The website is available at coralfuture.org, run by Voolstra lab. The motivation is to build a global database of standardized thermal tolerance ED50 values as determined by CBASS to enable meta-analyses and -comparisons.
docker compose up -d- Frontend:
cd react_app npm install npm run build rsync -a build/ /var/www/hemorrhagia.online/ - Django superuser (when needed):
docker compose exec django-app python manage.py createsuperuser - Optional seed users: edit
django_app/user_data.example.json, then save it asuser_data.jsonin the same folder beforedocker compose up -d—startup scripts will create those accounts automatically. - After code updates:
docker compose exec django-app python manage.py migrate docker compose exec django-app python manage.py collectstatic --noinput sudo nginx -t && sudo systemctl reload nginx
GET /– FastAPI ED calculator home page with upload form.POST /process– handles file upload/example data, invokes the R workflow, returns table + plots.GET /download-csv– downloads the latest ED table (used by the web UI button).
- UI posts CSV/XLSX or toggled example data to
/process. - FastAPI writes the dataset to a temp CSV and calls
calculate_eds.R. - The R script loads CBASSED50, preprocesses, fits DRMs with
is_curveid = TRUE, and writes ED5/50/95 plus PNG plots. - FastAPI reads the output CSV and PNGs, embeds the table + base64 images into the results template with download buttons.
/— legacy Django home, keeps basic landing view, redirects to React when needed./admin/— standard Django admin./projects/— SSR views for project listings (seeprojects.urls)./user/— auth/profile views (seeusers.urls)./api/auth/...— authenticated REST endpoints: cart (/cart/,/cart/group/<id>/,/cart/export/), session helpers (/status/,/csrf/,/login/,/logout/), CSV upload/check/ED50 calculation (/upload-csv/,/check-csv-ed50/,/calculate-ed50/)./api/public/...— read-only data feeds:statistics/,biosamples/,colonies/,observations/,projects/,projects/<id>/, and thermal layers (thermal-tolerances/,thermal-tolerances/max-min/,breakpoint-temperatures/,breakpoint-temperatures/max-min/,thermal-limits/,thermal-limits/max-min/).
| Service | Port | Notes |
|---|---|---|
| Django backend | 8000 | API + admin, proxied by nginx /api, /admin. |
| FastAPI ED50 app | 8001 | /shiny + /process, runs the R workflow. |
| React build (nginx) | 443 | Deployed to /var/www/hemorrhagia.online. |
- Build frontend
cd react_app npm install npm run build sudo cp -r build/* /var/www/coralfuture.org/
- Rebuild backend containers
docker compose build docker compose up -d
- Static files / migrations (when needed)
docker compose exec django-app python manage.py migrate docker compose exec django-app python manage.py collectstatic --noinput
- Reload nginx
sudo nginx -t && sudo systemctl reload nginx
usersapp: wraps Django auth, adds profile info, and exposes/api/auth/...endpoints for login/logout, cart management, CSV uploads, and ED50 calculations. Superusers manage accounts via/admin/.projectsapp: handles studies (projects) and associated colonies/observations. React pulls these via/api/public/projectsand details via/api/public/projects/<id>/.- “Studies”/“cart” flow: authenticated users build a cart of colonies (
UserCart,CartGroup) through the API, then export ED tables via/api/auth/cart/export/. Upload endpoints (upload-csv,check-csv-ed50,calculate-ed50) persist uploads for review.