Skip to content

๐Ÿ‘จโ€๐Ÿ’ป Developer Manual

Welcome to the Developer Manual. This section contains in-depth technical documentation about the LibreFolio architecture, codebase, and development practices.


๐Ÿš€ Getting Started

Set up your local development environment and learn the daily workflow:

  • ๐Ÿ“ฆ Host Installation โ€” Set up Python, Node.js, and Pipenv environment
  • ๐Ÿ”„ Developer Workflow โ€” Start Vite dev server and view all development CLI commands
  • ๐Ÿšฆ Lint Gates & Code Policy โ€” The ruff gate list, justified-noqa conventions, and code policies the linter can't express

Quick start

./dev.py install         # Install all dependencies
./dev.py db create-clean # Create fresh database
./dev.py server          # Start backend server
./dev.py front dev       # Start frontend dev server (separate terminal)

๐Ÿ—๏ธ Architecture & Technologies


โš™๏ธ Backend

  • ๐Ÿ“ฅ BRIM (Broker Report Import Manager) โ€” CSV/Excel import pipeline, plugin architecture
  • ๐Ÿ“ˆ Asset Pricing & Metadata โ€” How asset prices and metadata are fetched and managed
  • ๐Ÿงฎ Financial Math Layer โ€” The one home of financial calculations: package map, layer rules, guards
  • ๐Ÿ“ Price Resolver โ€” The single daily valuation-mark source behind NAV/MWRR/TWRR/ROI
  • ๐Ÿ’ฑ Foreign Exchange (FX) โ€” Multi-provider currency conversion system
  • ๐Ÿ“‰ Risk Engine โ€” Bulk risk analytics behind /api/v1/risk: plugin catalogue, eligibility verdicts, simulation and optimization in spawned worker pools
  • ๐Ÿ—ƒ๏ธ Database Schema โ€” SQLite schema split by subsystem (Users, Brokers, Assets, FX)

๐ŸŽจ Frontend

  • ๐Ÿ–ฅ๏ธ Frontend Development โ€” SvelteKit architecture, Svelte 5 Runes, directory structure
    • ๐Ÿงฑ Components โ€” Reusable UI component library
    • ๐Ÿ“„ Pages โ€” Application pages and routing
    • ๐Ÿ“ฆ State Management โ€” Stores and reactive state
    • ๐ŸŽจ Styling โ€” Tailwind CSS 4 and theming
  • ๐ŸŒ Internationalization (i18n) โ€” Multi-language support, audit CLI, key management
  • ๐Ÿ”— FX Chain Algorithm โ€” DFS + graphology for multi-step FX routes
  • ๐Ÿงญ Onboarding Guides โ€” Welcome setup, intro tour and contextual guides, with versioned per-user progress kept by the backend

๐ŸŒ API

  • ๐Ÿ“‹ API Overview โ€” OpenAPI-first workflow, schema export, TypeScript client generation
  • ๐Ÿ“– API Reference โ€” FastAPI endpoint documentation

๐Ÿงช Testing

  • ๐Ÿ” Test Walkthrough โ€” Full guide to the 10-category test suite
    • ๐Ÿ”ง Backend: External, Database, Services, Utils, Schemas, API, E2E
    • ๐ŸŽญ Frontend (Playwright): Front-Utility, Front-User, Front-FX