Docs
The full README ships with the code. This is the short version, so you know what you are getting into before you buy.
Setup, start to finish
npm install
cp .env.example .env
# generate a session secret
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# put SESSION_SECRET and DATABASE_URL in .env, then
npm run migrate
npm run dev # http://localhost:3000
Sign up straight away. With no SMTP configured the verification email is printed to your terminal, so you can click the link out of there and keep moving before you have an email provider.
Turning billing on
- Create the product in your payment provider, with monthly and yearly variants.
- Copy the API key, store id and variant ids into
.env. - Register the webhook at
/webhooks/billingwith your signing secret. - Edit the
plansarray inconfig/index.js. Everything reads from it.
Test mode works end to end, so you can watch an upgrade land before you take real money.
Deploying
There is no build step, so a deploy is npm ci && npm start
on anything that runs Node — a $5 VPS, Render, Fly, Railway. Set the
environment variables, point the webhook at the real URL, and run
npm run check once against production: it tells you if the
database is unmigrated or billing is half-configured.