Diamond Hands Consortium

Diamond Hands Consortium

General Ledger — please sign in

Clerk isn’t configured on this preview, so access control is running in demo mode. Pick a user to sign in as. Set CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY to switch to real Clerk sign-in, MFA and password reset.

Diamond Hands Consortium

Diamond Hands Consortium

General Ledger

The books haven’t been opened yet. Create the consortium’s ledger — a standard chart of accounts, a locked prior month and an open current month — and start posting.

Diamond Hands Consortium
Postgres · Netlify Functions · double-entry
Diamond Hands Consortium / Dashboard

Quick actions

Books at a glance

Recent activity

Most recent postings to the journal

Chart of Accounts

New invoice

The core translates this document into a balanced entry — debit Accounts Receivable, credit Sales Revenue and Sales Tax Payable. You never compute a debit.

Invoices

Customer receivables

Enter a bill / expense

A bill debits the expense you choose and credits Accounts Payable, tagged with the vendor so per-vendor payables reconcile to the control account automatically.

Bills

Vendor payables

Record a partner movement

Every member's capital lives in one equity account — Partner Investments — tracked per member by a balance key like partner:alice. An investment debits Cash and credits the member's equity; a capital return reverses that; yearly operation dues move capital out of the member's stake into Operation Dues revenue. The engine reconciles every key to the control account automatically.

Partners

Per-partner capital — reconciles to the control account

DHC Joint Pot & member exit

Group-level equity — the 2% spread and admin fees kept on member-funded loans

When a member funds a loan directly they earn 8% on their contribution; the consortium keeps the rest (the 2% spread on member-funded dollars, the full interest on group-funded dollars, and the $195 admin fee) in the DHC Joint Pot. A member who leaves takes their Partner Investments balance plus their ownership share of the pot. The table below is a live projection for members still in the group — ownership counts active members only.

Request a member exit

Locks in the payout at the exit date

When a member notifies the group they want to leave, their payout is locked in at that moment: their Partner Investments balance plus their pro-rata share of the DHC Joint Pot (their share of active members' capital). The pot is reduced by exactly that share, the member is marked departed and dropped from future ownership calculations, and the payout is booked as an obligation the group still owes — it need not be paid immediately.

Departed members

Locked payouts & outstanding obligations

Record a payout to a departed member

Loan portfolio

Small-business loans funded from pooled partner capital. A disbursement debits Loans Receivable and credits Cash; payments credit Loans Receivable and recognise Loan Interest Income.

New loan

The core records the disbursement as a balanced entry — debit Loans Receivable, credit Cash — plus a flat $195 origination fee. The 10% interest is recognised as income as the borrower pays. You never compute a debit.

Late fees (optional)
Member contributions (optional — direct loan funding)

Members can fund this loan directly from their own capital. Each contributor earns 8% on what they put in (credited to their Partner Investments balance); the remaining interest plus the $195 admin fee flow to the DHC Joint Pot. Anything not member-funded is covered by the group pool.

Loans

Click a loan for terms, payments & journal entries

Recurring invoices

Schedules generate an invoice on their cadence; with auto-charge on, the customer's saved card is billed via Stripe.

New recurring schedule

Each run posts a fresh invoice through the same Core boundary (debit A/R, credit Revenue + Tax). Auto-charge then attempts a Stripe payment and posts the cash receipt.

Schedules

Next run, cadence & run history

Saved payment methods

Cards on file per customer — used for automatic charges

Bank connections

Connect a bank with Plaid, import transactions, and reconcile them against the journal.

Connected institutions

Imported transactions

Match each line to a journal entry, or set it aside

Investments

The group's holdings across venues, valued in USD. Tracked separately from the accounting ledger — no journal entries are posted from here.

Total value over time

Breakdown by source

Interactive Brokers · Kraken · Atomic Wallet · Precious metals

Interactive Brokers

Kraken

Add Atomic Wallet crypto

Manual entry — Atomic Wallet has no API. Current price (CoinGecko) and USD value are shown live.

Atomic Wallet

Crypto held off-exchange

Add precious metal

Manual entry by weight. Current spot price and USD value are shown live (requires the metals feed).

Precious metals

Physical holdings by weight

Raw journal entry

The low-level posting primitive. Lines must net to zero or the engine refuses the write. Debits are positive, credits negative.

AccountAmount
∑ 0.00

Journal — append only

Posted entries are immutable; correct by reversal

Trial Balance

Every account, debit and credit columns must agree

Profit & Loss

Revenue and expense — the temporary accounts

Balance Sheet

Assets against liabilities, equity and unclosed earnings

Sub-ledgers

Per-customer and per-vendor balances by opaque key

Accounting Periods

A posting’s date sets its period. A locked period refuses new entries.

Create period

New periods are created OPEN. The label comes from the start date.

Period history

Every create, lock and unlock — who, when and why
The boundary

Two layers, one deliberate line between them

The engine guarantees the books are correct. The core decides what the books mean. A front-end talks to the core in the language of documents — invoices and bills; the core talks to the engine in the language of balanced entries. The engine talks to no one — it only enforces.

Core layer

What the books mean

  • Chart-of-accounts catalog
  • Documents → journal entries (an invoice debits A/R, credits Revenue + Tax; a bill debits an expense, credits A/P)
  • Period definition & close orchestration
  • The higher-level API front-ends call
POST /api/documents/invoice · /bill
hands down a balanced entry
Engine layer

What must stay true

  • Every entry balances: ∑ debits = ∑ credits
  • Accounts normalize & roll up by type
  • Posted entries are immutable — correct by reversal
  • Nothing posts into a locked period
POST /api/journal-entries

Four types — one per distinct (normal balance, statement) pair

Account typeNormal balanceStatementResets at close
AssetDebitBalance sheetNo — permanent
Liability / EquityCreditBalance sheetNo — permanent
RevenueCreditIncome statementYes — temporary
ExpenseDebitIncome statementYes — temporary

Liability and equity collapse into one credit-normal type at the engine level — they behave identically. The debt-vs-equity split lives in the chart, not the type system.

Integrity by construction, not by convention

Double-entry is the only write

Everything that touches money is a balanced entry of two or more lines. The engine never lets an unbalanced entry commit.

Immutable, correct by reversal

Posted entries are never edited or deleted. A mistake is fixed by posting a reversing entry — an audit trail by construction.

Documents, not debits

Front-ends submit invoices and bills. They never compute a debit. The core decides the postings; the engine enforces the balance.

Periods that lock

A posting’s date determines its period. A locked period refuses new entries — corrections become visible back-dated entries, never silent edits.

Sub-ledgers by opaque key

A line can carry a balance key — a customer, a vendor. The engine reconciles each key to its account total without learning what the key means.

Retained earnings lives above

The engine tracks revenue and expense; it does not close them. Closing net income into retained earnings is a core concern.

The full design notes and Prisma schema live in /docs in the repository.

Lending sits above the engine too

The consortium lends its pooled partner capital to small businesses. A disbursement debits Loans Receivable and credits Cash; the flat $195 origination fee and any late fees credit Loan Fee Income; and a payment debits Cash, crediting Loan Interest Income for the interest portion and Loans Receivable for the rest. Each loan is tracked as an opaque balance_key sub-ledger of Loans Receivable — the same mechanism behind per-customer receivables and per-partner equity — so every loan reconciles to the control account by construction. How each entry is formed is documented in /docs/loans.md and in netlify/lib/loans.ts.

Members may also fund an individual loan directly. When a funded loan is activated, the Core posts one balanced allocation entry that shares out the loan's earnings: each contributor earns 8% on what they put in (credited to their Partner Investments key), and the remaining interest plus the $195 admin fee flow to the group-level DHC Joint Pot. When a member leaves, one balanced exit entry locks in their payout — their capital plus a pro-rata share of that pot — by moving both into an Owed to Departed Members liability and reducing the pot accordingly; the member then drops out of all future ownership calculations. All still ordinary journal entries the engine enforces.

Integrations sit above the engine

Recurring billing (Stripe) and bank feeds (Plaid) are layered above the engine, never around it. A due recurring schedule generates an invoice through the same Core boundary, and an automatic payment posts a normal cash receipt — both are ordinary balanced entries the engine enforces. Imported bank transactions are matched against existing journal entries during reconciliation; they never rewrite them. Where each piece of Stripe and Plaid logic lives is documented in /docs/integrations.md.

Invite a user

Invite by email and assign a role. In real Clerk mode the person signs up in Clerk with this email and is linked automatically on first sign-in; in demo mode they become selectable on the sign-in screen immediately. A member must be linked to a Partner Investments balance key (e.g. partner:andy) — that key scopes everything they can see.

Users

Everyone with access