<p align="center">
  <img src="/docs/assets/logo.svg" alt="notabenda" width="380">
</p>

<p align="center">Compliance packs for your site.</p>

Choose a job: publish privacy pages, manage cookie choices, or ask for agreement to terms. Notabenda keeps the required facts, components and integration checks together as a pack. Prepare a draft, connect it to your site, and add more when you need it. Host the pages and controls yourself, with your own design.

**Developer preview.** The packages have not been published to npm yet. The frontend includes legal pages, cookie choices, form permissions and terms agreements, with optional React and Astro adapters. The Cloudflare package adds scoped evidence, document history and operator tools. Regional coverage and operational integration remain partial. See the [current scope](</guide/scope/index.md>) and [feature status](</guide/features/index.md>).

The packages are **`@notabenda/core`**, **`@notabenda/cloudflare`** and **`@notabenda/authoring`**. The npm organization is reserved; use local builds for now. [Package names and installation](</guide/packages/index.md>).

Read the [draft 0.1.0 release notes](</guide/changelog/index.md>) for the preview's contents and current limits.

Start with the [pack library](https://notabenda.org/start/) or explore the [documentation](https://notabenda.org/guide/) or try the [examples and your own temporary demo workspace](https://notabenda.org/examples/).

Start with the [compliance component map](https://notabenda.org/guide/compliance-map/) to see what notices, permissions, contract actions and evidence serve. The separate [software and storage diagram](https://notabenda.org/guide/architecture/) shows how those parts fit into a site and optional backend.

## Set up with an agent

Choose packs in the [product flow](https://notabenda.org/start/) and select **Give to my agent**. After explicit local installation, `notabenda packs cookie-choices --json` gives the same installed job contract; `wizard --packs cookie-choices --answers FILE` carries the selection into a draft and private report. [Pack guide](</guide/cartridges/index.md>).

Give your coding agent the [Notabenda integration skill](</skills/notabenda/SKILL.md>). It covers discovery, configuration, documents, controls and the optional backend. After local installation, `npx --no-install notabenda describe --json` gives agents a version-matched map of requested outcomes, config fields, facts still needed and host work. The [agent setup guide](</guide/agent-setup/index.md>) explains installation; [llms.txt](https://notabenda.org/llms.txt) links to Markdown documentation.

For ambiguous requests, the map includes explicit scope questions. `describe --selection FILE --json` resolves supported decisions into targets and prerequisites while keeping unanswered questions visible. It does not edit configuration or enable features.

## Try it

Repository tooling requires Node.js 22.22+ (including the Astro example) and Python 3.9+ for catalog checks. The core package itself supports Node.js 22+.

```sh
npm install
npm run dev
```

Open [the local example](</>). It includes privacy, cookie, and supplied terms pages in two themes, using a fictional operator and draft content.

Try [live cookie choices](</choices>): a small permission notice, a user-opened preferences drawer, and synthetic optional services that wait for your choice. [Integration guide](</guide/consent/index.md>).

Try [terms agreement](</agreement>): an unchecked, version-bound statement with acknowledged storage and [readable agreement evidence](</demo/admin/agreements>). [Integration guide](</guide/terms/index.md>).

Inspect [cookie-choice history](</demo/admin/choices>): fictional reports tied to the exact notice, purpose choices, document versions and receipt order. Try [recorded choices](</recorded-choices>) to exercise acknowledged delivery and a required-receipt permission gate. [Evidence guide](</guide/consent-evidence/index.md>).

```sh
npm test                         # build and run implementation tests
python3 scripts/regulatory.py --check
```

For the project website and isolated Cloudflare demo, run `npm run site:dev`. See the [website guide](</guide/website/index.md>).

The package can be packed and installed locally. Publishing is a separate step.

```sh
npm pack --workspace @notabenda/core --pack-destination /tmp
```

Try [gated media](</embeds>): iframe and image placeholders share one declared service, wait for permission, and return when you withdraw. [Integration guide](</guide/embeds/index.md>).

Try [privacy signals](</privacy-signals>): a labeled GPC simulation restricts declared processing independently of saved cookie choices. [Integration guide](</guide/privacy-signals/index.md>).

Try [recorded processing opt-outs](</processing-choices>): a separate privacy action, recoverable pending requests and retained restrictions that cookie acceptance cannot remove. [Integration guide](</guide/processing-choices/index.md>) · [Opt-out evidence](</demo/admin/processing>).

Try [retained document versions](</releases>): a clean deployment serves current terms and keeps the exact prior version at its pinned URL. [Release guide](</guide/releases/index.md>).

## Bring your own site

After installing the local tarball, create a configuration and preview your documents:

```sh
npx @notabenda/core init
# Fill in your facts and supply appropriate terms.
npx @notabenda/core check --preview
npx @notabenda/core build --preview
```

One config describes the operator, processing purposes, services, storage, retention, rights, and document versions. It produces ordinary static pages, public configuration, and a versioned artifact for your own history/evidence backend.

For guided setup, run `npx @notabenda/core wizard` or use the [setup screen](https://notabenda.org/demo/admin/setup). Describe your processing purposes, review providers and keep private reasons alongside the resulting draft. Unknown legal basis or retention stays unresolved for review. [Setup guide](</guide/setup/index.md>).

Use the renderer inside your own layout, too:

```ts
import { renderLegalDocument, renderLegalLinks } from '@notabenda/core';
import '@notabenda/core/styles.css'; // optional

const privacyArticle = renderLegalDocument(siteConfig, 'privacy');
const legalFooter = renderLegalLinks(siteConfig);
```

No framework or runtime dependencies are required. The build-time API lives separately at `@notabenda/core/content`. See the [package guide](</guide/package/index.md>) for configuration, rendering, review declarations, and artifacts.

The optional [`@notabenda/authoring`](</guide/authoring-package/index.md>) build package accepts **Markdown and MDX with YAML frontmatter**, including your own static components. Publish the HTML and keep source revisions in the authenticated history workspace. [Authoring guide](</guide/authoring/index.md>) · [Working example](</authored/terms>).

For browser cookie controls, compile full configuration in build/SSR code with `compileConsentRuntimeConfig` or `notabenda build --consent-runtime local|required`. Pass the resulting descriptor to `createConsent`; keep legal rendering and other workflows on their separate inputs. [Browser configuration](</guide/browser-config/index.md>) · [Migration from earlier previews](</guide/migration/index.md#unreleased-browser-api-migration>).

For React, import the optional `@notabenda/core/react` provider, hooks and controls, or `@notabenda/core/react/documents` for server-rendered legal content. They use the same consent engine. [React guide](</guide/react/index.md>) · [Live example](</react>).

For Astro, packaged `.astro` components render static legal pages, and `@notabenda/core/astro/client` keeps controls connected through client navigation. [Astro guide](</guide/astro/index.md>) · [Real Astro example](</astro/>).

Give visitors a clear next step with an optional [privacy request page](</guide/rights/index.md>). Supply the actions, scope and links to your actual workflows, plus a public contact. The static page works without JavaScript and shares the same theme tokens. [Light example](</rights/>) · [Midnight example](</dark/rights/>). Request handling belongs to your application.

The [scope guard laboratory](</scope-guards/>) shows ordinary optional work alongside purposes needing a separate supported process. [Scope guide](</guide/scope-guards/index.md>).

## Make it yours

Components inherit the host font and expose CSS variables for colors, spacing and layout. You can omit the stylesheet and style the HTML yourself. Examples include light and dark themes.

Public content is escaped, links and routes are checked, and private operator metadata is excluded from generated outputs. Drafts stay visibly marked; production builds reject draft declarations and unresolved placeholders. These checks don't verify that your facts or legal wording are correct.

## Evidence and document history

The [requirements catalog](</guide/requirements/index.md>) connects sources to individual obligations, planned features, implementation files, and tests. Regional behavior is recorded item by item. Research, legal review, and implementation have separate statuses.

The optional [`@notabenda/cloudflare` component](</guide/cloudflare/index.md>) adds host-authorized, scoped access to stored evidence and document history. Authentication belongs to your application. The backoffice provides evidence search, record details and policy/terms comparisons. Its Durable Object adapter and history APIs power the website's isolated demo and can be plugged into your own host integration.

Start your own backend with `npx @notabenda/cloudflare init`. It creates a local Worker project with SQLite storage, the admin and guided setup; you supply your existing authorization hook. Nothing is installed or deployed automatically. [Cloudflare starter guide](</guide/cloudflare-starter/index.md>).

For complete cookie recording wiring, adapt the [recorded-cookie application](</source/examples/recorded-cookies/README.md.txt>). It connects YAML-built notices, native controls, your host sessions, separate operator activation and the evidence admin. Its authorization hooks deny access until you connect them. [Application guide](</guide/recorded-cookie-application/index.md>).

For stored evidence, [lifecycle tools](</guide/evidence-lifecycle/index.md>) let your backend apply holds, close a context and remove matching payloads in resumable steps. The read-only workspace explains the progress and what remains. Try it through `npm run site:dev` at [evidence lifecycle](</demo/admin/lifecycle>).

The local example also serves [evidence search](</demo/admin/evidence>), [document history](</demo/admin/history>), and [the logo](</brand>). Those previews use a separate database for this browser session, seeded with fictional journeys. No password; cleanup follows one day without use.

## A look at the pages

![A static privacy page with native typography and clear navigation](</docs/assets/screenshots/privacy-desktop.jpg>)

![Terms agreements in the searchable evidence workspace](</docs/assets/screenshots/workspace-current.png>)

![Compact mobile cookie notice with balanced choices](</docs/assets/screenshots/consent-current.jpg>)

See a [policy comparison](</docs/assets/screenshots/admin-diff-desktop.jpg>) and [evidence search on a phone](</docs/assets/screenshots/admin-agreements-mobile.jpg>).

![An unchecked mobile agreement tied to an exact terms version](</docs/assets/screenshots/terms-mobile.jpg>)

See the [recorded agreement context](</docs/assets/screenshots/admin-agreement-detail-desktop.jpg>) and [terms integration guide](</guide/terms/index.md>).

## Guided setup

Use the [CLI wizard or admin setup screen](</guide/setup/index.md>) to work through practices, coverage and justifications. It recommends components and configuration fields, links the requirements, and exports a draft config with a separate private report.

## Read more

- [Product overview and priorities](</guide/overview/index.md>)
- [Current scope and decisions](</guide/scope/index.md>)
- [Architecture and implementation plan](</guide/plan/index.md>)
- [Requirements](</guide/requirements/index.md>), [sources](</guide/requirements/sources/index.md>), and [research workflow](</guide/research/index.md>)
- [Migration and removal](</guide/migration/index.md>)
- [Review local release candidates](</guide/release-candidate/index.md>)
- [Build and exercise an exact source revision](</guide/source-candidate/index.md>)
- [Report a security issue](</guide/security/index.md>)
- [Brand assets](</guide/assets/index.md>)

## License

Licensed under [Apache 2.0](</license-apache.txt>) or [MIT](</license-mit.txt>), at your option. See [LICENSE](</license.txt>) for contribution terms and separately licensed materials.
