How nox-mob/openledgerapp works
Open Ledger is a self-hostable double-entry accounting application for small businesses and nonprofits. Users sign in, set up an organization and accounts, then record transactions directly or import bank statements as reviewable evidence before posting. They can reconcile accounts, view reports, and perform period close; organization membership, permissions, and audit history support these workflows. The supplied excerpts show authentication, organization context, and import processing; several other product capabilities are documented in the README or indexed but their implementation details were not sampled, so their internal links are conservative.
Main entry points: org.functions.ts Organization setup · import.functions.ts Import batch operations · client.ts Supabase client · route.tsx Authenticated area
Components 20
Access and organization
- Sign in
src/routes/auth.tsx - Authenticated area
src/routes/_authenticated/route.tsx - Legal acceptance
src/components/LegalGate.tsx - App shell and org context
src/components/AppShell.tsx - Organization setup
src/lib/org.functions.ts
Ledger workflows
- Accounts and funds
src/routes/_authenticated/accounts.tsx - Transaction entry
src/lib/transactions.functions.ts - Bank statement import
src/routes/_authenticated/import.tsx - Import batch operations
src/lib/import.functions.ts - Statement parsers
src/lib/parsers
Reconciliation and reports
- Reconciliation
src/lib/reconcile.functions.ts - Financial reports
src/lib/reports.functions.ts - Period close
src/lib/close.functions.ts
Data and controls
- Audit trail
src/lib/audit.ts - Permission checks
src/lib/permissions.ts - Server auth middleware
src/integrations/supabase/auth-middleware.ts - Supabase client
src/integrations/supabase/client.ts - Postgres and row security
- Supabase Auth
Other components
- Business user
Connections 31
- Business user → Sign in: signs in
src/routes/auth.tsx - Sign in → Supabase client: authenticates with
src/routes/auth.tsx - Authenticated area → Supabase client: checks user
src/routes/_authenticated/route.tsx - Authenticated area → Legal acceptance: wraps routes
src/routes/_authenticated/route.tsx - Authenticated area → App shell and org context: opens workflows
- Legal acceptance → Postgres and row security: loads legal status
- App shell and org context → Organization setup: loads organizations
src/components/AppShell.tsx - Business user → Organization setup: sets up organization
- Organization setup → Server auth middleware: requires auth
src/lib/org.functions.ts - Organization setup → Permission checks: checks access
src/lib/org.functions.ts - Organization setup → Audit trail: records changes
src/lib/org.functions.ts - Organization setup → Postgres and row security: reads and writes
- Business user → Accounts and funds: configures accounts
- Business user → Transaction entry: records entries
- Business user → Bank statement import: imports statements
src/routes/_authenticated/import.tsx - Bank statement import → Statement parsers: parses and checks
src/routes/_authenticated/import.tsx - Bank statement import → Import batch operations: submits batches
src/routes/_authenticated/import.tsx - Import batch operations → Server auth middleware: requires auth
src/lib/import.functions.ts - Import batch operations → Permission checks: checks write access
src/lib/import.functions.ts - Import batch operations → Audit trail: records posting
src/lib/import.functions.ts - Import batch operations → Postgres and row security: stores evidence and posts
- Business user → Reconciliation: reconciles accounts
- Business user → Financial reports: reviews reports
- Business user → Period close: closes period
- Reconciliation → Postgres and row security: reads and updates
- Financial reports → Postgres and row security: queries ledger
- Period close → Postgres and row security: updates close state
- Server auth middleware → Supabase Auth: validates claims
- Supabase client → Supabase Auth: uses auth
- Supabase client → Postgres and row security: queries via Supabase
- Postgres and row security → Audit trail: enforces ledger invariant