Skip to content

Commit f9a0b42

Browse files
authored
Merge pull request #1400 from trycompai/main
[comp] Production Deploy
2 parents a06831f + 284b9fb commit f9a0b42

File tree

66 files changed

+293
-2563
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+293
-2563
lines changed

.env.example

Lines changed: 22 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,23 @@
1-
# Database Configuration - Required
2-
DATABASE_URL="postgresql://postgres:[email protected]:5432/comp"
1+
# Required
2+
AUTH_SECRET="" # openssl rand -base64 32
3+
DATABASE_URL="" # Format: "postgresql://postgres:[email protected]:5432/comp"
4+
RESEND_DOMAIN=" # Domain configured in Resend, e.g. mail.trycomp.ai
5+
RESEND_API_KEY="" # API key from Resend for email authentication / invites
6+
REVALIDATION_SECRET="" # openssl rand -base64 32
7+
NEXT_PUBLIC_PORTAL_URL="http://localhost:3002" # The employee portal uses port 3002 by default
8+
9+
# Recommended
10+
# Store attachemnts in any S3 compatible bucket, we use AWS
11+
APP_AWS_ACCESS_KEY_ID="" # AWS Access Key ID
12+
APP_AWS_SECRET_ACCESS_KEY="" # AWS Secret Access Key
13+
APP_AWS_REGION="" # AWS Region
14+
APP_AWS_BUCKET_NAME="" # AWS Bucket Name
15+
16+
TRIGGER_SECRET_KEY="" # For background jobs. Self-host or use cloud-version @ https://trigger.dev
17+
# TRIGGER_API_URL="" # Only set if you are self-hosting
18+
TRIGGER_API_KEY="" # API key from Trigger.dev
19+
TRIGGER_SECRET_KEY="" # Secret key from Trigger.dev
20+
21+
OPENAI_API_KEY="" # AI Chat + Auto Generated Policies, Risks + Vendors
22+
FIRECRAWL_API_KEY="" # For research, self-host or use cloud-version @ https://firecrawl.dev
323

4-
# Authentication - Required
5-
AUTH_SECRET=your-secret-auth-key-here-min-32-chars
6-
7-
# Optional
8-
AUTH_GOOGLE_ID=your-google-oauth-client-id
9-
AUTH_GOOGLE_SECRET=your-google-oauth-client-secret
10-
AUTH_GITHUB_ID=your-github-oauth-app-id
11-
AUTH_GITHUB_SECRET=your-github-oauth-app-secret
12-
13-
# Email Service - Required for OTP and Magic Link
14-
RESEND_API_KEY=re_your_resend_api_key_here
15-
16-
# Application URLs
17-
NEXT_PUBLIC_PORTAL_URL=http://localhost:3001
18-
NEXT_PUBLIC_VERCEL_URL=http://localhost:3000
19-
20-
# Security
21-
REVALIDATION_SECRET=your-revalidation-secret-here
22-
23-
# Required - Redis/Upstash (for caching)
24-
UPSTASH_REDIS_REST_URL=your-upstash-redis-url
25-
UPSTASH_REDIS_REST_TOKEN=your-upstash-redis-token
26-
27-
# Optional - AWS S3 (for file uploads)
28-
APP_AWS_ACCESS_KEY_ID=your-aws-access-key
29-
APP_AWS_SECRET_ACCESS_KEY=your-aws-secret-key
30-
APP_AWS_REGION=us-east-1
31-
APP_AWS_BUCKET_NAME=your-s3-bucket-name
32-
33-
# Optional - for AI features
34-
OPENAI_API_KEY=sk-your-openai-api-key
35-
36-
# Optional - Analytics
37-
NEXT_PUBLIC_POSTHOG_KEY=your-posthog-key
38-
NEXT_PUBLIC_POSTHOG_HOST=https://app.posthog.com
39-
40-
# Required - External Services
41-
TRIGGER_SECRET_KEY=your-trigger-secret
42-
TRIGGER_API_KEY=your-trigger-api-key
43-
44-
# Required - Chat and research with AI
45-
GROQ_API_KEY=your-groq-api-key
46-
FIRECRAWL_API_KEY=your-firecrawl-key
47-
48-
# Environment
49-
NODE_ENV=production

README.md

Lines changed: 14 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- PROJECT LOGO -->
22
<p align="center">
33
<a href="https://github.com/trycompai/comp">
4-
<img src="https://lp.trycomp.ai/logo_light.svg" alt="Logo" width="50%">
4+
<img src="https://assets.trycomp.ai/logo.png" alt="Logo" width="10%">
55
</a>
66

77
<h3 align="center">Comp AI</h3>
@@ -24,23 +24,28 @@
2424
</p>
2525
</p>
2626

27-
## About
27+
<p align="center">
28+
<a href="https://www.producthunt.com/products/comp-ai-get-soc-2-iso-27001-gdpr/launches/comp-ai"><img src="https://img.shields.io/badge/Product%20Hunt-%231%20Product%20of%20the%Day%23DA552E" alt="Product Hunt"></a>
29+
<a href="https://github.com/trycompai/comp/stargazers"><img src="https://img.shields.io/github/stars/trycompai/comp" alt="Github Stars"></a>
30+
<a href="https://github.com/trycompai/comp/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-AGPLv3-purple" alt="License"></a>
31+
<a href="https://github.com/trycompai/comp/pulse"><img src="https://img.shields.io/github/commit-activity/m/trycompai/comp" alt="Commits-per-month"></a>
32+
<a href="https://github.com/trycompai/comp/issues"><img src="https://img.shields.io/badge/Help%20Wanted-Contribute-blue"></a>
33+
</p>
2834

29-
# Security and compliance, open.
35+
## About
3036

31-
We're building the first open source compliance automation platform that helps companies of any size work towards, manage and achieve compliance with common standards like SOC 2, ISO 27001 and GDPR.
37+
### AI that handles compliance for you in hours.
3238

33-
We transform compliance from a vendor checkbox into an engineering problem solved through code. Our platform automates evidence collection, policy management, and control implementation while keeping you in control of your data and infrastructure.
39+
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.
3440

3541
## Recognition
3642

3743
#### [ProductHunt](https://www.producthunt.com/posts/comp-ai)
3844

3945
<a href="https://www.producthunt.com/posts/comp-ai?embed=true&utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-comp&#0045;ai" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=944698&theme=light&period=daily&t=1745500415958" alt="Comp&#0032;AI - The&#0032;open&#0032;source&#0032;Vanta&#0032;&#0038;&#0032;Drata&#0032;alternative | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
4046

41-
### [Vercel](https://vercel.com)
47+
#### [Vercel](https://vercel.com/)
4248

43-
<br />
4449
<a href="https://vercel.com/oss">
4550
<img alt="Vercel OSS Program" src="https://vercel.com/oss/program-badge.svg" />
4651
</a>
@@ -92,41 +97,13 @@ To get the project working locally with all integrations, follow these extended
9297
cd comp
9398
```
9499

95-
3. Remove existing lock files:
96-
97-
#### Linux / macOS
98-
99-
```sh
100-
rm bun.lock yarn.lock
101-
```
102-
103-
#### Windows (Command Prompt)
104-
105-
```cmd
106-
del bun.lock yarn.lock
107-
```
108-
109-
#### Windows (PowerShell)
110-
111-
```powershell
112-
Remove-Item bun.lock, yarn.lock
113-
```
114-
115-
4. Remove any `yarn` references from `comp/apps/app/package.json`
116-
117-
```sh
118-
"yarn": "^1.22.22",
119-
```
120-
121-
> 💡 Make sure this line is already deleted or running `bun install` will give you an error.
122-
123-
5. Install dependencies using Bun:
100+
3. Install dependencies using Bun:
124101

125102
```sh
126103
bun install
127104
```
128105

129-
6. Install `concurrently` as a dev dependency:
106+
4. Install `concurrently` as a dev dependency:
130107

131108
```sh
132109
bun add -d concurrently
@@ -301,48 +278,6 @@ bun docker:clean
301278

302279
---
303280

304-
### Hardcoding Env Vars (if needed)
305-
306-
If `.env` files don’t load values as expected, you can hard-code the following:
307-
308-
- **`comp/packages/kv/src/index.ts`** → Hard-coded Redis client credentials:
309-
- **URL**: The Redis URL needs to start with `https`. Example:
310-
```sh
311-
url: "https://default:AXhaAA***MA@charmed-wombat-3**0.upstash.io:6379"
312-
```
313-
- **Token**: Example:
314-
```sh
315-
token: "935****8f20"
316-
```
317-
318-
- **`comp/packages/db/prisma/schema.prisma`** → Hard-coded `DATABASE_URL`:
319-
- Example:
320-
`sh
321-
datasource db {
322-
url = "postpostgresql://user:password@host:port/database?schema=public"
323-
directUrl = "postpostgresql://user:password@host:port/database?schema=public"
324-
}
325-
`
326-
327-
- **`comp/apps/portal/src/app/lib/auth.ts`** → Hard-coded Google environment variables `clientId`, `clientSecret` under `socialProviders/google`:
328-
- Example:
329-
```js
330-
socialProviders: {
331-
google: {
332-
clientId: "your-client-id",
333-
clientSecret: "your-client-secret"
334-
}
335-
}
336-
```
337-
338-
- **`comp/apps/app/trigger.config.ts`** → Change the project to yours:
339-
- Example:
340-
```sh
341-
projectId: "proj_la**ob"
342-
```
343-
344-
---
345-
346281
### Start Development
347282

348283
Once everything is configured:
@@ -432,7 +367,3 @@ Comp AI, Inc. is a commercial open source company, which means some parts of thi
432367
433368
> [!TIP]
434369
> We work closely with the community and always invite feedback about what should be open and what is fine to be commercial. This list is not set and stone and we have moved things from commercial to open in the past. Please open a [discussion](https://github.com/trycompai/comp/discussions) if you feel like something is wrong.
435-
436-
```
437-
438-
```

SELF_HOSTING.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ App (`apps/app`):
4949
- **NEXT_PUBLIC_GTM_ID**: Google Tag Manager container ID for client tracking.
5050
- **NEXT_PUBLIC_LINKEDIN_PARTNER_ID**, **NEXT_PUBLIC_LINKEDIN_CONVERSION_ID**: LinkedIn insights/conversion tracking.
5151
- **NEXT_PUBLIC_GOOGLE_ADS_CONVERSION_LABEL**: Google Ads conversion tracking label.
52-
- **ZAPIER_HUBSPOT_WEBHOOK_URL**: Zapier inbound webhook for HubSpot events.
53-
- **HUBSPOT_ACCESS_TOKEN**: Server-side HubSpot API access for CRM sync.
5452
- **DUB_API_KEY**, **DUB_REFER_URL**: Dub.co link shortener/referral features.
55-
- **FIRECRAWL_API_KEY**, **GROQ_API_KEY**: Optional LLM/crawling providers for research features.
53+
- **FIRECRAWL_API_KEY**: Optional LLM/crawling providers for research features.
5654
- **SLACK_SALES_WEBHOOK**: Slack webhook for sales/lead notifications.
5755
- **GA4_API_SECRET**, **GA4_MEASUREMENT_ID**: Google Analytics 4 server/client tracking.
5856
- **NEXT_PUBLIC_API_URL**: Override client API base URL (defaults to same origin).
@@ -154,12 +152,9 @@ NEXT_PUBLIC_BETTER_AUTH_URL_PORTAL=http://localhost:3002
154152
# NEXT_PUBLIC_LINKEDIN_PARTNER_ID=
155153
# NEXT_PUBLIC_LINKEDIN_CONVERSION_ID=
156154
# NEXT_PUBLIC_GOOGLE_ADS_CONVERSION_LABEL=
157-
# ZAPIER_HUBSPOT_WEBHOOK_URL=
158-
# HUBSPOT_ACCESS_TOKEN=
159155
# DUB_API_KEY=
160156
# DUB_REFER_URL=
161157
# FIRECRAWL_API_KEY=
162-
# GROQ_API_KEY=
163158
# SLACK_SALES_WEBHOOK=
164159
# GA4_API_SECRET=
165160
# GA4_MEASUREMENT_ID=

apps/app/.env.example

Lines changed: 21 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,23 @@
1-
# Authentication (https://console.cloud.google.com/apis/credentials)
2-
AUTH_SECRET="" # Generate with: openssl rand -base64 32
3-
AUTH_GOOGLE_ID="" # Google Cloud Console -> APIs & Services -> Credentials -> Create OAuth 2.0 Client ID
4-
AUTH_GOOGLE_SECRET="" # Google Cloud Console -> Same location as above
5-
6-
# Database (https://neon.tech)
1+
# Required
2+
AUTH_SECRET="" # openssl rand -base64 32
73
DATABASE_URL="" # Format: "postgresql://postgres:[email protected]:5432/comp"
4+
RESEND_DOMAIN=" # Domain configured in Resend, e.g. mail.trycomp.ai
5+
RESEND_API_KEY="" # API key from Resend for email authentication / invites
6+
REVALIDATION_SECRET="" # openssl rand -base64 32
7+
NEXT_PUBLIC_PORTAL_URL="http://localhost:3002" # The employee portal uses port 3002 by default
8+
9+
# Recommended
10+
# Store attachemnts in any S3 compatible bucket, we use AWS
11+
APP_AWS_ACCESS_KEY_ID="" # AWS Access Key ID
12+
APP_AWS_SECRET_ACCESS_KEY="" # AWS Secret Access Key
13+
APP_AWS_REGION="" # AWS Region
14+
APP_AWS_BUCKET_NAME="" # AWS Bucket Name
15+
16+
TRIGGER_SECRET_KEY="" # For background jobs. Self-host or use cloud-version @ https://trigger.dev
17+
# TRIGGER_API_URL="" # Only set if you are self-hosting
18+
TRIGGER_API_KEY="" # API key from Trigger.dev
19+
TRIGGER_SECRET_KEY="" # Secret key from Trigger.dev
20+
21+
OPENAI_API_KEY="" # AI Chat + Auto Generated Policies, Risks + Vendors
22+
FIRECRAWL_API_KEY="" # For research, self-host or use cloud-version @ https://firecrawl.dev
823

9-
# AI Services
10-
# OpenAI (https://platform.openai.com/api-keys)
11-
OPENAI_API_KEY="" # Get from OpenAI dashboard -> API Keys
12-
13-
# Sentry (optional)
14-
SENTRY_AUTH_TOKEN="" # Sentry Dashboard -> Settings -> API Keys
15-
16-
# Email Services
17-
# Resend (https://resend.com/api-keys)
18-
RESEND_API_KEY="" # Resend Dashboard -> API Keys
19-
20-
# Infrastructure
21-
# Redis - Upstash (https://console.upstash.com/)
22-
UPSTASH_REDIS_REST_URL="" # Upstash Console -> Redis -> Create Database
23-
UPSTASH_REDIS_REST_TOKEN="" # Found in the same database details page
24-
25-
# File Storage
26-
# Upload Thing (https://uploadthing.com/dashboard)
27-
UPLOADTHING_TOKEN="" # Upload Thing Dashboard -> API Keys
28-
UPLOADTHING_SECRET="" # Upload Thing Dashboard -> API Keys
29-
30-
# Integration Services
31-
# OpenPanel (https://openpanel.dev)
32-
OPENPANEL_SECRET_KEY="" # OpenPanel Dashboard -> Settings -> API Keys
33-
NEXT_PUBLIC_OPENPANEL_CLIENT_ID="" # OpenPanel Dashboard -> Settings -> Client ID
34-
35-
# Nango (https://app.nango.dev)
36-
NANGO_SECRET_KEY="" # Nango Dashboard -> API Keys
37-
38-
# Trigger.dev (https://app.trigger.dev)
39-
TRIGGER_SECRET_KEY="" # Trigger.dev Dashboard -> Project Settings -> API Keys
40-
41-
# Monitoring
42-
DISCORD_WEBHOOK_URL="" # Discord Server -> Settings -> Integrations -> Create Webhook
43-
44-
NEXT_PUBLIC_PORTAL_URL="http://localhost:3002" # http://localhost:3002
45-
REVALIDATION_SECRET="" # It can be anything (Use `openssl rand -base64 32` to generate)

apps/app/src/actions/organization/accept-invitation.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import { db } from '@db';
44
import { revalidatePath, revalidateTag } from 'next/cache';
55
import { redirect } from 'next/navigation';
6-
import { Resend } from 'resend';
76
import { z } from 'zod';
87
import { authActionClientWithoutOrg } from '../safe-action';
98
import type { ActionResponse } from '../types';
@@ -124,22 +123,6 @@ export const completeInvitation = authActionClientWithoutOrg
124123
},
125124
});
126125

127-
if (process.env.RESEND_API_KEY && process.env.RESEND_AUDIENCE_ID) {
128-
const resend = new Resend(process.env.RESEND_API_KEY);
129-
130-
await resend.contacts.create({
131-
firstName:
132-
(user.name?.split(' ')[0] || '').charAt(0).toUpperCase() +
133-
(user.name?.split(' ')[0] || '').slice(1),
134-
lastName:
135-
(user.name?.split(' ')[1] || '').charAt(0).toUpperCase() +
136-
(user.name?.split(' ')[1] || '').slice(1),
137-
email: user.email,
138-
unsubscribed: false,
139-
audienceId: process.env.RESEND_AUDIENCE_ID,
140-
});
141-
}
142-
143126
revalidatePath(`/${invitation.organization.id}`);
144127
revalidatePath(`/${invitation.organization.id}/settings/users`);
145128
revalidateTag(`user_${user.id}`);

apps/app/src/actions/send-feedback-action.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

apps/app/src/app/(app)/[orgId]/components/DynamicMinHeight.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ export function DynamicMinHeight({ children, className }: DynamicMinHeightProps)
4242
const style = useMemo(() => ({ minHeight: `calc(100vh - ${offsetPx}px)` }), [offsetPx]);
4343

4444
return (
45-
<div
46-
ref={containerRef}
47-
className={cn('textured-background mx-auto px-4 py-4', className)}
48-
style={style}
49-
>
45+
<div ref={containerRef} className={cn('mx-auto px-4 py-4', className)} style={style}>
5046
{children}
5147
</div>
5248
);

apps/app/src/app/(app)/[orgId]/controls/[controlId]/components/table/ControlRequirementsTableColumns.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const ControlRequirementsTableColumns: ColumnDef<RequirementTableData>[]
4949
return (
5050
<div className="flex items-center justify-center">
5151
{isCompleted ? (
52-
<CheckCircle2 size={16} className="text-green-500" />
52+
<CheckCircle2 size={16} className="text-primary" />
5353
) : (
5454
<XCircle size={16} className="text-red-500" />
5555
)}

0 commit comments

Comments
 (0)