Skip to content

Commit 1055021

Browse files
committed
Document live Vercel and Heroku deployment in README.
Add deployment guide with URLs, env vars, and Heroku redeploy notes for the production stack.
1 parent 2f4c545 commit 1055021

2 files changed

Lines changed: 85 additions & 14 deletions

File tree

README.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
# Healthcare AI Risk Console
22

3-
End-to-end healthcare AI prototype: **Kaggle-trained ML**, **multi-agent orchestration**, **FastAPI inference**, and a **production Next.js dashboard** — deployable to AWS App Runner.
3+
End-to-end healthcare AI prototype: **Kaggle-trained ML**, **multi-agent orchestration**, **FastAPI inference**, and a **production Next.js dashboard**.
44

55
> **Educational prototype only — not medical advice.** Not a medical device. Not clinically validated.
66
77
**Repository:** [github.com/adit24dhaya/healthcare-agent-system](https://github.com/adit24dhaya/healthcare-agent-system)
88

9+
## Live demo
10+
11+
| | URL |
12+
|---|-----|
13+
| **Web app (Next.js)** | [healthcare-agent-system-teal.vercel.app](https://healthcare-agent-system-teal.vercel.app) |
14+
| **API (FastAPI)** | [healthcare-achv-api-adit24-cbf3793610ff.herokuapp.com/docs](https://healthcare-achv-api-adit24-cbf3793610ff.herokuapp.com/docs) |
15+
| **API health** | […/health](https://healthcare-achv-api-adit24-cbf3793610ff.herokuapp.com/health) |
16+
17+
The Heroku root URL returns `{"detail":"Not Found"}` — that is expected; use `/docs` or the Vercel app.
18+
19+
Deploy notes: [`docs/deployment.md`](docs/deployment.md). Optional AWS path: [`docs/aws_deployment.md`](docs/aws_deployment.md).
20+
921
## What this demonstrates
1022

1123
| Layer | What you built |
@@ -14,7 +26,7 @@ End-to-end healthcare AI prototype: **Kaggle-trained ML**, **multi-agent orchest
1426
| **Inference** | FastAPI service with persisted `joblib` artifact and BRFSS feature mapping |
1527
| **AI agents** | Risk scoring, explainability, RAG retrieval, memory, LLM explanation & recommendations |
1628
| **UI** | Next.js clinical risk console (portfolio UI) + Streamlit for rapid iteration |
17-
| **Cloud** | Docker, ECR, Terraform (API + web on AWS App Runner) |
29+
| **Cloud** | Vercel (web) + Heroku (API); optional AWS App Runner via Terraform |
1830

1931
## Product demo
2032

@@ -84,7 +96,7 @@ Details: [`docs/architecture.md`](docs/architecture.md)
8496
- **Agents:** OpenAI API, ChromaDB, local medical knowledge base
8597
- **Backend:** FastAPI, Uvicorn, Docker
8698
- **Frontend:** Next.js 15, TypeScript, Tailwind, TanStack Query, Recharts; Streamlit
87-
- **Deploy:** AWS App Runner, ECR, Terraform, GitHub Actions CI
99+
- **Deploy:** Vercel, Heroku, Docker; optional AWS App Runner + Terraform
88100

89101
## Quick start (recommended)
90102

@@ -171,19 +183,11 @@ curl -s http://127.0.0.1:8000/health
171183

172184
Optional auth: `REQUIRE_API_TOKEN=true` and `Authorization: Bearer <API_TOKEN>`.
173185

174-
## Deploy to AWS
186+
## Deploy (production)
175187

176-
API and Next.js deploy as separate App Runner services (ECR + Terraform).
177-
178-
```bash
179-
cd infra/aws/apprunner
180-
terraform init
181-
terraform apply -target=aws_ecr_repository.api -target=aws_ecr_repository.web
182-
# Build/push Docker images, then full apply
183-
terraform apply -var "api_token=replace-with-a-strong-token"
184-
```
188+
**Current stack:** Next.js on **Vercel** (`web/`) + FastAPI on **Heroku** (Python buildpack). See [`docs/deployment.md`](docs/deployment.md).
185189

186-
See [`docs/aws_deployment.md`](docs/aws_deployment.md) and [`infra/aws/apprunner/README.md`](infra/aws/apprunner/README.md).
190+
**Optional AWS:** App Runner + ECR + Terraform — [`docs/aws_deployment.md`](docs/aws_deployment.md).
187191

188192
## Project structure
189193

docs/deployment.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Production deployment (Vercel + Heroku)
2+
3+
Educational prototype hosting used for the live demo. Not medical advice.
4+
5+
## Architecture
6+
7+
```text
8+
Browser → Vercel (Next.js, web/) → server routes proxy → Heroku (FastAPI + joblib model)
9+
```
10+
11+
## Live URLs
12+
13+
| Service | URL |
14+
|---------|-----|
15+
| Web UI | https://healthcare-agent-system-teal.vercel.app |
16+
| API docs | https://healthcare-achv-api-adit24-cbf3793610ff.herokuapp.com/docs |
17+
| Health | https://healthcare-achv-api-adit24-cbf3793610ff.herokuapp.com/health |
18+
19+
## Vercel (frontend)
20+
21+
1. Import `adit24dhaya/healthcare-agent-system` from GitHub.
22+
2. **Root Directory:** `web`
23+
3. **Framework:** Next.js
24+
4. Environment variables (Production and Preview):
25+
26+
| Name | Value |
27+
|------|--------|
28+
| `API_BASE_URL` | `https://healthcare-achv-api-adit24-cbf3793610ff.herokuapp.com` (no trailing slash) |
29+
| `API_TOKEN` | Same as Heroku `API_TOKEN` |
30+
31+
5. Deploy. Redeploy after changing env vars.
32+
33+
## Heroku (API)
34+
35+
- App: `healthcare-achv-api-adit24`
36+
- Stack: `heroku/python` (see repo `Procfile`, `runtime.txt`)
37+
- Config: `REQUIRE_API_TOKEN=true`, `API_TOKEN`, `MODEL_ARTIFACT_PATH=artifacts/risk_model.joblib`, `LOG_DIR=logs`
38+
- Optional: `OPENAI_API_KEY` for LLM explanation and chat agents
39+
40+
The production model artifact is bundled in the Heroku slug (not in GitHub). To redeploy API changes with the model:
41+
42+
```bash
43+
git checkout -b heroku-deploy
44+
git add -f artifacts/risk_model.joblib # after ./scripts/kaggle_run.sh
45+
git commit -m "Update model artifact for Heroku"
46+
git push heroku heroku-deploy:main
47+
git checkout main && git branch -D heroku-deploy
48+
```
49+
50+
Code-only API updates without re-bundling the model:
51+
52+
```bash
53+
git push heroku main:main
54+
```
55+
56+
(Only works if `main` includes the model commit on Heroku’s branch history.)
57+
58+
## Cost notes
59+
60+
- **Vercel Hobby:** sufficient for this UI.
61+
- **Heroku:** one web dyno; GitHub Student Pack provides ~$13/month platform credit for 24 months.
62+
- Do not add extra Heroku services unless needed.
63+
64+
## Security
65+
66+
- Never commit `API_TOKEN` or `OPENAI_API_KEY`.
67+
- Production uses `REQUIRE_API_TOKEN=true`; Vercel holds the token server-side in API route proxies.

0 commit comments

Comments
 (0)