Cell image annotation app with a React/Vite frontend and a FastAPI backend.
The app supports image upload, SVS tiling, mask/annotation editing, exports, and admin user management. For deployment, treat the frontend as a static site and keep the Python backend on a separate stateful host.
frontend/- React + Vite clientbackend/- FastAPI API, SQLite data, tile generation, and image processingUAT_TEST_CASES.md- detailed manual acceptance tests
- Python 3.12 or newer
- Node.js 18.19 or newer
gitlibvipsand OpenSlide for SVS processing on the backend host
Clone the repo and create a Python virtual environment:
git clone <repo-url>
cd CellAnnotation
python3 -m venv .venvBackend setup:
source .venv/bin/activate
cd backend
pip install -r requirements.txtFrontend setup:
cd ../frontend
npm installBackend:
cd backend
source ../.venv/bin/activate
uvicorn app.main:app --reload --port 5001Frontend:
cd frontend
npm run devSet VITE_API_BASE_URL to the backend origin before opening the frontend in production-like mode.
Deploy only frontend/ to Vercel. Do not deploy the Python backend to Vercel.
Vercel env vars:
VITE_API_BASE_URL- public backend origin
Backend host env vars:
ANN_SECRET_KEYANN_JWT_SECRET_KEYANN_CORS_ORIGINSANN_APP_DATA_DIRANN_LOGS_DIRANN_ENABLE_DEV_SEED=false
The repository includes a Render blueprint in render.yaml and a backend Dockerfile at backend/Dockerfile.
Use Render for the API service only. The service expects:
- a persistent disk mounted at
/var/data ANN_CORS_ORIGINSset to your Vercel URL, for examplehttps://your-app.vercel.appANN_SECRET_KEYandANN_JWT_SECRET_KEYgenerated by Render or set manually
The app starts with uvicorn app.main:app --host 0.0.0.0 --port $PORT and exposes /api/health/health for health checks.
Frontend:
cd frontend
npm run typecheck
npm run build
npm run testBackend:
cd backend
source ../.venv/bin/activate
pytestManual UAT cases are documented in UAT_TEST_CASES.md.
The repo also includes packaging scripts in build.local.sh, build.local.ps1, and the MacFile/ folder for local desktop distribution.
- Gregorius Andrew Winata
- Byron Quintuna
- Ellis Mon
- Jiakun Li
- Enyuan Zhang