diff --git a/README.md b/README.md index ed97ab6048..701985dcd6 100644 --- a/README.md +++ b/README.md @@ -81,10 +81,14 @@ Here is what you need to be able to run Comp AI. bun i ``` -4. Set up your `.env` file - - - Duplicate `.env.example` to `.env` - - Use `openssl rand -base64 32` to generate a key and add it under `NEXTAUTH_SECRET` in the `.env` file. +4. Set up your `.env` files + - Copy the example environment files to create your local environment files: + ```sh + cp apps/web/.env.example apps/web/.env + cp apps/app/.env.example apps/app/.env + ``` + - Fill in the required environment variables in both `.env` files + - Use `openssl rand -base64 32` to generate a key and add it under `AUTH_SECRET` in the `apps/app/.env` file 5. Setup Node If your Node version does not meet the project's requirements as instructed by the docs, "nvm" (Node Version Manager) allows using Node at the version required by the project: diff --git a/apps/app/.env.example b/apps/app/.env.example new file mode 100644 index 0000000000..01a7b2c3ce --- /dev/null +++ b/apps/app/.env.example @@ -0,0 +1,44 @@ +# Authentication (https://console.cloud.google.com/apis/credentials) +AUTH_SECRET="" # Generate with: openssl rand -base64 32 +AUTH_GOOGLE_ID="" # Google Cloud Console -> APIs & Services -> Credentials -> Create OAuth 2.0 Client ID +AUTH_GOOGLE_SECRET="" # Google Cloud Console -> Same location as above + +# Database (https://neon.tech) +DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres" # Format: postgresql://user:password@host:port/database + +# AI Services +# OpenAI (https://platform.openai.com/api-keys) +OPENAI_API_KEY="" # Get from OpenAI dashboard -> API Keys + +# Email Services +# Resend (https://resend.com/api-keys) +RESEND_API_KEY="" # Resend Dashboard -> API Keys + +# Infrastructure +# Redis - Upstash (https://console.upstash.com/) +UPSTASH_REDIS_REST_URL="" # Upstash Console -> Redis -> Create Database +UPSTASH_REDIS_REST_TOKEN="" # Found in the same database details page + +# Payment Processing +# Stripe (https://dashboard.stripe.com/apikeys) +STRIPE_SECRET_KEY="" # Stripe Dashboard -> Developers -> API keys +STRIPE_WEBHOOK_SECRET="" # Stripe Dashboard -> Developers -> Webhooks + +# File Storage +# Upload Thing (https://uploadthing.com/dashboard) +UPLOADTHING_TOKEN="" # Upload Thing Dashboard -> API Keys +UPLOADTHING_SECRET="" # Upload Thing Dashboard -> API Keys + +# Integration Services +# OpenPanel (https://openpanel.dev) +OPENPANEL_SECRET_KEY="" # OpenPanel Dashboard -> Settings -> API Keys +NEXT_PUBLIC_OPENPANEL_CLIENT_ID="" # OpenPanel Dashboard -> Settings -> Client ID + +# Nango (https://app.nango.dev) +NANGO_SECRET_KEY="1234567890" # Nango Dashboard -> API Keys + +# Trigger.dev (https://app.trigger.dev) +TRIGGER_SECRET_KEY="" # Trigger.dev Dashboard -> Project Settings -> API Keys + +# Monitoring +DISCORD_WEBHOOK_URL="" # Discord Server -> Settings -> Integrations -> Create Webhook \ No newline at end of file diff --git a/apps/app/.gitignore b/apps/app/.gitignore index ac7bf9bd20..6968ac53c0 100644 --- a/apps/app/.gitignore +++ b/apps/app/.gitignore @@ -31,7 +31,7 @@ yarn-error.log* .pnpm-debug.log* # env files (can opt-in for committing if needed) -.env* +.env # vercel .vercel diff --git a/apps/web/.env.example b/apps/web/.env.example new file mode 100644 index 0000000000..31cc3be0a8 --- /dev/null +++ b/apps/web/.env.example @@ -0,0 +1,17 @@ +# Email Services +# Resend (https://resend.com/api-keys) +RESEND_API_KEY="" # Resend Dashboard -> API Keys +RESEND_AUDIENCE_ID="" # Resend Dashboard -> Audiences + +# Security & Anti-Spam +# Cloudflare Turnstile (https://dash.cloudflare.com/?to=/:account/turnstile) +TURNSTILE_SECRET_KEY="" # Cloudflare Dashboard -> Turnstile -> Your Site -> Settings +NEXT_PUBLIC_TURNSTILE_SITE_KEY="" # Same location as above + +# Monitoring +# Discord (https://discord.com/developers/applications) +DISCORD_WEBHOOK_URL="" # Discord Server -> Settings -> Integrations -> Create Webhook + +# Analytics +# Google Analytics (https://analytics.google.com) +NEXT_PUBLIC_GOOGLE_TAG_ID="" # GA4 -> Admin -> Data Streams -> Choose your stream -> Measurement ID \ No newline at end of file diff --git a/apps/web/.gitignore b/apps/web/.gitignore index 5ef6a52078..e72b4d6a48 100644 --- a/apps/web/.gitignore +++ b/apps/web/.gitignore @@ -31,7 +31,7 @@ yarn-error.log* .pnpm-debug.log* # env files (can opt-in for committing if needed) -.env* +.env # vercel .vercel