[policy]@policystack/react@1.0.0
Your privacy policy, as a typed config.
Define your policy once in TypeScript. Render it as React components, generate Markdown, ship a consent banner — all driven from the same source of truth.
privacy.tsx
import { PolicyStack } from "@policystack/react/provider";
import { PrivacyPolicy } from "@policystack/react/policy";
import policy from "@/policystack";
export function PrivacyPolicyPage() {
return (
<PolicyStack config={policy}>
<PrivacyPolicy />
</PolicyStack>
);
}[01]what you get
A policy you can grep, diff, and review.
- Typed config
- defineConfig() gives you autocomplete and type errors when something is missing or stale.
- React renderer
- Drop-in components for the policy page, individual sections, and per-purpose data tables.
- Markdown export
- Generate a static .md version for your repo, your docs site, or for the agents to consume.
- Consent banner
- A shadcn-style banner that reads from the same config — no copy drift between policy and UI.
- Astro + Svelte
- Astro docs are first-class. A Svelte adapter is shipping. More frameworks on the roadmap.
- Documents, not advice
- Built with privacy counsel review in mind — never as a replacement for it.
[01]
[02]
[03]
[04]
[05]
[06]
[02]vs the alternatives
Not a SaaS dashboard. Not a static template.
Same legal coverage you’d get from a lawyer, a template, or one of the incumbent SaaS tools — without the invoice, the dashboard, or the drift.
| Feature | Policy | Lawyers | Templates | Termly | iubenda |
|---|---|---|---|---|---|
| Developer workflow (Git, TypeScript, CI) | |||||
| Version controlled | |||||
| Renders as a React / Vue / Svelte component | |||||
| Always in sync with the codebase | |||||
| Markdown / HTML / PDF output | PDF only | Word / PDF | Hosted page | Hosted widget | |
| GDPR + CCPA coverage | Varies | ||||
| No ongoing subscription | |||||
| Self-hostable / open source | — | — |
GDPR and CCPA coverage is the floor — Policy is not legal advice and is not a replacement for counsel on high-stakes matters.
[03]install
Two lines and you’re shipping.
bash
pnpm dlx @policystack/cli initpolicystack.ts
import { ContractPrerequisite, defineConfig, LegalBases } from "@policystack/sdk";
export default defineConfig({
company: {
name: "Acme, Inc.",
legalName: "Acme, Inc.",
address: "123 Main St, San Francisco, CA",
contact: { email: "privacy@acme.com" },
},
effectiveDate: "2026-01-01",
jurisdictions: ["eea", "us-ca"],
data: {
collected: {
"Account Information": ["Name", "Email"],
},
context: {
"Account Information": {
purpose: "To authenticate users and send service notifications.",
lawfulBasis: LegalBases.Contract,
retention: "Until account deletion",
provision: ContractPrerequisite("We cannot operate your account."),
},
},
},
});[04]sponsor
Keep the core free, forever.
Consent and Policy are Apache-2.0 and will stay that way — no relicensing, no features held back behind a cloud tier. Sponsorship pays for the time it takes to keep both repos maintained, audited, and worth depending on.