How swanand58/cloudless works
Cloudless is a self-hosted, invite-only sharing app for two-person rooms. A user registers or signs in, creates or joins a room, verifies the other person’s safety number, then sends encrypted messages or files for later retrieval. The browser encrypts content before upload; the backend manages accounts, room membership, encrypted message and chunk storage, and expiry cleanup. The README documents the browser-to-server boundary and product workflow; source excerpts support backend routing and lifecycle edges, while some frontend wiring is not shown.
Main entry points: main.py FastAPI application · database.py SQLite database · transfer.py File transfers · cleanup.py Expiry cleanup
Components 24
Browser experience
- Account pages
frontend/src/app/login/page.tsx - Invite registration
frontend/src/app/register/page.tsx - Room list
frontend/src/app/page.tsx - Room view
frontend/src/app/room/[id]/page.tsx - Encrypted chat
frontend/src/components/ChatWindow.tsx - File previews
frontend/src/components/FileBubble.tsx - Identity verification
frontend/src/components/room/VerifyIdentity.tsx - Browser encryption
frontend/src/lib/filecrypt.ts - API client
frontend/src/lib/api.ts
Backend workflows
- FastAPI application
backend/app/main.py - Auth and invites
backend/app/routers/auth.py - Room management
backend/app/routers/rooms.py - File transfers
backend/app/routers/transfer.py - Live messaging
backend/app/routers/websocket.py
Persistence
- SQLite database
backend/app/database.py - Users and invites
backend/app/models/user.py - Rooms and members
backend/app/models/room.py - Encrypted messages
backend/app/models/message.py - Transfer metadata
backend/app/models/transfer.py
Security and lifecycle
- Authentication service
backend/app/services/auth.py - Expiry cleanup
backend/app/services/cleanup.py - Request security
backend/app/middleware/security.py - Runtime settings
backend/app/config.py
Other components
- Room participants
Connections 33
- Room participants → Account pages: signs in
README.md - Room participants → Invite registration: uses invite
README.md - Room participants → Room list: creates or joins
README.md - Room participants → Room view: opens room
README.md - Room view → Encrypted chat: shows chat
- Encrypted chat → File previews: renders attachments
frontend/src/components/ChatWindow.tsx - Room participants → Identity verification: compares fingerprints
README.md - Room participants → Browser encryption: encrypts content
README.md - API client → FastAPI application: calls API
README.md - FastAPI application → Auth and invites: registers routes
backend/app/main.py - FastAPI application → Room management: registers routes
backend/app/main.py - FastAPI application → File transfers: registers routes
backend/app/main.py - FastAPI application → Live messaging: registers route
backend/app/main.py - FastAPI application → Request security: installs middleware
backend/app/main.py - FastAPI application → Expiry cleanup: starts service
backend/app/main.py - Auth and invites → Authentication service: delegates auth
backend/app/routers/auth.py - Auth and invites → Users and invites: reads and writes
backend/app/routers/auth.py - Room management → Rooms and members: reads and writes
backend/app/routers/rooms.py - Room management → Users and invites: checks membership
backend/app/routers/rooms.py - File transfers → Room management: checks membership
backend/app/routers/transfer.py - File transfers → Transfer metadata: reads and writes
backend/app/routers/transfer.py - Live messaging → Rooms and members: checks room
backend/app/routers/websocket.py - Live messaging → Encrypted messages: stores messages
backend/app/routers/websocket.py - Expiry cleanup → Rooms and members: expires rooms
backend/app/services/cleanup.py - Expiry cleanup → Encrypted messages: deletes messages
backend/app/services/cleanup.py - Expiry cleanup → Transfer metadata: deletes transfers
backend/app/services/cleanup.py - Authentication service → Users and invites: loads accounts
backend/app/services/auth.py - SQLite database → Runtime settings: uses database URL
backend/app/database.py - Users and invites → SQLite database: maps tables
backend/app/models/user.py - Rooms and members → SQLite database: maps tables
backend/app/models/room.py - Encrypted messages → SQLite database: maps tables
backend/app/models/message.py - Transfer metadata → SQLite database: maps tables
backend/app/models/transfer.py - File transfers → Browser encryption: transfers ciphertext
README.md