How karimtawfikk/echo works
ECHO presents an Ancient Egypt exploration workflow: users browse or upload an artifact, then receive recognition, historical chat, hieroglyph translation, or generated video. The frontend calls a FastAPI gateway that routes feature requests to dedicated AI services; PostgreSQL and Cloudflare R2 support documented data and media operations. The graph preserves these major product capabilities. Internal service-to-runtime links are shown where excerpts demonstrate calls; gateway-to-service and external storage links rely on README architecture documentation, since route implementations and some service internals were not sampled.
Main entry points: main.py FastAPI gateway · app/page.tsx Explore home · chat/page.tsx Historical chat · app.py Recognition API
Components 27
User experience
- Explore home
frontend/app/page.tsx - Image upload
frontend/app/upload/page.tsx - Recognition results
frontend/app/result/page.tsx - Historical chat
frontend/app/chat/page.tsx - Translation UI
frontend/app/translate/page.tsx - Video UI
frontend/app/video/page.tsx - Page shell
frontend/components/layout/PageShell.tsx - Language context
frontend/context/LanguageContext.tsx - Recognition client
frontend/lib/services/recognition.ts
API gateway
- FastAPI gateway
src/app/main.py - Recognition route
src/app/api/routes/recognize.py - Chat route
src/app/api/routes/chat.py - Hieroglyph route
src/app/api/routes/hieroglyphs.py - Video route
src/app/api/routes/video.py
AI services
- Recognition API
src/recognition_api/app.py - Recognition pipeline
src/recognition_api/runtime.py - Chatbot API
src/chatbot_api/app.py - Chat service
src/chatbot_api/service.py - RAG and voice runtime
src/chatbot_api/runtime.py - Hieroglyph API
src/hieroglyph_api/app.py - Detection service
src/hieroglyph_api/service.py - Detection pipeline
src/hieroglyph_api/runtime.py - Video API
src/video_generation_api/app.py - Video pipeline
src/video_generation_api/runtime.py
Data and storage
- PostgreSQL
- Cloudflare R2
Other components
- Visitor
Connections 31
- Visitor → Explore home: browses
README.md - Explore home → Image upload: opens
frontend/app/page.tsx - Image upload → FastAPI gateway: submits image
README.md - FastAPI gateway → Recognition route: routes
src/app/main.py - Recognition route → Recognition API: forwards request
README.md - Recognition API → Recognition pipeline: runs inference
src/recognition_api/app.py - Recognition API → Recognition results: returns recognition
README.md - Recognition results → Historical chat: starts conversation
README.md - Historical chat → FastAPI gateway: sends prompt
README.md - FastAPI gateway → Chat route: routes
src/app/main.py - Chat route → Chatbot API: forwards request
README.md - Chatbot API → Chat service: dispatches
src/chatbot_api/app.py - Chat service → RAG and voice runtime: calls
src/chatbot_api/service.py - RAG and voice runtime → PostgreSQL: queries context
README.md - Visitor → Translation UI: uploads inscription
README.md - Translation UI → FastAPI gateway: requests translation
README.md - FastAPI gateway → Hieroglyph route: routes
src/app/main.py - Hieroglyph route → Hieroglyph API: forwards request
README.md - Hieroglyph API → Detection service: dispatches
src/hieroglyph_api/app.py - Detection service → Detection pipeline: runs pipeline
src/hieroglyph_api/service.py - Visitor → Video UI: requests video
README.md - Video UI → FastAPI gateway: requests generation
README.md - FastAPI gateway → Video route: routes
src/app/main.py - Video route → Video API: forwards request
README.md - Video API → Video pipeline: dispatches
src/video_generation_api/app.py - Video pipeline → PostgreSQL: retrieves media metadata
README.md - Video pipeline → Cloudflare R2: fetches images
README.md - Explore home → Page shell: renders
frontend/app/page.tsx - Historical chat → Recognition client: loads session result
frontend/app/chat/page.tsx - Page shell → Language context: uses translations
frontend/components/layout/PageShell.tsx - Recognition client → Recognition results: provides result data
frontend/lib/services/recognition.ts