How rishipatel9/elytra works
Main System Components
a) Client Layer:
• Next.js Frontend (src/app directory)
• Video Chat Interface (src/components/video-bot)
• Authentication UI (src/app/auth)
• Admin Dashboard (src/app/admin)
b) API Layer:
• Next.js API Routes (src/app/api)
• Authentication Endpoints
• Chat/Counseling Endpoints
• Admin Management Endpoints
c) Service Layer:
• AI Services Integration
• OpenAI Assistant (lib/openai-assistant.ts)
• Google Gemini (lib/GeminiClient.ts)
• Video Streaming (LiveKit)
• Email Service (lib/email.ts)
d) Data Layer:
• Prisma ORM
• Database (shown by prisma/schema.prisma)
• Pinecone Vector Storage
Component Relationships
a) Frontend to Backend:
• API routes connecting components to services
• WebSocket connections for real-time chat
• Authentication flows
b) Service Interactions:
• AI services communication flow
• Video streaming data flow
• Email notification system
Specific Implementation Details
Key architectural patterns:
a) Authentication Flow:
• NextAuth integration
• OAuth providers (Google, GitHub)
• Admin authentication system
b) AI Counseling System:
• Chat processing pipeline
• Video bot integration
• Session management
c) Data Management:
• Prisma schema relationships
• Vector storage for AI responses
• Real-time data synchronization
Additional Elements
Supporting components:
a) Infrastructure:
• Environment configuration
• API endpoints structure
• Database migrations
b) Development Tools:
• TypeScript integration
• ESLint/Prettier setup
• Build pipeline
This system design should emphasize the integration of AI services with real-time video capabilities, showing how they work together to provide an effective student counseling platform.