How aktdx/vaultkey works
VaultKey is a privacy-focused file-sharing application: the browser encrypts files before upload, owners configure and manage share links, and recipients obtain ciphertext through server-enforced access checks before decrypting locally. The graph includes the documented upload, access-control, revocation, and audit capabilities. Backend route internals and several frontend pages were not sampled, so links between those components follow documented behavior and are kept at the subsystem level.
Main entry points: api.ts API client · main.py FastAPI application · database.py Relational database · SecureDownloadPage.tsx Secure download
Components 28
Browser application
- Route application
frontend/src/App.tsx - Sign-in pages
frontend/src/pages/auth/AuthPages.tsx
Identity and sessions
- Auth context
frontend/src/contexts/AuthContext.tsx - Firebase client
frontend/src/lib/firebase.ts - Firebase verification
backend/app/firebase_service.py
File sharing
- File management
frontend/src/pages/dashboard/FilesPage.tsx - File upload
frontend/src/components/upload/FileUpload.tsx - Browser cryptography
frontend/src/lib/crypto.ts - Share management
frontend/src/pages/dashboard/SharesPage.tsx - Create share
frontend/src/components/shares/CreateShareModal.tsx - Secure download
frontend/src/pages/SecureDownloadPage.tsx - View-only viewer
frontend/src/components/shares/ViewOnlyViewer.tsx - Activity timeline
frontend/src/pages/dashboard/ActivityPage.tsx
API and policy
- API client
frontend/src/lib/api.ts - FastAPI application
backend/app/main.py - Authentication routes
backend/app/routes/auth.py - File routes
backend/app/routes/files.py - Share routes
backend/app/routes/shares.py - Access routes
backend/app/routes/access.py - Activity routes
backend/app/routes/activity.py - Token security
backend/app/security.py
Persistence and storage
- Relational database
backend/app/database.py - Object storage adapter
backend/app/storage.py
Other components
- File owner
- Link recipient
- Firebase Auth
- Neon PostgreSQL
- Cloudflare R2
Connections 38
- File owner → Sign-in pages: signs in
- Sign-in pages → Auth context: calls
- Auth context → API client: auth requests
- Auth context → Firebase client: starts Google sign-in
- Firebase client → Firebase Auth: authenticates
- Auth context → API client: exchanges ID token
- Route application → File management: routes
- Route application → Share management: routes
- Route application → Secure download: routes
- Route application → Activity timeline: routes
- File owner → File upload: selects file
- File upload → Browser cryptography: encrypts locally
- File upload → API client: uploads ciphertext
- File owner → Create share: sets controls
- Create share → API client: creates share
- Share management → API client: manages shares
- Link recipient → Secure download: opens link
- Secure download → API client: requests access
- Secure download → Browser cryptography: decrypts locally
- Secure download → View-only viewer: presents content
- Activity timeline → API client: loads events
- API client → FastAPI application: sends requests
- FastAPI application → Authentication routes: dispatches
- FastAPI application → File routes: dispatches
- FastAPI application → Share routes: dispatches
- FastAPI application → Access routes: dispatches
- FastAPI application → Activity routes: dispatches
- Authentication routes → Token security: issues tokens
- Authentication routes → Firebase verification: verifies Google token
- Authentication routes → Relational database: reads and writes users
- File routes → Object storage adapter: stores ciphertext
- File routes → Relational database: records file metadata
- Share routes → Relational database: stores share controls
- Access routes → Relational database: checks limits and logs
- Access routes → Object storage adapter: streams ciphertext
- Activity routes → Relational database: reads activity
- Relational database → Neon PostgreSQL: queries
- Object storage adapter → Cloudflare R2: stores and streams objects