How lebriton/ihatetobudget works
Main Components
a. Frontend Layer:
• Template-based UI (Django Templates)
• Static assets (CSS)
• Organized into main sections: Categories, Sheet, Overview, and History views
• Authentication interface
b. Backend Layer:
• Django Web Application
• URL routing system
• View controllers
• Template processors
• Custom template tags
c. Data Layer:
• SQLite database
• Models for expenses and categories
• Database migrations
d. Background Services:
• Cron jobs for scheduled tasks
┌─────────────────────────────────────────────┐
• Client Layer │
• (Browser/User Interface) │
• ┘
• ↕
┌─────────────────────────────────────────────┐
• Web Server (Caddy) │
• ┘
• ↕
┌─────────────────────────────────────────────┐
• Django Application Layer │
• ┬─────────────┬─────────────────┤
• Templates │ Views │ Forms │
• Base │ - Sheets │ - Category │
• Sheets │ - Category │ - Expense │
• Common │ - History │ │
• ┴─────────────┴─────────────────┘
• ↕
┌─────────────────────────────────────────────┐
• Data Layer │
• ┬─────────────────────┤
• Models │ Database │
• Expenses │ (SQLite) │
• Categories │ │
• ┴─────────────────────┘
• ↕
┌─────────────────────────────────────────────┐
• Background Services │
• (Cron Jobs) │
• ┘
Important Details to Highlight
a. Application Structure:
• Main Django app 'ihatetobudget' and the 'sheets' app
• Template inheritance structure
• Authentication boundaries
b. Data Flow:
• User request flow through the layers
• CRUD operations for expenses and categories
• Authentication flow
c. Docker Container Boundary:
• Containerized environment
• Volume mounts for persistence
• Caddy reverse proxy setup
Key Relationships to Emphasize
• Template inheritance patterns
• Model-View-Template (MVT) pattern implementation
• URL routing to view functions
• Database migration system
• Static file serving
Technical Details
• Python 3.8 runtime environment
• Django framework components
• SQLite database connection
• Cron job scheduling
• Docker containerization