Relevant source files
The following files were used as context for generating this wiki page:
This page provides a comprehensive guide to setting up and running the Comp AI platform locally for development. Comp AI is an open-source compliance platform designed to automate evidence collection, policy management, and control implementation for frameworks like SOC 2, ISO 27001, HIPAA, and GDPR.
The instructions cover prerequisites, environment configuration, database setup, and how to start the development servers, enabling you to get a local instance of Comp AI up and running quickly.
Prerequisites
Before you begin, ensure your system meets the following software requirements:
- Node.js: Version
20.xor higher. - Bun: Version
1.1.36or higher. - PostgreSQL: Version
15.xor higher.
Bun is used as the package manager and runtime for various scripts within the project. PostgreSQL is the primary database for the application.
Sources: README.md:49-52
Development Setup
Follow these steps to set up the Comp AI project locally, including all necessary integrations.
Overall Setup Flow
The following diagram illustrates the high-level steps required to get the Comp AI project running locally:
Sources: README.md:61-82
1. Clone the Repository
Begin by cloning the Comp AI repository from GitHub:
git clone https://github.com/trycompai/comp.gitNavigate into the project directory:
cd compSources: README.md:64-69
2. Install Dependencies
Install all project dependencies using Bun:
bun installSources: README.md:71-73
3. Environment Variables
Create the necessary .env files by copying from their respective .env.example templates. These files will hold your credentials and configuration.
cp apps/app/.env.example apps/app/.env
cp apps/portal/.env.example apps/portal/.env
cp packages/db/.env.example packages/db/.envRequired Environment Variables for apps/app/.env
Ensure the following variables are defined in comp/apps/app/.env:
| Variable | Description