-
Notifications
You must be signed in to change notification settings - Fork 92
docs(config): fix config.example.yml structure for correct gemini/jwt/smtp setup #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| server: | ||
| port: 1313 # The port number your backend server will run on | ||
|
|
||
| database: | ||
| uri: "mongodb+srv://<username>:<password>@<cluster-url>/<database-name>" # Replace with your MongoDB Atlas connection string # Get this from your MongoDB Atlas dashboard after creating a cluster and database | ||
|
|
||
| gemini: | ||
| apiKey: "<YOUR_GEMINI_API_KEY>" # API key for OpenAI / Gemini model access # Obtain from your OpenRouter.ai or OpenAI account dashboard | ||
|
|
||
| jwt: | ||
| secret: "<YOUR_JWT_SECRET>" # A secret string used to sign JWT tokens # Generate a strong random string (e.g. use `openssl rand -hex 32`) | ||
| expiry: 1440 # Token expiry time in minutes (e.g. 1440 = 24 hours) | ||
|
|
||
| smtp: | ||
| host: "smtp.gmail.com" # SMTP server host for sending emails (example is Gmail SMTP) | ||
| port: 587 # SMTP server port (587 for TLS) | ||
| username: "<YOUR_EMAIL_ADDRESS>" # Email username (your email address) | ||
| password: "<YOUR_EMAIL_PASSWORD_OR_APP_PASSWORD>" # Password for the email or app-specific password if 2FA is enabled | ||
| senderEmail: "<YOUR_EMAIL_ADDRESS>" # The 'from' email address used when sending mails | ||
| senderName: "DebateAI Team" | ||
|
|
||
| googleOAuth: | ||
| clientID: "<YOUR_GOOGLE_OAUTH_CLIENT_ID>" # Google OAuth Client ID for OAuth login # Obtain from Google Cloud Console (APIs & Services > Credentials > OAuth 2.0 Client IDs) | ||
|
Comment on lines
+1
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainVerify this structure matches backend/config/config.go expectations. Ensure that all required configuration fields expected by 🏁 Script executed: #!/bin/bash
# Description: Check if config.example.yml defines all top-level fields expected by config.go
# Identify all config struct fields parsed in config.go
echo "=== Config fields referenced in config.go ==="
rg -n "cfg\.[A-Z]" backend/config/config.go -o | head -20
# Compare with fields defined in config.example.yml
echo -e "\n=== Top-level fields in config.example.yml ==="
rg "^[a-z]" backend/config/config.example.ymlLength of output: 143 I need to examine config.go's structure directly to understand what fields it expects. Let me inspect the config struct definition. Length of output: 3422 Add missing configuration sections to config.example.yml The example file is missing two entire configuration sections defined in
Additionally, the SMTP and JWT structs in config.go lack yaml tags, which may cause unmarshaling issues. |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarify the Gemini API key instruction.
The comment mentions both "OpenAI / Gemini model access" and suggests obtaining from "OpenRouter.ai or OpenAI account dashboard," but the configuration is specifically for Gemini. Clarify the source for obtaining the Gemini API key.
Apply this diff to clarify:
📝 Committable suggestion
🤖 Prompt for AI Agents