Skip to content

popka13221/FinGuard

Repository files navigation

FinGuard — Personal Finance Tracker (Spring Boot)

English | Русский

CI CodeQL

Portfolio-ready personal finance tracker: accounts, transactions, reports, FX/crypto rates, and a static dashboard UI.

Features (v1)

  • Auth: registration + email verification, login, refresh, optional OTP; JWT in httpOnly cookies (or Authorization: Bearer).
  • Accounts: CRUD, archive, balances recalculated from transactions.
  • Categories: global defaults + user-defined categories.
  • Transactions: income/expense, recalculates account balance.
  • Reports: summary/by-category/cash-flow with conversion into user base currency.
  • FX: store and serve latest FX snapshots (admin upsert API).
  • Crypto: BTC/ETH rates + crypto wallet summary.
  • Static UI: landing, auth pages, dashboard (EN/RU + base currency switch).

Tech stack

  • Java 17+, Spring Boot (Web, Security, Data JPA, Validation, Scheduling, Actuator)
  • PostgreSQL + Flyway
  • Maven, Docker Compose (Postgres)
  • Playwright (E2E)

Quick start (local)

  1. Prerequisites: Java 17+, Maven, Docker
  2. Configure env
    • Copy .env.example.env and set JWT_SECRET (Base64, 32+ bytes).
    • ./scripts/run-local.sh loads .env automatically.
    • Generate a local secret:
      python -c "import secrets,base64; print(base64.b64encode(secrets.token_bytes(48)).decode())"
  3. Start Postgres
    docker compose up -d postgres
  4. Run backend
    ./scripts/run-local.sh
    # or
    mvn spring-boot:run
  5. Open
    • UI: http://localhost:8080/
    • Login: http://localhost:8080/app/login.html
    • Dashboard: http://localhost:8080/app/dashboard.html
    • Swagger UI: http://localhost:8080/swagger-ui/index.html
    • Health: http://localhost:8080/actuator/health

Demo (UI + Swagger)

  1. Register in UI (/app/login.html) and verify email (default code in dev is 654321, config: app.security.tokens.fixed-code).
  2. Create a couple of accounts/transactions via Swagger (or docs/API_EXAMPLES.md), then refresh /app/dashboard.html.

Configuration (env)

  • DB: DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD (or DB_URL).
  • JWT: JWT_SECRET is required (Base64, 32+ bytes).
  • CSRF: APP_SECURITY_CSRF_ENABLED=true|false (disable for quick curl/Swagger experiments).
  • OTP: OTP_ENABLED=true|false.

API examples

  • Swagger UI: http://localhost:8080/swagger-ui/index.html
  • Examples (curl + Postman import tips): docs/API_EXAMPLES.md

Tests

  • Backend: mvn test
  • E2E:
    npm ci
    npx playwright install --with-deps chromium
    npm run e2e

Roadmap

  • Rules + notifications: monthly category spending limit + in-app alerts.
  • Goals: progress + required monthly savings.
  • More docs: ER diagram, release notes, API cookbook.

About

Personal Finance & Alerts Platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors