Getting started
Running HysabOne locally against the demo book.
Before you start
You need Postgres running and both database URLs set. They point at the same database but authenticate as different roles, and that difference is what makes tenant isolation real rather than theoretical.
Running with only the owner URL makes row-level security silently do nothing. The isolation tests then pass against nothing at all, and you will "fix" a test that was never broken.
Running it
pnpm install
cp .env.example .env # set DATABASE_URL and APP_DATABASE_URL
pnpm db:migrate
pnpm dev # http://localhost:3000The demo book
A seeded demo company exists for development and for documentation capture:
| Sign-in | accountant@hysab.one |
| Password | correcthorse |
| Company | Demo Books |
The seed is idempotent and must be run as the owner role.
APP_DATABASE_URL='' pnpm dlx tsx src/db/seed-demo.tsBuilding for production
Set NODE_ENV=production at build time, not only at run time. Building
without it produces a server bundle that throws on every request, even though the
build itself reports success.
NODE_ENV=production pnpm build