Compliance-ready SaaS starter
Every action on the record.
Attestry is the starter for teams who must prove what happened: who did what, when, and under which policy. Audit trail, roles, SSO, retention and evidence exports are built in, so you spend your time on the product. It runs as a live demo with three fictional companies; remove the example app with one command and keep everything else.
- 290+unit and race tests
- 50docs guides
- 1command to remove the demo
Audit trail
Example trailOwner required two-factor sign-in for the workspace
org.policy.require_2fa09:42 UTCBilling contact downloaded an invoice
invoice.download09:51 UTCAdmin rotated an API key, step-up confirmed
apikey.rotate10:03 UTCSystem ended an expired session
session.expire10:20 UTCAuditor exported the audit log as CSV
audit.export10:34 UTC
Trust center
The control register
Each row is something the starter does today, where you can see it in the running app, and the guide that explains it.
Tenant isolation fails closed
Built inEvery workspace-owned collection carries an organisation id and a model plugin refuses a query that does not name one, and an update that tries to move a row to another workspace. A test enumerates every model.
Evidence: Tenancy guide and the model test
Read the guideSessions you control
Built inCookies are signed, HTTP-only and secure in production. People see each device, end any session, and every sign-in and failure is recorded for 90 days.
Evidence: Settings, Security and the sign-in history
Read the guideStep-up for the risky moments
Built inCreating or rotating a key, revealing a webhook secret and transferring ownership ask for the password or a code again, valid for ten minutes.
Evidence: Step-up prompts and audit rows
Read the guideRoles that cannot grant more than they hold
Built inPermissions are checked on the server for every action. API keys are capped by the role of the person who made them, and can expire or be limited to addresses.
Evidence: Team, custom roles and API keys
Read the guideOutgoing calls are guarded
Built inWebhooks, payment gateways, AI and OAuth requests go through a fetch that refuses private, loopback and metadata addresses. Webhook bodies are HMAC-signed.
Evidence: Request log and webhook delivery log
Read the guideMoney paths are race-tested
Built inRenewals, seat changes, coupons and credit are claimed with conditional updates, so two runners never charge a period twice.
Evidence: Billing, invoices and the usage meters
Read the guideEverything privileged leaves a trail
Built inConsole actions, role changes, exports and impersonation are written to the audit log with the actor. Impersonation is view-only by default.
Evidence: Audit log with actor, area and CSV export
Read the guideSecrets stay out of the repo
Built inKeys live in environment variables. Live calls to paid providers need both a key and an explicit switch; tests always refuse them.
Evidence: Environment reference and the secret scan
Read the guide
Evidence
Evidence you can export
When someone asks what happened, you hand over records, not screenshots.
Audit log export
Filter by actor, area, target and date range, then export the rows to CSV.
Read the guideWorkspace data export and delete
Owners can take a copy of the workspace data or request deletion, and both are recorded.
Read the guideRetention rules
Sign-in history and operational logs are kept for a stated period, then removed by a scheduled job.
Read the guideCookie-consent records
Each choice is logged with its policy version and an anonymous id: no IP address, no user agent.
Read the guideEmail outbox
Every outgoing message is stored with its template, recipient and delivery state.
Read the guideIdentity and access
Know who is signed in, and what they can do
- Single sign-onDomain-based SSO with a verified domain list.
- SCIM directory syncProvision and deprovision members from your identity provider.
- PasskeysPasswordless sign-in with device-bound credentials.
- TOTP and recovery codesAuthenticator-app codes, with a workspace policy that requires them.
- SessionsSee each device, end one or all, and read the sign-in history.
- Custom roles and step-upA permission matrix you extend, with a fresh confirmation before risky changes.
Frameworks
How the controls map to common areas
| Common area | Built-in controls that help evidence it | Where to look |
|---|---|---|
| Access control | Custom roles, SSO, SCIM, step-up, session list | Team page, Settings, audit rows |
| Logging and monitoring | Audit log with diffs, request log, webhook delivery log | Audit log, Developers |
| Data retention | Retention rules, scheduled clean-up, backups guide | Data and privacy guide |
| Privacy requests | Workspace export and delete, consent log, email outbox | Settings, outbox, consent log |
Mappings are guidance. Certification is the responsibility of the company that runs the product.
Policies
Read the policies the product ships with
These are templates for your own company to adapt, not legal advice.
Yours to review
- Your own models and routes: use the generator and the tenant plugin.
- Secrets management, backups and rate limits at your proxy.
- A security review and your own penetration test before taking real money.
- The legal pages: the shipped terms and privacy text are templates, not legal advice.
- Certification: Attestry maps to common control areas and helps you evidence them. Certifications and audit reports are earned by the company that runs the product, not by the starter.
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 mode and AA contrast.
- Next.js 16
- React 19
- TypeScript 6
- Tailwind 4
- MongoDB + Mongoose 9
- zod 4
- OpenAPI 3.1
- Vitest
- Playwright
Questions
No. It gives you the controls and the evidence trail that compliance work needs: audit log, roles, retention, consent records and exports. Certification or an audit report is earned by the company that runs the product.
Source you own. The platform core lives in a package inside the repository with its own tests, so you can read and change every rule your auditor asks about.
MongoDB as a single-node replica set. Every tenant row carries an organisation id and a plugin refuses unscoped queries.
Yes. The audit log filters by actor, area, target and date range, shows the before and after, and exports to CSV. Workspace data export and delete are included too.
Yes. A simulated gateway with test cards ships for demos. It is switched off in production unless you enable demo mode.
Run npm run example:remove. It deletes the demo product, cuts its lines from shared files and drops only its own collections.
Put the record first.
Sign in to the live demo and read the audit trail, the roles and the exports.