How daya0576/beaverhabits works
Main Components
a. Frontend Layer:
• Web Interface (Progressive Web App)
• Pages (Index, Habit List, Calendar, Import/Export)
• Components and Layout
• Static Assets (images, PWA manifest, service worker)
b. Backend Layer:
• API Routes and Views
• Authentication System
• CRUD Operations
• Middleware
• Configuration Management
c. Storage Layer:
• Multiple Storage Implementations:
• SQLite Database
• File-based Storage (JSON)
• Session Storage
[Client Layer]
• ↑↓
[Application Layer]
• ↑↓
[Storage Layer]
Detailed Component Breakdown
a. Client Layer (Top):
• Sub-components:
• Frontend Pages (from frontend/ directory)
• Static Assets
• Service Worker
• PWA Manifest
b. Application Layer (Middle):
• Core Application Components:
• API Routes (/api.py)
• Authentication (/app/auth.py)
• CRUD Operations (/app/crud.py)
• Middleware (/app/middlewares.py)
• Schema Validation (/app/schemas.py)
c. Storage Layer (Bottom):
• SQLite Database
• User File Storage
• Session File Storage
Important Connections to Highlight
• RESTful API endpoints connecting frontend to backend
• Authentication flow between layers
• Storage abstraction layer (storage/meta.py) connecting to different storage implementations
• User session management flow
Additional Elements
• A section for CI/CD pipeline (GitHub Actions)
• Docker container boundary
• Environment variable configuration points
• Integration points for derivatives (Home Assistant, Stream Deck)
Technical Details
• Python-based backend (FastAPI/Flask based on the structure)
• File-based storage options
• Docker containerization
• Environment variable configuration points
• Authentication flow
• API endpoints
This system design should help developers understand how to deploy, maintain, and extend the application while maintaining its core architectural principles.