The intent of Puff Serverless is to allow the deployment of hyper-scalable solution to centralize sign-on, access control, and unified billing for multiple organisations across multiple applications.
We run JavaScript on Node-compatible Cloudflare Functions. APIs return full HTML via HTMX to update in-page. Data is stored within Postgres-like CoackroachDB accessed via Cloudflare Hyperdrive.
More can be read in Architecture.md
Use the latest Node version. We recommend you Install NVM if you are not already using Node.
nvm install stable
nvm use stable
Note: SQL Schema can be found in the SQL folder, one file per table. users.sql
should be imported first as it provides the foreign key for many other tables.
You can override the Hyperdrive connection strings by setting the following in .env
:
WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_HYPERDRIVE="postgres://user:password@localhost:5432/databasename"
TODO
npm ci
npm run dev
Before pushing you may wish to run linting or allow autoformatting to run, or configure your editor to automatically use prettier.
npm run lint
npm run format
You may also need to update types:
npx wrangler types
Dependabot should update NPM and GitHub Actions with automatic pull requests.