Today: 9 Nov 2026

Learn: how Finance Lab is built

Spring Boot 3.5 · Java 21 · Spring Data JPA + JdbcTemplate · Flyway · SQL Server · Thymeleaf

The one idea behind everything: double entry

Every feature ends in a journal entry whose debits equal its credits. Reports never read invoices or bills - they read the journal lines through the view v_ledger. That is why the trial balance always balances and why the balance sheet, P&L and cash flow agree with each other.

Account typeGrows withExamples
AssetDebitBank, receivables, input VAT, laptops
ExpenseDebitSalaries, rent, FX loss
LiabilityCreditPayables, output VAT, WHT payable, loan
EquityCreditShare capital, retained earnings
RevenueCreditSoftware sales, consulting, FX gain

Layers - where to look

db/migrationFlyway SQL: tables, CHECK / UNIQUE constraints, filtered index, computed columns, the view v_ledger, master data
domainJPA entities (Lombok getters / setters), enums stored as text
repoSpring Data repositories, derived queries, @EntityGraph
servicePosting rules (@Transactional), reports with NamedParameterJdbcTemplate, BigDecimal money rules
webControllers, form binding + Bean Validation, PRG pattern (redirect after POST), SVG charts
configDemoDataSeeder - ten months of sample data posted through the real services

Feature map 411 - 430

Every page has a "How this works" panel at the bottom with the concepts, the classes to read and its SQL.

Exercises

  1. Record an expense with VAT 7 % and a withholding tax type, then open its journal entry: which four lines were posted?
  2. Create an invoice in USD, then receive it on a later date. Find the FX gain or loss line (428).
  3. Issue a credit note and watch the VAT report (423) for that month change.
  4. Post a manual journal that does not balance - read the error from JournalService.post.
  5. Make one cost center's budget smaller and open Budget vs actual (426).
  6. Run the SQL from a "How this works" panel in SQL Server Management Studio against FinanceLabDB.

Start again

Deletes every transaction (invoices, bills, journals, budgets, exchange rates) and creates the sample data again. Accounts, contacts and cost centers stay.