How andymutale/store works
Store is a full-stack sporting-goods commerce app. The main customer journey runs from catalogue discovery and variant selection through a persistent cart, server-driven checkout, Stripe confirmation, and fulfilment-oriented order records. Separate branches cover customer accounts and store administration. Source excerpts and the SOURCE INDEX substantiate the cart, authentication, and payment-confirmation links; checkout internals and several documented capabilities are represented at their exact enclosing directories because their implementation was not sampled.
Main entry points: db.ts Prisma database · products Product discovery · stripe-webhook.ts Payment webhook · cart.ts Cart actions
Components 23
Storefront
- Product discovery
src/app/(customerFacing)/products - Product detail
src/app/(customerFacing)/products/[slug]
Commerce
- Cart review
src/app/(customerFacing)/cart - Cart actions
src/app/_actions/cart.ts - Cart service
src/lib/cart.ts - Checkout
src/app/(customerFacing)/checkout - Checkout actions
src/app/_actions/checkout.ts - Stripe payments
src/lib/stripe.ts - Payment webhook
src/lib/stripe-webhook.ts - Order confirmation email
src/email/OrderConfirmation.tsx - Stripe webhook route
src/app/webhooks/stripe/route.ts
Accounts
- Order history
src/app/(customerFacing)/account/orders - Account management
src/app/(customerFacing)/account - Authentication actions
src/app/_actions/auth.ts - Session service
src/lib/auth.ts
Store operations
- Admin dashboard
src/app/admin - Catalog management
src/app/admin/_actions/products.ts - Order management
src/app/admin/_actions/orders.ts - Fulfilment operations
src/app/admin/orders
Runtime services
- Prisma database
src/lib/db.ts - Currency formatters
src/lib/formatters.ts
Other components
- Shopper
- Stripe
Connections 26
- Shopper → Product discovery: browses
- Product discovery → Product detail: opens product
src/app/(customerFacing)/products/page.tsx - Product detail → Cart actions: adds variant
src/app/(customerFacing)/products/[slug]/_components/ProductActions.tsx - Cart actions → Cart service: updates cart
src/app/_actions/cart.ts - Cart review → Cart service: loads cart
src/app/(customerFacing)/cart/page.tsx - Cart review → Checkout: proceeds to
src/app/(customerFacing)/cart/page.tsx - Shopper → Checkout: submits details
- Checkout → Checkout actions: submits checkout
- Checkout actions → Stripe payments: creates intent
- Stripe payments → Stripe: creates payment
- Stripe → Stripe webhook route: sends event
- Stripe webhook route → Payment webhook: dispatches handler
- Payment webhook → Prisma database: updates order and stock
src/lib/stripe-webhook.ts - Payment webhook → Cart actions: clears guest cart
src/lib/stripe-webhook.ts - Payment webhook → Order confirmation email: sends confirmation
src/lib/stripe-webhook.ts - Order history → Prisma database: reads orders
- Account management → Session service: requires session
src/app/(customerFacing)/account/page.tsx - Authentication actions → Session service: creates session
src/app/_actions/auth.ts - Session service → Prisma database: stores sessions
src/lib/auth.ts - Admin dashboard → Prisma database: reads metrics
src/app/admin/page.tsx - Catalog management → Prisma database: manages catalogue
- Order management → Prisma database: manages orders
- Order management → Fulfilment operations: supports fulfilment
src/app/admin/orders/_components/OrderStatusForm.tsx - Product discovery → Prisma database: reads catalogue
src/app/(customerFacing)/products/page.tsx - Product discovery → Currency formatters: formats prices
src/app/(customerFacing)/products/[slug]/page.tsx - Order confirmation email → Currency formatters: formats totals
src/email/OrderConfirmation.tsx