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.
- Centralized Dashboard: Unified view of your financial health with interactive balance forecasting.
- Transaction Management: Robust filtering, categorization, and smart import (CSV/JSON).
- 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: Deep-dive into spending patterns with category-based breakdowns and YoY trends.
- 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/).
- 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: Project-wide linting via ESLint (JS, Vue, JSON), Stylelint (CSS/Tailwind v4), and Markdownlint. Unified under
pnpm run lint:all. - 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 is fully compatible with the Gemini CLI and other AI-assisted development tools.
- GEMINI.md: This file contains the primary context, architectural protocols, and mandatory coding standards for AI agents. It ensures that any AI-generated code or refactoring remains consistent with the project's established patterns and design principles.
- 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.
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.
Contributions are welcome! To ensure stability and high code quality, please follow these steps:
-
Fork the repository.
-
Create a feature branch (
git checkout -b feature/AmazingFeature). -
Lint-First Rule: If your feature introduces a new language or framework, ensure its linter is configured and added to
pnpm run lint:allbefore implementation. -
Auto-Fix Rule: Before manually addressing linting errors, always execute the project's auto-fixers to save time and tokens:
pnpm exec eslint '**/*.{js,mjs,vue}' --fix pnpm exec stylelint 'frontend/src/**/*.css' --fix
-
Run local tests to ensure no regressions:
pnpm test # Backend tests pnpm run test:ui # Frontend tests pnpm run lint:all # Code quality audit
-
Commit your changes (
git commit -m 'feat: Add some AmazingFeature'). -
Push to the branch (
git push origin feature/AmazingFeature). -
Open a Pull Request.
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.



