How mentalwz/comfort-me2 works
Main Components
a) Client-Side Layer:
• Next.js Frontend (App Router based)
• UI Components (shadcn/ui + Tailwind CSS)
• Authentication Interface
• Chat Interface
• File Upload Interface
b) Server-Side Layer:
• Next.js Server Components
• Server Actions
• Authentication System (NextAuth.js)
• API Routes
c) External Services:
• AI Models Integration (AI SDK)
• Vercel Postgres Database
• Vercel Blob Storage
• Authentication Providers
[Frontend Layer]
• ↑↓
[Server Layer]
• ↑↓
[External Services Layer]
Detailed Component Breakdown
Frontend Layer (Top):
• Chat Interface (/app/(chat))
• Authentication Pages (/app/(auth))
• Shared Components (/components)
• Use rounded rectangles for React components
Server Layer (Middle):
• API routes (/app/api/*)
• Server Actions
• Authentication middleware
• AI integration handlers
• Database queries and operations
External Services (Bottom):
• AI Model Providers (OpenAI, etc.)
• Vercel Postgres
• Vercel Blob Storage
• Auth Providers
Additional Elements
• Version information
• Environment configuration dependencies
• Real-time features with special indicators