How sadmann7/skateshop works
Main System Components
a) Frontend Layer
• Next.js 14 App Router Structure
• Lobby Section (public-facing storefront)
• Dashboard Section (seller/admin interface)
• Auth Section (authentication flows)
• Checkout Section (cart and payment flows)
b) API Layer
• API Routes (/api)
• Webhook handlers
• Email services
• Image generation (OG)
• File upload endpoints
c) Database Layer
• Drizzle ORM
• PlanetScale Database
• Schema relationships for:
• Products
• Orders
• Customers
• Stores
• Carts
• Categories
d) External Services
• Clerk (Authentication)
• Stripe (Payments)
• uploadthing (File Storage)
• Resend (Email)
• Contentlayer (Content Management)
Component Relationships
a) Client-Server Flow
• Frontend components → API Routes → Database
• Authentication flow through Clerk
• Payment flow through Stripe
• File upload flow through uploadthing
b) Data Flow
• Product management flow
• Order processing flow
• Cart management flow
• Content delivery flow
Specific Implementation Details
a) Next.js App Router Structure (Blue)
• Route groups: (auth), (dashboard), (checkout), (lobby)
• Dynamic routes with parameters
• API routes structure
b) Database Schema (Green)
• Main tables and their relationships
• Fields and foreign keys
• Indexes and constraints
c) External Services Integration (Orange)
• Auth flows with Clerk
• Payment processing with Stripe
• File storage with uploadthing
• Email handling with Resend
Architectural Patterns
Following patterns:
• Next.js App Router architecture
• Server-side rendering strategy
• API route organization
• Database schema design
• Content management workflow
• Authentication flow
• Payment processing flow
Implementation Notes
Notes regarding:
• Environment variables and configuration
• Development vs. production considerations
• Security implementations
• Performance optimizations
• Scaling considerations