diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..807b85e --- /dev/null +++ b/.env.example @@ -0,0 +1,51 @@ +# ============================================================================= +# TalkHeal Environment Configuration +# ============================================================================= +# Copy this file to `.env` and fill in your actual values. +# cp .env.example .env +# +# For Streamlit Cloud deployment, add these values to your app's +# Secrets settings (Settings → Secrets) in TOML format. +# See DEPLOYMENT_GUIDE.md for full instructions. +# ============================================================================= + +# --------------- Google Gemini API (Required) --------------- +# Get your API key from: https://aistudio.google.com/app/apikey +GEMINI_API_KEY=your_gemini_api_key_here + +# --------------- OpenAI API (Optional — for audio features) --------------- +# Get your API key from: https://platform.openai.com/api-keys +OPENAI_API_KEY=your_openai_api_key_here + +# --------------- JWT Authentication --------------- +# A random secret string used to sign JWT tokens for user sessions. +# Generate one with: python -c "import secrets; print(secrets.token_hex(32))" +JWT_SECRET=your_jwt_secret_here + +# --------------- Email Configuration (Optional — for password reset) --------------- +# Used to send password-reset emails via SMTP. +EMAIL_ADDRESS=your_email@gmail.com +EMAIL_PASSWORD=your_email_app_password + +# --------------- Application Settings --------------- +# Base URL of the running application (used in email links). +APP_BASE_URL=http://localhost:8501 + +# --------------- OAuth Configuration (Optional) --------------- +# Redirect URI for OAuth callbacks. +OAUTH_REDIRECT_URI=http://localhost:8501/oauth_callback + +# --- Google OAuth --- +# Set up at: https://console.cloud.google.com/apis/credentials +GOOGLE_CLIENT_ID=your_google_client_id +GOOGLE_CLIENT_SECRET=your_google_client_secret + +# --- GitHub OAuth --- +# Set up at: https://github.com/settings/developers +GITHUB_CLIENT_ID=your_github_client_id +GITHUB_CLIENT_SECRET=your_github_client_secret + +# --- Microsoft OAuth --- +# Set up at: https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps +MICROSOFT_CLIENT_ID=your_microsoft_client_id +MICROSOFT_CLIENT_SECRET=your_microsoft_client_secret diff --git a/README.md b/README.md index 11e5557..e93a3f0 100644 --- a/README.md +++ b/README.md @@ -288,6 +288,7 @@ TalkHeal/ │ ├── Journaling.py # Journaling UI page │ ├── Yoga.py # Yoga activity page │ └── selfHelpTools.py # Tools/resources for self-help +├── .env.example # Template for environment variables ├── .gitignore # Files/folders ignored by Git ├── Background.jpg ├── Background_Dark.jpg @@ -357,25 +358,13 @@ TalkHeal/ GEMINI_API_KEY = "YOUR_GOOGLE_GEMINI_API_KEY" ``` -4. **Set up OAuth (Optional but Recommended):** - Create a `.env` file in the TalkHeal directory: - - ```env - # OAuth Configuration - OAUTH_REDIRECT_URI=http://localhost:8501/oauth_callback - - # Google OAuth (Get from Google Cloud Console) - GOOGLE_CLIENT_ID=your_google_client_id_here - GOOGLE_CLIENT_SECRET=your_google_client_secret_here - - # GitHub OAuth (Get from GitHub Developer Settings) - GITHUB_CLIENT_ID=your_github_client_id_here - GITHUB_CLIENT_SECRET=your_github_client_secret_here - - # Microsoft OAuth (Get from Azure App Registration) - MICROSOFT_CLIENT_ID=your_microsoft_client_id_here - MICROSOFT_CLIENT_SECRET=your_microsoft_client_secret_here +4. **Set up environment variables:** + Copy the provided template and fill in your values: + ```bash + cp .env.example .env ``` + Then edit `.env` with your actual credentials (API keys, OAuth secrets, etc.). + See [`.env.example`](.env.example) for all available options and setup links. For detailed OAuth setup instructions, see [OAUTH_SETUP.md](OAUTH_SETUP.md)