Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

ANN - Image Annotation Tool

Cell image annotation app with a React/Vite frontend and a FastAPI backend.

Overview

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.

Repository Layout

  • frontend/ - React + Vite client
  • backend/ - FastAPI API, SQLite data, tile generation, and image processing
  • UAT_TEST_CASES.md - detailed manual acceptance tests

Requirements

  • Python 3.12 or newer
  • Node.js 18.19 or newer
  • git
  • libvips and OpenSlide for SVS processing on the backend host

Local Setup

Clone the repo and create a Python virtual environment:

git clone <repo-url>
cd CellAnnotation
python3 -m venv .venv

Backend setup:

source .venv/bin/activate
cd backend
pip install -r requirements.txt

Frontend setup:

cd ../frontend
npm install

Run Locally

Backend:

cd backend
source ../.venv/bin/activate
uvicorn app.main:app --reload --port 5001

Frontend:

cd frontend
npm run dev

Set VITE_API_BASE_URL to the backend origin before opening the frontend in production-like mode.

Vercel Deployment

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_KEY
  • ANN_JWT_SECRET_KEY
  • ANN_CORS_ORIGINS
  • ANN_APP_DATA_DIR
  • ANN_LOGS_DIR
  • ANN_ENABLE_DEV_SEED=false

Render Deployment

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_ORIGINS set to your Vercel URL, for example https://your-app.vercel.app
  • ANN_SECRET_KEY and ANN_JWT_SECRET_KEY generated 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.

Testing

Frontend:

cd frontend
npm run typecheck
npm run build
npm run test

Backend:

cd backend
source ../.venv/bin/activate
pytest

Manual UAT cases are documented in UAT_TEST_CASES.md.

Legacy Desktop Packaging

The repo also includes packaging scripts in build.local.sh, build.local.ps1, and the MacFile/ folder for local desktop distribution.

Team

  • Gregorius Andrew Winata
  • Byron Quintuna
  • Ellis Mon
  • Jiakun Li
  • Enyuan Zhang

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages