← Back to archive

Repo of the Day

c15t/c15t

Published: Apr 23, 2025

Open repository ↗

c15t (consent management) unifies analytics, consent tracking, and privacy controls into a single performant solution. Built for modern development teams, it transforms privacy management from a compliance burden into a fully observable system.

Summary

c15t is a TypeScript-based, open-source consent management platform (CMP) that lets JavaScript, React, and Next.js teams build cookie banners, preference centers, and headless consent flows inside their own application stack. It ships prebuilt UI components alongside headless APIs, with options for a hosted backend, a self-hosted backend, or offline/local-only mode.

What it is useful for

  • Building cookie consent banners, consent dialogs, and preference centers for web apps in vanilla JavaScript, React, or Next.js.
  • Gating analytics, ad pixels, tag managers, and chat widgets behind the correct category of user consent before they execute.
  • Supporting Google Consent Mode v2 and IAB TCF 2.3 workflows for programmatic advertising, including TC String generation, GVL support, and vendor/purpose controls.
  • Managing conversion pixels such as Meta Pixel, TikTok Pixel, LinkedIn Insights, Microsoft UET, X Pixel, Reddit Pixel, and Snapchat Pixel under marketing consent.
  • Internationalizing consent UIs through a dedicated translations package with type-safe translation interfaces.
  • Running consent in environments that cannot reach an external service, such as static deployments, demos, or local previews.

How engineers can use it

  1. Pick a deployment mode that matches your constraints: hosted on inth.com, self-hosted via the @c15t/backend package, or offline/local-only for development and static sites. Hosted and self-hosted modes provide durable consent records, backend policy state, and audit logs; offline mode stores consent only in the browser.
  2. Install the framework package for your stack: c15t for framework-agnostic JavaScript, @c15t/react (React 16.8 through 19), or @c15t/nextjs (App Router, Pages Router, and React Server Components).
  3. Choose your UI approach: drop in the prebuilt cookie banner and preference center components, or use the headless hooks and framework-native primitives to build a custom consent experience.
  4. Add @c15t/scripts to load third-party tools (Google Tag Manager, GA4, Google Ads, PostHog, Intercom, Crisp, and others) so they only fire after the matching consent is granted.
  5. For programmatic advertising, install @c15t/iab to generate TC strings and expose TCF APIs.
  6. Use @c15t/cli for configuration generation, database migrations, and guided multi-framework workflows; use @c15t/node-sdk for typed access to hosted or self-hosted APIs.
  7. To explore the product locally, the README documents bun run dev, which starts the main demo in examples/demo. Framework-specific install commands and quickstart snippets are not included in the README text, so refer to the linked Next.js, React, and JavaScript quickstart guides for setup details.

Documented limitations: @c15t/dev-tools is described as "experimental" and "currently under active development," and offline mode is intended only for local development, previews, demos, and static deployments rather than production-grade durable consent storage.