How bhuvanshankar45/lunaris works
Lunaris is a privacy-first messaging and calling application. The main journey is account creation and identity setup, mutual-consent connections, local encrypted conversations relayed as opaque packets, and private calls; profile, privacy, and settings screens support that journey. The page-level controller connects the major screens, while API routes and server storage handle identity, connections, privacy actions, and relay packets. The README documents additional chat, group-call, and security capabilities; where their wiring was not shown, relationships are omitted or marked unverified.
Main entry points: page.tsx App controller · AuthModal.tsx Authentication · ChatView.tsx Messaging · storage.ts Server storage
Components 24
Client experience
- App controller
src/app/page.tsx - Welcome screen
src/components/auth/WelcomeScreen.tsx - Authentication
src/components/auth/AuthModal.tsx - Dashboard
src/components/dashboard/DashboardView.tsx - Connections
src/components/connections/ConnectionsView.tsx - Messaging
src/components/chat/ChatView.tsx - Call lobby
src/components/calling/CallLobby.tsx - Calls and group grid
src/components/calling/CallView.tsx - Profile
src/components/profile/ProfileView.tsx - Privacy controls
src/components/privacy/PrivacyView.tsx - Settings
src/components/settings/SettingsView.tsx
Identity and encryption
- ID generation
src/lib/crypto/id-generator.ts - Crypto primitives
src/lib/crypto/primitives.ts - Double Ratchet
src/lib/crypto/double-ratchet.ts - File encryption
src/lib/crypto/file-encryption.ts
API and relay
- Registration API
src/app/api/auth/register/route.ts - Login API
src/app/api/auth/login/route.ts - Connection APIs
src/app/api/connections/request/route.ts - User lookup API
src/app/api/users/lookup/route.ts - Privacy APIs
src/app/api/privacy/clear-chat/route.ts - Relay APIs
src/app/api/relay/send/route.ts - Server storage
src/lib/server/storage.ts
Local state
- Encrypted local vault
src/lib/storage/vault.ts
Other components
- User
Connections 30
- User → App controller: uses
README.md - App controller → Welcome screen: renders
src/app/page.tsx - App controller → Authentication: renders
src/app/page.tsx - App controller → Dashboard: renders
src/app/page.tsx - App controller → Connections: renders
src/app/page.tsx - App controller → Messaging: renders
src/app/page.tsx - App controller → Call lobby: renders
src/app/page.tsx - App controller → Calls and group grid: renders
src/app/page.tsx - App controller → Profile: renders
src/app/page.tsx - App controller → Privacy controls: renders
src/app/page.tsx - App controller → Settings: renders
src/app/page.tsx - Authentication → Crypto primitives: generates keys
src/components/auth/AuthModal.tsx - Authentication → ID generation: generates ID
src/components/auth/AuthModal.tsx - Authentication → Registration API: submits registration
src/components/auth/AuthModal.tsx - Registration API → ID generation: generates ID
src/app/api/auth/register/route.ts - Registration API → Server storage: registers user
src/app/api/auth/register/route.ts - Login API → Server storage: checks account
src/app/api/auth/login/route.ts - Connections → Connection APIs: requests connection
- Connections → User lookup API: looks up ID
- Privacy controls → Privacy APIs: requests deletion
- Privacy APIs → Server storage: purges packets
src/app/api/privacy/clear-chat/route.ts - Relay APIs → Server storage: relays packets
src/app/api/relay/send/route.ts - Double Ratchet → Crypto primitives: derives keys
src/lib/crypto/double-ratchet.ts - File encryption → Crypto primitives: encrypts files
src/lib/crypto/file-encryption.ts - App controller → Encrypted local vault: uses local state
src/app/page.tsx - Settings → Encrypted local vault: updates preferences
src/components/settings/SettingsView.tsx - Messaging → Double Ratchet: encrypts messages
- Messaging → File encryption: encrypts media
- Messaging → Relay APIs: sends packets
- Call lobby → Calls and group grid: enters call