How amittras-pal/silent-memoirs works
Silent Memoirs is a browser-based, encrypted journal backed by Google Drive. The main workflow connects a Google account, unlocks or sets up a vault, then lets the user write entries and browse or view saved entries; the app also provides an emotion-record book and PDF export. The graph follows explicit routing and sampled calls. Several feature modules are represented from the tree, but their internal wiring is not inferred where source was not sampled.
Main entry points: ProtectedLayout.tsx Protected layout · AppContext.tsx App state · exportPdf.worker.ts PDF export worker · sync.ts Journal sync
Components 24
Access and vault
- App routes
app/src/App.tsx - Google login
app/src/components/AuthWall.tsx - Session refresh
app/src/components/SessionManager.tsx - Vault setup
app/src/components/VaultSetupWall.tsx - Protected layout
app/src/components/ProtectedLayout.tsx
Journal workflow
- Entry editor
app/src/modules/editor/index.tsx - Editor UI
app/src/components/Editor.tsx - Entry browser
app/src/modules/entries/index.tsx - Entry viewer
app/src/modules/viewer/index.tsx - Past entries
app/src/modules/editor/useLastEntry.ts
Journal features
- Emotion book
app/src/modules/emotionbook/index.tsx - Emotion records
app/src/modules/emotionbook/useEmotionBook.ts - Settings
app/src/modules/settings/index.tsx - PDF export worker
app/src/workers/exportPdf.worker.ts - PDF renderer
app/src/lib/export/pdfRenderer.ts
Sync and export
- App state
app/src/contexts/AppContext.tsx - Vault manager
app/src/lib/vault.ts - Drive storage
app/src/lib/storage.ts - Journal sync
app/src/lib/sync.ts - Media helpers
app/src/lib/media.ts - Staged media
app/src/lib/stagedMedia.ts - Encryption
app/src/lib/crypto.ts
Other components
- User
- Google Drive
Connections 30
- User → Google login: connects account
- Google login → Google Drive: OAuth token
- Google login → App state: sets storage
- App state → Drive storage: creates provider
- Drive storage → Google Drive: reads and writes
- Drive storage → Session refresh: refreshes token
- App routes → Google login: routes login
- App routes → Vault setup: routes unlock
- Vault setup → App state: sets vault
- App state → Journal sync: creates engine
- App state → Vault manager: holds manager
- App routes → Protected layout: guards pages
- Protected layout → Entry editor: routes editor
- Protected layout → Entry browser: routes entries
- Protected layout → Entry viewer: routes viewer
- Protected layout → Settings: routes settings
- Protected layout → Emotion book: routes emotion book
- Entry editor → Editor UI: uses editor
- Entry editor → Journal sync: syncs entries
- Entry browser → Journal sync: browses entries
- Entry viewer → Journal sync: loads entry
- Past entries → Journal sync: loads history
- Emotion book → Emotion records: uses records
- Emotion records → App state: reads app state
- Emotion records → Drive storage: persists records
- PDF export worker → Google Drive: downloads files
- PDF export worker → PDF renderer: renders PDF
- PDF export worker → Media helpers: extracts media
- PDF export worker → Staged media: reads pending media
- PDF export worker → Encryption: decrypts content