Skip to content

Commit 1aa23ad

Browse files
committed
added docs
1 parent 5cd11ed commit 1aa23ad

116 files changed

Lines changed: 65302 additions & 6 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy MkDocs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Change this to your default branch name
7+
workflow_dispatch: # Allow manual triggering
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Python
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: '3.9'
30+
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install mkdocs mkdocs-material
35+
36+
- name: Build MkDocs site
37+
run: mkdocs build
38+
39+
- name: Setup Pages
40+
uses: actions/configure-pages@v4
41+
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: './site'
46+
47+
deploy:
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
runs-on: ubuntu-latest
52+
needs: build
53+
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jspm_packages/
3838

3939
# Output of 'npm pack'
4040
*.tgz
41+
.venv
4142

4243
# Yarn Integrity file
4344
.yarn-integrity
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"id": "devoverflow-env",
3+
"name": "DevOverflow Backend Environment",
4+
"values": [
5+
{
6+
"key": "base_url",
7+
"value": "http://localhost:3000",
8+
"description": "Base URL for the DevOverflow backend API",
9+
"enabled": true
10+
},
11+
{
12+
"key": "jwt_token",
13+
"value": "",
14+
"description": "JWT token obtained from login/register endpoint",
15+
"enabled": true
16+
}
17+
],
18+
"_postman_variable_scope": "environment"
19+
}

docs/AI_APIS_POSTMAN_GUIDE.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ PREREQUISITES
1313
1. Start the backend server: `npm start`
1414
2. Get JWT token by logging in via POST /api/auth/login
1515
3. Set Authorization header: `Bearer YOUR_JWT_TOKEN`
16-
4. Ensure GEMINI_API_KEY is configured in .env
16+
4. Ensure GEMINI_API_KEY is configured in .env (tested and working)
17+
5. For development/testing without API calls, set AI_MOCK=true in .env
18+
6. Optional: Set GEMINI_MODEL to pin a specific model (defaults to fallback candidates)
1719

1820
================================================================================
1921
AI ENDPOINTS TESTING GUIDE

docs/DEPLOYMENT_GUIDE.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Deploy MkDocs to GitHub Pages - Manual Method
2+
3+
## Step 1: Enable GitHub Pages
4+
1. Go to your repository on GitHub
5+
2. Click on **Settings** tab
6+
3. Scroll down to **Pages** section
7+
4. Under **Source**, select **Deploy from a branch**
8+
5. Select **gh-pages** branch and **/(root)** folder
9+
6. Click **Save**
10+
11+
## Step 2: Build and Deploy Manually
12+
13+
### Option A: Using GitHub Actions (Recommended)
14+
The workflow file `.github/workflows/deploy-mkdocs.yml` has been created for you.
15+
16+
**To trigger deployment:**
17+
1. Commit and push the workflow file to your main branch
18+
2. Go to **Actions** tab in your repository
19+
3. Click on the **Deploy MkDocs to GitHub Pages** workflow
20+
4. Click **Run workflow**
21+
22+
### Option B: Manual Deployment Script
23+
24+
Create a deployment script:
25+
26+
```bash
27+
#!/bin/bash
28+
# deploy.sh
29+
30+
# Build the site
31+
mkdocs build
32+
33+
# Create gh-pages branch if it doesn't exist
34+
git checkout --orphan gh-pages
35+
git reset --hard
36+
37+
# Copy built site files
38+
cp -r site/* .
39+
rm -rf site/
40+
41+
# Add and commit
42+
git add .
43+
git commit -m "Deploy MkDocs site"
44+
45+
# Push to gh-pages branch
46+
git push origin gh-pages --force
47+
48+
# Go back to main branch
49+
git checkout main
50+
```
51+
52+
Make it executable and run:
53+
```bash
54+
chmod +x deploy.sh
55+
./deploy.sh
56+
```
57+
58+
## Step 3: Access Your Site
59+
60+
After deployment, your site will be available at:
61+
```
62+
https://YOUR_USERNAME.github.io/YOUR_REPOSITORY_NAME/
63+
```
64+
65+
For example:
66+
```
67+
https://omchoksi108.github.io/Devoverflow-Backend/
68+
```
69+
70+
## Step 4: Custom Domain (Optional)
71+
72+
To use a custom domain:
73+
1. Go to repository **Settings****Pages**
74+
2. Under **Custom domain**, enter your domain
75+
3. Add a `CNAME` file to your `docs/` directory with your domain name
76+
4. Configure DNS settings with your domain provider
77+
78+
## Troubleshooting
79+
80+
### Site not updating?
81+
- Wait 2-3 minutes after deployment
82+
- Check the **Actions** tab for any build errors
83+
- Clear your browser cache
84+
85+
### Build failing?
86+
- Check the MkDocs configuration in `mkdocs.yml`
87+
- Ensure all required dependencies are installed
88+
- Verify file paths in navigation are correct
89+
90+
### 404 errors?
91+
- Make sure GitHub Pages is enabled
92+
- Check that the `gh-pages` branch exists
93+
- Verify the build output is in the correct location

docs/GEMINI_API_SETUP.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# 🔑 Gemini API Setup Guide
22

3-
## Why AI Failed
3+
## ✅ Current Status: Keys Tested and Working
44

5-
Your Gemini API keys are **invalid/expired**. The system shows:
6-
- ❌ Primary key: "API key not valid"
7-
-- ❌ Backup key: "models/<model> is not found" — check GET /api/ai/status for the model the server is attempting to use, or set GEMINI_MODEL to a supported model name.
5+
Your Gemini API keys have been tested and are operational. The system shows:
6+
- ✅ Primary key: Valid and working
7+
- ✅ Backup key: Available for fallback
8+
- ✅ Model fallback: Automatic model selection with candidates
89

9-
## 🚀 How to Get Valid Gemini API Keys
10+
## 🚀 How to Get Valid Gemini API Keys (If Needed)
1011

1112
### Step 1: Visit Google AI Studio
1213
1. Go to: https://makersuite.google.com/app/apikey
@@ -49,6 +50,10 @@ node demonstrateMemory.js
4950
- **Backup key**: Automatic fallback if primary fails
5051
- **Error handling**: Graceful degradation
5152

53+
### ✅ Development Mode
54+
- **AI_MOCK=true**: Use deterministic mock responses for testing without API calls
55+
- **GEMINI_MODEL**: Pin a specific model (optional, defaults to fallback candidates)
56+
5257
### ✅ Indian Developer Focus
5358
- **Context-aware responses** for Indian tech ecosystem
5459
- **Local market insights** (jobs, frameworks, trends)

0 commit comments

Comments
 (0)