How allgoz/superwalls works
SuperWalls is a mobile-first online storefront with guest and registered checkout, online payment, customer accounts and a staff CMS. The main purchase path runs from browsing products through cart and checkout to a server-priced, stock-reserved order and payment, followed by order confirmation/tracking. Separate capabilities include editorial content, store administration, media uploads, analytics and external Supabase/Razorpay/R2 services. Edges are limited to README statements and shown source references; unsampled route and UI wiring is not inferred.
Main entry points: checkout.ts Order creation · db.ts Database access · checkout/route.ts Checkout endpoint · verify/route.ts Payment endpoints
Components 25
Storefront
- Storefront pages
src/app/(flow)/products/[id]/page.tsx - Cart
src/components/cart/cart-view.tsx - Customer accounts
src/lib/services/auth.ts
Commerce
- Checkout flow
src/components/checkout/checkout-flow.tsx - Checkout endpoint
src/app/api/checkout/route.ts - Order creation
src/lib/server/checkout.ts - Pricing rules
src/lib/commerce/pricing.ts - Payment adapters
src/lib/server/payments/index.ts - Payment endpoints
src/app/api/payments/verify/route.ts - Order status and tracking
src/app/api/orders/track/route.ts
Store administration
- Admin CMS
src/app/admin/(panel)/products/page.tsx - Admin API client
src/lib/admin/client.ts - Admin operations
src/lib/server/admin/ops/index.ts - Image upload endpoint
src/app/api/admin/upload/route.ts - Media storage
src/lib/server/admin/media.ts
Content and insights
- CMS pages and blog
src/lib/server/content.ts - Shop analytics
src/lib/analytics.ts
Server platform
- HTTP and errors
src/lib/server/http.ts - Server authentication
src/lib/server/auth.ts - Database access
src/lib/server/db.ts
Other components
- Shopper
- Supabase Auth
- Supabase Postgres
- Cloudflare R2
- Google Tag Manager
Connections 26
- Shopper → Storefront pages: browses
README.md - Shopper → Cart: shops with
- Shopper → Checkout flow: checks out
README.md - Checkout flow → Checkout endpoint: submits order
- Checkout endpoint → Order creation: delegates to
src/app/api/checkout/route.ts - Order creation → Pricing rules: calculates totals
src/lib/server/checkout.ts - Order creation → Database access: queries
src/lib/server/checkout.ts - Database access → Supabase Postgres: reads and writes
README.md - Order creation → Payment adapters: opens session
src/lib/server/checkout.ts - Shopper → Payment endpoints: pays online
README.md - Payment endpoints → Payment adapters: uses adapter
src/app/api/payments/verify/route.ts - Payment endpoints → Database access: records payment
- Shopper → Order status and tracking: tracks order
README.md - Customer accounts → Supabase Auth: authenticates
- Server authentication → Supabase Auth: validates token
src/lib/server/auth.ts - Admin CMS → Admin API client: uses mutations
- Admin API client → Admin operations: calls operation
src/lib/admin/client.ts - Admin CMS → Image upload endpoint: uploads media
README.md - Image upload endpoint → Media storage: stores image
src/app/api/admin/upload/route.ts - Media storage → Cloudflare R2: writes objects
README.md - Media storage → Supabase Postgres: saves public URL
README.md - Shopper → CMS pages and blog: reads content
README.md - Storefront pages → Shop analytics: emits shop events
- Shop analytics → Google Tag Manager: pushes data layer
README.md - Checkout endpoint → HTTP and errors: wraps response
src/app/api/checkout/route.ts - HTTP and errors → Database access: rate limits
src/lib/server/http.ts