Billing-grade SaaS starter
Ship the money layer first.
Penvoro is the platform layer of a SaaS that takes payments: plans, trials, proration, metered usage, invoices, credit notes, signed webhooks and an operator console. Built and race-tested, so your product starts on top of it. It runs as a live demo with fictional companies; remove the demo with one command and keep everything else.
- 290+unit and race tests
- 50docs guides
- 1command to remove the demo
curl -X POST https://api.example.com/api/v1/events \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"metric":"api.calls","quantity":1}'await fetch('https://api.example.com/api/v1/events', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ metric: 'api.calls', quantity: 1 }),
});GET /api/v1/usage
{ "plan": "team",
"rows": [
{ "metric": "api_calls", "used": 1, "limit": 100000 },
{ "metric": "seats", "used": 3, "limit": 10 } ] }Primitives
Eight platform areas, each with tests and a guide. Nothing here is a placeholder. See every feature or read how security works.
Billing math you can show your auditor
Credit is based on what the customer actually paid, discounts included. Every plan change shows a preview before anything is charged. Parallel checkouts leave one subscription, and a payment that cannot be applied is refunded and flagged.
- Trials fall back to the free plan, never an invoice
- Coupons are redeemed atomically
- Renewals are claimed with conditional updates, so a period is never charged twice
Switch to Business, monthly · illustrative example
| Unused time on current plan (amount paid) | −$9.50 |
| Business for the rest of this period | $24.50 |
| Due now | $15.00 |
Your current period is kept and ends on the same day.
Signed, replayable webhooks
Every delivery carries an HMAC signature, a stable event id for deduplication and a retry schedule. Replay a time window to one endpoint when a receiver was down.
| Event | When it fires |
|---|---|
member.joined | A person accepted an invite |
subscription.updated | Plan, interval or status changed |
subscription.canceled | Cancellation took effect |
invoice.paid | An invoice was paid |
credit.issued | Account credit was granted |
file.uploaded | A file finished uploading |
note.created | The example module wrote a record |
Verify a delivery
const t = Number(header.match(/t=(\d+)/)[1]);
const want = crypto.createHmac('sha256', secret)
.update(`${t}.${rawBody}`).digest('hex');
// accept any v1=... that matches, within 300 secondsWebhook guide A go-live checklist that shows progress
Every workspace gets a checklist on its dashboard: create the workspace, invite a teammate, choose a plan, make an API key, add a webhook. Each step ticks off as it is done.
Go-live checklist
3 of 5 done
Tenant-safe by default
A plugin refuses queries that forget the organisation, and updates that try to move a row.
Docs you can search
50 guides, recipes and references with a sidebar and client-side search, plus an API reference built from your routes.
Global and accessible
English, Spanish and Arabic with right-to-left layouts, dark and light themes and AA contrast.
- Next.js 16
- React 19
- TypeScript 6
- Tailwind 4
- MongoDB + Mongoose 9
- zod 4
- OpenAPI 3.1
- Vitest
- Playwright
Questions
Source you own. The platform core lives in packages/gantrel-core with its own tests, so you can read and change every rule.
MongoDB as a single-node replica set. Every tenant row carries an orgId and a plugin refuses unscoped queries.
Yes. A simulated gateway with test cards ships for demos. It is switched off in production unless you enable demo mode. Stripe and Razorpay drivers are included for live use.
No. They are the example product’s plans, the demo that ships in the box, so you can watch proration, coupons and limits work. You define your own plans in one config file or the console.
Run npm run example:remove. It deletes the demo, cuts its lines from shared files and drops only its own collections.
No. It is a web starter: Next.js, MongoDB and a REST API you can call from any client.
Get your API keys in two minutes
Sign in to the live console and try billing, the operator view and the API.