This repository contains a quick proof of concept for an API to serve outputs from the Rapid Evaluation Framework (REF). This system enables near real-time evaluation of Earth system models.
This is a full-stack application that consists of a:
- Backend: API
- FastAPI, OpenAPI documentation
- Frontend: React frontend
- TypeScript, Tanstack Query, Shadcn, Vite
Status: Pre-Alpha
The REF Web Application provides researchers and scientists with tools to:
- Perform model evaluations quickly
- Visualize evaluation results
- Compare models against benchmark data
- Access evaluation metrics and diagnostics
- Python 3.10+
- PostgreSQL database
- Node.js v20 and npm (for frontend)
- Docker and Docker Compose (optional)
- Clone the repository
git clone https://github.com/Climate-REF/ref-app.git
cd ref-app
- Set up environment variables
Create a .env
file in the project root with the following variables:
PROJECT_NAME=REF Web Application
SQLALCHEMY_DATABASE_URI=postgresql://user:password@localhost:5432/refdb
BACKEND_CORS_ORIGINS=http://localhost:3000,http://localhost:5173
- Install dependencies
cd backend
make virtual-environment
- Start the backend server
make dev
- Generate Client
make generate-client
- Install dependencies
cd frontend
npm install
- Start the frontend server
npm run dev
ref-app/
├─�� .env # Environment variables
├── Makefile # Project automation tasks
├── backend/
│ ├── src/
│ │ └── ref_backend/ # Main package
│ │ ├── api/ # API endpoints
│ │ ├── core/ # Core functionality
│ │ └── main.py # Application entry point
│ ├── tests/ # Test suite
│ └── pyproject.toml # Python dependencies
When the backend is running, API documentation is available at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
- OpenAPI JSON: http://localhost:8000/api/v1/openapi.json