CodeDocs Vault

Comp AI Architecture Documentation

Comp AI is an open-source (AGPLv3) compliance automation platform that helps organizations achieve and maintain SOC 2, ISO 27001, HIPAA, and GDPR compliance. It uses LLMs to automate policy generation, questionnaire answering, vendor risk assessment, and provides an AI-powered chat assistant for compliance guidance.

Documents

Document Description
00 - Overview High-level project summary, tech stack, and monorepo layout
01 - Entry Points Application entry points, authentication flow, and request lifecycle
02 - Core Logic Business domain model, data flows, background jobs, and integrations
03 - Key Abstractions Design patterns, interfaces, and architectural decisions
04 - Configuration Environment variables, Docker setup, CI/CD, and deployment
05 - AI and LLM LLM usage, RAG pipeline, embeddings, and AI architecture

Quick-Reference Tech Stack

Layer Technology
Language TypeScript
Monorepo Turborepo + Bun
Frontend Next.js 16, React 19, Tailwind CSS v4
Backend API NestJS 11 (Express)
Database PostgreSQL + Prisma 6.18
Auth Better Auth (magic link, OTP, OAuth, JWT)
AI/LLM Vercel AI SDK, OpenAI, Anthropic, Groq
Vector Store Upstash Vector (text-embedding-3-small)
Background Jobs Trigger.dev v4
Cache/KV Upstash Redis
Email Resend + React Email
File Storage AWS S3
Analytics PostHog, Vercel Analytics
UI Components Radix UI, TipTap editor
Integrations AWS, Azure, GCP, GitHub, Google Workspace, JumpCloud, Ramp, Rippling, Vercel, Aikido
CI/CD GitHub Actions, semantic-release
Container Docker multi-stage (Bun build, Node 22 runtime)