Skip to content

Commit 37e19cd

Browse files
Standardize web client directory to docs/ and update documentation
1 parent d99bf14 commit 37e19cd

6 files changed

Lines changed: 28 additions & 133 deletions

File tree

DEPLOY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
## After Getting Render URL
1414

15-
Once you have your Render URL, update `client/app.js`:
15+
Once you have your Render URL, update `docs/app.js`:
1616
- Replace `YOUR-RENDER-URL.onrender.com` with your actual URL
1717
- Commit and push
18-
- Enable GitHub Pages (Settings → Pages → /client folder)
18+
- Enable GitHub Pages (Settings → Pages → /docs folder)
1919

2020
## Test Deployment
2121

PHASE1_CHECKLIST.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
## ✅ GitHub Pages Client
2727

2828
### Requirements Met:
29-
- ✅ Client directory exists: `client/`
30-
-`client/index.html` - HTML structure with buttons
31-
-`client/app.js` - JavaScript to call API endpoints
32-
-`client/style.css` - Styling
29+
- ✅ Client directory exists: `docs/`
30+
-`docs/index.html` - HTML structure with buttons
31+
-`docs/app.js` - JavaScript to call API endpoints
32+
-`docs/style.css` - Styling
3333
- ✅ CORS middleware configured in backend for GitHub Pages domains
3434

3535
### Client Features:
@@ -40,9 +40,9 @@
4040
### To Deploy:
4141
1. Go to repository Settings → Pages
4242
2. Source: Deploy from branch `main`
43-
3. Folder: `/client`
43+
3. Folder: `/docs`
4444
4. Save
45-
5. Client will be available at: `https://<username>.github.io/<repo-name>/client/`
45+
5. Client will be available at: `https://<username>.github.io/<repo-name>/`
4646

4747
### Important:
4848
- Update `API_BASE` in `client/app.js` with your Render URL before deploying
@@ -99,8 +99,8 @@ https://<your-service>.onrender.com/docs
9999
### 2. GitHub Pages
100100
```bash
101101
# After enabling GitHub Pages:
102-
# 1. Update client/app.js with Render URL
103-
# 2. Open: https://<username>.github.io/<repo-name>/client/
102+
# 1. Update docs/app.js with Render URL
103+
# 2. Open: https://<username>.github.io/<repo-name>/
104104
# 3. Click "Check Health" - should show JSON response
105105
# 4. Click "Send Echo" - should show echo response
106106
```
@@ -131,7 +131,7 @@ uvicorn app.main:app --reload
131131
- `/docs` endpoint exists (FastAPI auto-generates)
132132

133133
✅ GitHub Pages client ready (needs deployment)
134-
- Client files exist
134+
- Client files exist in `docs/`
135135
- Buttons call API
136136
- JSON display works
137137

@@ -142,7 +142,7 @@ uvicorn app.main:app --reload
142142

143143
**Next Steps:**
144144
1. Deploy to Render and get Render URL
145-
2. Update `client/app.js` with Render URL
145+
2. Update `docs/app.js` with Render URL
146146
3. Enable GitHub Pages
147147
4. Test both deployments
148148
5. Verify CI runs successfully

README.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -196,17 +196,17 @@ The project includes a `render.yaml` file for automatic configuration. When crea
196196

197197
## Web Client
198198

199-
A simple web client is included in the `client/` directory that can call the API from a browser.
199+
A simple web client is included in the `docs/` directory that can call the API from a browser.
200200

201201
### Setup Client
202202

203-
1. **Update API URL** in `client/app.js`:
203+
1. **Update API URL** in `docs/app.js`:
204204
```javascript
205205
const API_BASE = "https://YOUR-RENDER-URL.onrender.com"; // Replace with your Render URL
206206
```
207207

208208
2. **Test locally**:
209-
- Open `client/index.html` in your browser
209+
- Open `docs/index.html` in your browser
210210
- Click "Check Health" or "Send Echo" buttons
211211
- Make sure your Render API is deployed and CORS is configured
212212

@@ -218,17 +218,17 @@ A simple web client is included in the `client/` directory that can call the API
218218
- Go to your repository on GitHub
219219
- Settings → Pages
220220
- Source: Select "Deploy from a branch"
221-
- Branch: `main` (or `gh-pages`)
222-
- Folder: `/client` (or `/root` if client is at root)
221+
- Branch: `main`
222+
- Folder: `/docs`
223223
- Click "Save"
224224

225225
3. **Update CORS in Backend**:
226226
- The backend already includes CORS middleware
227-
- Make sure your GitHub Pages URL is in the `allow_origins` list in `app/main.py`
227+
- Make sure your GitHub Pages URL is in the `ALLOWED_ORIGINS` list in `app/main.py`
228228
- Example: `"https://mytherapy-coding.github.io"`
229229

230230
4. **Verify Deployment**:
231-
- Your client will be available at: `https://<username>.github.io/<repo-name>/client/`
231+
- Your client will be available at: `https://<username>.github.io/<repo-name>/`
232232
- Or if using a custom domain: `https://yourdomain.com`
233233

234234
### Client Features
@@ -284,11 +284,17 @@ financial-calculations-api/
284284
├── app/
285285
│ ├── __init__.py
286286
│ └── main.py
287-
├── client/
287+
├── docs/ # Web client (served by GitHub Pages)
288288
│ ├── index.html
289289
│ ├── app.js
290290
│ └── style.css
291-
├── requirements.txt
291+
├── tests/ # Pytest test suite
292+
├── .github/workflows/ # CI workflow
293+
├── CONCEPTS.md
294+
├── DEPLOY.md
295+
├── LICENSE
296+
├── PHASE1_CHECKLIST.md
297+
├── README.md
292298
├── render.yaml
293-
└── README.md
299+
└── requirements.txt
294300
```

client/app.js

Lines changed: 0 additions & 42 deletions
This file was deleted.

client/index.html

Lines changed: 0 additions & 20 deletions
This file was deleted.

client/style.css

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)