The Buy Plan Platform supports Levi’s seasonal inventory planning across up to 500 franchise stores and 50–100 concurrent users. Planners work store by store through a four-level merchandise hierarchy (GenCat → Brick → Platform → Fit), editing Width and distribution percentages against AI-generated recommendations, with Depth derived automatically; admins manage users, monitor franchisee engagement, and export finished plans to Excel. Each planning season runs in its own isolated environment, so historical seasons remain intact while a new season is planned.
Architecturally it is a deliberately simple three-tier system: a React single-page application served from AWS Amplify, a NestJS modular-monolith API on a single EC2 instance (Docker), and Aurora Serverless PostgreSQL using a schema-per-environment pattern for seasonal isolation. Files (uploads and Excel exports) live in S3; transactional email (OTP login, onboarding) goes out through SendGrid. The design accepts single-instance trade-offs by choice — planning is seasonal, non-transactional work where brief off-peak interruptions are acceptable — and prioritizes operational simplicity and cost over high availability.
All client traffic over HTTPS/TLS 1.2+; no other public entry points. Line counts are application source excluding tests.
search_path selection for the caller’s seasonal schema → JWT guard → role guard → controller. The search path is reset when the connection returns to the pool, preventing cross-environment leakage.| Service | Type | Used for | Integration & failure policy |
|---|---|---|---|
| SendGrid | Third-party | OTP delivery, onboarding and notification email | SMTP via Nodemailer, API-key auth from environment variables (never logged); synchronous send with automatic retry for transient failures; email failures are audited and never block non-auth flows. |
| Aurora Serverless (PostgreSQL) | AWS platform | All application data | TLS connections, KMS encryption at rest, automated backups; schema-per-environment isolation. |
| S3 | AWS platform | Upload staging, generated Excel exports | SSE-S3 encryption, lifecycle expiry for export files; export jobs tracked with status and expiry in the database. |
| Amplify Hosting | AWS platform | Serving the React SPA | Managed CDN with automatic HTTPS and cache invalidation on deploy. |
| CloudWatch | AWS platform | Application, error, and access logs | Structured JSON logs with correlation IDs and sensitive-data masking; 30-day retention. |
There are no other external integrations — no third-party analytics, no payment systems, no outbound data sharing. The integration surface is intentionally minimal for a system of this scale.