SimBoard is a platform for managing and comparing Earth system simulation metadata, with a focus on E3SM (Energy Exascale Earth System Model) reference simulations.
SimBoard helps researchers:
- Store and organize simulation metadata
- Browse and visualize simulation details
- Compare runs side-by-side
- Surface diagnostics and metadata-driven insights
AI-assisted capabilities are being explored to supplement these features, including automated metadata summarization, simulation comparison analysis, and intelligent discovery of patterns across runs.
- Prerequisites
- Developer Quickstart
- Repository Structure
- Development Notes
- Staging and Production Environments
- License
-
Install Docker Desktop
- Download and install: https://www.docker.com/products/docker-desktop
- Ensure Docker Desktop is running before using any Docker-based commands.
-
Install uv (Python dependency manager)
-
macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh -
Windows:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex" -
Verify installation:
uv --version
-
-
Install Node.js, npm, and pnpm
-
Install Node.js (LTS recommended): https://nodejs.org
-
Verify Node and npm:
node --version npm --version
-
Install pnpm:
npm install -g pnpm pnpm --version
-
-
Clone the repository
git clone https://github.com/E3SM-Project/simboard.git cd simboard
⚠️ This is a bare-metal development environment and is not production-accurate — it is optimized for speed.
This is the recommended daily workflow:
- Fastest hot reloads
- Best debugging experience
- No Docker overhead
cd simboard
# 1. Setup development assets (env files + certs + DB + deps)
make setup-local
# 2. (First time only) Create an admin account (interactive)
make backend-create-admin
# 3. Start backend (terminal 1)
make backend-run
# 4. Start frontend (terminal 2)
make frontend-run
# 5. Open API and UI
open https://127.0.0.1:8000/docs
open https://127.0.0.1:5173For a list of all make commands, run:
make help-
Click “New OAuth App”.
-
Fill in:
-
Application name: SimBoard (local)
-
Homepage URL: https://127.0.0.1:5173
-
Authorization callback URL:
https://127.0.0.1:8000/api/v1/auth/github/callback
-
-
Click Register application.
-
Copy the generated:
- Client ID
- Client Secret
Add the credentials to:
.envs/local/backend.envExample:
GITHUB_CLIENT_ID=your_client_id
GITHUB_CLIENT_SECRET=your_client_secret
# Must match GitHub OAuth callback URL exactly
GITHUB_REDIRECT_URL=https://127.0.0.1:8000/auth/github/callback
# Generate securely:
# python -c "import secrets; print(secrets.token_urlsafe(64))"
GITHUB_STATE_SECRET_KEY=your_secretRestart the backend after updating environment variables.
For local development, SimBoard uses local HTTPS with development certificates:
certs/local.crt
certs/local.keyThese files are generated automatically with make install. To re-generate, run:
make gen-certsUsed automatically by:
- FastAPI (Uvicorn SSL)
- Vite (via
VITE_SSL_CERT,VITE_SSL_KEY)
- Backend dependencies managed using uv
- Frontend dependencies managed using pnpm
Use GitHub Issues to report bugs or propose features. Pull requests should include tests + documentation updates.
simboard/
├── backend/ # FastAPI, SQLAlchemy, Alembic, OAuth, metadata ingestion
├── frontend/ # Vite + React + Tailwind + shadcn
├── .envs/ # Env configs: example/ (templates, committed) + local/ (developer values, ignored)
├── docker-compose.local.yml
├── docker-compose.yml
├── Makefile # unified monorepo automation
└── certs/ # dev HTTPS certificatesThis repository uses pre-commit to enforce consistent checks for both the backend (Python) and frontend (TypeScript).
Pre-commit runs automatically on git commit and will block commits if checks fail.
Always run pre-commit from the repository root.
Some hooks (e.g., mypy) rely on config paths like backend/pyproject.toml. Running from a subdirectory can cause incorrect or inconsistent results.
✅ Correct:
pre-commit run --all-files❌ Incorrect:
cd backend
pre-commit run --all-filesCI also runs pre-commit from the repo root.
Backend:
- Ruff (lint + format)
- mypy (type checking)
Frontend:
- ESLint
- Prettier
All hooks are configured in the root .pre-commit-config.yaml.
After cloning:
make installThis will:
- Create the backend
uvenvironment (if missing) - Install dependencies
- Install git hooks
To reinstall hooks only:
make pre-commit-installmake pre-commit-runOr:
uv run pre-commit run --all-files- Python hooks run via
uv - Frontend hooks run via
pnpm - Required tools (
uv,pnpm,node) must be available in your systemPATH - Hooks auto-fix most formatting issues; re-stage files and re-commit if needed
git commit --no-verifyUse only when absolutely necessary.
- Harbor Registry: https://registry.nersc.gov/harbor/projects
- Rancher Dashboard: https://rancher2.spin.nersc.gov/dashboard/c/c-fwj56/explorer/apps.deployment
- Full Deployment Guide: docs/cicd/DEPLOYMENT.md
SimBoard uses automated CI/CD pipelines to build and deploy containers to NERSC Spin.
- Development Backend: Automatically built and pushed to NERSC registry on every push to
main - Development Frontend: Automatically built and pushed to NERSC registry on every push to
main - Production Backend & Frontend: Automatically built and pushed on GitHub Releases or version tags (e.g.,
v0.3.0)
Registry: registry.nersc.gov/e3sm/simboard/
If you need to manually build and push images:
Login to registry:
docker login registry.nersc.govBackend:
cd backend
docker buildx build \
--platform=linux/amd64,linux/arm64 \
--build-arg ENV=production \
-t registry.nersc.gov/e3sm/simboard/backend:manual \
--push \
.Frontend:
cd frontend
docker buildx build \
--platform=linux/amd64,linux/arm64 \
--build-arg VITE_API_BASE_URL=https://simboard-api.e3sm.org \
-t registry.nersc.gov/e3sm/simboard/frontend:manual \
--push \
.Service accounts are required when non-interactive systems (e.g., HPC ingestion jobs or automation) need to authenticate to the SimBoard API.
-
Ensure the backend is deployed and reachable (e.g.,
https://simboard-dev-api.e3sm.org). -
Run the provisioning script from your local machine:
cd backend uv run python -m app.scripts.users.provision_service_account \ --service-name perlmutter-ingestion \ --base-url https://simboard-dev-api.e3sm.org \ --admin-email admin@simboard.org \ --expires-in-days 365 -
Enter the admin password when prompted.
-
Copy the generated API token and store it securely (e.g., Kubernetes Secret).
kubectl -n <namespace> create secret generic simboard-perlmutter-ingestion \
--from-literal=api_token='<TOKEN>'Use this secret in your HPC job or service configuration.
> The token is shown only once. Store it securely and rotate as needed.Export the token:
export SIMBOARD_API_TOKEN=<TOKEN>Submit an ingestion request:
curl -X POST https://simboard-dev-api.e3sm.org/api/v1/ingestions/from-path \
-H "Authorization: Bearer $SIMBOARD_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"archive_path": "/global/cfs/cdirs/e3sm/simulations/archive.tar.gz",
"machine_name": "perlmutter",
"hpc_username": "<your_hpc_username>"
}'Python example:
import requests
API_BASE = "https://simboard-dev-api.e3sm.org/api/v1"
TOKEN = "<TOKEN>"
resp = requests.post(
f"{API_BASE}/ingestions/from-path",
json={
"archive_path": "/global/cfs/cdirs/e3sm/simulations/archive.tar.gz",
"machine_name": "perlmutter",
"hpc_username": "<your_hpc_username>"
},
headers={"Authorization": f"Bearer {TOKEN}"},
)
print(resp.json())docker container ls # List running containers
docker image ls # List local images
docker tag <src> <dest> # Tag an imageFor complete deployment instructions, release process, and troubleshooting, see docs/cicd/DEPLOYMENT.md
TBD