How pranjalpruthi/pdsr works
Main Components
A. Frontend Layer:
• Client-Side Components (React/Next.js)
• Public Pages (/, /sign-in, /sign-up)
• Protected Dashboard (/dashboard/*)
• Auth Components
• UI Components Library
• Payment Flow Pages (success/cancel)
B. Backend Layer:
• API Routes
• Auth Webhook Handler
• Payment Routes
• Protected API Endpoints
C. External Services:
• Clerk (Authentication)
• Stripe (Payments)
• Supabase (Database)
• Prisma (ORM)
[Client Layer]
• ↕
[Server Layer]
• ↕
[External Services]
Detailed Component Relationships
Frontend → Backend:
• API route connections
• Protected routes with auth middleware
• Form submissions and data fetching paths
Backend → External Services:
• Auth verification flows with Clerk
• Payment processing with Stripe
• Database operations through Prisma to Supabase
Implementation Details
[📱] Frontend Components
[🔒] Auth Protected Routes
[⚡] API Endpoints
[💾] Database
[🔌] External Services
[🔄] Middleware
Key Relationships to Highlight
• Auth flow: Client → Clerk → Middleware → Protected Routes
• Payment flow: Client → Stripe → Webhook → Database
• Data flow: Client → API Routes → Prisma → Supabase
Additional Elements
• Error handling paths
• Rate limiting implementation
• Environment variable dependencies
• Webhook processing flows
• Security boundaries
• Data flow directions
• Service interactions
• State management
• Cache layers (if any)
• API boundaries