How computing-den/unforget works
Main Components
a. Client-Side (Browser):
• Progressive Web App Container
• React Frontend Application
• Service Worker Layer
• Local Storage (IndexedDB)
• Encryption/Decryption Module
• Sync Manager
b. Server-Side:
• API Server
• User Authentication System
• Encrypted Notes Storage
• Sync Management System
Key Architectural Patterns to Highlight
a. PWA Architecture:
• How the service worker (src/client/serviceWorker.ts) enables offline functionality
• Client-to-service-worker communication (src/client/clientToServiceWorkerApi.ts)
b. Security Layer:
• Demonstrate the end-to-end encryption flow
• Password hashing and key derivation processes
• Encryption boundary between client and server
c. Data Flow:
• Local storage operations
• Sync mechanism with delta and queue sync options
• Encryption/decryption process
Specific Implementation Details
[Frontend Layer]
• React Components (src/client/*.tsx)
• App Store (src/client/appStore.tsx)
• Router (src/client/router.tsx)
↕️ (API Calls)
[Client Core Layer]
• API Client (src/client/api.ts)
• Crypto Module (src/client/crypto.ts)
• Sync Manager (src/client/sync.ts)
↕️ (Local Storage)
[Storage Layer]
• IndexedDB (src/client/storage.ts)
• Service Worker Cache
↕️ (HTTPS)
[Server Layer]
• Authentication API
• Note Sync API
• Encrypted Storage
Important Flows to Illustrate
a. Creation/Update Flow:
User Input → Encryption → Local Storage → Sync Queue → Server Storage
b. Sync Flow:
Delta Sync Request → Queue Sync (if needed) → Merge Resolution → Local Update
c. Authentication Flow:
Login/Signup → Password Hashing → Token Generation → Encryption Key Derivation