Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 40 additions & 9 deletions .env
Original file line number Diff line number Diff line change
@@ -1,20 +1,51 @@
# ============================================
# Development Environment Configuration
# PRODUCTION Environment Configuration
# ============================================
# IMPORTANT: Keep this file secure and never commit to git!

# ==================== DATABASE ====================
DATABASE_URL=mongodb+srv://thesharmakeshav:TFJUWDRi46dbR5TB@cluster0.kegg0.mongodb.net/verifydev?retryWrites=true&w=majority
CHAT_DATABASE_URL=mongodb+srv://thesharmakeshav:TFJUWDRi46dbR5TB@cluster0.kegg0.mongodb.net/verifydev?retryWrites=true&w=majority
GITHUB_CLIENT_ID=Ov23lir98xHDxyEDYrzs
GITHUB_CLIENT_SECRET=10377fe6414ad7419077a66e9494da6b3eb955c0

# ==================== GITHUB OAUTH ====================
GITHUB_CLIENT_ID=Ov23liGWgQieB5R0LTyS
GITHUB_CLIENT_SECRET=cfe167df000cde12886d6e637853f96c50c72117
GITHUB_CALLBACK_URL=http://localhost:8000/api/v1/auth/github/callback
GITHUB_TOKEN=
JWT_ACCESS_SECRET=dev_access_secret_change_in_production_32chars!
JWT_REFRESH_SECRET=dev_refresh_secret_change_in_production_32!
REDIS_HOST=redis

# ==================== JWT SECRETS ====================
# PRODUCTION: Generate strong secrets with: openssl rand -base64 32
JWT_ACCESS_SECRET=prod_access_secret_CHANGE_THIS_32chars_min!
JWT_REFRESH_SECRET=prod_refresh_secret_CHANGE_THIS_32chars!

# ==================== REDIS ====================
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=

# ==================== RABBITMQ ====================
RABBITMQ_USER=verifydev
RABBITMQ_PASS=verifydev_dev_password
RABBITMQ_URL=amqp://verifydev:verifydev_dev_password@rabbitmq:5672
CORS_ORIGIN=http://localhost:3000,http://localhost:5173,https://verifydev.me
RABBITMQ_PASS=verifydev_prod_password_CHANGE_THIS
RABBITMQ_URL=amqp://verifydev:verifydev_prod_password_CHANGE_THIS@localhost:5672

# ==================== CORS ====================
CORS_ORIGIN=https://verifydev.me,https://www.verifydev.me,https://api.verifydev.me,http://localhost:3000,http://localhost:5173,http://localhost:8000

# ==================== ENVIRONMENT ====================
NODE_ENV=development
FRONTEND_URL=http://localhost:3000

WORKER_COUNT=4
# RabbitMQ prefetch count (should match WORKER_COUNT)
PREFETCH_COUNT=4


# ==================== SERVICE PORTS ====================
AUTH_SERVICE_PORT=3001
USER_SERVICE_PORT=3002
JOB_SERVICE_PORT=3004
RECRUITER_SERVICE_PORT=3005
CHAT_SERVICE_PORT=3006
ANALYZER_SERVICE_PORT=8001
RESUME_SERVICE_PORT=8003
GATEWAY_PORT=8000
10 changes: 9 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CHAT_DATABASE_URL=mongodb+srv://YOUR_USERNAME:YOUR_PASSWORD@cluster0.xxxxx.mongo
# Create OAuth App at: https://github.com/settings/developers
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
GITHUB_CALLBACK_URL=http://localhost:8000/api/v1/auth/github/callback
GITHUB_CALLBACK_URL=http://localhost:80/api/v1/auth/github/callback

# Personal Access Token for repo cloning (optional, for private repos)
GITHUB_TOKEN=
Expand All @@ -42,6 +42,13 @@ RABBITMQ_USER=verifydev
RABBITMQ_PASS=verifydev_dev_password
RABBITMQ_URL=amqp://verifydev:verifydev_dev_password@rabbitmq:5672

# ==================== CLOUDINARY ====================
# For avatar/image uploads
# Get from: https://cloudinary.com/console
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret

# ==================== CORS ====================
# Comma-separated list of allowed origins
CORS_ORIGIN=http://localhost:3000,http://localhost:5173
Expand All @@ -59,3 +66,4 @@ CHAT_SERVICE_PORT=3006
ANALYZER_SERVICE_PORT=8001
RESUME_SERVICE_PORT=8003
GATEWAY_PORT=8000

46 changes: 46 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# ============================================
# PRODUCTION Environment Configuration
# ============================================
# IMPORTANT: Keep this file secure and never commit to git!

# ==================== DATABASE ====================
DATABASE_URL=mongodb+srv://thesharmakeshav:TFJUWDRi46dbR5TB@cluster0.kegg0.mongodb.net/verifydev?retryWrites=true&w=majority
CHAT_DATABASE_URL=mongodb+srv://thesharmakeshav:TFJUWDRi46dbR5TB@cluster0.kegg0.mongodb.net/verifydev?retryWrites=true&w=majority

# ==================== GITHUB OAUTH ====================
GITHUB_CLIENT_ID=Ov23li8KrcXPVTwLxWUE
GITHUB_CLIENT_SECRET=34d8078e6d9a86b8daadf94aa9c36c053a276ba7
GITHUB_CALLBACK_URL=https://api.verifydev.me/api/v1/auth/github/callback
GITHUB_TOKEN=

# ==================== JWT SECRETS ====================
# PRODUCTION: Generate strong secrets with: openssl rand -base64 32
JWT_ACCESS_SECRET=prod_access_secret_CHANGE_THIS_32chars_min!
JWT_REFRESH_SECRET=prod_refresh_secret_CHANGE_THIS_32chars!

# ==================== REDIS ====================
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=

# ==================== RABBITMQ ====================
RABBITMQ_USER=verifydev
RABBITMQ_PASS=verifydev_prod_password_CHANGE_THIS
RABBITMQ_URL=amqp://verifydev:verifydev_prod_password_CHANGE_THIS@rabbitmq:5672

# ==================== CORS ====================
CORS_ORIGIN=https://verifydev.me,https://www.verifydev.me,https://api.verifydev.me

# ==================== ENVIRONMENT ====================
NODE_ENV=production
FRONTEND_URL=https://verifydev.me

# ==================== SERVICE PORTS ====================
AUTH_SERVICE_PORT=3001
USER_SERVICE_PORT=3002
JOB_SERVICE_PORT=3004
RECRUITER_SERVICE_PORT=3005
CHAT_SERVICE_PORT=3006
ANALYZER_SERVICE_PORT=8001
RESUME_SERVICE_PORT=8003
GATEWAY_PORT=8000
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# VerifyDev Backend
# VerifyDev Backend

> Developer Verification & Recruitment Platform - Microservices Architecture

Expand All @@ -13,7 +13,7 @@ VerifyDev automatically **verifies developer skills** by analyzing their GitHub
- [Performance Analysis](./PERFORMANCE.md) - **Latency Metrics & Benchmarks**
- [Services](#services)
- [API Routes](#api-routes)
- [Getting Started](#getting-started)
- [Getting Started](#getting-started)

---

Expand Down
18 changes: 18 additions & 0 deletions ai-service/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# AI Service Environment Variables

# Server
PORT=3008
NODE_ENV=development

# Ollama Configuration
OLLAMA_HOST=http://ollama:11434
OLLAMA_MODEL=llama3.2

# WhatsApp Cloud API (Get from Meta Developer Console)
WHATSAPP_TOKEN=your_whatsapp_token_here
WHATSAPP_PHONE_NUMBER_ID=your_phone_number_id_here
WHATSAPP_VERIFY_TOKEN=your_custom_verify_token_here

# Internal Service URLs
JOB_SERVICE_URL=http://job-service:3003
USER_SERVICE_URL=http://user-service:3002
18 changes: 18 additions & 0 deletions ai-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:20-alpine

WORKDIR /app

# Install dependencies
COPY package*.json ./
RUN npm ci --only=production

# Copy source
COPY dist/ ./dist/

# Environment
ENV NODE_ENV=production
ENV PORT=3008

EXPOSE 3008

CMD ["node", "dist/server.js"]
18 changes: 18 additions & 0 deletions ai-service/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:20-alpine

WORKDIR /app

# Install dependencies
COPY package*.json ./
RUN npm install

# Copy source (for dev, we mount volumes)
COPY . .

# Environment
ENV NODE_ENV=development
ENV PORT=3008

EXPOSE 3008

CMD ["npm", "run", "dev"]
Loading