A comprehensive web application for exploring and filtering climate scenarios from various publishers. The application follows the 12-factor app methodology.
- Frontend: Svelte/SvelteKit with TypeScript
- Backend: Rust API with Actix-web
- Database: PostgreSQL
- Browse climate scenarios from various publishers
- Filter scenarios by publisher, region, stakeholder, sector, type, temperature target, and year
- View detailed information about each scenario
- Responsive design that works on all devices
This application follows the 12-factor app methodology:
- Codebase: One codebase tracked in version control
- Dependencies: Explicitly declared and isolated
- Config: Stored in environment variables
- Backing services: Treated as attached resources
- Build, release, run: Strict separation of build and run stages
- Processes: Application runs as stateless processes
- Port binding: Services exposed via port binding
- Concurrency: Scale via the process model
- Disposability: Fast startup and graceful shutdown
- Dev/prod parity: Development, staging, and production as similar as possible
- Logs: Treated as event streams
- Admin processes: Run admin tasks as one-off processes
- Docker and Docker Compose
- Rust (for local development of the API)
- Node.js (for local development of the frontend)
The easiest way to run the entire application stack is with Docker Compose:
docker-compose up
This will start the database, API, and frontend services. The application will be accessible at http://localhost:3000.
cd api
# Install dependencies and run
cargo run
cd frontend
# Install dependencies
npm install
# Start development server
npm run dev
The API provides the following endpoints:
GET /api/health
: Health check endpointGET /api/scenarios
: List all scenarios with optional filter parametersGET /api/scenarios/:id
: Get detailed information about a specific scenarioGET /api/scenarios/filters/options
: Get available filter options
The database includes the following main tables:
scenarios
: Core climate scenario informationpublishers
: Organizations that publish scenariosregions
: Geographic regions relevant to scenariosstakeholders
: Groups interested in or affected by scenariossectors
: Economic sectors addressed in scenarios
This project is open source and available under the MIT License.