How divyanshuchipa/intrachat-android-fastapi works
Intra is a LAN messaging product with Android and web clients backed by a FastAPI server, plus a desktop administration utility. The main workflow is user authentication, then real-time or offline message exchange, with file sharing and calls as related stages and Lumir as an assistant branch. The graph also captures administration and scheduled environment alerts. Some subsystems are represented by their exact enclosing directory because their implementation was not sampled; those links are limited to documented capabilities or visible router registration.
Main entry points: server.py FastAPI app · chat.py WebSocket chat · tasks.py Scheduled alerts · engine.py Lumir command engine
Components 19
Messaging clients
- Android app
app/src/main/java/com/example/intra - Web client
backend/static
Backend services
- FastAPI app
backend/server.py - Authentication and profiles
backend/users.py - WebSocket chat
backend/chat.py - File sharing
backend/files.py - Call signaling
backend/calls.py - Scheduled alerts
backend/tasks.py
Persistent state
- User database
backend/users.py - Message history
backend/messages.py
Lumir assistant
- Lumir command engine
backend/lumir/engine.py - AI model adapter
backend/lumir/ai_engine.py - Assistant memory
backend/lumir/memory.py - Media utilities
backend/lumir/utilities.py
Administration
- Desktop admin
intra_admin/admin.py - Admin endpoints
backend/admin_api.py
Other components
- LAN user
- Ollama service
- Weather service
Connections 23
- LAN user → Android app: uses
- LAN user → Web client: uses
- Android app → FastAPI app: connects to
- Web client → FastAPI app: HTTP and WebSocket
- FastAPI app → Authentication and profiles: handles auth
- FastAPI app → WebSocket chat: registers router
- FastAPI app → File sharing: registers router
- FastAPI app → Call signaling: registers router
- FastAPI app → Admin endpoints: registers router
- Authentication and profiles → User database: reads and writes
- WebSocket chat → Message history: stores and loads
- WebSocket chat → Authentication and profiles: checks users
- WebSocket chat → Lumir command engine: routes assistant messages
- WebSocket chat → Assistant memory: saves uploaded media
- Lumir command engine → AI model adapter: requests AI response
- Lumir command engine → Media utilities: runs media commands
- Lumir command engine → Assistant memory: searches and saves facts
- AI model adapter → Ollama service: sends chat request
- Desktop admin → Admin endpoints: manages server
- FastAPI app → Scheduled alerts: schedules jobs
- Scheduled alerts → Weather service: fetches forecast
- Scheduled alerts → AI model adapter: generates alert text
- Scheduled alerts → WebSocket chat: broadcasts alerts