๐จโ๐ป 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
๐๏ธ Architecture & Technologies
- ๐บ๏ธ System Overview โ High-level system diagrams, tech stack, and design decisions
- ๐งฉ Technologies & Patterns:
- โก Async Architecture โ async/await, aiosqlite, non-blocking I/O
- ๐ Registry & Plugin System โ Provider plugins for BRIM, Assets, FX
- ๐งฐ Tool Plugins โ Atomic, typed calculations behind a versioned catalogue (first tool: the PAC allocator), each computed in a spawned process the executor owns
- ๐๏ธ Database Migrations โ Alembic workflow, SQLite batch mode
- โ๏ธ Configuration โ
.envloading, PydanticBaseSettings, global settings (admin options: Configuration)
- ๐ Core Systems:
- ๐ก๏ธ Security & Authentication โ JWT cookies, endpoint protection
- ๐ค Users & Roles โ Login flow, session, user roles
- ๐ Access Control (RBAC) โ Broker sharing permissions
- โ๏ธ Settings System โ SETTINGS_REGISTRY, user vs global storage, base-currency resolution
- ๐งน Cache Registry & Admin โ named theine caches,
/settings/cache/*admin endpoints
- ๐๏ธ Database Schema:
- ๐ Overview โ ER diagram, design philosophy
- ๐ค Users & Access ยท ๐ฆ Brokers & Transactions ยท ๐ Assets & Pricing ยท ๐ฑ FX Rates & Routes
โ๏ธ 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
- ๐ FX Configuration & Routing โ Chain routing algorithm
- ๐ FX Providers โ ECB, FED, BOE, SNB technical details
- ๐ 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