Project overview
The client operates 140+ physical stores and a growing online channel that accounted for 22% of revenue. Their e-commerce platform was a heavily customised monolith that had become the single biggest constraint on the digital roadmap.
CodeQube was engaged to design and deliver a headless replacement, migrate the product catalogue and customer accounts, and hand over a platform the client’s own team could operate.
Business problem
Where the client started.
Release cycles of 6–8 weeks due to a shared monolith and manual regression testing, making seasonal campaigns hard to execute.
Median page load of 4.8s on mobile and a Lighthouse performance score in the low 30s, suppressing both conversion and organic ranking.
Inventory across stores and warehouses synced hourly by batch job, leading to oversells and cancellations at peak.
No design system; the storefront, loyalty portal and store-locator each had their own component implementations.
Proposed solution
What we proposed, and why.
A headless architecture separating the customer experience layer (Next.js) from commerce services via a GraphQL backend-for-frontend.
Event-driven inventory synchronisation using Kafka, with near-real-time stock levels surfaced on product and checkout pages.
A tokenised design system shared across storefront, loyalty and store tools, with accessibility baked into every component.
A strangler-pattern migration in which routes moved to the new platform incrementally behind an edge router, allowing per-route rollback.
Architecture
How the system is put together.
Edge-rendered Next.js storefront talking to a GraphQL BFF that aggregates commerce, search, inventory and content services. Inventory events flow over Kafka from the store POS and warehouse systems into a materialised stock service.
Technology stack
Backend, frontend, data and cloud.
Challenges faced
What got in the way, and how we dealt with it.
Challenge
Customer data lived in the monolith’s database with bespoke password hashing and no export tooling.
Resolution
Built a dual-write bridge and lazy password re-hash on first login. Accounts migrated silently over eight weeks with no forced resets.
Implementation details
How delivery was sequenced.
- 1
Discovery & architecture (weeks 1–4)
Event-storming workshops with merchandising, stores and digital teams; C4 architecture and ADRs agreed with the client architecture board.
- 2
Foundation (weeks 5–10)
AWS landing zone and EKS platform via Terraform, CI/CD with preview environments, design system v1 with 40 components.
- 3
Incremental delivery (weeks 11–26)
Two-week sprints migrating routes in priority order: PLP, PDP, search, cart, checkout, account. Each route shadow-tested before traffic switch.
- 4
Hardening & launch (weeks 27–30)
Load tests to 5× peak, penetration test, accessibility audit, and rehearsed cutover for the final checkout route ahead of the holiday season.
Non-functional requirements
Security and scalability considerations.
Security
- PCI DSS scope minimised by tokenising payments through a hosted provider; no card data touches CodeQube-built services.
- WAF, rate limiting and bot management at the edge; OWASP ASVS L2 controls verified by third-party penetration test.
- Secrets managed in AWS Secrets Manager with short-lived IAM roles per service; no static credentials in pipelines.
Scalability
- Horizontal pod autoscaling on EKS with pre-warmed capacity for known campaign windows.
- ISR and edge caching serve 92% of page views without hitting origin services.
- Kafka partitioning by store allows inventory throughput to scale linearly with the store estate.
Results & business impact
What it delivered.
Business impact
- Online revenue share grew from 22% to 34% within two quarters of launch.
- Oversell-related cancellations reduced by 88% due to real-time inventory.
- The client’s in-house team now ships independently; CodeQube retained for platform advisory.
More case studies