Comp AI is a free, open source compliance & risk management project written in TypeScript and released under AGPL-3.0. It has 1,968 GitHub stars, 415 forks and 36 open issues, and was last pushed 9 days ago. On this registry it ranks #31 of 45 tracked projects in Compliance & Risk Management, with 5 head-to-head comparisons available. It gained 15 stars over the last 6 tracked days.

What is Comp AI?

What it is

Comp AI is an open-source compliance platform written in TypeScript and released under the AGPL-3.0 license. It is positioned as an AI-native alternative to paid compliance products such as Vanta and Drata, and it targets companies that need audit-ready coverage for SOC 2, ISO 27001, HIPAA, and GDPR. The project lives in the Next.js, Prisma, and Auth.js ecosystem, with a cloud-hosted option and a self-hostable codebase.

The concrete problem it solves is the manual burden of preparing for compliance audits. Comp AI automates evidence collection, policy management, and control implementation while keeping the customer in control of their data and infrastructure. This makes it relevant for organizations that want compliance workflows without surrendering all records to a hosted vendor.

Key capabilities

  • AI-assisted compliance workflows are central to the project, with the README claiming that compliance can be handled in hours.
  • Evidence collection is automated, reducing manual evidence assembly.
  • Policy management is included, giving organizations a place to maintain compliance policies.
  • Control implementation is supported, helping teams implement framework requirements.
  • The platform targets SOC 2, ISO 27001, HIPAA, and GDPR frameworks, as stated in the tagline and description.
  • The project lists Next.js, Prisma, and Auth.js among its technologies and topics, indicating its application, database, and authentication foundations.
  • A cloud-hosted version is offered alongside the open-source repository.

Who uses it and how

  • Compliance teams use it to collect evidence, manage policies, and implement controls for frameworks such as SOC 2, ISO 27001, HIPAA, and GDPR.
  • Self-hosters deploy the repository locally with Node.js, Bun, Postgres, Docker, and environment variables for secrets, database URLs, and portal URLs.
  • Developers configure integrations such as Trigger.dev, Google OAuth, and Resend, based on the README setup instructions.
  • Organizations that prefer a managed option can use the hosted version at the project homepage instead of running the stack themselves.

Getting started

The typical local setup is to clone the repository, install dependencies with Bun, start a Postgres Docker container, run migrations, generate Prisma types, and launch the apps with bun run dev; a hosted option is also mentioned at the project homepage.

When to use it — and when not to

Comp AI is most useful when an organization wants an open-source alternative to Vanta or Drata and is willing to operate the platform itself. Self-hosting requires Postgres, Docker for the database container, environment secrets, Trigger.dev configuration, Google OAuth, and Resend credentials, so teams that do not want to operate those services may prefer the hosted version. The metadata lists zero contributors, thirty-six open issues, and a zero-year age, which suggests limited maturity and possible maintenance risk.

project readme (upstream, from github) — read inline

Logo

Comp AI

The open-source compliance platform.
Learn more »

Discord · Website · Documentation · Issues · Roadmap

Product Hunt Github Stars License Commits-per-month

About

AI that handles compliance for you in hours.

Comp AI is the fastest way to get compliant with frameworks like SOC 2, ISO 27001, HIPAA and GDPR. Comp AI automates evidence collection, policy management, and control implementation while keeping you in control of your data and infrastructure.

Recognition

ProductHunt

Comp AI - The open source Vanta & Drata alternative | Product Hunt

Vercel
Vercel OSS Program

Built With

Contact us

Contact our founders at [email protected] to learn more about how we can help you achieve compliance.

Stay Up-to-Date

Get access to the cloud hosted version of Comp AI.

Getting Started

To get a local copy up and running, please follow these simple steps.

Prerequisites

Here is what you need to be able to run Comp AI.

  • Node.js (Version: >=20.x)
  • Bun (Version: >=1.1.36)
  • Postgres (Version: >=15.x)

Development

To get the project working locally with all integrations, follow these extended development steps

Setup

Add environment variables and fill them out with your credentials

cp apps/app/.env.example apps/app/.env
cp apps/portal/.env.example apps/portal/.env
cp packages/db/.env.example packages/db/.env

Get code running locally

  1. Clone the repo
git clone https://github.com/trycompai/comp.git
  1. Navigate to the project directory
cd comp
  1. Install dependencies using Bun
bun install
  1. Get Database Running
cd packages/db
bun run docker:up # Spin up docker container
bun run db:migrate # Run migrations
  1. Generate Prisma Types for each app
cd apps/app
bun run db:generate
cd ../portal
bun run db:generate
cd ../api
bun run db:generate
  1. Run all apps in parallel from the root directory
bun run dev

Environment Setup

Create the following .env files and fill them out with your credentials

  • comp/apps/app/.env
  • comp/apps/portal/.env
  • comp/packages/db/.env

You can copy from the .env.example files:

Linux / macOS

cp apps/app/.env.example apps/app/.env
cp apps/portal/.env.example apps/portal/.env
cp packages/db/.env.example packages/db/.env

Windows (Command Prompt)

copy apps\app\.env.example apps\app\.env
copy apps\portal\.env.example apps\portal\.env
copy packages\db\.env.example packages\db\.env

Windows (PowerShell)

Copy-Item apps\app\.env.example -Destination apps\app\.env
Copy-Item apps\portal\.env.example -Destination apps\portal\.env
Copy-Item packages\db\.env.example -Destination packages\db\.env

Additionally, ensure the following required environment variables are added to .env in comp/apps/app/.env:

AUTH_SECRET=""                  # Use `openssl rand -base64 32` to generate
DATABASE_URL="postgresql://user:password@host:port/database"
RESEND_API_KEY="" # Resend (https://resend.com/api-keys) - Resend Dashboard -> API Keys
NEXT_PUBLIC_PORTAL_URL="http://localhost:3002"
REVALIDATION_SECRET=""         # Use `openssl rand -base64 32` to generate

✅ Make sure you have all of these variables in your .env file. If you're copying from .env.example, it might be missing the last two (NEXT_PUBLIC_PORTAL_URL and REVALIDATION_SECRET), so be sure to add them manually.

Some environment variables may not load correctly from .env — in such cases, hard-code the values directly in the relevant files (see Hardcoding section below).


Cloud & Auth Configuration

1. Trigger.dev
  • Create an account on https://cloud.trigger.dev
  • Create a project and copy the Project ID
  • In comp/apps/app/trigger.config.ts, set:
    project: 'proj_****az***ywb**ob*';
    
2. Google OAuth
  • Go to Google Cloud OAuth Console

  • Create an OAuth client:

    • Type: Web Application
    • Name: comp_app # You can choose a different name if you prefer!
  • Add these Authorized Redirect URIs:

    http://localhost
    http://localhost:3000
    http://localhost:3002
    http://localhost:3000/api/auth/callback/google
    http://localhost:3002/api/auth/callback/google
    http://localhost:3000/auth
    http://localhost:3002/auth
    
  • After creating the app, copy the GOOGLE_ID and GOOGLE_SECRET

    • Add them to your .env files
    • If that doesn’t work, hard-code them in:
      comp/apps/portal/src/app/lib/auth.ts
      
3. Redis (Upstash)
  • Go to https://console.upstash.com
  • Create a Redis database
  • Copy the Redis URL and TOKEN
  • Add them to your .env file, or hard-code them if the environment variables are not being recognized in:
    comp/packages/kv/src/index.ts
    

Database Setup

Start and initialize the PostgreSQL database using Docker:

  1. Start the database:

    cd packages/db
    bun docker:up
    
  2. Default credentials:

    • Database name: comp
    • Username: postgres
    • Password: postgres
  3. To change the default password:

    ALTER USER postgres WITH PASSWORD 'new_password';
    
  4. If you encounter the following error:

    HINT: No function matches the given name and argument types...
    

    Run the fix:

    psql "postgresql://postgres:@localhost:5432/comp" -f ./packages/db/prisma/functionDefinition.sql
    

    Expected output: CREATE FUNCTION

    💡 comp is the database name. Make sure to use the correct port and database name for your setup.

  5. Apply schema and seed:

 # Generate Prisma client
 bun db:generate

 # Push the schema to the database
 bun db:push

 # Optional: Seed the database with initial data
 bun db:seed

Other useful database commands:

# Open Prisma Studio to view/edit data
bun db:studio

# Run database migrations
bun db:migrate

# Stop the database container
bun docker:down

# Remove the database container and volume
bun docker:clean

Start Development

Once everything is configured:

bun run dev

Or use the Turbo repo script:

turbo dev

💡 Make sure you have Turbo installed. If not, you can install it using Bun:

bun add -g turbo

🎉 Yay! You now have a working local instance of Comp AI! 🚀

Deployment

Docker

Steps to deploy Comp AI on Docker are coming soon.

Vercel

Steps to deploy Comp AI on Vercel are coming soon.

📦 Package Publishing

This repository uses semantic-release to automatically publish packages to npm when merging to the release branch.

readme truncated — read the full docs on github

Frequently asked questions

Is Comp AI free to use?

Comp AI is open source under the AGPL-3.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does Comp AI do?

Get audit-ready for SOC 2, ISO 27001, HIPAA, and GDPR

What is Comp AI written in?

Comp AI is primarily written in TypeScript. Its source is publicly available at https://github.com/trycompai/comp, and it has 1,968 GitHub stars.