Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/soker90/finper/llms.txt

Use this file to discover all available pages before exploring further.

Finper is a pnpm monorepo with three primary packages: api (Express + TypeScript), client (React + Vite), and db (Drizzle ORM + SQLite). A Makefile at the root provides short aliases for the most common workflows. This page documents every available command and explains how the test and lint setups work.

All make commands

Run make with no arguments to print the built-in help text.
CommandDescription
make installInstall all workspace dependencies (pnpm install)
make build-typesCompile the shared @soker90/finper-types package
make build-dbCompile the @soker90/finper-db package
make build-apiCompile the API (chains build-typesbuild-db → TypeScript compile)
make build-clientBuild the React client for production
make start-apiStart the API server (builds TypeScript first)
make start-clientStart the Vite dev server for the client
make seed-user USERNAME=... PASSWORD=...Create an initial user (see User Management)
make lint-apiRun ESLint on the API package
make lint-clientRun ESLint on the client package
make lint-dbRun ESLint on the db package
make test-apiRun Jest tests for the API
make test-clientRun Vitest tests for the client
make test-dbRun Vitest tests for the db package
make testRun all tests across all packages in parallel
make cleanRemove all dist/, coverage/, and node_modules/ directories

pnpm equivalents

Every make target is a thin alias over a pnpm --filter command. You can call pnpm directly if you prefer:
# Build
pnpm --filter @soker90/finper-types build
pnpm --filter @soker90/finper-db build
pnpm --filter @soker90/finper-api build
pnpm --filter @soker90/finper-client build

# Start
pnpm --filter @soker90/finper-api start
pnpm --filter @soker90/finper-client dev

# Test
pnpm --filter @soker90/finper-api test
pnpm --filter @soker90/finper-client test
pnpm --filter @soker90/finper-db test

# Lint
pnpm --filter @soker90/finper-api lint
pnpm --filter @soker90/finper-client lint
pnpm --filter @soker90/finper-db lint

# Seed user
INIT_USERNAME=admin INIT_PASSWORD=mypassword \
  pnpm --filter @soker90/finper-api seed-user

Testing

API — Jest + supertest

The API test suite uses Jest with ts-jest and supertest to make real HTTP requests against an in-memory SQLite database. No external services or running API instance is required.
  • Test files live in packages/api/src/**/__tests__/
  • The test runner sets ALLOW_REGISTRATION=true so registration flows can be tested without adjusting the env
  • Before running API tests for the first time, build the upstream packages:
make build-types
make build-db
make test-api

Client — Vitest + Testing Library + MSW

The React client uses Vitest as the test runner, @testing-library/react for component assertions, and MSW (Mock Service Worker) to intercept API calls. No running API or database is needed.
make test-client

DB — Vitest

The database package has its own isolated Vitest suite. No API prerequisites required.
make test-db

Run all tests

make test
This runs all packages in parallel with pnpm -r --parallel test.
make test-api
# or
pnpm --filter @soker90/finper-api test

Linting

All packages use ESLint with a flat config (eslint.config.mjs). The API and client configs extend neostandard and @typescript-eslint for consistent style and type-aware rules. Check for lint errors:
make lint-api
make lint-client
make lint-db
Auto-fix lint errors:
# API
pnpm --filter @soker90/finper-api lint:fix

# Client
pnpm --filter @soker90/finper-client lint:fix

Toolchain notes

ToolVersionNotes
Node.js≥ 24Enforced via .nvmrc (value: 24). Use nvm use to switch automatically.
pnpm10The Dockerfile pins pnpm@10.29.3 via corepack. .npmrc does not enforce engine-strict, but mismatched pnpm versions may produce lock file warnings.
TypeScriptstrict"strict": true is set in both packages/api/tsconfig.json and packages/client/tsconfig.json.
HuskyGit hooks are installed via Husky. A pre-commit hook runs on staged files.
commitlintCommit messages are linted on commit-msg to enforce Conventional Commits format.

After making any changes to packages/db (schema, migrations) or packages/types (shared types), always rebuild those packages before restarting the API:
make build-db
make build-types
make start-api
The API’s TypeScript compilation imports from the built output of these packages. Stale builds will cause type errors or runtime failures.

Build docs developers (and LLMs) love