From da178b48fc8a5d783a43f11e6d90e15ee15f8dd4 Mon Sep 17 00:00:00 2001 From: code Date: Sun, 22 Nov 2026 17:55:25 +0000 Subject: [PATCH] paisa: templates/ (personal, household, business, corporation); richer demo data - templates/: split template/ into personal, household, business (sole proprietor) and corporation - demo: BMO/RBC/Scotiabank/CIBC accounts, GIC, BTC wallet, office equipment, hand tools, recurring internet/water/cleaning, more credit card activity; tax sheet figures updated - year and budget files include accounts.ledger so the editor's per-file --pedantic check passes - docs follow ${VOL_PATH:-/data}/paisa; drop paisa VOL_PATH exceptions Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 1 - _docs/lint.py | 3 +- paisa/README.md | 30 ++-- paisa/config/paisa.yaml | 2 +- paisa/demo/2025.ledger | 60 +++++-- paisa/demo/2026.ledger | 157 +++++++++++++++--- paisa/demo/accounts.ledger | 26 ++- paisa/demo/budget.ledger | 8 +- paisa/demo/main.ledger | 2 +- paisa/demo/paisa.yaml | 16 +- paisa/demo/sheets/tax-estimates.paisa | 14 +- paisa/docs/demo.md | 68 ++++++-- paisa/sample.env | 2 +- .../business}/.gitignore | 0 paisa/templates/business/2026.ledger | 39 +++++ paisa/templates/business/accounts.ledger | 51 ++++++ paisa/templates/business/budget.ledger | 13 ++ paisa/templates/business/main.ledger | 10 ++ paisa/templates/business/paisa.yaml | 80 +++++++++ .../business}/sheets/.gitkeep | 0 paisa/templates/corporation/.gitignore | 3 + .../corporation}/2026.ledger | 3 + .../corporation}/accounts.ledger | 0 .../corporation}/budget.ledger | 3 + .../corporation}/main.ledger | 2 +- .../corporation}/paisa.yaml | 2 +- paisa/templates/corporation/sheets/.gitkeep | 0 paisa/templates/household/.gitignore | 3 + paisa/templates/household/2026.ledger | 46 +++++ paisa/templates/household/accounts.ledger | 76 +++++++++ paisa/templates/household/budget.ledger | 20 +++ paisa/templates/household/main.ledger | 9 + paisa/templates/household/paisa.yaml | 95 +++++++++++ paisa/templates/household/sheets/.gitkeep | 0 paisa/templates/personal/.gitignore | 3 + paisa/templates/personal/2026.ledger | 41 +++++ paisa/templates/personal/accounts.ledger | 58 +++++++ paisa/templates/personal/budget.ledger | 17 ++ paisa/templates/personal/main.ledger | 9 + paisa/templates/personal/paisa.yaml | 87 ++++++++++ paisa/templates/personal/sheets/.gitkeep | 0 41 files changed, 973 insertions(+), 86 deletions(-) rename paisa/{template => templates/business}/.gitignore (100%) create mode 100644 paisa/templates/business/2026.ledger create mode 100644 paisa/templates/business/accounts.ledger create mode 100644 paisa/templates/business/budget.ledger create mode 100644 paisa/templates/business/main.ledger create mode 100644 paisa/templates/business/paisa.yaml rename paisa/{template => templates/business}/sheets/.gitkeep (100%) create mode 100644 paisa/templates/corporation/.gitignore rename paisa/{template => templates/corporation}/2026.ledger (91%) rename paisa/{template => templates/corporation}/accounts.ledger (100%) rename paisa/{template => templates/corporation}/budget.ledger (79%) rename paisa/{template => templates/corporation}/main.ledger (82%) rename paisa/{template => templates/corporation}/paisa.yaml (95%) create mode 100644 paisa/templates/corporation/sheets/.gitkeep create mode 100644 paisa/templates/household/.gitignore create mode 100644 paisa/templates/household/2026.ledger create mode 100644 paisa/templates/household/accounts.ledger create mode 100644 paisa/templates/household/budget.ledger create mode 100644 paisa/templates/household/main.ledger create mode 100644 paisa/templates/household/paisa.yaml create mode 100644 paisa/templates/household/sheets/.gitkeep create mode 100644 paisa/templates/personal/.gitignore create mode 100644 paisa/templates/personal/2026.ledger create mode 100644 paisa/templates/personal/accounts.ledger create mode 100644 paisa/templates/personal/budget.ledger create mode 100644 paisa/templates/personal/main.ledger create mode 100644 paisa/templates/personal/paisa.yaml create mode 100644 paisa/templates/personal/sheets/.gitkeep diff --git a/AGENTS.md b/AGENTS.md index 8bedbc5..c00c0f4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -32,7 +32,6 @@ These deliberately violate the conventions above — do not "fix" them: - `pangolin_dev` is itself an edge reverse proxy (Pangolin + gerbil + traefik), not a client of NPM; the `proxy` network is declared for convention but unused by its services, and `traefik` uses `network_mode: service:gerbil` instead of joining `internal` - `zammad_dev` `zammad-init` service hardcodes `restart: on-failure` (init container) - `nextcloud/compose-aio.yaml` follows the upstream AIO layout: fixed container/volume names, no env templating, no proxy network -- `paisa` uses a single volume `${VOL_PATH:-/data/paisa}` (a full path, nested default, no `VOL_PROJECTS`) holding the ledger git repo and `paisa.db`, so it can point at any folder, e.g. `paisa/demo` in a clone of this repo - `opencode` and `vscode` default `VOL_PROJECTS` to `${VOL_PATH:-/data}/projects` (nested default), not plain `/data` - `mailu_dev` passes env via `env_file: .env`, so its sample.env holds vars the compose file never references - `headscale` sample.env documents `HEADSCALE_DOMAIN`/`HEADSCALE_URL` for the config file even though compose doesn't use them diff --git a/_docs/lint.py b/_docs/lint.py index e64e0d6..a13225d 100644 --- a/_docs/lint.py +++ b/_docs/lint.py @@ -23,7 +23,6 @@ UNIVERSAL_VARS = {"VOL_PATH", "VOL_PROJECTS", "TZ", "CONFIG_PATH", "LOG_PATH"} # Known exceptions — see AGENTS.md "Known exceptions" NO_PROXY_OK = {"pihole", "nginx-proxy-manager"} -NESTED_VOL_PATH_OK = {"paisa"} # single full-path volume HARDCODED_RESTART_OK = {("zammad_dev", "on-failure")} STALE_VARS_OK = { "mailu_dev": None, # env_file: .env — all vars consumed in-container @@ -55,7 +54,7 @@ def check_compose(stack, path): err(stack, f"relative volume path: {m.group(1)}") if re.search(r"\$\{VOL_PATH\}", c): err(stack, "VOL_PATH used without :-/data default") - if stack not in NESTED_VOL_PATH_OK and re.search(r"VOL_PATH:-(?!/data\})", c): + if re.search(r"VOL_PATH:-(?!/data\})", c): err(stack, "VOL_PATH default is not /data") for m in re.finditer(r"TZ:-([^}\s]+)", c): if m.group(1) != "America/Vancouver": diff --git a/paisa/README.md b/paisa/README.md index d0cc24a..ce0debc 100644 --- a/paisa/README.md +++ b/paisa/README.md @@ -15,12 +15,18 @@ budgets, and transaction management. ## Getting Started -1. Copy this stack's `config/` folder to `${VOL_PATH:-/data/paisa}` +1. Copy this stack's `config/` folder to `${VOL_PATH:-/data}/paisa` and make it a git repo. It holds `paisa.yaml`, an empty `main.ledger`, `sheets/`, and a `.gitignore`. Edit `paisa.yaml` to suit you. - Starting a new business? Copy `template/` instead: it has a chart of - accounts for a small BC corporation and commented example entries. - Fill in its `TODO`s. + Or start from one of the `templates/` folders instead. Each has a chart + of accounts, a budget, and commented example entries; fill in its `TODO`s: + - `personal/` — one person: salary, TFSA/RRSP, everyday spending + - `household/` — two adults and a child: joint accounts, mortgage, + CCB, RESP, childcare + - `business/` — sole proprietor (not incorporated): GST/PST, owner + draws, T2125 expense categories + - `corporation/` — small BC corporation: share capital, shareholder + loan, payroll, WorkSafeBC 2. Deploy the stack. Paisa creates `paisa.db` in the same folder. 3. Open http://localhost:7500 in your browser. @@ -34,7 +40,7 @@ especially the section on closing entries. PAISA_IMAGE – container image (default ananthakumaran/paisa:latest) PAISA_RESTART – restart policy (default unless-stopped) - VOL_PATH – full host path of the ledger git repo; nothing is appended (default /data/paisa) + VOL_PATH – host base path; the ledger git repo is VOL_PATH/paisa (default /data) PAISA_PORT – host port for the web UI (default 7500) ## Volume Notes @@ -42,10 +48,10 @@ especially the section on closing entries. One volume holds everything: - `/root/Documents/paisa` — `paisa.yaml`, `*.ledger`, `sheets/`, and - `paisa.db`; `${VOL_PATH:-/data/paisa}` on the host + `paisa.db`; `${VOL_PATH:-/data}/paisa` on the host -`VOL_PATH` is the full path to the folder (nothing is appended), so it -can point anywhere, such as the `demo/` folder in a clone of this repo. +The compose file appends `/paisa` to `VOL_PATH`, so the folder is always +named `paisa`. Keep the folder in git; the shipped `.gitignore` keeps `paisa.db` out of commits. The database is a cache rebuilt from the ledger files. @@ -69,13 +75,15 @@ docker run -d \ (INR, en-IN, fiscal year starting in April), so copy `config/` in first. - `paisa.db` sits in the git folder (`db_path: paisa.db`); keep the shipped `.gitignore` so it isn't committed. -- Upgrading from the old two-volume layout with the old default - (`VOL_PATH=/data`): set `VOL_PATH=/data/paisa` or Paisa will look in - `/data`. - `config/paisa.yaml` uses CAD, en-US number formatting, America/Vancouver, a January fiscal year, and no login. Add `user_accounts` before exposing Paisa through the proxy. - The container runs as root; files it writes are root-owned. +- With `strict: "yes"`, Paisa's editor checks each file on its own + (`ledger --pedantic` on just that file), so every `.ledger` file that + posts to accounts starts with `include accounts.ledger`. Without it + the editor shows `Unknown account` for every line, even though the + full journal is fine. Add the include to any new year file. ## Dockhand Stack, Deploy from Git diff --git a/paisa/config/paisa.yaml b/paisa/config/paisa.yaml index 63d59c4..d8cb477 100644 --- a/paisa/config/paisa.yaml +++ b/paisa/config/paisa.yaml @@ -1,4 +1,4 @@ -# Paisa starter config — copy this folder into ${VOL_PATH:-/data/paisa} (git repo) +# Paisa starter config — copy this folder into ${VOL_PATH:-/data}/paisa (git repo) # Reference: https://paisa.fyi/reference/config/ # Relative paths resolve from this file's directory (in git) diff --git a/paisa/demo/2025.ledger b/paisa/demo/2025.ledger index 8d3ad6d..b9187f6 100644 --- a/paisa/demo/2025.ledger +++ b/paisa/demo/2025.ledger @@ -7,15 +7,18 @@ ; Class B (non-voting) 34 shares 10 family and friends investors ; Investor01-04: 4 shares each, Investor05-10: 3 shares each +; Declares the accounts so Paisa's editor can check this file on its own +include accounts.ledger + 2025/12/01 Share issuance | Class A voting shares to officers - Assets:Bank:Chequing 165,000.00 CAD + Assets:Bank:BMO:Chequing 165,000.00 CAD Equity:ShareCapital:ClassA:CEO -65,000.00 CAD ; Shares: 26 Equity:ShareCapital:ClassA:CAO -62,500.00 CAD ; Shares: 25 Equity:ShareCapital:ClassA:CFO -25,000.00 CAD ; Shares: 10 Equity:ShareCapital:ClassA:Secretary -12,500.00 CAD ; Shares: 5 2025/12/01 Share issuance | Class B non-voting shares to investors - Assets:Bank:Chequing 85,000.00 CAD + Assets:Bank:BMO:Chequing 85,000.00 CAD Equity:ShareCapital:ClassB:Investor01 -10,000.00 CAD ; Shares: 4 Equity:ShareCapital:ClassB:Investor02 -10,000.00 CAD ; Shares: 4 Equity:ShareCapital:ClassB:Investor03 -10,000.00 CAD ; Shares: 4 @@ -29,35 +32,54 @@ 2025/12/01 BC Registries | Incorporation filing Expenses:Incorporation 350.00 CAD - Assets:Bank:Chequing + Assets:Bank:BMO:Chequing 2025/12/03 Law firm | Incorporation and shareholder agreement Expenses:ProfessionalFees 1,500.00 CAD Assets:GST:InputTaxCredits 75.00 CAD - Assets:Bank:Chequing + Assets:Bank:BMO:Chequing 2025/12/05 Lender | Equipment loan advance - Assets:Bank:Chequing 120,000.00 CAD + Assets:Bank:BMO:Chequing 120,000.00 CAD Liabilities:Loan:Equipment ; BC PST is not recoverable, so it is added to the cost of the asset 2025/12/08 Equipment dealer | Excavator and skid steer Assets:Equipment:Machinery 197,950.00 CAD ; 185,000 + PST 12,950 Assets:GST:InputTaxCredits 9,250.00 CAD - Assets:Bank:Chequing + Assets:Bank:BMO:Chequing 2025/12/10 Truck dealer | Dump truck and pickup Assets:Equipment:Vehicles 66,340.00 CAD ; 62,000 + PST 4,340 Assets:GST:InputTaxCredits 3,100.00 CAD - Assets:Bank:Chequing + Assets:Bank:BMO:Chequing + +2025/12/11 Office furniture store | Desks, chairs, filing cabinet + Assets:Equipment:Office 3,317.00 CAD ; 4 desks 1,800 + 4 chairs 1,000 + cabinet 300 + PST 217 + Assets:GST:InputTaxCredits 155.00 CAD + Assets:Bank:BMO:Chequing + +2025/12/11 Computer store | Laptops, desktop, printer + Assets:Equipment:Office 5,136.00 CAD ; 2 laptops 3,200 + desktop 1,200 + printer 400 + PST 336 + Assets:GST:InputTaxCredits 240.00 CAD + Assets:Bank:BMO:Chequing + +2025/12/11 Tool supply | Hand tools for the crew + Assets:Equipment:Tools 2,782.00 CAD ; sledgehammers, pry bars, cordless saws 2,600 + PST 182 + Assets:GST:InputTaxCredits 130.00 CAD + Assets:Bank:BMO:Chequing 2025/12/12 Transfer | Excavator replacement fund - Assets:Bank:Savings 20,000.00 CAD - Assets:Bank:Chequing + Assets:Bank:Scotiabank:Savings 20,000.00 CAD + Assets:Bank:BMO:Chequing + +2025/12/12 Transfer | Payroll account float + Assets:Bank:RBC:Payroll 5,000.00 CAD + Assets:Bank:BMO:Chequing 2025/12/12 Bank | Petty cash float Assets:Cash 500.00 CAD - Assets:Bank:Chequing + Assets:Bank:BMO:Chequing 2025/12/15 Fuel station | Diesel for first jobs Expenses:Fuel 320.00 CAD @@ -71,13 +93,13 @@ Liabilities:PST:Collected -175.00 CAD 2025/12/16 Customer | E-transfer for invoice 1001 - Assets:Bank:Chequing 2,800.00 CAD + Assets:Bank:BMO:Chequing 2,800.00 CAD Assets:AccountsReceivable 2025/12/16 Landfill | Tipping fees, shed job Expenses:Disposal 600.00 CAD Assets:GST:InputTaxCredits 30.00 CAD - Assets:Bank:Chequing + Assets:Bank:BMO:Chequing 2025/12/19 Invoice 1002 | Kitchen tear-out, Oak Ave Assets:AccountsReceivable 5,376.00 CAD @@ -99,21 +121,25 @@ 2025/12/22 Landfill | Tipping fees, garage job Expenses:Disposal 1,400.00 CAD Assets:GST:InputTaxCredits 70.00 CAD - Assets:Bank:Chequing + Assets:Bank:BMO:Chequing 2025/12/23 Scrap yard | Steel from garage job - Assets:Bank:Chequing 682.50 CAD + Assets:Bank:BMO:Chequing 682.50 CAD Income:Scrap -650.00 CAD Liabilities:GST:Collected -32.50 CAD 2025/12/30 Customer | Payment on invoice 1003 - Assets:Bank:Chequing 8,400.00 CAD + Assets:Bank:BMO:Chequing 8,400.00 CAD Assets:AccountsReceivable +2025/12/30 Transfer | Fund December payroll + Assets:Bank:RBC:Payroll 4,500.00 CAD + Assets:Bank:BMO:Chequing + 2025/12/31 Payroll | December crew wages Expenses:Wages 6,000.00 CAD Liabilities:Payroll:CRA -1,500.00 CAD - Assets:Bank:Chequing + Assets:Bank:RBC:Payroll 2025/12/31 WorkSafeBC | December premium Expenses:WorkSafeBC 240.00 CAD @@ -122,7 +148,7 @@ 2025/12/31 Lender | Equipment loan payment Liabilities:Loan:Equipment 2,780.00 CAD Expenses:Interest 670.00 CAD - Assets:Bank:Chequing + Assets:Bank:BMO:Chequing ; --------------------------------------------------------------------------- diff --git a/paisa/demo/2026.ledger b/paisa/demo/2026.ledger index ef1e341..f60cd8c 100644 --- a/paisa/demo/2026.ledger +++ b/paisa/demo/2026.ledger @@ -1,43 +1,98 @@ ; 2026 transactions — Demolition Company Ltd. ; All amounts are fictional demo data. -2026/01/08 Customer | Payment on invoice 1002 (2025) - Assets:Bank:Chequing 5,376.00 CAD - Assets:AccountsReceivable +; Declares the accounts so Paisa's editor can check this file on its own +include accounts.ledger + +2026/01/05 Water delivery | January water bottles and cooler rental + Expenses:WaterCooler 46.05 CAD ; water 30.00 (zero-rated) + rental 15.00 + PST 1.05 + Assets:GST:InputTaxCredits 0.75 CAD + Assets:Bank:BMO:Chequing 2026/01/05 Fuel station | Diesel for excavator Expenses:Fuel 850.00 CAD Assets:GST:InputTaxCredits 42.50 CAD Liabilities:CreditCard +2026/01/07 Hardware store | Gloves, safety glasses, ear protection + Expenses:SafetyGear 256.80 CAD ; 240.00 + PST 16.80 + Assets:GST:InputTaxCredits 12.00 CAD + Liabilities:CreditCard + +2026/01/08 Customer | Payment on invoice 1002 (2025) + Assets:Bank:BMO:Chequing 5,376.00 CAD + Assets:AccountsReceivable + 2026/01/09 Insurance broker | Annual liability policy Expenses:Insurance 9,600.00 CAD - Assets:Bank:Chequing + Assets:Bank:BMO:Chequing 2026/01/12 City permit office | Demolition permit, 123 Main St Expenses:Permits 450.00 CAD - Assets:Bank:Chequing + Assets:Bank:BMO:Chequing + +2026/01/13 Accounting software | January subscription + Expenses:Software 48.15 CAD ; 45.00 + PST 3.15 + Assets:GST:InputTaxCredits 2.25 CAD + Liabilities:CreditCard + +; 1-year non-redeemable GIC at 4.00%, matures 2027/01/15. +; Interest is accrued monthly and paid at maturity. +2026/01/15 CIBC | Buy 1-year GIC at 4.00% + Assets:Investments:GIC:CIBC 10,000.00 CAD + Assets:Bank:BMO:Chequing + +2026/01/15 Internet provider | January business internet + Expenses:Internet 101.65 CAD ; 95.00 + PST 6.65 + Assets:GST:InputTaxCredits 4.75 CAD + Assets:Bank:BMO:Chequing 2026/01/20 Landfill | Tipping fees, Main St job Expenses:Disposal 3,200.00 CAD Assets:GST:InputTaxCredits 160.00 CAD - Assets:Bank:Chequing + Assets:Bank:BMO:Chequing + +; Bitcoin bought through an exchange and moved to the company wallet. +; P lines record market prices so Paisa can show the gain or loss. +P 2026/01/21 BTC 135,000.00 CAD + +2026/01/21 Exchange | Buy bitcoin + Assets:Crypto:Wallet 0.05000000 BTC @ 135,000.00 CAD + Assets:Bank:BMO:Chequing 2026/01/23 Scrap yard | Steel and copper from Main St job - Assets:Bank:Chequing 2,940.00 CAD + Assets:Bank:BMO:Chequing 2,940.00 CAD Income:Scrap -2,800.00 CAD Liabilities:GST:Collected -140.00 CAD +2026/01/27 City parkade | Parking at Main St job + Expenses:Parking 64.00 CAD + Assets:GST:InputTaxCredits 3.20 CAD + Liabilities:CreditCard + +2026/01/29 Cleaning service | January office cleaning + Expenses:Cleaning 220.00 CAD ; wipe down computers, vacuum floors + Assets:GST:InputTaxCredits 11.00 CAD + Assets:Bank:BMO:Chequing + 2026/01/30 Invoice 1004 | Main St house demolition Assets:AccountsReceivable 31,360.00 CAD Income:Demolition -28,000.00 CAD Liabilities:GST:Collected -1,400.00 CAD Liabilities:PST:Collected -1,960.00 CAD +2026/01/30 Transfer | Fund January payroll + Assets:Bank:RBC:Payroll 13,500.00 CAD + Assets:Bank:BMO:Chequing + 2026/01/31 Payroll | January crew wages Expenses:Wages 18,000.00 CAD Liabilities:Payroll:CRA -4,500.00 CAD - Assets:Bank:Chequing + Assets:Bank:RBC:Payroll + +2026/01/31 CIBC | GIC interest accrued, Jan 15 to 31 + Assets:Investments:GIC:CIBC 16.67 CAD + Income:Interest 2026/01/31 WorkSafeBC | January premium Expenses:WorkSafeBC 720.00 CAD @@ -46,15 +101,25 @@ 2026/01/31 Lender | Equipment loan payment Liabilities:Loan:Equipment 2,800.00 CAD Expenses:Interest 650.00 CAD - Assets:Bank:Chequing + Assets:Bank:BMO:Chequing + +2026/02/03 Hardware store | Saw blades and drill bits + Expenses:SmallTools 197.95 CAD ; 185.00 + PST 12.95 + Assets:GST:InputTaxCredits 9.25 CAD + Liabilities:CreditCard 2026/02/04 Fuel station | Diesel and truck fuel Expenses:Fuel 1,100.00 CAD Assets:GST:InputTaxCredits 55.00 CAD Liabilities:CreditCard +2026/02/05 Water delivery | February water bottles and cooler rental + Expenses:WaterCooler 46.05 CAD ; water 30.00 (zero-rated) + rental 15.00 + PST 1.05 + Assets:GST:InputTaxCredits 0.75 CAD + Assets:Bank:BMO:Chequing + 2026/02/10 Customer | Payment on invoice 1004 - Assets:Bank:Chequing 31,360.00 CAD + Assets:Bank:BMO:Chequing 31,360.00 CAD Assets:AccountsReceivable 2026/02/12 Equipment rental | Skid steer, 5 days @@ -62,18 +127,55 @@ Assets:GST:InputTaxCredits 87.50 CAD Liabilities:CreditCard +2026/02/13 Accounting software | February subscription + Expenses:Software 48.15 CAD ; 45.00 + PST 3.15 + Assets:GST:InputTaxCredits 2.25 CAD + Liabilities:CreditCard + 2026/02/14 CRA | Payroll source deductions remittance Liabilities:Payroll:CRA 4,500.00 CAD - Assets:Bank:Chequing + Assets:Bank:BMO:Chequing +2026/02/15 Internet provider | February business internet + Expenses:Internet 101.65 CAD ; 95.00 + PST 6.65 + Assets:GST:InputTaxCredits 4.75 CAD + Assets:Bank:BMO:Chequing + +; Pays the balance through the February 15 statement; charges after that +; are still owing at the end of February 2026/02/16 Credit card | Payment - Liabilities:CreditCard 4,725.00 CAD - Assets:Bank:Chequing + Liabilities:CreditCard 5,369.00 CAD + Assets:Bank:BMO:Chequing + +2026/02/18 Fuel station | Diesel for strip-out job + Expenses:Fuel 920.00 CAD + Assets:GST:InputTaxCredits 46.00 CAD + Liabilities:CreditCard 2026/02/20 Repair shop | Hydraulic hose replacement Expenses:Repairs 980.00 CAD Assets:GST:InputTaxCredits 49.00 CAD - Assets:Bank:Chequing + Assets:Bank:BMO:Chequing + +2026/02/21 Hardware store | Safety gear restock + Expenses:SafetyGear 128.40 CAD ; 120.00 + PST 8.40 + Assets:GST:InputTaxCredits 6.00 CAD + Liabilities:CreditCard + +2026/02/24 Online office store | Toner and paper + Expenses:Office 90.95 CAD ; 85.00 + PST 5.95 + Assets:GST:InputTaxCredits 4.25 CAD + Liabilities:CreditCard + +2026/02/25 City parkade | Parking at strip-out job + Expenses:Parking 48.00 CAD + Assets:GST:InputTaxCredits 2.40 CAD + Liabilities:CreditCard + +2026/02/26 Cleaning service | February office cleaning + Expenses:Cleaning 220.00 CAD ; wipe down computers, vacuum floors + Assets:GST:InputTaxCredits 11.00 CAD + Assets:Bank:BMO:Chequing 2026/02/26 Invoice 1005 | Commercial interior strip-out Assets:AccountsReceivable 47,040.00 CAD @@ -84,23 +186,38 @@ 2026/02/27 Office supplies | Printer and paper Expenses:Office 210.00 CAD Assets:GST:InputTaxCredits 10.50 CAD - Assets:Bank:Chequing + Assets:Bank:BMO:Chequing + +2026/02/27 Transfer | Fund February payroll + Assets:Bank:RBC:Payroll 15,750.00 CAD + Assets:Bank:BMO:Chequing 2026/02/28 Payroll | February crew wages Expenses:Wages 21,000.00 CAD Liabilities:Payroll:CRA -5,250.00 CAD - Assets:Bank:Chequing + Assets:Bank:RBC:Payroll 2026/02/28 WorkSafeBC | Pay Dec 2025 to Feb 2026 premiums Liabilities:WorkSafeBC 960.00 CAD Expenses:WorkSafeBC 840.00 CAD - Assets:Bank:Chequing + Assets:Bank:BMO:Chequing 2026/02/28 Lender | Equipment loan payment Liabilities:Loan:Equipment 2,820.00 CAD Expenses:Interest 630.00 CAD - Assets:Bank:Chequing + Assets:Bank:BMO:Chequing 2026/02/28 Transfer | Excavator replacement fund - Assets:Bank:Savings 2,000.00 CAD - Assets:Bank:Chequing + Assets:Bank:Scotiabank:Savings 2,000.00 CAD + Assets:Bank:BMO:Chequing + +2026/02/28 CIBC | GIC interest accrued, February + Assets:Investments:GIC:CIBC 33.33 CAD + Income:Interest + +; Hold back the tax owing from the tax-estimates sheet (rounded) +2026/02/28 Transfer | Tax reserve + Assets:Bank:CIBC:TaxReserve 9,500.00 CAD + Assets:Bank:BMO:Chequing + +P 2026/02/28 BTC 128,000.00 CAD diff --git a/paisa/demo/accounts.ledger b/paisa/demo/accounts.ledger index b70a8b6..8aa51e5 100644 --- a/paisa/demo/accounts.ledger +++ b/paisa/demo/accounts.ledger @@ -3,14 +3,28 @@ commodity CAD format 1,000.00 CAD +commodity BTC + format 1.00000000 BTC + ; Assets -account Assets:Bank:Chequing -account Assets:Bank:Savings +; Banks: BMO is the main operating account, RBC pays the crew, +; Scotiabank holds the excavator fund, CIBC holds money set aside for tax +account Assets:Bank:BMO:Chequing +account Assets:Bank:RBC:Payroll +account Assets:Bank:Scotiabank:Savings +account Assets:Bank:CIBC:TaxReserve +; Investments: a 1-year non-redeemable GIC and a bitcoin wallet +account Assets:Investments:GIC:CIBC +account Assets:Crypto:Wallet account Assets:Cash account Assets:AccountsReceivable account Assets:GST:InputTaxCredits account Assets:Equipment:Machinery account Assets:Equipment:Vehicles +; Desks, chairs, computers, printer (consumable supplies go to Expenses:Office) +account Assets:Equipment:Office +; Hand tools: sledgehammers, pry bars, cordless saws and drills +account Assets:Equipment:Tools ; Liabilities account Liabilities:CreditCard @@ -43,8 +57,10 @@ account Equity:RetainedEarnings ; Income account Income:Demolition account Income:Scrap +account Income:Interest ; Expenses +account Expenses:Cleaning account Expenses:Disposal account Expenses:EquipmentRental account Expenses:Fuel @@ -52,11 +68,17 @@ account Expenses:Insurance account Expenses:IncomeTax account Expenses:Incorporation account Expenses:Interest +account Expenses:Internet account Expenses:Office +account Expenses:Parking account Expenses:Permits account Expenses:ProfessionalFees account Expenses:Repairs +account Expenses:SafetyGear +account Expenses:SmallTools +account Expenses:Software account Expenses:Wages +account Expenses:WaterCooler account Expenses:WorkSafeBC ; Metadata tags diff --git a/paisa/demo/budget.ledger b/paisa/demo/budget.ledger index f5dca59..701e9a1 100644 --- a/paisa/demo/budget.ledger +++ b/paisa/demo/budget.ledger @@ -1,9 +1,15 @@ ; Monthly budget (Paisa reads periodic transactions as budgets) +; Declares the accounts so Paisa's editor can check this file on its own +include accounts.ledger + ~ Monthly Expenses:Fuel 3,000.00 CAD Expenses:Disposal 4,000.00 CAD Expenses:EquipmentRental 2,500.00 CAD Expenses:Repairs 1,000.00 CAD Expenses:Office 300.00 CAD - Assets:Bank:Chequing + Expenses:Internet 105.00 CAD + Expenses:WaterCooler 50.00 CAD + Expenses:Cleaning 220.00 CAD + Assets:Bank:BMO:Chequing diff --git a/paisa/demo/main.ledger b/paisa/demo/main.ledger index ee4f949..abfddac 100644 --- a/paisa/demo/main.ledger +++ b/paisa/demo/main.ledger @@ -1,5 +1,5 @@ ; Demolition Company Ltd. — demo books (BC, Canada) -; Ledger git repo: ${VOL_PATH:-/data/paisa}, mounted at /root/Documents/paisa +; Ledger git repo: ${VOL_PATH:-/data}/paisa, mounted at /root/Documents/paisa ; Incorporated in BC on 2025/12/01; fiscal year end December 31 ; Sales tax: GST 5% (federal) + PST 7% (BC) diff --git a/paisa/demo/paisa.yaml b/paisa/demo/paisa.yaml index 86df7be..ee2852c 100644 --- a/paisa/demo/paisa.yaml +++ b/paisa/demo/paisa.yaml @@ -1,6 +1,6 @@ # Paisa config for Demolition Company Ltd. (demo) # Incorporated in BC 2025/12/01; 100 shares (66 Class A voting, 34 Class B non-voting) -# Git repo: ${VOL_PATH:-/data/paisa}, mounted at /root/Documents/paisa +# Git repo: ${VOL_PATH:-/data}/paisa, mounted at /root/Documents/paisa # Reference: https://paisa.fyi/reference/config/ # Relative paths resolve from this file's directory (in git) @@ -36,8 +36,18 @@ user_accounts: [] # password: sha256: accounts: - - name: Assets:Bank:Chequing + - name: Assets:Bank:BMO:Chequing icon: mdi:bank + - name: Assets:Bank:RBC:Payroll + icon: mdi:account-cash + - name: Assets:Bank:Scotiabank:Savings + icon: mdi:piggy-bank + - name: Assets:Bank:CIBC:TaxReserve + icon: mdi:safe + - name: Assets:Investments:GIC + icon: mdi:certificate + - name: Assets:Crypto:Wallet + icon: mdi:bitcoin - name: Assets:Equipment icon: mdi:excavator - name: Equity:ShareCapital @@ -60,7 +70,7 @@ goals: target_date: "2028-12-31" rate: 3 accounts: - - Assets:Bank:Savings + - Assets:Bank:Scotiabank:Savings schedule_al: - code: bank diff --git a/paisa/demo/sheets/tax-estimates.paisa b/paisa/demo/sheets/tax-estimates.paisa index 49283e3..d449a79 100644 --- a/paisa/demo/sheets/tax-estimates.paisa +++ b/paisa/demo/sheets/tax-estimates.paisa @@ -16,21 +16,21 @@ profit_2025 = -cost(pre_tax AND fy2025) ; 3,890.00 tax_2025 = profit_2025 * small_business_rate ; 427.90, accrued Dec 31 gst_collected_2025 = -cost({account = Liabilities:GST:Collected} AND fy2025) ; 772.50 -gst_itc_2025 = cost({account = Assets:GST:InputTaxCredits} AND fy2025) ; 12,565.00 -gst_net_2025 = gst_collected_2025 - gst_itc_2025 ; -11,792.50 = refund due +gst_itc_2025 = cost({account = Assets:GST:InputTaxCredits} AND fy2025) ; 13,090.00 +gst_net_2025 = gst_collected_2025 - gst_itc_2025 ; -12,317.50 = refund due // ---- 2026 year to date ---- ytd = {date >= [2026-01-01] AND date < [2027-01-01]} -profit_ytd = -cost(pre_tax AND ytd) ; 12,820.00 -tax_ytd = profit_ytd * small_business_rate ; 1,410.20 to set aside +profit_ytd = -cost(pre_tax AND ytd) ; 10,332.20 +tax_ytd = profit_ytd * small_business_rate ; 1,136.54 to set aside gst_collected_ytd = -cost({account = Liabilities:GST:Collected} AND ytd) ; 3,640.00 -gst_itc_ytd = cost({account = Assets:GST:InputTaxCredits} AND ytd) ; 404.50 -gst_net_ytd = gst_collected_ytd - gst_itc_ytd ; 3,235.50 owing to CRA +gst_itc_ytd = cost({account = Assets:GST:InputTaxCredits} AND ytd) ; 525.10 +gst_net_ytd = gst_collected_ytd - gst_itc_ytd ; 3,114.90 owing to CRA pst_ytd = -cost({account = Liabilities:PST:Collected} AND ytd) ; 4,900.00 owing to BC // Cash to hold back for tax this year -set_aside = tax_ytd + gst_net_ytd + pst_ytd ; 9,545.70 +set_aside = tax_ytd + gst_net_ytd + pst_ytd ; 9,151.44 // Function: GST included in a tax-inclusive receipt total gst_in(total) = total * gst_rate / (1 + gst_rate) diff --git a/paisa/docs/demo.md b/paisa/docs/demo.md index 46cdb76..8a28b1c 100644 --- a/paisa/docs/demo.md +++ b/paisa/docs/demo.md @@ -10,7 +10,7 @@ Paisa before entering your own books. All figures are made up. | ----------------- | ---------------------------------------------------------- | | `paisa.yaml` | Paisa config: CAD, BC time zone, strict accounts, goals | | `main.ledger` | Entry point; includes the other files | -| `accounts.ledger` | Chart of accounts and the CAD commodity | +| `accounts.ledger` | Chart of accounts and the CAD and BTC commodities | | `budget.ledger` | Monthly budget (periodic transaction) | | `2025.ledger` | Incorporation, share issue, equipment purchase (Dec 2025) | | `2026.ledger` | January and February 2026 transactions | @@ -42,10 +42,28 @@ equity but have no vote. Each holder has an account under `Equity:ShareCapital:ClassA` or `ClassB`, and each posting carries a `Shares:` tag with the share count. +## Banks and investments + +| Account | Used for | +| -------------------------------- | ------------------------------------------------- | +| `Assets:Bank:BMO:Chequing` | Main operating account: deposits, bills, transfers| +| `Assets:Bank:RBC:Payroll` | Pays the crew; funded from BMO before each payroll| +| `Assets:Bank:Scotiabank:Savings` | Excavator replacement fund (savings goal) | +| `Assets:Bank:CIBC:TaxReserve` | Cash held back for income tax, GST and PST | +| `Assets:Investments:GIC:CIBC` | $10,000 1-year GIC at 4.00%, matures 2027/01/15 | +| `Assets:Crypto:Wallet` | 0.05 BTC bought at $135,000 per BTC | + +GIC interest is accrued monthly to `Income:Interest` and added to the GIC +balance. Bitcoin is held in its own `BTC` commodity; `P` price lines in +`2026.ledger` set its market value, so Paisa shows an unrealized loss +when the price drops to $128,000 at the end of February. + December 2025 covers incorporation and legal fees, the share issue, a $120,000 equipment loan, machinery and vehicle purchases (BC PST added to -the asset cost, GST claimed as input tax credits), a savings transfer, a -petty cash float, and the first loan payment. +the asset cost, GST claimed as input tax credits), office equipment +(desks, chairs, laptops, a desktop and a printer, $8,453) and hand tools +($2,782) recorded as assets, a savings transfer, a +payroll account float, a petty cash float, and the first loan payment. The crew also did three small jobs that month: @@ -110,39 +128,55 @@ The 2026 books cover demolition invoices with GST 5% and BC PST 7%, scrap metal sales (GST only), expenses with GST input tax credits, payroll and CRA remittances, WorkSafeBC premiums, an equipment loan, a credit card, and a savings transfer toward an excavator fund. +Each month the office pays for business internet (GST + PST), water +delivery and cooler rental (the water itself is zero-rated), and a +cleaning service that wipes down the computers and vacuums the floors +(GST only). Office supplies such as paper are expensed, not added to +`Assets:Equipment:Office`. +Day-to-day purchases go on the company Visa (statement closes on the +15th): fuel, safety gear, saw blades and drill bits, the accounting +software subscription, job-site parking, and toner and paper. The +February 16 payment clears everything through the February 15 +statement; $1,246.00 charged after that is still owing at the end of +February, so the Credit Cards page shows an open balance. +It also buys the GIC and the bitcoin, funds each payroll from BMO to RBC, +and moves the tax estimate from the sheet into the CIBC tax reserve. ## Where the files go -Everything lives in one folder, `${VOL_PATH:-/data/paisa}`: the +Everything lives in one folder, `${VOL_PATH:-/data}/paisa`: the `paisa.yaml` and `*.ledger` files (in git) and `paisa.db` (a cache, ignored by `.gitignore`). ## Load the demo -1. Clone this repo somewhere on the Docker host, e.g.: +1. From the root of this repo, copy the demo into its own folder named + `paisa`, keeping your real books separate: ```bash - cd /data - git clone https://github.com/nickyeoman/docker-compose-cookbooks.git + mkdir -p /data/demo + cp -r paisa/demo /data/demo/paisa ``` -2. In Dockhand, point the stack at the demo folder: +2. In Dockhand, edit the stack's environment variable: ```env - VOL_PATH=/data/docker-compose-cookbooks/paisa/demo + VOL_PATH=/data/demo ``` - The path is used as-is. Paisa writes `paisa.db` into that folder; - `demo/.gitignore` keeps it out of git. + The compose file appends `/paisa`, so Paisa reads `/data/demo/paisa` + and writes `paisa.db` there. 3. Redeploy the stack and open http://localhost:7500 (or the host's address or proxy hostname if you're not on the Docker host). ## Switch back to your own books -Set `VOL_PATH` back to your books (default `/data/paisa`) and redeploy. -The demo's `paisa.db` stays in the clone and can be deleted any time. +Set `VOL_PATH` back to your value (default `/data`) and redeploy. The +demo folder `/data/demo` can be deleted any time. ## Start your own books -- **New business:** copy `template/` instead of `demo/`. It has a - chart of accounts for a small BC corporation, `strict: "yes"`, a - sample budget, and a year file with commented examples. Fill in the - `TODO`s in `paisa.yaml`, `main.ledger`, and `accounts.ledger`. +- **From a template:** copy one of the `templates/` folders instead of + `demo/`: `personal/`, `household/`, `business/` (sole proprietor), or + `corporation/` (small BC corporation). Each has a chart of accounts, + `strict: "yes"`, a sample budget, and a year file with commented + examples. Fill in the `TODO`s in `paisa.yaml`, `main.ledger`, and + `accounts.ledger`. - **Blank slate:** copy `config/`. It holds the same defaults with an empty journal, `strict: "no"`, and no accounts. diff --git a/paisa/sample.env b/paisa/sample.env index efe6638..95fa2bc 100644 --- a/paisa/sample.env +++ b/paisa/sample.env @@ -1,4 +1,4 @@ PAISA_IMAGE=ananthakumaran/paisa:latest PAISA_RESTART=unless-stopped -VOL_PATH=/data/paisa +VOL_PATH=/data PAISA_PORT=7500 diff --git a/paisa/template/.gitignore b/paisa/templates/business/.gitignore similarity index 100% rename from paisa/template/.gitignore rename to paisa/templates/business/.gitignore diff --git a/paisa/templates/business/2026.ledger b/paisa/templates/business/2026.ledger new file mode 100644 index 0000000..b421d47 --- /dev/null +++ b/paisa/templates/business/2026.ledger @@ -0,0 +1,39 @@ +; 2026 transactions. Uncomment and edit the examples below, or delete them. +; Sole proprietors file on the calendar year (T1 with T2125). +; See docs/ledger-cheatsheet.md for more patterns. + +; Declares the accounts so Paisa's editor can check this file on its own +include accounts.ledger + +; Owner puts money into the business account +; 2026/01/01 Owner contribution +; Assets:Bank:Chequing 2,000.00 CAD +; Equity:Owner:Contributions + +; Sale with GST 5% + BC PST 7% (register for GST once revenue passes $30,000) +; 2026/01/15 Invoice 1001 | Customer name +; Assets:AccountsReceivable 1,120.00 CAD +; Income:Sales -1,000.00 CAD +; Liabilities:GST:Collected -50.00 CAD +; Liabilities:PST:Collected -70.00 CAD + +; Customer pays +; 2026/01/30 Payment | Invoice 1001 +; Assets:Bank:Chequing 1,120.00 CAD +; Assets:AccountsReceivable + +; Expense with GST input tax credit +; 2026/01/20 Office supply store +; Expenses:Office 100.00 CAD +; Assets:GST:InputTaxCredits 5.00 CAD +; Liabilities:CreditCard + +; Owner pays themselves: a draw, not wages or an expense +; 2026/01/31 Owner draw +; Equity:Owner:Drawings 1,500.00 CAD +; Assets:Bank:Chequing + +; Set aside money for personal income tax and CPP (both owed by the owner) +; 2026/01/31 Tax savings +; Assets:TaxSavings 800.00 CAD +; Assets:Bank:Chequing diff --git a/paisa/templates/business/accounts.ledger b/paisa/templates/business/accounts.ledger new file mode 100644 index 0000000..30d2161 --- /dev/null +++ b/paisa/templates/business/accounts.ledger @@ -0,0 +1,51 @@ +; Chart of accounts for a BC sole proprietorship (not incorporated). +; Expense accounts roughly follow CRA form T2125 so year-end is easier. +; With strict: "yes", every account used in a transaction must be declared here first. + +commodity CAD + format 1,000.00 CAD + +; Assets +account Assets:Bank:Chequing +account Assets:Bank:Savings +account Assets:Cash +account Assets:AccountsReceivable +account Assets:GST:InputTaxCredits +account Assets:Equipment +account Assets:TaxSavings + +; Liabilities +account Liabilities:AccountsPayable +account Liabilities:CreditCard +account Liabilities:Loan +account Liabilities:GST:Collected +account Liabilities:PST:Collected + +; Equity: there are no shares; the owner contributes and draws +account Equity:Owner:Contributions +account Equity:Owner:Drawings +account Equity:OpeningBalances + +; Income +account Income:Sales +account Income:Interest + +; Expenses (T2125 categories) +account Expenses:Advertising +account Expenses:BankFees +account Expenses:BusinessUseOfHome +account Expenses:Insurance +account Expenses:Interest +account Expenses:Meals +account Expenses:Office +account Expenses:ProfessionalFees +account Expenses:Rent +account Expenses:Software +account Expenses:Subcontractors +account Expenses:Supplies +account Expenses:Telephone +account Expenses:Travel +account Expenses:Vehicle + +; Metadata tags +tag closing diff --git a/paisa/templates/business/budget.ledger b/paisa/templates/business/budget.ledger new file mode 100644 index 0000000..d9b8c43 --- /dev/null +++ b/paisa/templates/business/budget.ledger @@ -0,0 +1,13 @@ +; Monthly budget (Paisa reads periodic transactions as budgets) +; TODO: set amounts, or delete the block until you know your costs. + +; Declares the accounts so Paisa's editor can check this file on its own +include accounts.ledger + +~ Monthly + Expenses:Office 150.00 CAD + Expenses:Software 100.00 CAD + Expenses:Telephone 80.00 CAD + Expenses:Advertising 100.00 CAD + Assets:TaxSavings 800.00 CAD + Assets:Bank:Chequing diff --git a/paisa/templates/business/main.ledger b/paisa/templates/business/main.ledger new file mode 100644 index 0000000..8f4700e --- /dev/null +++ b/paisa/templates/business/main.ledger @@ -0,0 +1,10 @@ +; TODO: Business Name — sole proprietorship books (BC, Canada) +; Ledger git repo: ${VOL_PATH:-/data}/paisa, mounted at /root/Documents/paisa +; Fiscal year: calendar year (required for most sole proprietors) +; Sales tax: GST 5% (federal) + PST 7% (BC) +; +; Add a file per year (2027.ledger, ...) and include it below. + +include accounts.ledger +include budget.ledger +include 2026.ledger diff --git a/paisa/templates/business/paisa.yaml b/paisa/templates/business/paisa.yaml new file mode 100644 index 0000000..c2c7140 --- /dev/null +++ b/paisa/templates/business/paisa.yaml @@ -0,0 +1,80 @@ +# Paisa template: Business (sole proprietor, not incorporated) — copy this folder into ${VOL_PATH:-/data}/paisa (git repo) +# Fill in the TODOs here and in accounts.ledger, then start recording in the year file. +# Reference: https://paisa.fyi/reference/config/ + +# Relative paths resolve from this file's directory (in git) +journal_path: main.ledger +sheets_directory: sheets + +# Database sits next to this file; .gitignore keeps it out of git +db_path: paisa.db + +# ledger | hledger | beancount (hledger/beancount need the matching image tag) +ledger_cli: ledger + +# Upstream defaults are tuned for India (INR / en-IN / April FY) +default_currency: CAD +locale: en-US +time_zone: America/Vancouver +display_precision: 2 +amount_alignment_column: 52 +# Sole proprietors use the calendar year +financial_year_starting_month: 1 +week_starting_day: 0 + +# Accounts and commodities are declared in accounts.ledger; typos become errors +strict: "yes" + +budget: + rollover: "yes" + +# Empty = no login. Add users to enable auth; password is sha256 hashed twice: +# echo -n 'ChangeThisPassword' | sha256sum | head -c 64 | sha256sum | head -c 64 +user_accounts: [] +# - username: admin +# password: sha256: + +accounts: + - name: Assets:Bank:Chequing + icon: mdi:bank + - name: Assets:TaxSavings + icon: mdi:piggy-bank + - name: Equity:Owner + icon: mdi:account + - name: Liabilities:CreditCard + icon: mdi:credit-card + - name: Income:Sales + icon: mdi:cash-register + +goals: + retirement: [] + savings: [] +# - name: Emergency Fund +# icon: mdi:piggy-bank +# target: 10000 +# target_date: "2027-12-31" +# accounts: +# - Assets:Bank:Savings + +schedule_al: + - code: bank + accounts: + - Assets:Bank:* + - code: cash + accounts: + - Assets:Cash + - code: loan + accounts: + - Liabilities:Loan:* + +allocation_targets: [] +commodities: [] +import_templates: [] +credit_cards: [] +# - account: Liabilities:CreditCard +# credit_limit: 10000 +# statement_end_day: 15 +# due_day: 5 +# network: visa +# number: "0000" +# expiration_date: "2029-12-31" diff --git a/paisa/template/sheets/.gitkeep b/paisa/templates/business/sheets/.gitkeep similarity index 100% rename from paisa/template/sheets/.gitkeep rename to paisa/templates/business/sheets/.gitkeep diff --git a/paisa/templates/corporation/.gitignore b/paisa/templates/corporation/.gitignore new file mode 100644 index 0000000..435b3b4 --- /dev/null +++ b/paisa/templates/corporation/.gitignore @@ -0,0 +1,3 @@ +# paisa.db is a rebuildable cache next to paisa.yaml; keep it out of git +paisa.db +paisa.db-* diff --git a/paisa/template/2026.ledger b/paisa/templates/corporation/2026.ledger similarity index 91% rename from paisa/template/2026.ledger rename to paisa/templates/corporation/2026.ledger index ea5a215..b71b83a 100644 --- a/paisa/template/2026.ledger +++ b/paisa/templates/corporation/2026.ledger @@ -2,6 +2,9 @@ ; the include in main.ledger. Uncomment and edit the examples below, or ; delete them. See docs/ledger-cheatsheet.md for more patterns. +; Declares the accounts so Paisa's editor can check this file on its own +include accounts.ledger + ; Founder buys shares when the company is incorporated ; 2026/01/01 Share issuance | Class A shares to founder ; Assets:Bank:Chequing 100.00 CAD diff --git a/paisa/template/accounts.ledger b/paisa/templates/corporation/accounts.ledger similarity index 100% rename from paisa/template/accounts.ledger rename to paisa/templates/corporation/accounts.ledger diff --git a/paisa/template/budget.ledger b/paisa/templates/corporation/budget.ledger similarity index 79% rename from paisa/template/budget.ledger rename to paisa/templates/corporation/budget.ledger index 5a5a6ab..1817dbe 100644 --- a/paisa/template/budget.ledger +++ b/paisa/templates/corporation/budget.ledger @@ -1,6 +1,9 @@ ; Monthly budget (Paisa reads periodic transactions as budgets) ; TODO: set amounts, or delete the block until you know your costs. +; Declares the accounts so Paisa's editor can check this file on its own +include accounts.ledger + ~ Monthly Expenses:Rent 1,000.00 CAD Expenses:Office 200.00 CAD diff --git a/paisa/template/main.ledger b/paisa/templates/corporation/main.ledger similarity index 82% rename from paisa/template/main.ledger rename to paisa/templates/corporation/main.ledger index ddc8af1..664e2f7 100644 --- a/paisa/template/main.ledger +++ b/paisa/templates/corporation/main.ledger @@ -1,5 +1,5 @@ ; TODO: Business Name Ltd. — books (BC, Canada) -; Ledger git repo: ${VOL_PATH:-/data/paisa}, mounted at /root/Documents/paisa +; Ledger git repo: ${VOL_PATH:-/data}/paisa, mounted at /root/Documents/paisa ; TODO: incorporation date and fiscal year end ; Sales tax: GST 5% (federal) + PST 7% (BC) ; diff --git a/paisa/template/paisa.yaml b/paisa/templates/corporation/paisa.yaml similarity index 95% rename from paisa/template/paisa.yaml rename to paisa/templates/corporation/paisa.yaml index e98cafc..44392e9 100644 --- a/paisa/template/paisa.yaml +++ b/paisa/templates/corporation/paisa.yaml @@ -1,4 +1,4 @@ -# Paisa template for a new business — copy this folder into ${VOL_PATH:-/data/paisa} (git repo) +# Paisa template for a BC corporation — copy this folder into ${VOL_PATH:-/data}/paisa (git repo) # Fill in the TODOs here and in accounts.ledger, then start recording in the year file. # Reference: https://paisa.fyi/reference/config/ diff --git a/paisa/templates/corporation/sheets/.gitkeep b/paisa/templates/corporation/sheets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/paisa/templates/household/.gitignore b/paisa/templates/household/.gitignore new file mode 100644 index 0000000..435b3b4 --- /dev/null +++ b/paisa/templates/household/.gitignore @@ -0,0 +1,3 @@ +# paisa.db is a rebuildable cache next to paisa.yaml; keep it out of git +paisa.db +paisa.db-* diff --git a/paisa/templates/household/2026.ledger b/paisa/templates/household/2026.ledger new file mode 100644 index 0000000..402da8b --- /dev/null +++ b/paisa/templates/household/2026.ledger @@ -0,0 +1,46 @@ +; 2026 transactions. Uncomment and edit the examples below, or delete them. +; Add a file per year (2027.ledger, ...) and include it in main.ledger. +; See docs/ledger-cheatsheet.md for more patterns. + +; Declares the accounts so Paisa's editor can check this file on its own +include accounts.ledger + +; Starting balances: what the household has and owes on day one +; 2026/01/01 Opening balances +; Assets:Bank:Joint:Chequing 4,000.00 CAD +; Assets:Bank:Joint:Savings 10,000.00 CAD +; Assets:Home 750,000.00 CAD +; Liabilities:Mortgage -450,000.00 CAD +; Equity:OpeningBalances + +; Partner A's paycheque, deposited to the joint account +; 2026/01/15 Employer A | Pay period ending Jan 15 +; Assets:Bank:Joint:Chequing 2,600.00 CAD +; Expenses:Tax:Income:PartnerA 620.00 CAD +; Expenses:Tax:CPP:PartnerA 210.00 CAD +; Expenses:Tax:EI:PartnerA 60.00 CAD +; Income:Salary:PartnerA -3,490.00 CAD + +; Mortgage payment: split principal and interest from the lender's statement +; 2026/02/01 Bank | Mortgage payment +; Liabilities:Mortgage 1,400.00 CAD +; Expenses:Housing:MortgageInterest 1,100.00 CAD +; Assets:Bank:Joint:Chequing + +; Canada Child Benefit (tax-free, paid monthly) +; 2026/01/20 CRA | Canada Child Benefit +; Assets:Bank:Joint:Chequing 650.00 CAD +; Income:Benefits:CCB + +; Daycare (keep receipts: childcare expenses are deductible) +; 2026/01/31 Daycare | January +; Expenses:Child:Childcare 500.00 CAD +; Assets:Bank:Joint:Chequing + +; RESP contribution; the 20% CESG grant arrives later +; 2026/01/31 RESP contribution +; Assets:Investments:RESP:Child 208.33 CAD +; Assets:Bank:Joint:Chequing +; 2026/03/15 CESG grant +; Assets:Investments:RESP:Child 41.67 CAD +; Income:Benefits:RESPGrant diff --git a/paisa/templates/household/accounts.ledger b/paisa/templates/household/accounts.ledger new file mode 100644 index 0000000..dd46554 --- /dev/null +++ b/paisa/templates/household/accounts.ledger @@ -0,0 +1,76 @@ +; Chart of accounts for a BC household: two adults and one child. +; TODO: rename PartnerA/PartnerB/Child to your names (or keep them). +; With strict: "yes", every account used in a transaction must be declared here first. + +commodity CAD + format 1,000.00 CAD + +; Assets +account Assets:Bank:Joint:Chequing +account Assets:Bank:Joint:Savings +account Assets:Bank:PartnerA:Chequing +account Assets:Bank:PartnerB:Chequing +account Assets:Cash +account Assets:Investments:TFSA:PartnerA +account Assets:Investments:TFSA:PartnerB +account Assets:Investments:RRSP:PartnerA +account Assets:Investments:RRSP:PartnerB +account Assets:Investments:RESP:Child +account Assets:Home + +; Liabilities +account Liabilities:Mortgage +account Liabilities:CreditCard:PartnerA +account Liabilities:CreditCard:PartnerB +account Liabilities:LineOfCredit +account Liabilities:Loan:Vehicle + +; Equity +account Equity:OpeningBalances + +; Income +account Income:Salary:PartnerA +account Income:Salary:PartnerB +account Income:Benefits:CCB +account Income:Benefits:GST +account Income:Benefits:RESPGrant +account Income:Interest +account Income:TaxRefund +account Income:Gifts + +; Payroll deductions (from each pay stub) +account Expenses:Tax:Income:PartnerA +account Expenses:Tax:Income:PartnerB +account Expenses:Tax:CPP:PartnerA +account Expenses:Tax:CPP:PartnerB +account Expenses:Tax:EI:PartnerA +account Expenses:Tax:EI:PartnerB + +; Expenses +account Expenses:Housing:MortgageInterest +account Expenses:Housing:PropertyTax +account Expenses:Housing:Insurance +account Expenses:Housing:Maintenance +account Expenses:Utilities:Hydro +account Expenses:Utilities:Gas +account Expenses:Utilities:Internet +account Expenses:Utilities:Phone +account Expenses:Food:Groceries +account Expenses:Food:Restaurants +account Expenses:Transport:Fuel +account Expenses:Transport:Insurance +account Expenses:Transport:Maintenance +account Expenses:Transport:Transit +account Expenses:Child:Childcare +account Expenses:Child:Activities +account Expenses:Child:Clothing +account Expenses:Child:School +account Expenses:Health:Dental +account Expenses:Health:Pharmacy +account Expenses:Personal:Clothing +account Expenses:Personal:Subscriptions +account Expenses:Entertainment +account Expenses:Travel +account Expenses:Gifts +account Expenses:Donations +account Expenses:BankFees diff --git a/paisa/templates/household/budget.ledger b/paisa/templates/household/budget.ledger new file mode 100644 index 0000000..23f4774 --- /dev/null +++ b/paisa/templates/household/budget.ledger @@ -0,0 +1,20 @@ +; Monthly household budget (Paisa reads periodic transactions as budgets) +; TODO: set amounts to match your spending, or delete lines you don't need. + +; Declares the accounts so Paisa's editor can check this file on its own +include accounts.ledger + +~ Monthly + Expenses:Housing:MortgageInterest 1,100.00 CAD + Expenses:Housing:PropertyTax 300.00 CAD + Expenses:Utilities:Hydro 120.00 CAD + Expenses:Utilities:Gas 80.00 CAD + Expenses:Utilities:Internet 90.00 CAD + Expenses:Utilities:Phone 140.00 CAD + Expenses:Food:Groceries 1,200.00 CAD + Expenses:Food:Restaurants 250.00 CAD + Expenses:Transport:Fuel 300.00 CAD + Expenses:Child:Childcare 500.00 CAD + Expenses:Child:Activities 150.00 CAD + Expenses:Entertainment 200.00 CAD + Assets:Bank:Joint:Chequing diff --git a/paisa/templates/household/main.ledger b/paisa/templates/household/main.ledger new file mode 100644 index 0000000..80bdf33 --- /dev/null +++ b/paisa/templates/household/main.ledger @@ -0,0 +1,9 @@ +; TODO: Family Name — household books (BC, Canada) +; Ledger git repo: ${VOL_PATH:-/data}/paisa, mounted at /root/Documents/paisa +; Calendar year (January 1 to December 31), matching the personal tax year +; +; Add a file per year (2027.ledger, ...) and include it below. + +include accounts.ledger +include budget.ledger +include 2026.ledger diff --git a/paisa/templates/household/paisa.yaml b/paisa/templates/household/paisa.yaml new file mode 100644 index 0000000..69756db --- /dev/null +++ b/paisa/templates/household/paisa.yaml @@ -0,0 +1,95 @@ +# Paisa template: Household (family of three) — copy this folder into ${VOL_PATH:-/data}/paisa (git repo) +# Fill in the TODOs in main.ledger and accounts.ledger, then start recording in the year file. +# Reference: https://paisa.fyi/reference/config/ + +# Relative paths resolve from this file's directory (in git) +journal_path: main.ledger +sheets_directory: sheets + +# Database sits next to this file; .gitignore keeps it out of git +db_path: paisa.db + +# ledger | hledger | beancount (hledger/beancount need the matching image tag) +ledger_cli: ledger + +# Upstream defaults are tuned for India (INR / en-IN / April FY) +default_currency: CAD +locale: en-US +time_zone: America/Vancouver +display_precision: 2 +amount_alignment_column: 52 +# Calendar year, matching the personal tax year +financial_year_starting_month: 1 +week_starting_day: 0 + +# Accounts and commodities are declared in accounts.ledger; typos become errors +strict: "yes" + +budget: + rollover: "yes" + +# Empty = no login. Add users to enable auth; password is sha256 hashed twice: +# echo -n 'ChangeThisPassword' | sha256sum | head -c 64 | sha256sum | head -c 64 +user_accounts: [] +# - username: admin +# password: sha256: + +accounts: + - name: Assets:Bank:Joint:Chequing + icon: mdi:bank + - name: Assets:Home + icon: mdi:home + - name: Assets:Investments:RESP:Child + icon: mdi:school + - name: Liabilities:Mortgage + icon: mdi:home-city + - name: Liabilities:CreditCard + icon: mdi:credit-card + - name: Income:Benefits:CCB + icon: mdi:baby-face + +goals: + retirement: [] +# - name: Retirement +# icon: mdi:beach +# swr: 4 +# expenses: +# - Expenses:* +# savings: +# - Assets:Investments:* + savings: [] +# - name: Emergency Fund +# icon: mdi:piggy-bank +# target: 10000 +# target_date: "2027-12-31" +# accounts: +# - Assets:Bank:Joint:Savings + +schedule_al: + - code: bank + accounts: + - Assets:Bank:* + - code: cash + accounts: + - Assets:Cash + - code: loan + accounts: + - Liabilities:Loan:* + - code: home + accounts: + - Assets:Home + - code: mortgage + accounts: + - Liabilities:Mortgage + +allocation_targets: [] +commodities: [] +import_templates: [] +credit_cards: [] +# - account: Liabilities:CreditCard +# credit_limit: 10000 +# statement_end_day: 15 +# due_day: 5 +# network: visa +# number: "0000" +# expiration_date: "2029-12-31" diff --git a/paisa/templates/household/sheets/.gitkeep b/paisa/templates/household/sheets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/paisa/templates/personal/.gitignore b/paisa/templates/personal/.gitignore new file mode 100644 index 0000000..435b3b4 --- /dev/null +++ b/paisa/templates/personal/.gitignore @@ -0,0 +1,3 @@ +# paisa.db is a rebuildable cache next to paisa.yaml; keep it out of git +paisa.db +paisa.db-* diff --git a/paisa/templates/personal/2026.ledger b/paisa/templates/personal/2026.ledger new file mode 100644 index 0000000..71a0210 --- /dev/null +++ b/paisa/templates/personal/2026.ledger @@ -0,0 +1,41 @@ +; 2026 transactions. Uncomment and edit the examples below, or delete them. +; Add a file per year (2027.ledger, ...) and include it in main.ledger. +; See docs/ledger-cheatsheet.md for more patterns. + +; Declares the accounts so Paisa's editor can check this file on its own +include accounts.ledger + +; Starting balances: what you have and owe on day one +; 2026/01/01 Opening balances +; Assets:Bank:Chequing 2,500.00 CAD +; Assets:Bank:Savings 5,000.00 CAD +; Liabilities:CreditCard -800.00 CAD +; Equity:OpeningBalances + +; Paycheque: record gross pay and each deduction from the pay stub +; 2026/01/15 Employer | Pay period ending Jan 15 +; Assets:Bank:Chequing 2,150.00 CAD +; Expenses:Tax:Income 480.00 CAD +; Expenses:Tax:CPP 170.00 CAD +; Expenses:Tax:EI 50.00 CAD +; Income:Salary -2,850.00 CAD + +; Rent +; 2026/02/01 Landlord | February rent +; Expenses:Housing:Rent 1,800.00 CAD +; Assets:Bank:Chequing + +; Groceries on the credit card +; 2026/01/18 Grocery store +; Expenses:Food:Groceries 124.37 CAD +; Liabilities:CreditCard + +; Pay off the credit card +; 2026/01/25 Credit card payment +; Liabilities:CreditCard 924.37 CAD +; Assets:Bank:Chequing + +; TFSA contribution +; 2026/01/31 TFSA contribution +; Assets:Investments:TFSA 500.00 CAD +; Assets:Bank:Chequing diff --git a/paisa/templates/personal/accounts.ledger b/paisa/templates/personal/accounts.ledger new file mode 100644 index 0000000..c3dcfa4 --- /dev/null +++ b/paisa/templates/personal/accounts.ledger @@ -0,0 +1,58 @@ +; Chart of accounts for one person in BC. +; Add, rename, or delete accounts to suit you. With strict: "yes", +; every account used in a transaction must be declared here first. + +commodity CAD + format 1,000.00 CAD + +; Assets +account Assets:Bank:Chequing +account Assets:Bank:Savings +account Assets:Cash +account Assets:Investments:TFSA +account Assets:Investments:RRSP +account Assets:Investments:NonRegistered + +; Liabilities +account Liabilities:CreditCard +account Liabilities:LineOfCredit +account Liabilities:Loan:Vehicle +account Liabilities:Loan:Student + +; Equity +account Equity:OpeningBalances + +; Income +account Income:Salary +account Income:Interest +account Income:Dividends +account Income:TaxRefund +account Income:Gifts + +; Payroll deductions (from the pay stub) +account Expenses:Tax:Income +account Expenses:Tax:CPP +account Expenses:Tax:EI + +; Expenses +account Expenses:Housing:Rent +account Expenses:Housing:Insurance +account Expenses:Utilities:Hydro +account Expenses:Utilities:Internet +account Expenses:Utilities:Phone +account Expenses:Food:Groceries +account Expenses:Food:Restaurants +account Expenses:Transport:Transit +account Expenses:Transport:Fuel +account Expenses:Transport:Insurance +account Expenses:Health:MSP +account Expenses:Health:Dental +account Expenses:Health:Pharmacy +account Expenses:Personal:Clothing +account Expenses:Personal:Subscriptions +account Expenses:Entertainment +account Expenses:Travel +account Expenses:Gifts +account Expenses:Donations +account Expenses:BankFees +account Expenses:Interest diff --git a/paisa/templates/personal/budget.ledger b/paisa/templates/personal/budget.ledger new file mode 100644 index 0000000..3ca637c --- /dev/null +++ b/paisa/templates/personal/budget.ledger @@ -0,0 +1,17 @@ +; Monthly budget (Paisa reads periodic transactions as budgets) +; TODO: set amounts to match your spending, or delete lines you don't need. + +; Declares the accounts so Paisa's editor can check this file on its own +include accounts.ledger + +~ Monthly + Expenses:Housing:Rent 1,800.00 CAD + Expenses:Utilities:Hydro 60.00 CAD + Expenses:Utilities:Internet 80.00 CAD + Expenses:Utilities:Phone 60.00 CAD + Expenses:Food:Groceries 500.00 CAD + Expenses:Food:Restaurants 200.00 CAD + Expenses:Transport:Transit 110.00 CAD + Expenses:Personal:Subscriptions 40.00 CAD + Expenses:Entertainment 150.00 CAD + Assets:Bank:Chequing diff --git a/paisa/templates/personal/main.ledger b/paisa/templates/personal/main.ledger new file mode 100644 index 0000000..8e55573 --- /dev/null +++ b/paisa/templates/personal/main.ledger @@ -0,0 +1,9 @@ +; TODO: Your Name — personal books (BC, Canada) +; Ledger git repo: ${VOL_PATH:-/data}/paisa, mounted at /root/Documents/paisa +; Calendar year (January 1 to December 31), matching the personal tax year +; +; Add a file per year (2027.ledger, ...) and include it below. + +include accounts.ledger +include budget.ledger +include 2026.ledger diff --git a/paisa/templates/personal/paisa.yaml b/paisa/templates/personal/paisa.yaml new file mode 100644 index 0000000..e7d27c8 --- /dev/null +++ b/paisa/templates/personal/paisa.yaml @@ -0,0 +1,87 @@ +# Paisa template: Personal (single person) — copy this folder into ${VOL_PATH:-/data}/paisa (git repo) +# Fill in the TODOs in main.ledger and accounts.ledger, then start recording in the year file. +# Reference: https://paisa.fyi/reference/config/ + +# Relative paths resolve from this file's directory (in git) +journal_path: main.ledger +sheets_directory: sheets + +# Database sits next to this file; .gitignore keeps it out of git +db_path: paisa.db + +# ledger | hledger | beancount (hledger/beancount need the matching image tag) +ledger_cli: ledger + +# Upstream defaults are tuned for India (INR / en-IN / April FY) +default_currency: CAD +locale: en-US +time_zone: America/Vancouver +display_precision: 2 +amount_alignment_column: 52 +# Calendar year, matching the personal tax year +financial_year_starting_month: 1 +week_starting_day: 0 + +# Accounts and commodities are declared in accounts.ledger; typos become errors +strict: "yes" + +budget: + rollover: "yes" + +# Empty = no login. Add users to enable auth; password is sha256 hashed twice: +# echo -n 'ChangeThisPassword' | sha256sum | head -c 64 | sha256sum | head -c 64 +user_accounts: [] +# - username: admin +# password: sha256: + +accounts: + - name: Assets:Bank:Chequing + icon: mdi:bank + - name: Assets:Investments:TFSA + icon: mdi:piggy-bank + - name: Assets:Investments:RRSP + icon: mdi:chart-line + - name: Liabilities:CreditCard + icon: mdi:credit-card + - name: Income:Salary + icon: mdi:briefcase + +goals: + retirement: [] +# - name: Retirement +# icon: mdi:beach +# swr: 4 +# expenses: +# - Expenses:* +# savings: +# - Assets:Investments:* + savings: [] +# - name: Emergency Fund +# icon: mdi:piggy-bank +# target: 10000 +# target_date: "2027-12-31" +# accounts: +# - Assets:Bank:Savings + +schedule_al: + - code: bank + accounts: + - Assets:Bank:* + - code: cash + accounts: + - Assets:Cash + - code: loan + accounts: + - Liabilities:Loan:* + +allocation_targets: [] +commodities: [] +import_templates: [] +credit_cards: [] +# - account: Liabilities:CreditCard +# credit_limit: 10000 +# statement_end_day: 15 +# due_day: 5 +# network: visa +# number: "0000" +# expiration_date: "2029-12-31" diff --git a/paisa/templates/personal/sheets/.gitkeep b/paisa/templates/personal/sheets/.gitkeep new file mode 100644 index 0000000..e69de29