c2202ea0bb58bf5c0dc1fb50eefe65c985dca7df
Firefly III Analytics & Reporting
A flexible web application for analytics and reporting on Firefly III personal finance data.
Features
- 📊 Interactive dashboard with key financial metrics
- 📈 Flexible date range selection for custom reporting periods
- 📉 Multiple chart types: trends, category breakdowns, income vs expenses, budget vs actual
- 🎯 Dynamic filtering and grouping by category and account type
- 🚀 Responsive design for desktop and mobile
- 🔐 Secure connection to your Firefly III instance
- 💾 Local SQLite caching to minimize API calls
Quick Start
Prerequisites
- Docker and Docker Compose
- Firefly III instance with API token
Setup
-
Clone this repository
cd firefly_reports -
Create environment file
cp .env.example .env -
Configure your Firefly III instance Edit
.envand set:FIREFLY_URL=https://firefly.scsimedia.duckdns.org FIREFLY_API_TOKEN=your_api_token_here -
Start the application
docker-compose up -d -
Access the dashboard
- Frontend: http://localhost:3000
- API: http://localhost:8000
Architecture
firefly_reports/
├── backend/ # FastAPI backend
│ ├── app/
│ │ ├── main.py
│ │ ├── config.py
│ │ ├── database.py
│ │ ├── models.py
│ │ ├── routers/ # API endpoints
│ │ ├── services/ # Business logic
│ │ └── clients/ # Firefly III API client
│ ├── Dockerfile
│ └── pyproject.toml
├── frontend/ # React frontend
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── services/
│ │ └── App.tsx
│ ├── Dockerfile
│ └── package.json
├── docker-compose.yml
└── .env
Project Structure
- Backend: Python FastAPI with SQLAlchemy ORM, SQLite database
- Frontend: React 18 with TypeScript, Recharts for visualizations
- Database: SQLite with caching for Firefly III data
Development
Backend
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e ".[dev]"
uvicorn app.main:app --reload
Frontend
cd frontend
npm install
npm start
API Endpoints
GET /api/transactions- Cached transaction dataGET /api/categories- Category dataGET /api/accounts- Account informationGET /api/reports/{report_type}- Generate reports (spending-by-category, trends, budget-vs-actual, income-vs-expenses)GET /api/summary- Dashboard summary metrics
Reports Available
- Spending by Category - Breakdown of expenses by category
- Income vs Expenses - Comparison of income and expenses over time
- Budget vs Actual - How actual spending compares to budgets
- Trends - Financial trends over time (line charts)
- Account Balances - Net worth and account balance trends
Configuration
See .env.example for available environment variables:
FIREFLY_URL- Your Firefly III instance URLFIREFLY_API_TOKEN- Your Firefly III API tokenSYNC_INTERVAL_MINUTES- How often to sync data (default: 30)
License
MIT
Description
Languages
Python
90.8%
TypeScript
5.3%
Batchfile
1.6%
PowerShell
1%
Shell
0.9%
Other
0.4%