How codexaniket/cipherlink works
CipherLink is a browser-based, peer-to-peer messenger. A user creates a device identity, adds a contact by friend code, and the signaling server introduces the browsers; after WebRTC connects, chat and media travel directly between them. Contacts, keys, and conversation history stay in browser storage, while the server retains limited identity, waiting-request, and push-subscription records. The graph also shows notification delivery and the safety/connection-information layer. Some app and server source was sampled only in excerpts, so uncertain internal wiring is omitted.
Main entry points: app.js App workflow · server.js Signaling server · peer.js WebRTC connection · sw.js Service worker
Components 14
Browser app
- Chat interface
public/index.html - App workflow
public/app.js
Identity and history
- Device keys
public/device-key.js - Browser history
public/storage.js
Peer chat
- WebRTC connection
public/peer.js
Signaling service
- Signaling server
server.js - Server records
server.js
Notifications
- Notification controls
public/notify.js - Service worker
public/sw.js - UI sounds
public/sounds.js
Other components
- User
- Contact browser
- Push service
- Google STUN
Connections 20
- User → Chat interface: uses
- Chat interface → App workflow: hosts interface
- App workflow → Device keys: loads identity
- Device keys → Browser history: reads/writes key
- App workflow → Browser history: reads/writes chats
- App workflow → Signaling server: signs in; exchanges requests
- Signaling server → App workflow: dispatches signaling
- Signaling server → Server records: stores pending records
- App workflow → WebRTC connection: creates connection
- WebRTC connection → Signaling server: sends handshake signals
- Signaling server → WebRTC connection: forwards handshake signals
- WebRTC connection → Contact browser: exchanges chat and media
- Contact browser → WebRTC connection: returns chat and media
- WebRTC connection → Google STUN: discovers route
- App workflow → Notification controls: controls alerts
- App workflow → UI sounds: plays tones
- Notification controls → Service worker: registers; shows alerts
- Signaling server → Push service: sends encrypted push
- Push service → Service worker: delivers push
- Service worker → User: shows request alert