Skip to content

Add a .env.example File β€” The README References One That Doesn't ExistΒ #35

Description

@Vedant1703

πŸ“‹ Description

The Getting Started section of the README (Step 2) tells contributors to run:

cp .env.example .env

But .env.example does not exist in the repository. Any new contributor who follows the README will immediately hit an error:

cp: .env.example: No such file or directory

This is one of the most common friction points for first-time open source contributors and should be fixed immediately.


πŸ“ File to Create

.env.example at the repository root


βœ… What To Do

Create a .env.example file with all required keys stubbed out using placeholder values and helpful comments:

# ─────────────────────────────────────────────────────────────
# πŸ—„οΈ Database (Supabase PostgreSQL)
# Get your connection string from: https://supabase.com/dashboard
# ─────────────────────────────────────────────────────────────
DATABASE_URL=postgresql://postgres:<password>@<host>:<port>/<db>

# ─────────────────────────────────────────────────────────────
# πŸ” GitHub OAuth App Credentials
# Create one at: https://github.com/settings/developers
# Callback URL should be: http://localhost:8080/auth/github/callback
# ─────────────────────────────────────────────────────────────
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret

# A Personal Access Token for higher GitHub API rate limits
GITHUB_TOKEN=your_personal_github_token

# ─────────────────────────────────────────────────────────────
# πŸ”‘ JWT Secret (use a long random string, min 32 characters)
# Generate with: openssl rand -hex 32
# ─────────────────────────────────────────────────────────────
JWT_SECRET=your_super_secret_jwt_key_min_32_chars

# ─────────────────────────────────────────────────────────────
# πŸ€– AI Provider: "groq" (recommended) or "gemini"
# Groq API: https://console.groq.com/
# Gemini API: https://aistudio.google.com/
# ─────────────────────────────────────────────────────────────
LLM_PROVIDER=groq
LLM_MODEL=mixtral-8x7b-32768
GROQ_API_KEY=your_groq_api_key
GEMINI_API_KEY=your_gemini_api_key

# ─────────────────────────────────────────────────────────────
# 🌐 Frontend (Next.js) β€” URLs for backend services
# ─────────────────────────────────────────────────────────────
NEXT_PUBLIC_CORE_SERVICE_URL=http://localhost:8083
NEXT_PUBLIC_GITHUB_SERVICE_URL=http://localhost:8081

# ─────────────────────────────────────────────────────────────
# πŸ”— Auth Redirect (where GitHub OAuth sends users after login)
# ─────────────────────────────────────────────────────────────
AUTH_REDIRECT_URL=http://localhost:3000/auth/success

🏁 Acceptance Criteria

  • .env.example exists at the repository root
  • All environment variables referenced in the README are present with placeholder values
  • Every variable has a comment explaining what it is and where to obtain it
  • .env.example is committed to the repo (it does NOT get added to .gitignore β€” it contains no real secrets, only placeholders)

πŸ’‘ Technical Hints

  • Check the existing .env files inside each service directory for all variables used:
    • backend/core_service/.env
    • backend/auth-service/.env (if it exists)
    • backend/ai-service/.env
    • frontend/.env.local
  • The file must use placeholder values like your_api_key_here β€” never use real credentials
  • .env.example should be tracked by git. Only .env itself should be in .gitignore

πŸš€ Getting Started

  1. Fork the repository
  2. Create a branch: git checkout -b fix/issue-7-add-env-example
  3. Create .env.example at the project root
  4. Make sure it is NOT listed in .gitignore
  5. Open a Pull Request!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions