Seshat is a manuscript annotation and analysis platform. It combines:
- a Vue frontend for image/PDF upload, IIIF viewing, annotation, export, and scribe-analysis workflows,
- a Python Flask backend for image preparation + scribe detection,
- an optional Node/Express + WebSocket collaboration server with PostgreSQL.
src/— Vue frontendpython-backend/— Flask ML/OCR backend (/health,/prepare,/analyze, ...)server/— collaboration API + WebSocket backend (/api/sessions,/ws)ops/gwdg_deploy.sh— Ubuntu deployment script (frontend + both backends + nginx)DEPLOYING_TO_HF.md— Hugging Face Spaces (Docker) backend deployment guide
- Node.js 18+
- npm
- Python 3.10+ (3.11 recommended)
- (Optional for collaboration server) Docker + Docker Compose
npm installpython3 -m venv .venv
source .venv/bin/activate
pip install -r python-backend/requirements.txtcd python-backend
../.venv/bin/python app.pyDefault backend URL: http://localhost:5001
npm run serveDefault frontend URL: http://localhost:8081
The frontend proxies ML calls from /ml/* to http://localhost:5001 via vue.config.js.
cd server
npm install
npm run setup
npm run devDefault collaboration URL: http://localhost:3001
The frontend reads these values when present:
VUE_APP_API_URL— collaboration API base URL (e.g.http://localhost:3001)VUE_APP_WS_URL— collaboration WebSocket URL base (e.g.ws://localhost:3001)VUE_APP_PHAROSIGHT_API_BASE— ML backend base URL (e.g.http://localhost:5001or/ml)VITE_PHAROSIGHT_API_BASE— same purpose as above, used in some runtime contextswindow.__PHAROSIGHT_API_BASE__— runtime override injected into built frontend
npm run buildOutput is generated in dist/.
- ML backend:
GET /health(example:http://localhost:5001/health) - Collaboration backend:
GET /health(example:http://localhost:3001/health)
This means the frontend got plain-text proxy output (usually backend unreachable) instead of JSON.
Checklist:
- Ensure frontend is running (
npm run serve). - Ensure Python backend is running on port
5001. - Test proxy path:
http://localhost:8081/ml/healthshould return{"status":"ok"}.
This section is for operators deploying Seshat to a VM or server.
Use ops/gwdg_deploy.sh on Ubuntu 22.04:
sudo APP_HOST=your.server.domain bash ops/gwdg_deploy.shWhat it configures:
- Node.js + npm
- Python venv + ML dependencies
- PostgreSQL database
- collaboration server systemd service
- ML backend systemd service
- nginx reverse proxy serving built frontend + API proxying
Important environment knobs:
APP_HOST(required)APP_NAME,APP_ROOT,REPO_URL,BRANCHNODE_PORT(default3001),PY_PORT(default5001)DB_NAME,DB_USER,DB_PASS
After deployment, verify:
- frontend over
http://<APP_HOST>/ - collaboration health at
http://<APP_HOST>/health - ML health at
http://<APP_HOST>/ml/health
- Build frontend:
npm cinpm run build
- Serve
dist/with nginx. - Run collaboration backend (
server/) with Node (systemd/pm2/container). - Run Python backend (
python-backend/app.py) with a process manager. - Configure reverse proxy:
/→ static frontend (dist/)/apiand/ws→ collaboration backend/ml→ Python backend
If you only want hosted ML inference while keeping your own frontend/server:
- follow
DEPLOYING_TO_HF.md, - set frontend ML base to your HF URL via
VITE_PHAROSIGHT_API_BASE/VUE_APP_PHAROSIGHT_API_BASE.
DEPLOYING_TO_HF.md— Hugging Face deploymentserver/README.mdandserver/SETUP.md— collaboration server setupJSON_UPLOAD_FEATURE.md— JSON upload flow details
For this type of platform (frontend + backend services + ML tooling), the most suitable default license is Apache License 2.0.
Why this is a good fit:
- permissive for research, academic, and commercial adoption,
- includes an explicit patent grant,
- allows private internal modifications without requiring source disclosure,
- keeps attribution and notice requirements straightforward.
If your goal is strong copyleft for hosted/network use (so modified hosted versions must also share source), consider AGPLv3 instead.