How sokosam/viddat works
Main Components
A. Frontend Layer:
• Flask web application (in /app directory)
• Static assets (CSS, audio files)
• Template rendering system (Jinja2 templates)
B. Authentication System:
• Auth.py as a separate component
• User management flow
• Email verification system (evident from email-related templates)
C. Worker Service:
• Video generation worker (/worker directory)
• Polly integration for text-to-speech
• Background music processing
• Stock footage handling
• Thumbnail generation
D. Nginx Layer:
• Reverse proxy configuration
• Static file serving
• Load balancing
Component Relationships
• Client Browser → Nginx
• Nginx → Flask Application
• Flask Application → Worker Service
• Worker Service → External Services (AWS Polly)
Specific Implementation Details
• Blue rectangles for containers (Flask app, Worker, Nginx)
• Green diamonds for storage components (stock footage, bg music)
• Yellow hexagons for external services (AWS Polly)
• Purple rectangles for authentication components
Following flows:
• User requests → Nginx → Flask App
• Video generation requests → Worker Service
• Text-to-speech requests → Polly Service
• Media file handling between components
Key Architectural Elements
Architectural patterns:
• Microservices architecture (separate app and worker services)
• Container orchestration (Docker Compose)
• MVC pattern in Flask app (models.py, views.py)
• Asynchronous video processing
Technical Stack Indicators
Technology labels:
• Python/Flask
• Nginx
• Docker
• AWS Polly
• Jinja2 Templates
[Client Browser] → [Nginx Container]
• ↓
• [Flask App Container] ← → [Authentication]
• ↓ ↓
• [Worker Container] → [AWS Polly]
• ↓
[Media Storage (Stock/Music)]