SYA Store — Medusa v2 & Next.js 15
A high-performance ecommerce platform combining Medusa v2.17.2 backend with a responsive Next.js 15 App Router storefront.
Dual-Engine System Architecture
Engineered as an enterprise-grade monorepo cleanly isolating backend commerce mechanics from dynamic presentation layers.
Commerce Engine & Workflow Server
Autonomous commerce backbone delivering automated SKU deduplication, strict option normalization, transaction orchestration, and localized payment rails.
- Automated SKU normalization & write-time middleware
- Title-case option value sanitation & audit CLI
- PostgreSQL database & Redis event bus / cache
- Resend transactional email workflows
- Stripe & Lenco payment provider extensions
Editorial Front-End Experience
High-performance React 19 storefront featuring partial prerendering, frosted-glass interactive navigation, and instant Google One Tap auth.
- Frosted-glass responsive navigation & account drawer
- Instant Google OAuth with FedCM token reject fallbacks
- Intelligent checkout autofill & priority address resolution
- Dynamic shipping labels from cart.shipping_methods
- Full wildcard product hydration with zero layout shift
Key Features & Architectural Enhancements
Every feature was engineered to eliminate edge-case friction, ensure database integrity, and deliver frictionless customer conversion.
SKU Duplication Prevention & Sanitization
Large-scale ecommerce databases frequently suffer from SKU drift due to whitespace padding, casing inconsistencies, or non-printable unicode artifacts. We engineered a write-time middleware interceptor and automated CLI that enforces strict SKU hygiene before database persistence.
- Sanitizes strings by trimming and collapsing irregular whitespace
- Removes non-printable unicode artifacts and standardizes casing
- Write-time middleware intercepts /admin/products endpoints
- Safe audit and merge CLI script (sku-audit.ts)
- Automated Jest regression test coverage
Product Option Value Normalization
Prevents duplicate variant attributes (such as 'Red', 'RED', and ' Red ') from fragmenting store analytics, inventory tracking, and client-side faceted filtering. Sanitizes all incoming option values to standard title-case formatting.
- Standardizes option strings prior to variant association
- Automated dry-run audit CLI (option-value-audit.ts)
- Safe merge flag to consolidate orphaned duplicate values
- Comprehensive Jest test suite verifying edge cases
Smart Checkout Auto-Fill
A frictionless multi-step checkout experience that prioritizes customer profile defaults while gracefully falling back to recent successful order addresses without destructive overwrites.
- Dynamic address resolution hierarchy reducing cart friction
- Non-destructive progressive disclosure for Company & Address Line 2
- Maintains customer address profiles intact across sessions
- Instant Google Places autocomplete integration
Dynamic Shipping Method Resolution
Eliminates hardcoded delivery assumptions. Resolves carrier pricing and delivery timelines dynamically across Cart, Checkout, Order Review, Payment, and Confirmation screens.
- Zero hardcoded delivery estimates or carrier labels
- Direct query bindings to cart.shipping_methods
- Multi-region dynamic tax and tariff alignment
- Accurate real-time receipt generation
Identity, Google One Tap & Responsive Navigation
A bespoke frosted-glass navigation bar featuring dynamic user greetings ('Hi, {firstName}'), quick order lookups, and resilient Google One Tap authentication engineered to bypass FedCM token rejections in incognito sessions.
- Account drawer with Profile, Orders, and Address books
- Synchronous NextAuth & Medusa session termination
- Custom sya:auth cross-component event dispatcher
- Resilient fallback for partitioned cookie environments
Full Product Hydration
Leverages Medusa remote query field wildcards (*) to ensure complete hydration of dimensional metadata, weight classifications, care materials, and inventory specifications across all device viewports.
- Zero layout shifts during dynamic specification rendering
- Deep query hydration for dimensions, weight, and materials
- Graceful degradation for partial inventory entries
- High-efficiency client-side memoization
Production-Ready Connectors
Pre-wired integrations spanning identity, communications, payment gateways, geographic validation, search, and storage.
Google OAuth + Google One Tap
NextAuth + Medusa JWT cross-session synchronization with FedCM fallback.
Resend & React Email
Bespoke transactional email templates for order creation, fulfillment, and receipts.
Stripe & Lenco Gateways
Multi-currency checkout supporting credit, debit, and localized African payment rails.
Google Maps Places API
Real-time address autocomplete and geographic postal verification.
Meilisearch Engine
Instant typo-tolerant search indexing products, variants, and categories.
S3-Compatible Storage
Seamless asset hosting via Railway Buckets, Cloudflare R2, AWS S3, or MinIO.
Local Setup, CLI Audits & Cloud Deployment
Comprehensive developer instructions for running local infrastructure, bootstrapping the backend, executing audit CLIs, and launching on Railway.
Local Infrastructure
Root docker-compose.yml orchestrating PostgreSQL, Redis, Meilisearch, and MinIO storage.
docker compose up -dNote: Exposes MinIO Console at http://localhost:9005 (medusa / supersecret) and Meilisearch at http://localhost:7700.
One-Click Deployment on Railway
SYA Store includes native Nixpacks / Dockerfile profiles optimized for Railway. Link the repository to automatically provision Postgres, Redis, and unified container instances.