Grand Prize — AI Healthcare Hack NYC · Devpost
Get Florence running locally in two paths depending on who you are.
| I want to… | Go to |
|---|---|
| Try the web demo (judge, PM, designer) | User quick start ↓ |
| Try the phone demo (Twilio) | Phone demo ↓ |
| Develop or contribute (engineer) | Developer quick start ↓ |
URLs when running: UI → http://127.0.0.1:5173 · API → http://127.0.0.1:8001
For anyone who wants to use Florence locally — no coding required.
- Docker Desktop (runs the database)
- Ollama (optional — enables natural AI replies; app works without it)
1. Open a terminal in the project folder (you already have the repo cloned).
2. Run the startup helper:
./scripts/dev-up.shThis starts Postgres, checks Ollama, and prints what to run next.
3. Start the backend (terminal 1):
cd backend
source .venv/bin/activate # first time: see Developer setup below to create it
uvicorn app.main:app --host 127.0.0.1 --port 8001 --reload4. Start the frontend (terminal 2):
cd frontend
npm install # first time only
npm run dev -- --host 127.0.0.1 --port 51735. Open the app: http://127.0.0.1:5173
Use
127.0.0.1, notlocalhost— avoids CORS issues.
Fastest path: click Run demo in the UI header — it replays the Queens daughter scenario automatically.
Or run the terminal walkthrough:
./scripts/run-demo.shManual script:
-
Read Florence's greeting → reply Yes to storage consent.
-
Describe a care situation, for example:
My father is 82, lives in Queens 11101. He needs help with bathing and meals, has memory concerns, and recently fell. We need care within 30 days. Budget is about $6,000–$8,000 per month.
-
Answer follow-up questions (location, budget, timing).
-
When provider cards appear → click Select provider.
-
Confirm — you'll see a mock referral recorded.
Voice: Click Voice input (Chrome recommended) or Listen on replies.
Operator view: Use the header link to inspect lead score, transcript, and referral economics after a session.
| Problem | Try this |
|---|---|
| White screen | Hard refresh: Cmd+Shift+R |
| "Failed to create session" | Backend not running — check terminal 1 |
| Slow first reply | Normal if Ollama is starting; wait ~10s |
| No provider cards | Include ZIP code + budget in your messages |
More help: Troubleshooting · getting-started.md
Call Florence on a Twilio number — same intake engine as the web app, with spoken prompts.
Requires: Twilio account, ngrok (or similar tunnel), telephony Python extras.
- Follow telephony.md to configure
.envand Twilio webhooks. - Run
./scripts/telephony-dev.shand start ngrok on port 8001. - Dial your Twilio number — the web header shows the configured number when telephony is enabled.
Phone calls use scripted stage prompts by default for reliable live demos. Web chat still uses Ollama for natural replies.
For engineers cloning the repo for the first time.
brew install git docker ollama pre-commit gitleaks ruffAlso need Python 3.12+ and Node.js 18+.
git clone https://github.com/DouglasMacKrell/florence.git
cd florence
git checkout develop
cp .env.example .env
cp frontend/.env.example frontend/.envDefault config works for local Docker Postgres. Frontend points at http://127.0.0.1:8001.
pre-commit install
pre-commit install --hook-type pre-pushollama pull llama3.2:3bVerify: ollama list shows llama3.2:3b.
./scripts/dev-up.sh
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
ln -sf ../.env .env
uvicorn app.main:app --host 127.0.0.1 --port 8001 --reloadVerify:
curl http://127.0.0.1:8001/health
# {"status":"ok","service":"florence"}cd frontend
npm install
npm run dev -- --host 127.0.0.1 --port 5173./scripts/run-tests.sh
./scripts/pre-push-gate.sh# Terminal 1
docker compose up -d
cd backend && source .venv/bin/activate
uvicorn app.main:app --host 127.0.0.1 --port 8001 --reload
# Terminal 2
cd frontend && npm run dev -- --host 127.0.0.1 --port 5173# All services (after first-time setup)
docker compose up -d
cd backend && source .venv/bin/activate && uvicorn app.main:app --host 127.0.0.1 --port 8001 --reload
cd frontend && npm run dev -- --host 127.0.0.1 --port 5173
# Health checks
curl http://127.0.0.1:8001/health
curl -X POST http://127.0.0.1:8001/sessions
# Tests
./scripts/pre-push-gate.sh| Symptom | Fix |
|---|---|
| White screen in browser | Cmd+Shift+R; check browser devtools console |
| CORS error in network tab | Open UI at 127.0.0.1:5173, not localhost:5173 |
| Port 8000 already in use | We use 8001 — ensure frontend/.env has VITE_API_BASE_URL=http://127.0.0.1:8001 |
ModuleNotFoundError: psycopg2 |
Pull latest code; database.py auto-converts to psycopg v3 |
| Postgres connection refused | docker compose up -d and wait for healthy status |
| Ollama errors / timeouts | Run ollama serve; or set ENABLE_OLLAMA=false in .env for scripted fallback |
| No provider matches | Include postal code, budget range, and care needs in conversation |
- getting-started.md — detailed setup notes
- telephony.md — Twilio + ngrok phone demo
- development.md — TDD, branches, hooks
- portfolio.md — demo narrative for presentations
- api.md — REST + Twilio API reference