How vignesh01-afk/cipher works
CipherNote is a browser-first encrypted notes application: users authenticate and unlock local key material, then create, decrypt, search, share, revoke, and inspect notes while the API stores ciphertext and metadata. The graph preserves the documented secure-file, activity-log, and recovery capabilities alongside notes and sharing. Some route and page implementations were not sampled; those relationships are included only where documented in the README or supported by the SOURCE INDEX.
Main entry points: api.ts Typed API client · db.ts Application database · auth.ts Authentication · useNotes.ts Notes and search
Components 26
Browser app
- App routes
client/src/App.tsx - Session and unlock
client/src/context/AuthContext.tsx - Notes and search
client/src/hooks/useNotes.ts - Note pages
client/src/pages/NoteEditorPage.tsx - Shared notes
client/src/pages/SharedWithMePage.tsx - Share and revoke
client/src/components/ShareNoteModal.tsx - Secure files
client/src/lib/files.ts - Activity log
client/src/pages/ActivityLogPage.tsx - Security inspector
client/src/pages/SecurityInspectorPage.tsx - Privacy settings
client/src/context/PrivacyContext.tsx - Typed API client
client/src/lib/api.ts
Client security
- Browser cryptography
client/src/lib/crypto.ts - Decrypt and search
client/src/lib/notes.ts
API services
- HTTP API
server/src/app.ts - Authentication
server/src/routes/auth.ts - Notes and sharing
server/src/routes/notes.ts - Shared-note listing
server/src/routes/shared.ts - User lookup
server/src/routes/users.ts - File access
server/src/routes/files.ts - Audit access
server/src/routes/audit.ts - Authentication and access
server/src/middleware/auth.ts - Audit writer
server/src/lib/audit.ts
Persistent data
- Application database
server/src/db.ts - Encrypted file storage
server/src/lib/storage.ts
Other components
- User
- CipherNote API
Connections 38
- User → App routes: uses
README.md - App routes → Session and unlock: guards routes
client/src/App.tsx - Session and unlock → Browser cryptography: unlocks keys
client/src/context/AuthContext.tsx - Session and unlock → Typed API client: authenticates
client/src/context/AuthContext.tsx - User → Note pages: creates and edits
README.md - Note pages → Browser cryptography: encrypts locally
README.md - Notes and search → Typed API client: loads notes
client/src/hooks/useNotes.ts - Notes and search → Decrypt and search: decrypts locally
client/src/hooks/useNotes.ts - Decrypt and search → Browser cryptography: decrypts content
client/src/lib/notes.ts - User → Notes and search: searches locally
README.md - User → Share and revoke: shares or revokes
README.md - Share and revoke → Typed API client: submits sharing
client/src/components/ShareNoteModal.tsx - User → Shared notes: opens shared notes
README.md - Shared notes → Typed API client: fetches shares
client/src/lib/api.ts - User → Secure files: manages files
README.md - Secure files → Typed API client: requests file data
client/src/lib/files.ts - Secure files → Browser cryptography: decrypts files
client/src/lib/files.ts - User → Activity log: views activity
README.md - Activity log → Typed API client: requests audit logs
client/src/lib/api.ts - User → Security inspector: inspects note metadata
README.md - Security inspector → Notes and search: reads loaded notes
client/src/pages/SecurityInspectorPage.tsx - User → Privacy settings: sets privacy controls
README.md - Typed API client → CipherNote API: sends API requests
client/src/lib/api.ts - CipherNote API → HTTP API: routes requests
server/src/app.ts - HTTP API → Authentication: mounts API routes
server/src/app.ts - Authentication → Application database: reads and writes users
server/src/routes/auth.ts - Notes and sharing → Application database: reads and writes notes
server/src/routes/notes.ts - Shared-note listing → Application database: lists shared notes
- User lookup → Application database: looks up users
- File access → Application database: tracks file metadata
server/src/routes/files.ts - File access → Encrypted file storage: stores encrypted blobs
server/src/routes/files.ts - Audit access → Application database: reads audit records
- Authentication → Authentication and access: protects endpoints
server/src/routes/auth.ts - Notes and sharing → Authentication and access: protects endpoints
server/src/routes/notes.ts - File access → Authentication and access: protects endpoints
server/src/routes/files.ts - Authentication → Audit writer: records events
server/src/routes/auth.ts - Notes and sharing → Audit writer: records events
server/src/routes/notes.ts - Audit writer → Application database: writes audit records
server/src/lib/audit.ts