Files
finance/README.md
T
k1nq d582f15681 feat: add tests for import polling, login page, money utilities, and query keys
- Implemented tests for import polling functionality, ensuring correct behavior for active and terminal import statuses.
- Created tests for the login page, validating user interactions and error handling.
- Added unit tests for money utility functions, covering parsing, formatting, and summation of monetary values.
- Developed tests for query keys, ensuring proper scoping and invalidation roots.

chore: setup testing environment and configuration

- Added setup file for testing with Vitest and Testing Library.
- Configured TypeScript and Vite for the frontend project.
- Created Docker and Nginx configurations for local development and production environments.
- Established a PostgreSQL initialization script for setting up application roles.

docs: add README and environment configuration for infra

- Included README for the infra directory, detailing local development setup and service descriptions.
- Created an example environment configuration file for local development with placeholders for sensitive information.
2026-09-14 09:26:33 +05:00

57 lines
1.9 KiB
Markdown

# Finance Tracker
Closed-beta, zero-based personal budgeting for RUB accounts and credit cards.
The application is a modular monolith with a FastAPI API and Celery worker,
a React web client, PostgreSQL, Redis, S3-compatible object storage, and SMTP.
## Prerequisites
- Docker with Compose
- `uv` for backend development
- Node.js and Corepack (`corepack enable`) for frontend development
## Local stack
```bash
cp infra/.env.example infra/.env
docker compose --env-file infra/.env -f infra/docker-compose.yml up --build
```
The web application is served at `http://localhost:8080`; Mailpit is available
at `http://localhost:8025`, and the MinIO console at `http://localhost:9001`.
Run migrations before the first API start if the compose stack does not do it:
```bash
docker compose --env-file infra/.env -f infra/docker-compose.yml run --rm migrate
```
## Development checks
```bash
uv sync --project backend --all-groups --locked
uv run --project backend ruff check backend
uv run --project backend mypy --config-file backend/pyproject.toml backend/app
uv run --project backend pytest backend
corepack pnpm --dir frontend install --frozen-lockfile
corepack pnpm --dir frontend lint
corepack pnpm --dir frontend typecheck
corepack pnpm --dir frontend test
corepack pnpm --dir frontend build
```
Tests that use real bank documents are deliberately separate and require
`PRIVATE_FIXTURES_DIR`. Never put bank originals under a tracked repository
path. Synthetic parser fixtures are safe for CI.
## Production boundary
Production services must use Russian-hosted PostgreSQL, Redis, object storage,
and backups. TLS, a private object bucket, externally managed secrets, legal
review, and the private parser contract suite are release gates, not defaults
provided by the local compose stack. Browser-visible `VITE_*` variables must
never contain secrets.
See `CONTEXT.md` for domain terminology and `docs/adr/` for architectural
decisions.