Context
Farmbyte required a scalable eCommerce platform to connect consumers directly with Agrofood products. The platform needed to handle growing traffic while maintaining reliability for both the customer-facing portal and the internal CMS used by operations teams.
Constraints
- Expected traffic growth requiring horizontal scalability from day one
- Multiple frontend consumers (customer portal, CMS) requiring a clean API contract
- Migration from on-premise servers to AWS cloud infrastructure
- Stress testing requirements to validate platform reliability before launch
- Decoupled environments needed for development, staging, and production
Architecture
The system was designed as a decoupled API-first architecture with Laravel Octane powering the backend APIs. The eCommerce APIs serve both the customer portal and the CMS, with PostgreSQL as the primary data store and Amazon S3 for asset management.
Key Decisions
- Laravel Octane: Chosen for its persistent worker model, significantly reducing response times for API-heavy workloads compared to traditional PHP request lifecycles.
- PostgreSQL over MySQL: Selected for better support of complex queries, JSON operations, and data integrity features critical to eCommerce transactions.
- Decoupled on-premise environments: Maintained separate dev, staging, and production environments to ensure deployment confidence and reduce risk of production incidents.
- Stress testing with Locust: Validated platform reliability under load before launch, identifying bottlenecks in database queries and API response handling.
Security & Reliability
- Secure coding standards applied across all API development
- CI/CD pipelines with quality gates for automated deployment
- Database-level constraints and validation for transaction integrity
- S3 bucket policies and access controls for asset management
Execution
- Designed the system architecture and planned feature sprints
- Developed robust eCommerce APIs powering both customer portal and CMS
- Architected and configured cloud infrastructure on AWS, including migration from on-premise servers
- Built and maintained decoupled on-premise environments (dev, staging, production)
- Conducted stress testing with Locust for platform reliability
- Led technical discussions, documentation, and knowledge transfer sessions
Outcome
- Enabled Farmbyte to launch a secure, scalable platform capable of handling growing traffic
- Successfully migrated from on-premise to AWS cloud infrastructure
- Stress testing validated the platform could handle projected load with headroom
- Architecture documentation and knowledge transfer ensured long-term maintainability