trycompai/comp 是一个托管在 GitHub 上的开源项目,主要使用 TypeScript 编写,采用 GNU Affero General Public License v3.0 许可证,目前获得 2.2k 个 Star、462 次 Fork。
仓库全名
trycompai/comp
README 摘要
Comp AI Community Edition The free, open-source compliance platform. Learn more » Discord · Website · Documentation · Issues · Roadmap 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…
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.
Community Edition and Comp AI Cloud
This repository is Comp AI Community Edition: a free, open-source compliance platform you can self-host and run on your own infrastructure. It’s licensed under AGPLv3 and maintained by the Comp AI team together with the community.
Comp AI Cloud is our fully managed platform. It’s built and operated as its own product on a separate codebase, with additional capabilities, managed infrastructure, and hands-on support from our team. The two share a lot of DNA and ideas travel in both directions, but each is developed and released independently, with its own features, fixes, and timelines.
Community Edition
Comp AI Cloud
Price
Free
Paid plans
Hosting
Self-hosted
Fully managed
Source
Open source (AGPLv3), this repo
Proprietary
Updates and fixes
Released in this repository
Applied by our team
Support
Community (Discord, GitHub Issues)
Dedicated support
Security advisories for Comp AI Cloud apply to the managed service. Issues affecting Community Edition are tracked and fixed here; see SECURITY.md to report one.
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).
💡 comp is the database name. Make sure to use the correct port and database name for your setup.
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. The following packages are published:
@trycompai/db - Database utilities with Prisma client
@trycompai/email - Email templates and components
@trycompai/kv - Key-value store utilities using Upstash Redis
@trycompai/ui - UI component library with Tailwind CSS
Setup
NPM Token: Add your npm token as NPM_TOKEN in GitHub repository secrets
Release Branch: Create and merge PRs into the release branch to trigger publishing
Versioning: Uses conventional commits for automatic version bumping
Usage
# Install a published package
npm install @trycompai/ui
# Use in your project
import { Button } from '@trycompai/ui/button'
import { client } from '@trycompai/kv'
Development
# Build all packages
bun run build
# Build specific package
bun run -F @trycompai/ui build
# Test packages locally
bun run release:packages --dry-run
Contributors
Repo Activity
License
Comp AI Community Edition is licensed under AGPLv3. Comp AI Cloud is a separate commercial product and is not distributed from this repository.
Tip 提示
Have ideas about what Community Edition should include? Open an issue. We read all of them.
评论