How arv100/finance-tracker works
Purpose and Repository Shape
Finance-Tracker is a split frontend/backend application for recording, categorizing, viewing, and analyzing financial transactions. The repository has independent Python backend and Next.js frontend roots, plus sample import data at dummy_data.csv.
Backend API and Application Entry
The backend’s primary runtime entry point is Backend/main.py. It likely exposes the application/API surface and coordinates request handling with authentication, persistence, transaction schemas, and categorization.
• Backend/main.py
• Backend/schemas.py
• Backend/requirements.txt
Authentication Boundary
Authentication is isolated from the main application flow, providing a clear boundary between identity/access handling and financial-data operations. Backend routes or services should depend on this module rather than embedding credential logic.
• Backend/auth.py
• Backend/main.py
• Backend/.env.example
Persistence and Domain Data
Database access is centralized in Backend/database.py; request and response/domain shapes are defined separately in Backend/schemas.py. This separation makes the database layer the persistence boundary and schemas the API contract boundary.
• Backend/database.py
• Backend/schemas.py
• Backend/main.py
Categorization Pipeline
Transaction categorization is a dedicated backend capability rather than a frontend concern. Transaction input—manual entry or uploaded file data—should flow through the API into persistence and/or Backend/categorization.py, which owns classification behavior.
• Backend/categorization.py
• Backend/schemas.py
• Backend/database.py
Frontend Application and Routes
The frontend is a Next.js application with a root route, login route, and dashboard route. Shared layout establishes application-wide structure; dashboard-specific components compose the transaction-management and analytics experience.
• Frontend/app/layout.tsx
• Frontend/app/login/page.tsx
• Frontend/app/dashboard/page.tsx
Dashboard Data Flow
The dashboard contains distinct presentation stages for transaction entry, file import, tabular transaction display, summary cards, and analytics charts. API communication is centralized in the frontend client boundary rather than distributed across UI components.
• Frontend/lib/api.ts
• Frontend/components/dashboard/transaction-form.tsx
• Frontend/components/dashboard/file-uploader.tsx
• Frontend/components/dashboard/data-table.tsx
• Frontend/components/dashboard/analytics-charts.tsx
Runtime and Infrastructure Boundaries
The frontend uses the Node.js/Next.js ecosystem (Frontend/package.json) and includes query/theme providers for cross-cutting client behavior. The backend uses Python dependency management (Backend/pyproject.toml, Backend/uv.lock) and environment-based configuration. The database technology and external authentication provider cannot be determined from the supplied tree.
• Frontend/components/query-provider.tsx
• Frontend/package.json
• Backend/pyproject.toml
Main entry points: main.py Backend API · api.ts API client · page.tsx Dashboard route · layout.tsx Shared layout
Components 18
Next.js Frontend
- Shared layout · Establishes application-wide structure.
Frontend/app/layout.tsx - Query & theme providers · Provides cross-cutting client behavior.
Frontend/components/query-provider.tsx - Login route
Frontend/app/login/page.tsx - Dashboard route · Composes transaction management and analytics.
Frontend/app/dashboard/page.tsx - API client · Centralizes backend communication.
Frontend/lib/api.ts - Transaction entry
Frontend/components/dashboard/transaction-form.tsx - File import
Frontend/components/dashboard/file-uploader.tsx - Transaction table
Frontend/components/dashboard/data-table.tsx - Analytics charts
Frontend/components/dashboard/analytics-charts.tsx - Next.js runtime
Frontend/package.json
Python Backend
- Backend API · Exposes financial-data operations and coordinates backend services.
Backend/main.py - Authentication · Separates access handling from financial-data operations.
Backend/auth.py - API schemas · Defines request, response, and transaction shapes.
Backend/schemas.py - Categorization · Classifies transaction data.
Backend/categorization.py - Database access · Centralizes financial-data persistence.
Backend/database.py - Backend environment · Supplies backend runtime configuration.
Backend/.env.example - Python runtime
Backend/pyproject.toml
Other components
- Sample import data
dummy_data.csv
Connections 23
- Shared layout → Query & theme providers: wraps
- Shared layout → Login route: hosts
- Shared layout → Dashboard route: hosts
- Dashboard route → Transaction entry: composes
- Dashboard route → File import: composes
- Dashboard route → Transaction table: composes
- Dashboard route → Analytics charts: composes
- Login route → API client: auth requests
- Transaction entry → API client: submits transactions
- File import → API client: uploads imports
- Transaction table → API client: loads transactions
- Analytics charts → API client: loads analytics
- Sample import data → File import: example input
- API client → Backend API: HTTP API
- Backend API → Authentication: authorizes requests
- Backend API → API schemas: validates contracts
- Backend API → Categorization: categorizes imports
- Backend API → Database access: reads and writes
- Categorization → API schemas: uses transaction shapes
- Categorization → Database access: updates classified data
- Backend environment → Backend API: configures
- Next.js runtime → Shared layout: runs
- Python runtime → Backend API: runs