How idityage/blind-chat works
Main Components
A. Frontend Layer (Next.js Application):
• Authentication Module
• Chat Interface
• Landing Page Components
• Theme System
• User Management
B. Backend Components:
• Next.js API Routes (Authentication & User Management)
• WebSocket Server (Real-time Communication)
• Database Layer (PostgreSQL with Prisma)
• Email Service (Nodemailer)
Client Tier
• Next.js Frontend (Port 3000)
• Public Routes
• Landing Page
• Authentication Pages
• Protected Routes
• Chat Interface
API Tier
• Next.js API Routes (Port 3000)
• Authentication APIs
• User Management APIs
• WebSocket Server (Port 8080)
• Socket Manager
Data Tier
• PostgreSQL Database
• Email Service
Key Interactions to Highlight
• Email notifications (wavy lines)
Component Details
Frontend Components (Blue):
• Route structure (/auth, /chat)
• Components like chat interface, forms
• Theme provider and context providers
API Layer (Green):
• API endpoints
• WebSocket connection handling
• Authentication middleware
Database Layer (Yellow):
• Main database tables (Users, Messages)
• Prisma ORM layer
• Email service integration
Security & Authentication Flow
A separate section showing:
• JWT token flow
• Email verification process
• Student email validation
• Rate limiting implementation
Infrastructure Elements
Deployment-related components:
• Nginx configuration
• Environment configurations
• Database migrations
Use these visual elements:
• 🔒 for security features
• 📧 for email-related components
• 🔄 for real-time features
• 🎨 for UI/theme components
• Different types of connections
• Component groupings
This system design should emphasize the real-time nature of the application while showing how the student authentication and email verification systems are integrated into the overall architecture.