How actualbudget/actual-server works
Main System Components
a) Core Application Layer:
• Entry point (app.js)
• Account Management System (src/accounts/*)
• Authentication Systems (password.js and openid.js)
• Database Layer (src/db.js, src/account-db.js)
• Migration System (migrations/*)
b) Integration Services:
• GoCardless Banking Integration (src/app-gocardless/*)
• SimpleFin Integration (src/app-simplefin/*)
• Sync Service (src/app-sync/*)
c) Security Layer:
• Secrets Management (src/app-secrets.js)
• User Service (src/services/user-service.js)
Architectural Patterns to Highlight
• Local-First Architecture: Show the local storage and sync mechanisms
• Multi-User Support: Illustrate user isolation and management
• Banking Integration Framework: Display the pluggable bank adapter system
• Migration System: Show the database evolution path
Component Relationships
[Client Applications] ←→ [Sync Service]
• ↕
• [Core Server Layer]
• ↕
• [Banking APIs] ←→ [Integration Layer]
• ↕
• [Database Layer]
Specific Implementation Details
• Blue rectangles: Core services
• Green diamonds: External integrations
• Red hexagons: Security components
• Purple clouds: Third-party services
Key Flows to Illustrate
a) Authentication Flow:
User → OpenID/Password Auth → Token Generation → Protected Resources
b) Banking Integration Flow:
Bank API → GoCardless Adapter → Bank Factory → Core Services
c) Sync Flow:
Client → Sync Service → File Service → Database
Technical Stack Indicators
Technologies used:
• Node.js runtime
• SQL database
• REST APIs
• OpenID Connect
• Docker containerization
Remember to:
• Use clear, consistent naming
• Data flow directions
• Async operations
• Security boundaries
• Version/migration paths
• Scaling points