A personal finance analytics backend that ingests transaction data, cleans and categorizes transactions, and exposes API endpoints for dashboard-ready spending insights.
- FastAPI backend for transaction ingestion, mock Plaid-style sync, and spending analytics
- SQLAlchemy data model that runs locally with SQLite and is PostgreSQL-ready through Docker Compose
- pandas and NumPy analytics for category, merchant, monthly, and anomaly summaries
- Lightweight dashboard endpoint for demo-ready insights
- Test suite covering analytics functions and API behavior
This project is useful for software engineering, data analyst, and data science internships because it combines API design, database modeling, data cleaning, and product analytics.
- Python
- FastAPI
- SQLAlchemy
- PostgreSQL-ready data model
- pandas + NumPy
- Plaid Sandbox-inspired mock data
- Transaction ingestion endpoint
- Mock Plaid sync endpoint for sandbox-style transactions
- Category, merchant, and monthly spending summaries
- Simple anomaly detection for unusually large transactions
- Dashboard summary endpoint for frontend-ready metrics
- Lightweight local dashboard at
/dashboard - Isolated test suite for analytics and API behavior
- Developed a backend analytics platform that ingests transaction data, normalizes financial records, and stores structured user spending data with SQLAlchemy.
- Implemented transaction cleaning and category-mapping workflows with pandas and NumPy to analyze monthly spending patterns across merchants and categories.
- Built REST API endpoints for spending summaries, anomaly detection, and category-level insights, enabling dashboard-ready financial reporting.
Recommended Python version: 3.12.
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reloadOpen:
- API docs: http://localhost:8000/docs
- Health check: http://localhost:8000/health
- Dashboard: http://localhost:8000/dashboard
Seed demo data:
curl -X POST http://localhost:8000/seedRun tests:
pip install -r requirements-dev.txt
python -m pytestPOST /transactionscreates a transactionPOST /plaid/sync/mocksyncs Plaid Sandbox-inspired mock transactionsPOST /seedloads Plaid Sandbox-inspired mock transactionsGET /transactionslists transactionsGET /analytics/category-summarygroups spend by categoryGET /analytics/merchant-summarygroups spend by merchantGET /analytics/monthly-summarygroups spend by monthGET /analytics/anomaliesflags unusually large transactionsGET /analytics/dashboardreturns dashboard-ready metrics
See docs/api.md for endpoint descriptions and sample request
payloads.
The data stack is pinned for Python 3.12 because pandas and NumPy wheels are
more reliable there than on bleeding-edge Python versions. If your default
python3 is newer, create the virtual environment with a Python 3.12 binary.
The default local database is SQLite. To run with PostgreSQL:
docker compose up --build
curl -X POST http://localhost:8000/plaid/sync/mockThe Docker Compose setup uses a local Postgres container and does not require paid Plaid credentials.
See docs/architecture.md for the data flow, analytics
layer, and design tradeoffs.
- How transaction records are normalized before analytics
- Why API validation and database modeling matter for financial data
- How pandas groupby operations support dashboard metrics
- How anomaly detection can start simple and improve with more user history
- Replace mock data with Plaid Sandbox integration
- Add user authentication
- Add recurring subscription detection
- Add React dashboard