https://github.com/jamiedavenport/policystack
AI-first primitives for adding consent and policies to your apps
https://github.com/jamiedavenport/policystack
astro cli privacy-policy react typescript vite
Last synced: 11 days ago
JSON representation
AI-first primitives for adding consent and policies to your apps
- Host: GitHub
- URL: https://github.com/jamiedavenport/policystack
- Owner: jamiedavenport
- License: apache-2.0
- Created: 2026-03-03T00:55:54.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-05-26T13:34:22.000Z (25 days ago)
- Last Synced: 2026-06-07T17:05:05.526Z (13 days ago)
- Topics: astro, cli, privacy-policy, react, typescript, vite
- Language: TypeScript
- Homepage: https://www.policystack.dev/
- Size: 11.8 MB
- Stars: 151
- Watchers: 0
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Notice: NOTICE.md
Awesome Lists containing this project
README
[](https://policystack.dev)
# PolicyStack
Open-source, AI-first primitives for adding privacy policies and consent to your app. One typed config drives your privacy policy, your cookie policy, and the consent that gates the cookies they describe — all rendered directly into your React/Vue/Svelte/Solid/Angular app, never a third-party iframe.
- [Homepage](https://policystack.dev)
- [Documentation](https://policystack.dev/docs)
- [Blog](https://policystack.dev/blog)
## Three building blocks
- **[Policy](https://policystack.dev/docs/policy)** — your privacy and cookie policy as a typed config, rendered as components or Markdown. A Vite plugin compiles it at build time and scans for undeclared third parties.
- **[Consent](https://policystack.dev/docs/consent)** — a headless consent state machine. Sub-4kb core, adapters for React, Vue, Solid, Svelte, and Angular, and a Vite plugin that fails the build on an ungated cookie. No bundled UI — you build the banner with your own components.
- **Cloud** — an optional hosted control plane for versioning, audit trails, and consent analytics. It sits on top of the OSS pieces; you never need it to use them.
Everything except Cloud is Apache-2.0.
## Quick start
```bash
bunx @policystack/cli init
```
`init` installs the right packages for your stack, writes a starter `policystack.ts`, and prints a prompt you can hand to a coding agent. See the [quick start](https://policystack.dev/docs/policy/cli) for the full walkthrough.
## Packages
All packages publish under the `@policystack/*` scope and version together.
| Package | What it is |
| ------------------------ | ---------------------------------------------------------- |
| `@policystack/sdk` | Public API — `defineConfig()`, `renderLlmsTxt()` |
| `@policystack/core` | Compilation engine + consent runtime (`./consent` subpath) |
| `@policystack/vite` | Vite plugin + opt-in consent scanner |
| `@policystack/cli` | Install / configure / validate CLI |
| `@policystack/renderers` | Shared Markdown / HTML / PDF render layer |
| `@policystack/scripts` | Consent-gated third-party script loaders |
| `@policystack/react` | React adapters — `./policy`, `./consent`, `./provider` |
| `@policystack/vue` | Vue adapters — `./policy`, `./consent` |
| `@policystack/svelte` | Svelte adapters — `./policy`, `./consent` |
| `@policystack/solid` | Solid adapter — `./consent` |
| `@policystack/angular` | Angular adapter — `./consent` |
## Contributing
See [CONTRIBUTING.md](./CONTRIBUTING.md) for setup, the monorepo layout, and the release flow. Apache-2.0 — issues and PRs welcome.
> **Not legal advice.** PolicyStack generates policy documents from your config. It does not provide legal advice. Have a lawyer review your policies before publication. See the [legal notice](https://policystack.dev/legal-notice).
# Contributors

Jamie Davenport
💻

James
💻

Vish
💻

Kamil Doroszewicz
💻
# Stargazers
[](https://repostars.dev/?repos=jamiedavenport%2Fpolicystack&theme=light)