How bhanu1776/casecanvas works
Main Components
Frontend Layer:
• Next.js Application (Client-Side)
• Pages/Routes structure (/dashboard, /configure, /thank-you)
• UI Components (shadcn, HeadlessUI)
• Client-side state management
• Analytics integration
API Layer:
• Next.js API Routes
• Authentication endpoints
• Protected routes
• Public routes
• Webhook handlers
• File upload handling
Backend Services:
• Authentication Service (Kinde Auth)
• Database Layer (PostgreSQL via NeonDB)
• File Storage (Uploadthing)
• Email Service (Resend)
• Payment Processing (Stripe)
• Analytics (Google Analytics)
┌─────────────────────────────────────────────────────────┐
• Client Layer (Browser) │
• ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
• Public │ │ Protected │ │Configuration │ │
• Pages │ │ Pages │ │ Pages │ │
• ┘ └─────────────┘ └─────────────┘ │
• ┘
┌───────────────────────▼───────────────▼────────────────┐
• API Layer │
• ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
• Auth API │ │ Protected │ │ Public │ │
• Routes │ │ Routes │ │ Routes │ │
• ┘ └─────────────┘ └─────────────┘ │
• ┘
┌───────▼───────────────▼───────────────▼────────────────┐
• External Services │
• ┌──────────┐ ┌─────────┐ ┌────────┐ ┌──────────────┐ │
• Kinde Auth│ │ NeonDB │ │Stripe │ │ Uploadthing │ │
• ┘ └─────────┘ └────────┘ └──────────────┘ │
• ┘
Important Flows to Highlight
Authentication Flow:
• Path from client → Kinde Auth → API → Database
• Protected routes and public routes
Data Flow:
• File upload path through Uploadthing
• Payment processing through Stripe
• Email notifications via Resend
Technical Details
• Prisma ORM layer between API and Database
• PWA capabilities
• React Query for data fetching
• TailwindCSS for styling
• Zod for validation
Infrastructure Notes
• Serverless deployment
• CDN integration
• Static vs dynamic routes
• Development tools integration
• How authentication flows through the system
• Where and how data is stored
• How different services interact
• Security boundaries and protected resources
• The role of each external service