How eniimz/cypress works
Main Components
A. Client-Side (Frontend):
• Next.js Application Layer
• Auth Routes (/auth)
• Main Dashboard Routes (/dashboard)
• Landing Page Routes (/site)
• Real-time Components
• UI Components Library (shadcn)
B. Server-Side:
• Next.js API Routes
• Socket.IO Server
• Authentication System
• Subscription Management
C. External Services:
• Supabase (Database & Authentication)
• Stripe (Payment Processing)
[Client Tier]
• ↕️
[Application Tier]
• ↕️
[Data Tier]
Client Tier
• Next.js pages structure
• Real-time collaboration components
• State management providers
• UI component library integration
Application Tier
• API routes handling
• Socket.IO server
• Server actions
• Authentication middleware
• Stripe integration
Data Tier
• Supabase database
• Drizzle ORM layer
• Real-time subscriptions
• File storage
• Blue: Frontend components
• Green: API/Backend services
• Yellow: External services
• Purple: Database and storage
• Red: Authentication flows
• Orange: Payment processing
Important Flows to Highlight:
Authentication Flow
• User → Auth Pages → Supabase Auth → Dashboard
Real-time Collaboration Flow
• User Action → Socket.IO → Other Users
Subscription Flow
• User → Stripe Checkout → Webhook → Database Update
Special Considerations:
Real-time Architecture
• Socket.IO connection between clients and server
• Supabase real-time subscriptions
• How real-time updates propagate through the system
File Structure
• Demonstrate the workspace/folder/file hierarchy
• How file permissions and sharing work
• Where file content is stored
State Management
• State providers (src/lib/providers)
• How state flows through the application
• Where real-time updates are managed
Security Layer
• Authentication boundaries
• Where middleware intercepts requests
• Permission checking points
Recommended Tools:
• Rectangles for services
Level of Detail:
• Keep high-level architecture clear and visible
• Use nested components to show detail where needed
• Annotations for critical paths and important notes
Remember to emphasize: