FinTrack is a comprehensive, modern personal finance management application. Built with Vue 3 and Node.js, it provides an intuitive interface to track income, manage budgets, analyze spending trends, and monitor subscriptionsβall in one place.
- Features
- Quick Start
- Core Concepts
- Previews
- Architecture & Dependencies
- DevOps & Tooling
- Getting Started
- Contributing
- Security
- License
# Clone and setup
git clone https://github.com/niyazmft/financial_tracker.git
cd financial_tracker
pnpm install
# Configure environment
cp .env.example .env
# Edit .env with your Firebase and NocoDB credentials
# Start infrastructure (Docker)
cd infrastructure/docker && docker-compose up -d && cd ../..
# Setup database tables
pnpm run db:setup
# Start development
pnpm run devOpen: http://localhost:3000
For detailed setup instructions, see Getting Started.
- Centralized Dashboard: Unified view of your financial health with interactive balance forecasting.
- Plain-Language Insights: A "Money at a glance" advisory reads your financial health in everyday words β projected dips, one-time anomalies, and your long-term outlook β with confidence bands on the forecast.
- Actionable Risk Alerts: Forecast warnings and spending anomalies don't just describe risk β they offer next steps (review a category, set a budget, check installments).
- Transaction Management: Robust filtering, categorization, and smart import (CSV/JSON) with a resilient CSV parser.
- Intelligent Tagging: Automate transaction categorization with custom rules.
- Budget Manager: Set monthly targets per category with real-time progress tracking.
- Installment Plans: Manage long-term payments with automatic schedule generation and rebalancing.
- Subscription Tracker: Identify and track recurring payments with smart suggestions from your transaction history.
- Spending Analysis & Reports: Deep-dive into spending patterns with category-based breakdowns, YoY trends, and a dedicated Reports page.
- Secure Auth & Analytics: Powered by Firebase Authentication for secure sign-up and session management, and Firebase Analytics to track user interactions and improve the experience.
- Smart Notifications: Transactional emails for welcome messages and password resets (Dev-friendly with Ethereal).
Understanding how FinTrack processes your data helps you get the most out of the application.
FinTrack uses a two-tier approach to organize your spending:
- Manual Categories: Every transaction is assigned to a category (e.g., "Groceries", "Salary"). Categories are either typed as
earningorspending. - Intelligent Tagging Rules: You can create custom rules (e.g., "If description contains 'Amazon', set category to 'Shopping'"). When you import transactions, these rules are applied automatically to save time.
The application automatically calculates your "Estimated Monthly Income" by averaging all earning category transactions from the last 6 months. This estimate is used as the baseline for your dashboard's balance forecasting.
Budgets are set per category for a specific date range. FinTrack tracks your real-time spending against these targets.
- Spent Amount: Only negative transactions within the budget's category and date range are counted.
- Visual Progress: Progress bars turn from green to red as you approach or exceed your limits.
The system monitors your spending patterns to identify unusual activity:
- Logic: It compares recent transactions (last 30 days) against your historical average (90-day window) for each category.
- Sensitivity: If a transaction is
Xtimes higher than your average (whereXis your sensitivity setting), it triggers an alert.
| Dashboard | Transactions |
|---|---|
![]() |
![]() |
| Budget Manager | Spending Analysis |
|---|---|
![]() |
![]() |
FinTrack follows a clean, modular architecture separating the frontend, backend, and infrastructure layers.
- Frontend: Vue 3 (Composition API), Pinia (State), PrimeVue (UI), Tailwind CSS.
- Backend: Node.js, Express.js (REST API).
- Data Layer: NocoDB (Low-code DB interface) on top of PostgreSQL.
- Authentication & Analytics: Firebase Admin SDK (Backend), Firebase Client SDK (Frontend).
- Infrastructure: Docker & PM2 configurations (located in
infrastructure/).
The following are intentional architectural trade-offs documented for contributors and future audits:
- PrimeVue Vendor Chunking: All PrimeVue dependencies are bundled into a single
vendor-primevuechunk via Vite'smanualChunks. This is a deliberate caching strategy β per-component tree-shaking is already applied at import level. The chunk size is an accepted trade-off for fewer HTTP requests. - Force Token Refresh: The auth store uses
getIdToken(true)to guarantee fresh Firebase tokens on every API call. This prioritizes security (zero stale-token risk) over per-call latency. A future optimization may switch to cached tokens with 401-retry. - Knip False Positives: Some exports flagged by Knip (
pnpm run lint:unused) are internally-used utilities (e.g.,getFirebaseAppconsumed bygetFirebaseAuth). Verify internal references before deleting any flagged export.
- CI/CD Pipeline: Automated testing (Mocha/Vitest) and build checks via GitHub Actions.
- Logging: Structured logging with Winston, supporting daily rotation and separate error logs.
- Email Service: Nodemailer with Handlebars templates. Uses Ethereal (fake SMTP) in dev for easy testing.
- Testing:
- Backend: Mocha + Sinon + Supertest
- Frontend: Vitest + Vue Test Utils
- Code Quality:
- ESLint (JS, Vue, JSON), Stylelint (CSS/Tailwind v4), Markdownlint - Unified under
pnpm run lint:all. - Knip (unused exports/files), depcheck (unused dependencies) - Run via
pnpm run analyze.
- ESLint (JS, Vue, JSON), Stylelint (CSS/Tailwind v4), Markdownlint - Unified under
- Git Hooks: Automated pre-commit hooks via Husky and lint-staged ensure all staged code is automatically fixed and validated before being committed.
FinTrack is designed to be AI-native and compatible with AI-assisted development tools like OpenCode and Gemini CLI.
- AGENTS.md: Contains developer guidelines, coding standards, and architectural protocols for AI agents working on this codebase.
- Protocol-Driven: The codebase follows a strict service-layer architecture and TDD workflow, making it highly predictable and safe for automated interventions.
FinTrack utilizes NocoDB to manage its data. Ensure the following tables are set up in your NocoDB instance with these specific fields:
-
bank_statments (Transactions)
Id: Primary Keyuser_id: Text (User's Firebase UID)date: Dateamount: Number (Negative for expenses, positive for income)bank: Textdescription: Textref_no: Text (Reference number for bank transactions)categories_id: Link to categories tableis_deleted: Boolean
-
categories
Id: Primary Keyuser_id: Text (User's Firebase UID)category_name: Texttype: Text (e.g., 'spending', 'earning')is_deleted: Boolean
-
subscriptions
Id: Primary Keyuser_id: Text (User's Firebase UID)name: Textamount: Numbercurrency: Text (Default: 'TRY')billing_cycle: Text (e.g., 'monthly', 'weekly', 'bi-weekly')status: Text (e.g., 'Active', 'Inactive')start_date: Datenext_payment_date: Dateauto_renewal: Booleannotes: Long Textcategories_id: Link to categories table
-
items
Id: Primary Keyuser_id: Text (User's Firebase UID)item_name: Textcategories_id: Link to categories tableis_deleted: Boolean
-
saving_goals
Id: Primary Keyuser_id: Text (User's Firebase UID)goal_name: Texttarget_amount: Numberpriority: Number (Integer)target_date: Date- (Note:
current_amountis dynamically calculated by the application.)
-
budget_manager
Id: Primary Keyuser_id: Text (User's Firebase UID)target_amount: Numberstart_date: Dateend_date: Dateis_active: Booleancategories_id: Link to categories table
-
installments_per_record
Id: Primary Keyuser_id: Text (User's Firebase UID)installment_payment: Numberstart_date: Datepaid: Booleanitems_id: Link to items tablecategories_id: Link to categories tableis_deleted: Boolean
-
tagging_rules
Id: Primary Keyuser_id: Text (User's Firebase UID)keyword: Texttype: Text (e.g., 'contains')categories_id: Link to categories table
-
user_settings
Id: Primary Keyuser_id: Text (User's Firebase UID)name: Textemail: Text (Email format)monthly_income_estimate: Numbercurrency: Text (e.g., 'TRY')time_zone: Textwarning_threshold: Numberanomaly_detection_enabled: Booleananomaly_detection_sensitivity: Numberdismissed_warnings: JSONonboarding_completed: Boolean
- Node.js (v18 or higher)
- Docker & Docker Compose
- A Firebase Project (for Auth & Analytics)
-
Clone the repository
git clone https://github.com/niyazmft/financial_tracker.git cd financial_tracker -
Configuration
-
Copy the example environment file:
cp .env.example .env
-
Open
.envand fill in your Firebase credentials and NocoDB tokens. -
Place your Firebase Service Account JSON file in the root directory (e.g.,
service-account.json). -
Associate your Firebase Project:
firebase use --add
-
-
Development Workflow This project uses a hybrid workflow: Docker handles the infrastructure (Database, NocoDB), while the FinTrack App runs locally on your machine for rapid development.
Spin up Postgres and NocoDB using Docker Compose:
cd infrastructure/docker docker-compose up -d cd ../..
- NocoDB Dashboard: http://localhost:8080
Instead of creating tables manually, run the automated setup script. This will create all necessary tables, columns, and relationships in your NocoDB project.
-
Login to NocoDB and create a new Project/Base (e.g., "FinTrack").
-
Get your API Token (My Settings -> API Tokens) and Base ID (Project Settings).
-
Update your
.envfile withNOCODB_API_TOKENandNOCODB_PROJECT_ID. -
Run the setup script from the root directory:
pnpm run db:setup
Note: If the script detects existing tables, it will abort to prevent data loss. Use
pnpm run db:setup -- --forceto override this safeguard. -
The script will output the created Table IDs. Copy them into your
.envfile to finalize the configuration.
The following scripts are available in
backend/scripts/to help with development and debugging:-
Seed Data: Populates your database with realistic dummy data for testing.
pnpm run db:seed -- <USER_ID>
-
Check Data: A diagnostic tool to verify the existence and integrity of a user's data.
pnpm run db:check -- <USER_ID>
-
Email Diagnostic: Interactively verify your SMTP configuration by sending a test email.
pnpm run test:email
Run the frontend and backend locally from the root directory:
# Install dependencies pnpm install # Development Mode (Hot Reload) pnpm run dev
- FinTrack App: http://localhost:3000
Note: Ensure your
.envfile is configured with the correctNOCODB_API_TOKENafter you set up your NocoDB account in Step 1.For production environments, the app is configured for process management via PM2. This ensures the application stays alive indefinitely and restarts automatically if it crashes.
Run with PM2:
pnpm run pm2:start
Key Benefits:
- Process Monitoring: Automatically restarts the server on crashes or system reboots.
- Background Management: Runs the application as a background daemon.
- Log Management: Centralized logs for both
stdoutandstderr. - Zero-Downtime Reload: (Available via
pm2 reload) for seamless updates.
Note: Configuration is located in
infrastructure/ecosystem.config.js.
The backend provides a RESTful API. Key endpoints include:
GET /api/transactions- Fetch transactions with filtering.POST /api/transactions- Create a new transaction.GET /api/budgets/active- Get currently active budgets.GET /api/subscriptions- List all subscriptions and recurring payments.GET /api/cash-flow-forecast- Get 30-day balance projection (with confidence bands).GET /api/anomalies- Get detected spending anomalies.GET /api/anomalies/advisory- Get a plain-language financial health advisory.GET /api/salary/last-month- Get last month's earnings summary.GET /api/spending/monthly-data- Get monthly spending trend.GET /api/spending/categories- Get spending breakdown by category.
Full API documentation is available in the codebase under backend/routes.
- NocoDB Connection Failed: Ensure the
nocodb-appcontainer is healthy (docker ps) and that your.envNOCODB_API_URLmatches the Docker port (default 8080). - Docker Paths: All infrastructure files are located in
infrastructure/docker. Commands should be run from that directory or use the absolute path. - Firebase Errors: specific
service-account.jsonerrors usually mean the file is missing or the path in.envis incorrect. - Port Conflicts: If port 3000 or 5432 is taken, update
infrastructure/docker/docker-compose.ymlor your local env.
For information about reporting security vulnerabilities, see our Security Policy.
We use:
- β Secret scanning to detect leaked credentials
- β Dependabot for automated security updates
- β CodeQL for code analysis
- β Protected branches with required reviews
We welcome contributions! Please see our Contributing Guide for detailed guidelines on:
- Development workflow
- Coding standards (AGENTS.md)
- Testing requirements
- Pull request process
Quick start for contributors:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Run tests and linting:
pnpm run lint:all && pnpm test && pnpm run test:ui - Commit your changes (
git commit -m 'feat: Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Please read our Code of Conduct before contributing.
This project was developed with the help of modern AI and design tools:
- Gemini CLI: For autonomous coding, refactoring, and project management.
- Google Stitch: For visual design and UI components.
This project is licensed under the Apache License 2.0. See the LICENSE and NOTICE files for details.



