Skip to content

OpticWorks Store Overview

The OpticWorks Store is our production e-commerce platform for selling mmWave presence sensors and accessories. It combines a modern Next.js 15 storefront with a Medusa v2 backend.

EnvironmentURLPurpose
Production Storeoptic.worksCustomer-facing store
Admin Dashboardapi.optic.worksOrder management
Staging Storestaging.optic.worksQA testing

The OpticWorks Store handles the complete customer journey:

  1. Product Discovery - Browse our mmWave sensor products
  2. Cart Management - Add items, apply discounts
  3. Checkout - Secure payment via Stripe
  4. Order Fulfillment - Automated shipping label generation
  5. Tracking - Real-time shipment tracking
  6. Email Notifications - Order confirmation, shipping updates
TechnologyPurpose
Next.js 15React framework with App Router
React 19UI components
Tailwind CSS 4Styling
Shadcn UIComponent library
Cloudflare WorkersEdge deployment
TechnologyPurpose
Medusa v2E-commerce engine
PostgreSQL 17Primary database
Redis 7Caching and sessions
Node.js 20Runtime
Hetzner CloudInfrastructure
ServicePurpose
StripePayment processing
EasyPostShipping rates and labels
ResendTransactional emails
HookdeckWebhook management
┌─────────────────────────────────────────────────────────────────┐
│ Customer Browser │
└───────────────────────────────┬─────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────┐
│ Cloudflare Workers │
│ (Next.js Storefront) │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────────┐ │
│ │ Product │ │ Cart │ │ Checkout │ │
│ │ Pages │ │ Logic │ │ Flow │ │
│ └─────────────┘ └─────────────┘ └─────────────────────────┘ │
└───────────────────────────────┬─────────────────────────────────┘
│ API Calls
┌─────────────────────────────────────────────────────────────────┐
│ Hetzner Cloud │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Medusa v2 │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │ │
│ │ │ Orders │ │ Products │ │ Fulfillment │ │ │
│ │ │ Service │ │ Service │ │ Service │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────────┘ │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌─────────────────┐ ┌─────────────────────────┐ │
│ │ PostgreSQL 17 │ │ Redis 7 │ │
│ └─────────────────┘ └─────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
┌─────────────────┼─────────────────┐
▼ ▼ ▼
┌───────────┐ ┌───────────┐ ┌───────────┐
│ Stripe │ │ EasyPost │ │ Resend │
│ Payments │ │ Shipping │ │ Emails │
└───────────┘ └───────────┘ └───────────┘
  • Multiple product variants (colors, bundles)
  • Inventory tracking
  • Product images via Cloudflare Images
  • SEO-optimized product pages
  • Persistent cart across sessions
  • Guest checkout support
  • Discount code application
  • Real-time inventory validation
  • Stripe Elements integration
  • Deferred payment intent pattern
  • Address validation
  • Real-time shipping rate calculation
  • Automatic shipping label generation
  • EasyPost rate shopping
  • Tracking number sync
  • Fulfillment status updates
  • Order confirmation
  • Shipping confirmation with tracking
  • Delivery notifications
  • Review requests
opticworks-store/
├── apps/
│ └── storefront/ # Next.js frontend
│ ├── app/ # App Router pages
│ ├── components/ # React components
│ └── lib/ # Utilities
├── packages/
│ └── medusa-backend/ # Medusa customizations
│ ├── src/
│ │ ├── api/ # Custom API routes
│ │ ├── jobs/ # Background jobs
│ │ ├── services/ # Custom services
│ │ └── subscribers/ # Event handlers
│ └── medusa-config.ts
├── infra/
│ └── ansible/ # Deployment playbooks
├── e2e/ # Playwright tests
├── docs/ # Documentation
└── pnpm-workspace.yaml
RoleResponsibility
Frontend EngineersNext.js storefront, UI/UX
Backend EngineersMedusa customizations, integrations
DevOpsInfrastructure, deployments
ProductCatalog management, pricing
  1. Review the Architecture documentation
  2. Set up your Development Environment
  3. Understand Deployment & Operations