How jiyaagarwal2007-lang/swara-ai works
SWARA AI is a Flutter client and FastAPI service for English, Hindi, and Bengali translation, speech, documents, and tutoring. Its main workflow sends a client request to a feature API, performs translation or transcription as needed, and returns translated content or a tracked document job. The graph also shows authentication, user settings, history, and storage. Flutter source files and several feature implementations were not included in the supplied tree or excerpts, so those nodes use the existing flutter directory and only documented connections are shown.
Main entry points: main.py API entry · translation_service.py Translation service · session.py SQL database · auth_service.py Auth service
Components 22
Flutter client
- Flutter app
flutter
API workflows
- API entry
backend/main.py - Auth API
backend/app/routers/auth.py - Auth service
backend/app/services/auth_service.py - Speech API
backend/app/routers/speech.py - Subtitle API
backend/app/routers/subtitle.py - Document API
backend/app/routers/document.py - PDF API
backend/app/routers/pdf.py - Document jobs
backend/app/tasks/document_task.py - PDF jobs
backend/app/tasks/pdf_task.py - Tutor API
backend/app/routers/tutor.py - History API
backend/app/routers/history.py - Settings API
backend/app/routers/settings.py
AI services
- Translation service
backend/app/services/translation_service.py - Whisper service
backend/app/services/whisper_service.py
State and files
- Subtitle sessions
backend/app/services/subtitle_service.py - File storage
backend/app/services/storage_service.py - SQL database
backend/app/database/session.py - Domain records
backend/app/models
Other components
- App user
- Groq AI
- Redis and broker
Connections 28
- App user → Flutter app: uses
- Flutter app → API entry: REST requests
- API entry → Auth API: registers
- API entry → Speech API: registers
- API entry → Subtitle API: registers
- API entry → Document API: registers
- API entry → PDF API: registers
- API entry → Tutor API: registers
- API entry → History API: registers
- API entry → Settings API: registers
- Auth API → Auth service: calls
- Auth service → SQL database: reads/writes
- Auth service → Domain records: uses records
- Speech API → Whisper service: transcribes
- Speech API → Translation service: translates
- Subtitle API → Subtitle sessions: manages sessions
- Subtitle sessions → Redis and broker: stores session state
- Document API → Document jobs: dispatches jobs
- PDF API → PDF jobs: dispatches jobs
- Document jobs → Translation service: translates text
- PDF jobs → Translation service: translates text
- Document jobs → File storage: stores files
- PDF jobs → File storage: stores files
- Translation service → Groq AI: requests translation
- Tutor API → Groq AI: requests chat
- History API → SQL database: reads/writes
- Settings API → SQL database: reads/writes
- File storage → SQL database