How abhiveeramallu/signalappclone works
This is an educational Signal-inspired messaging application: a Next.js client backed by a FastAPI API, SQLite persistence, and an authenticated WebSocket endpoint. The main workflow is account access, conversation discovery or creation, then persisted real-time messaging with receipts and typing events. Contacts, group administration, attachments, settings, and responsive chat UI are distinct capabilities. The README documents several frontend behaviors and API features; unsampled implementation details are represented at subsystem level, and edges avoid assuming unshown internal calls.
Main entry points: api.ts HTTP API client · main.py API application · endpoint.py WebSocket events · AppShell.tsx Chat interface
Components 23
Web client
- Chat interface
frontend/components/layout/AppShell.tsx - Login and registration
frontend/components/auth/RegisterForm.tsx - Conversation discovery
frontend/components/contacts/NewConversationModal.tsx - Message experience
frontend/components/chat/MessageComposer.tsx - Session state
frontend/lib/auth-context.tsx - HTTP API client
frontend/lib/api.ts - WebSocket client
frontend/lib/ws.tsx - Appearance settings
frontend/lib/theme-context.tsx
Identity and discovery
- Authentication
backend/app/routers/auth.py - Contacts
backend/app/routers/contacts.py - User discovery
backend/app/routers/users.py
Conversations and messages
- Conversation management
backend/app/routers/conversations.py - Message history
backend/app/routers/messages.py - Message validation and status
backend/app/services/message_service.py
Realtime and attachments
- WebSocket events
backend/app/websocket/endpoint.py - Connection manager
backend/app/websocket/manager.py - File attachments
backend/app/routers/uploads.py - Attachment files
backend/app/core/config.py
Backend foundations
- Messaging data models
backend/app/models/conversation.py - SQLite database
backend/app/db/session.py - JWT and access checks
backend/app/core/deps.py - API application
backend/app/main.py
Other components
- User
Connections 31
- User → Login and registration: signs in
- Login and registration → HTTP API client: submits credentials
- HTTP API client → Authentication: calls auth API
- Authentication → JWT and access checks: issues tokens
backend/app/routers/auth.py - Session state → HTTP API client: restores session
- User → Chat interface: uses
- Chat interface → Conversation discovery: opens discovery
- Conversation discovery → HTTP API client: requests users and chats
- HTTP API client → Contacts: calls contacts API
- HTTP API client → User discovery: searches users
- HTTP API client → Conversation management: manages conversations
- Chat interface → Message experience: opens conversation
- Message experience → HTTP API client: loads history
- HTTP API client → Message history: requests messages
- Message history → Message validation and status: creates messages
backend/app/routers/messages.py - Message validation and status → Messaging data models: persists message status
backend/app/services/message_service.py - Messaging data models → SQLite database: stores records
- API application → Authentication: registers routes
backend/app/main.py - API application → Contacts: registers routes
backend/app/main.py - API application → User discovery: registers routes
backend/app/main.py - API application → Conversation management: registers routes
backend/app/main.py - API application → Message history: registers routes
backend/app/main.py - API application → File attachments: registers routes
backend/app/main.py - API application → WebSocket events: registers endpoint
backend/app/main.py - WebSocket client → WebSocket events: exchanges events
- WebSocket events → Message validation and status: handles message events
backend/app/websocket/endpoint.py - WebSocket events → Connection manager: dispatches events
backend/app/websocket/endpoint.py - WebSocket events → JWT and access checks: authenticates users
backend/app/websocket/endpoint.py - HTTP API client → File attachments: uploads and retrieves files
- File attachments → Attachment files: stores attachment files
backend/app/routers/uploads.py - User → Appearance settings: sets appearance