Skip to content

Repository files navigation

CrewBooks

Contractor-native double-entry accounting — the money half of the Crew suite. Invoicing, purchase orders, bills, cash + accrual P&L, and taking payment via Stripe (hosted pages, so you never touch raw card data). It integrates two-way with CrewClock — pulling job-cost/labor and pushing revenue back — so you get true per-job profit and a company P&L that reconciles to payroll. The thing QuickBooks can't do, because it has no idea what happened on the job site.

▶ Live demo: cas-tx.com/crewbooks — the owner login is prefilled on the screen. Sample books only; Stripe and the AI assistant are off on the demo.

Part of the CAS-TX open-source trades suite, alongside CrewClock and Peal.

Highlights

  • A real immutable double-entry ledger — every entry balances or it doesn't post; corrections are reversing entries, never edits; money is integer cents. It's the foundation every report is a view on top of, so a CPA can trust the books and an audit can reconstruct any number.
  • Invoicing + A/R (send → Dr A/R · Cr Revenue · Cr Sales-Tax-Payable), payments, credit memos/refunds, and Stripe hosted payment pages with signed webhooks (a payment posts to the ledger only after its webhook signature checks out).
  • Bills + A/P + purchase orders; recurring invoices & bills; 1099 tracking; bank reconciliation.
  • Reports — P&L (cash and accrual), balance sheet, A/R & A/P aging, per-job profit, company year-to-date, and month-by-month P&L.
  • CrewClock integration — pull labor/job-costs in, push per-job revenue back, for reconciled per-job profit.
  • "Ask your books" AI assistant (read-only; optional — bring your own Anthropic key).
  • Books-admin & trust — period locking enforced in the writer, chart-of-accounts & team management, forced password change, full audit log, print-to-PDF.
  • Multi-tenant — every record is org-scoped.

Stack

Next.js 16 (App Router, Server Actions) · Prisma 7 / PostgreSQL (pg driver adapter) · Tailwind v4 · self-hosted email/password auth (JWT cookie, jose + bcryptjs) · Stripe (hosted pages + signed webhooks) · at-rest AES-256-GCM encryption for connected keys. Runs with no third-party services; Stripe and the AI assistant are opt-in.

Self-host quick start

npm install
cp .env.example .env               # set AUTH_SECRET + CRED_SECRET: openssl rand -base64 32
createdb crew_books                # or point DATABASE_URL at your Postgres
npm run db:deploy && npm run db:seed   # seeds a contractor chart of accounts + demo books
npm run dev                        # http://localhost:3000

See INSTALL.md for a Docker/self-host walkthrough (health check, nightly backups) and CODEMAP.md to navigate the code. Connect Stripe (test keys are fine) and the AI assistant from Settings after first run — both are optional.

Verify

npm test          # the pure ledger engine — balanced-entry invariant, trial balance,
                  # cash vs accrual P&L, balance-sheet equation, A/R aging
npm run build     # typecheck + production build

License

AGPL-3.0-or-later — see LICENSE. If you run a modified version as a network service, the AGPL requires you to offer your changes' source to its users. Managed hosting and paid installs of the upstream are offered separately. Contributions welcome — see CONTRIBUTING.md.

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages