Webskyne
Webskyne
LOGIN
← Back to journal

26 May 2026 • 9 min read

Building a Scalable E-commerce Platform with Flutter, NestJS, and AWS

Webskyne partnered with a mid-size retail client to transform their legacy PHP e-commerce system into a modern, scalable platform using Flutter for cross-platform mobile apps, NestJS for a modular backend architecture, and AWS managed services for cloud infrastructure. The legacy system suffered from slow page load times (averaging 4.5 seconds), limited scalability during peak seasons, and lack of native mobile support. Over a six-month development cycle, the team delivered a production-ready platform that achieved sub-2-second page load times for 95% of requests, supported automatic horizontal scaling for up to 50,000 concurrent users, and provided native iOS and Android applications from a single Flutter codebase. The solution leveraged AWS services including Aurora Serverless v2 for database scaling, ElastiCache for caching, S3/CloudFront for static assets, and Fargate for containerized backend services. Post-launch metrics demonstrated significant improvements: page load times reduced from 4.5 seconds to an average of 1.8 seconds for dynamic calls, conversion rates increased by 18%, gross merchandise volume grew 34% quarter-over-quarter, and operational costs decreased by 28%. The platform successfully integrated with the client's existing ERP system and provided a seamless omnichannel experience where cart, wishlist, and user preferences synced across devices.

Case Studye-commerceFlutterNestJSAWSscalabilitymobile developmentcloud infrastructure
Building a Scalable E-commerce Platform with Flutter, NestJS, and AWS
Building a Scalable E-commerce Platform with Flutter, NestJS, and AWS Overview In the rapidly evolving digital marketplace, businesses require robust, scalable, and user-friendly e-commerce solutions to stay competitive. This case study examines how Webskyne, a full‑service development agency, partnered with a mid‑size retail client to build a cross‑platform e‑commerce application that seamlessly integrates a Flutter‑based mobile frontend, a NestJS‑powered backend, and Amazon Web Services (AWS) for cloud infrastructure. Over a six‑month development cycle, the team delivered a production‑ready platform that supports over 10,000 concurrent users, processes thousands of daily transactions, and provides a cohesive shopping experience across iOS, Android, and web browsers. Challenge The client’s legacy e‑commerce system was a monolithic PHP application hosted on a single virtual machine. It suffered from frequent performance bottlenecks during peak shopping seasons, limited mobile support, and a cumbersome deployment process that required manual server updates. Key pain points included: - Slow page load times (averaging 4.5 seconds) leading to high bounce rates. - Inability to scale horizontally; traffic spikes caused server crashes. - Lack of a native mobile app, forcing customers to rely on a non‑responsive mobile web site. - Deployment risks: each release required downtime and often introduced bugs. - Difficulty integrating third‑party services such as payment gateways, inventory management, and analytics due to tight coupling. Goals The project aimed to transform the client’s online store into a modern, scalable, and future‑proof platform with the following objectives: 1. Achieve sub‑2‑second page load times for 95% of requests under normal load. 2. Support automatic horizontal scaling to handle traffic surges of up to 50,000 concurrent users. 3. Deliver native iOS and Android applications built from a single Flutter codebase, sharing business logic with the web version. 4. Implement a micro‑service‑style backend using NestJS to enable independent deployment and easier maintenance. 5. Leverage AWS managed services (RDS, ElastiCache, S3, CloudFront, etc.) to reduce operational overhead. 6. Establish a CI/CD pipeline that enables zero‑downtime deployments and automated rollback. 7. Provide a seamless omnichannel experience where cart, wishlist, and user preferences sync across devices. 8. Reduce operational costs by 30% through optimized resource utilization and managed services. Approach Webskyne adopted a domain‑driven design (DDD) approach, breaking the system into bounded contexts such as Catalog, Order, Payment, User, and Inventory. Each context was implemented as a separate NestJS module, communicating via lightweight DTOs and asynchronous events where appropriate. The frontend adopted a clean architecture with feature‑based Flutter modules, using Riverpod for state management and GoRouter for navigation. On the infrastructure side, the team selected AWS services that aligned with the goals of scalability, reliability, and cost‑efficiency: - Amazon Aurora (PostgreSQL‑compatible) for the primary relational database, with read replicas for scaling read‑heavy workloads. - Amazon ElastiCache (Redis) for session storage, caching frequently accessed product data, and rate‑limiting. - Amazon S3 for static assets (images, videos, CSS/JS) served via Amazon CloudFront CDN. - AWS Fargate for running NestJS containers, allowing the team to focus on application code without managing EC2 instances. - Application Load Balancer (ALB) to distribute traffic across multiple Fargate tasks and enable SSL termination. - Amazon Cognito for user authentication, authorization, and social login integration. - AWS CodePipeline, CodeBuild, and CodeDeploy to automate build, test, and deployment stages. - Amazon CloudWatch for logging, metrics, and alarms; AWS X‑Ray for distributed tracing. The development process followed Scrum with two‑week sprints, daily stand‑ups, and bi‑weekly sprint reviews with the client. Continuous feedback loops ensured that the evolving product matched business expectations. Implementation The implementation phase was divided into four parallel tracks: backend services, frontend applications, infrastructure as code (IaC), and DevOps automation. Backend (NestJS) - Created a monorepo using Nx to share libraries and enforce linting/formatting standards. - Each microservice (Catalog, Order, Payment, etc.) was a NestJS application with its own database schema where logical separation benefited performance. - Used TypeORM for ORM, with migrations managed via TypeORM CLI. - Implemented JWT‑based authentication guarded by NestJS AuthModule, integrating with Amazon Cognito user pools. - Employed NestJS microservices (TCP/Redis) for inter‑service communication where eventual consistency was acceptable (e.g., updating inventory after order placement). - Integrated third‑party APIs: Stripe for payments, Twilio for SMS notifications, and a custom ERP system via REST/WebSocket. - Wrote unit tests with Jest and integration tests using SuperTest; achieved 85%+ code coverage. - Dockerized each service with multi‑stage builds to keep image sizes under 150 MB. Frontend (Flutter) - Structured the Flutter project using the feature‑slice pattern: each feature (home, product catalog, cart, checkout, profile) lived in its own folder with UI, business logic, and widgets. - Leveraged Riverpod for state management, allowing selective rebuilds and easy testing. - Used GoRouter for declarative navigation, supporting deep links and web URL strategy. - Created a shared Dart package for data models and API clients, consumed by both mobile and web builds. - Implemented responsive design with LayoutBuilder and MediaQuery to adapt to various screen sizes. - Optimized images with flutter_native_splash and cached_network_image; used WebP format where supported. - Added accessibility features: semantic labels, sufficient contrast, and scalable fonts. - Conducted widget tests with flutter_test and integration tests using flutter_driver. - Built release binaries for iOS (IPA) and Android (AAB) using Flutter’s build commands; enabled app‑bundles for smaller download sizes. Infrastructure (AWS & IaC) - Defined infrastructure as code using AWS CloudFormation (YAML) and supplemented with AWS CDK (TypeScript) for higher‑level abstractions. - Created separate stacks for networking (VPC, subnets, IGW, NAT), database (Aurora cluster), caching (ElastiCache), and compute (ECS/Fargate services). - Configured Aurora Serverless v2 to automatically scale compute capacity based on workload, reducing idle costs. - Set up ElastiCache cluster with automatic failover and read‑replica support. - Configured S3 buckets with versioning, lifecycle policies (transition to Glacier after 90 days), and public‑read access for static assets. - Deployed CloudFront distribution with origin access identity (OAI) to secure S3 origins, and added Lambda@Edge for header manipulation and basic A/B testing. - Established ECS cluster with Fargate launch type; defined task definitions for each NestJS service, specifying CPU/memory, environment variables, and log drivers. - Configured ALB with target groups per service, path‑based routing, and HTTPS listener using ACM‑issued certificates. - Integrated Cognito user pool with hosted UI for sign‑up/sign‑in; added app clients for web and mobile. - Built CI/CD pipeline: CodePipeline sourced from GitHub, CodeBuild ran unit tests and built Docker images, CodeDeploy (ECS) deployed new task definitions with blue/green deployment strategy. - Enabled automated rollback on CloudWatch alarm thresholds (e.g., elevated 5XX errors or latency). - Set up CloudWatch dashboards for real‑time monitoring of key metrics: request latency, error rates, database connections, cache hit ratio, and ETS CPU utilization. - Enabled AWS X‑Ray tracing on NestJS services via AWS SDK; sampled traces to analyze latency bottlenecks. Results After eight weeks of intensive development and two weeks of performance testing and user acceptance testing (UAT), the platform was launched to a beta audience of 5,000 users. Key outcomes included: - Page load times reduced from 4.5 seconds to an average of 1.2 seconds (static assets) and 1.8 seconds (dynamic API calls), exceeding the sub‑2‑second goal. - During a simulated Black‑Friday traffic spike (50,000 concurrent virtual users), the system maintained 99.9% availability with average response time under 2.5 seconds; Aurora Serverless v2 scaled compute units automatically within 30 seconds. - Mobile apps achieved 4.8‑star rating on iOS App Store and 4.6‑star on Google Play Store, with over 12,000 downloads in the first month. - Deployment frequency increased from bi‑weekly manual releases to daily automated pushes; mean time to recovery (MTTR) dropped from 4 hours to under 15 minutes thanks to blue/green deployments and automated rollback. - Operational costs decreased by 28% compared to the legacy VM‑based setup, primarily due to rightsizing, reserved instances for baseline workloads, and pay‑as‑you‑go pricing for serverless components. - Conversion rate (visits to completed purchase) improved by 18% after launch, attributed to faster load times and smoother checkout flow. - Customer support tickets related to performance issues fell by 72% in the first two months post‑launch. - The platform successfully integrated with the client’s existing ERP system, synchronizing inventory levels every five minutes via a NestJS‑based middleware. Metrics Quantitative metrics collected over the first three months of production: - **Requests per second (RSS):** Peak 12,400 RSS during flash sales; average 3,400 RSS. - **Average latency:** 95th percentile API latency 1.6 seconds; 99th percentile 2.9 seconds. - **Error rate:** <0.1% 5XX errors; 0.4% 4XX errors (mostly client‑side validation). - **Database:** Aurora read replica lag <100 ms; write throughput 2,400 writes/sec. - **Cache:** ElastiCache hit ratio 92%; average get latency 1.2 ms. - **Mobile:** Crash‑free sessions 99.8%; average session length 4.7 minutes. - **DevOps:** Lead time for changes <20 minutes; deployment failure rate 0.5%; time to restore service <10 minutes. - **Business:** Gross merchandise volume (GMV) increased 34% quarter‑over‑quarter; average order value (AOV) rose 12%; customer retention rate (30‑day) improved from 62% to 71%. Lessons Learned 1. **Invest in observability early.** Implementing distributed tracing (X‑Ray) and detailed logging from day one made it trivial to pinpoint latency issues during load testing. 2. **Choose the right scaling mechanism.** Aurora Serverless v2 proved ideal for unpredictable workloads, while fixed‑size Fargate services suited steady‑state APIs. Mixing both optimized cost and performance. 3. **Automate database migrations.** Using TypeORM CLI with GitHub Actions ensured migrations were applied consistently across environments, preventing drift. 4. **Feature toggles reduce risk.** Launching dark features (e.g., new recommendation engine) behind flags allowed testing in production without affecting all users. 5. **Responsive design is non‑negotiable.** Prioritizing Flutter’s adaptive layout widgets saved significant rework when expanding to tablet and web form factors. 6. **Managed services ≠ zero maintenance.** While AWS managed services reduced operational burden, they still required monitoring, capacity planning, and cost‑optimization reviews. 7. **Cross‑team communication is crucial.** Regular syncs between backend, frontend, and DevOps teams prevented integration surprises and ensured that API contracts were respected. 8. **Performance budgeting guides development.** Setting explicit performance targets (e.g., <2 seconds API response) influenced architectural decisions such as caching strategies and payload sizes. 9. **Plan for data migration early.** Migrating legacy product and customer data required careful scripting and validation; allocating dedicated sprints for this avoided last‑minute rushes. 10. **Celebrate incremental wins.** Recognizing milestones (e.g., first successful blue/green deployment, achieving sub‑second latency) kept team morale high during a long‑term project. Conclusion By combining Flutter’s cross‑platform UI capabilities, NestJS’s modular backend architecture, and AWS’s scalable managed services, Webskyne delivered a modern e‑commerce platform that met—and exceeded—the client’s expectations. The solution not only resolved immediate performance and scalability challenges but also positioned the business for future growth, enabling rapid feature releases, seamless omnichannel experiences, and a solid foundation for integrating emerging technologies such as AI‑driven personalization and augmented reality shopping. The project serves as a blueprint for retailers seeking to transition from legacy systems to cloud‑native, composable commerce platforms.

Related Posts

Redesigning E-commerce Platform for EcoGoods: A Shopify Plus Transformation Case Study
Case Study

Redesigning E-commerce Platform for EcoGoods: A Shopify Plus Transformation Case Study

EcoGoods, a sustainable products retailer, partnered with Webskyne to redesign their aging Magento 1.x e-commerce platform. Through a comprehensive replatforming to Shopify Plus, mobile-first design system implementation, and checkout flow optimization, the transformation resulted in a 187% increase in conversion rate, 42% reduction in bounce rate, and 2.3x growth in average order value within six months. The project delivered enterprise-grade performance, PCI DSS compliance, and operational efficiency gains that enabled the marketing team to launch campaigns independently.

Modernizing Legacy Systems: A Microservices Migration Journey with AWS and NestJS
Case Study

Modernizing Legacy Systems: A Microservices Migration Journey with AWS and NestJS

This case study details how a mid-sized enterprise transformed its legacy monolithic application into a cloud-native microservices architecture using AWS services and the NestJS framework. The migration journey spanned six months, involved a cross-functional team of developers, architects, and DevOps engineers, and resulted in improved system performance, reduced operational costs, and enhanced developer productivity. By leveraging serverless technologies, container orchestration, and event-driven design patterns, the organization achieved a resilient, scalable foundation capable of supporting future growth and innovation.

Revitalizing E-Commerce: How Webskyne Boosted Sales by 150% for Trendify
Case Study

Revitalizing E-Commerce: How Webskyne Boosted Sales by 150% for Trendify

In this detailed case study, we explore how Webskyne partnered with Trendify, a struggling mid-sized e-commerce retailer, to overhaul their online presence. Through a comprehensive audit, strategic redesign, and targeted optimization efforts, we helped Trendify achieve a 150% increase in sales within six months. This case study delves into the challenges faced, the goals set, the approach taken, the implementation process, the results achieved, and the key lessons learned. Discover how data-driven decisions, user experience improvements, and performance optimizations transformed Trendify's digital storefront into a high-converting sales engine.