How mdhruvil/tuto works
Main System Components
a) Frontend Layer (Web Application)
• React-based SPA with Vite
• Authentication UI components
• Knowledge Base Management interface
• Chat interface
• Document Management interface
b) Backend Layer (API)
• Cloudflare Workers-based API
• Authentication service
• Document processing service
• AI/Chat service
• Database queries layer
c) External Services
• Neon Database (with pg_vector)
• Azure OpenAI
• Cloudflare (hosting/deployment)
Component Relationships
a) Client-Server Communication
• RESTful API routes between frontend and backend
• WebSocket/real-time connections for chat functionality
b) Data Flow
• Document upload flow
• Chat message flow
• Knowledge base management flow
• Authentication flow
Detailed Component Breakdown
Frontend (apps/web):
┌─ Web Application ─────────────────┐
• Auth Module │
• Knowledge Base Management │
• Document Viewer/Manager │
• Chat Interface │
• User Profile Management │
• ┘
Backend (apps/api):
┌─ API Layer ──────────────────────┐
• Auth Middleware │
• Route Handlers │
• Document Processing │
• AI Integration │
• Database Operations │
• ┘
Technical Stack Indicators
Technology choices:
• HONC stack components
• Vite/React frontend
• Cloudflare Workers
• pg_vector enabled Neon Database
• Azure OpenAI integration
Data Flow Patterns
Key flows:
User → Upload Document → Processing → Vector Storage
User → Chat Query → Vector Search → AI Processing → Response