Lionheart Wholesale
Quantifiable Outcomes
Lionheart Wholesale
The Story
Lionheart Wholesale is a B2B e-commerce platform designed to help wholesale and retail operations move from manual workflows into a centralized digital platform.
The system provides a customer-facing wholesale storefront and an internal administration platform for managing customers, orders, inventory, and operational visibility.
I was responsible for the backend architecture, database design, technical planning, feature discussions, implementation decisions, deployment, testing, and post-release maintenance. A separate frontend developer handled the frontend implementation.
The first production version was delivered within approximately 2.5 months, followed by continuous improvements and feature enhancements based on business needs.
The Problem
The business needed a custom platform to support complex wholesale operations while maintaining visibility across different user groups and workflows.
The platform needed to support:
- Wholesale customers placing and managing orders.
- Retail stores moving inventory within the organization.
- Sales representatives managing customer relationships.
- Distribution teams handling operational workflows.
- Administrators managing the overall platform.
The main challenge was building a system that could support multiple business workflows while remaining simple enough to deliver quickly and flexible enough to evolve.
Architecture & Design
Modular Monolith Architecture
I designed the backend as a modular monolith using FastAPI.
This approach provided clear separation of responsibilities while avoiding the operational complexity of prematurely introducing distributed services.
The architecture allowed the platform to:
- Ship quickly within a strict timeline.
- Maintain clean and maintainable code boundaries.
- Support future scaling and service extraction if required.
The application was containerized using Docker and deployed within a private cloud environment on AWS.
Data Architecture
The platform uses a combination of databases based on application requirements:
- PostgreSQL serves as the primary application database for core business data.
- SQLite supports inventory-related workflows requiring lightweight local processing.
- MongoDB supports temporary inventory processing workloads.
Redis is used for application-level performance improvements, including caching, background processing, and rate limiting.
Product Features
Wholesale Storefront
The storefront provides a complete wholesale ordering experience, including:
- Product discovery and search.
- Featured products.
- Cart management.
- Order creation and management.
- Order history.
- Order updates during eligible order states.
- Requested delivery date selection.
Wholesale accounts can manage visibility across their associated sub-accounts, allowing larger organizations to manage purchasing activity across multiple locations.
Sales representatives can also place orders on behalf of assigned wholesale customers.
Administration Platform
The admin platform provides operational management across the business.
Dashboard
Provides visibility into:
- Sales performance.
- Sales representatives.
- Product performance.
- Profitability insights.
Order Management
Supports:
- Viewing and managing order workflows.
- Updating order states.
- Reviewing order details.
- Creating orders for retail locations.
Account Management
The account system supports:
- Customer registration workflows.
- Wholesale accounts and sub-account relationships.
- Retail store management.
- Sales representative assignments.
- Administrative account management.
The platform supports different operational roles with controlled access based on responsibilities.
Inventory Management
The inventory system provides:
- Inventory visibility.
- Availability rules based on customer type.
- Inventory categorization and tagging workflows.
Security Design
Security was a core consideration due to the number of user types and business workflows.
The platform was hardened with:
- Strong authentication and authorization flows.
- Strict role-based access control.
- Secure user management.
- Protected API endpoints.
- Input validation.
- Auditability of important actions.
- Secure communication and deployment practices.
Authorization was designed around user responsibilities and business relationships to ensure users only accessed permitted resources.
Performance & Reliability
The platform was optimized to support reliable day-to-day operations through:
- Database optimization.
- Efficient query design.
- Caching strategies.
- Asynchronous processing.
- Rate limiting.
- Application benchmarking using concurrent request testing.
Performance considerations were incorporated during development to ensure the system remained responsive while supporting future growth.
Infrastructure & Operations
The application was deployed using Docker-based infrastructure within a private cloud environment.
Operational reliability was supported through:
- Centralized application logging.
- Monitoring and observability using Prometheus and Grafana.
- Log aggregation through Loki.
- Automated backup workflows.
- Encrypted backup storage.
These systems provided visibility into application health and simplified ongoing maintenance after deployment.
Engineering Challenges
Managing Changing Requirements While Maintaining Consistency
The project required adapting to evolving business requirements while maintaining a consistent user experience and stable architecture.
The modular backend design helped accommodate changes without introducing unnecessary complexity.
Designing Complex User Workflows With Secure Access Control
Supporting multiple user types and business relationships required careful authorization design.
The system needed to balance flexibility for operational workflows while maintaining strict access boundaries.
Delivering Quickly Without Sacrificing Maintainability
The strict delivery timeline required thoughtful architectural decisions.
Choosing a modular monolith allowed rapid development while maintaining a foundation that could support future expansion.
Impact
The platform helped transform wholesale operations into a centralized digital workflow.
Key outcomes included:
- Improved visibility across ordering and inventory operations.
- Better accountability through structured workflows and permissions.
- Reduced reliance on manual operational processes.
- A scalable foundation for future platform improvements.
Specific business metrics are confidential and intentionally omitted.
Lessons Learned
Choosing Architecture Based on Current Needs While Planning for Growth
The project reinforced the importance of choosing architecture that matches current requirements while keeping future options open.
A modular monolith provided the right balance between development speed, simplicity, and long-term maintainability.
Balancing Delivery Speed With Engineering Quality
Fast delivery does not require sacrificing maintainability.
Clear architecture, strong security practices, and operational visibility allowed the platform to evolve while continuing to meet business requirements.