diff --git a/.gitignore b/.gitignore index f3dc83e..c88a604 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,11 @@ -# Environment variables -.env +# Environment variables (local overrides only) +# .env files are committed (contain production URLs, not secrets) +# .env.local files are git-ignored (contain local overrides) .env.local .env.*.local +backend/.env.local +frontend/.env.local +.env # AI assistant instructions (keep private) CLAUDE.md diff --git a/backend/.env.example b/backend/.env.example index 9805822..14924b1 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -1,13 +1,32 @@ +# Backend Environment Variables +# Copy this file to .env.local for local development + # Server Configuration PORT=8080 # Database Configuration # Format: postgres://username:password@host:port/database?sslmode=disable -DATABASE_URL=postgres://collab:your_password_here@localhost:5432/collaboration?sslmode=disable +DATABASE_URL=postgres://collab:collab123@localhost:5432/collaboration?sslmode=disable -# Redis Configuration +# Redis Configuration (optional, for future use) REDIS_URL=redis://localhost:6379 # CORS Configuration # Comma-separated list of allowed origins ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000 + +# JWT Secret (use a strong random string in production) +JWT_SECRET=your-secret-key-change-this + +# Frontend URL (for OAuth redirects after login) +FRONTEND_URL=http://localhost:5173 + +# Google OAuth (get from https://console.cloud.google.com/) +GOOGLE_CLIENT_ID=your-google-client-id +GOOGLE_CLIENT_SECRET=your-google-client-secret +GOOGLE_REDIRECT_URL=http://localhost:8080/api/auth/google/callback + +# GitHub OAuth (get from https://github.com/settings/developers) +GITHUB_CLIENT_ID=your-github-client-id +GITHUB_CLIENT_SECRET=your-github-client-secret +GITHUB_REDIRECT_URL=http://localhost:8080/api/auth/github/callback diff --git a/frontend/.env.example b/frontend/.env.example index 1c6c151..e122839 100644 --- a/frontend/.env.example +++ b/frontend/.env.example @@ -1,3 +1,6 @@ +# Frontend Environment Variables +# Copy this file to .env.local for local development + # API Configuration # Backend API base URL (must include /api path) VITE_API_URL=http://localhost:8080/api