How contre95/expense-mate works
Main Components Identification
The project follows a clean architecture pattern with clear separation of concerns. The main components to represent are:
a) Presentation Layer:
• Web UI (Fiber + HTMX)
• Telegram Bot Interface
• REST API
b) Application Layer:
• Analyzing Module
• Managing Module
• Querying Module
• Tracking Module
• Health Module
c) Domain Layer:
• Expense Domain
• Rules Domain
• Users Domain
d) Infrastructure Layer (Gateways):
• Storage (SQL and JSON)
• Logger
• Password Hasher
Specific Components Detail
Frontend Section:
• Web UI components (dashboard, expenses, settings, importers)
• HTMX integration points
• Static assets and views
Application Services:
• Four main modules (analyzing, managing, querying, tracking)
• Their interaction with the domain layer
Storage Layer:
• Both SQL (expenses, rules) and JSON (users) storage
• Database schema relationships
Integration Points
• N26 CSV import workflow
• Telegram bot command flow
• API endpoints
Additional Elements
Include:
• Configuration components (.env, air.toml)
• External service connections (Telegram API)
• Security layer (password hashing)
• The clean architecture pattern
• The dual interface nature (Web + Telegram)
• The flexible storage engine design (SQL/SQLite + JSON)
• The rule-based categorization system
This project particularly requires emphasis on: