Skip to content

Resilience Atlas - Evidence-based decision-making around resilience

License

Notifications You must be signed in to change notification settings

ConservationInternational/resilienceatlas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3,351 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Resilience Atlas

Backend Tests Frontend Tests Integration Tests

Architecture

Directory Description Documentation Tech Stack
frontend Frontend application frontend/README.md React 19.2.0, Next.js 16.1.1, Node.js 24.0.0
backend Ruby on Rails backend (API + backoffice) backend/README.md Ruby 3.4.8, Rails 7.2.x
cloud_functions AWS Lambda functions cloud_functions/README.md AWS Lambda
infrastructure Terraform for TiTiler COG tiler infrastructure/README.md Terraform, AWS
data Data processing scripts data/README.md Various tools

Environments

Quick Start

Prerequisites

Development Setup

  1. Set up environment variables

    cp .env.example .env
    cp frontend/.env.example frontend/.env
    cp backend/.env.sample backend/.env
  2. Start the development environment

    docker compose -f docker-compose.dev.yml up --build

    This starts:

  3. Admin Panel Access

    The admin panel is available at http://localhost:3001/admin with the following default credentials:

    Field Value
    Email admin@example.com
    Password password

Hybrid Development (Database in Docker, Apps Local)

For faster development iteration, you can run only the database in Docker while running the frontend and backend locally:

  1. Start only the database

    docker compose -f docker-compose.dev.yml up -d db
  2. Start the backend (requires Ruby 3.4.8)

    cd backend
    bundle install
    bin/rails db:setup    # First time only
    bin/rails server -p 3001
  3. Start the frontend (requires Node.js 24.0.0)

    cd frontend
    npm install
    npm run dev

The frontend will be available at http://localhost:3000 and the backend at http://localhost:3001.

Note: This approach requires having the correct Ruby and Node.js versions installed locally. Use the full Docker setup if you don't have these versions available.

Running Tests

Backend Tests

# Run all backend tests
docker compose -f docker-compose.test.yml run --rm backend-test ./bin/test

# Individual commands
docker compose -f docker-compose.test.yml run --rm backend-test ./bin/test rspec    # Unit tests
docker compose -f docker-compose.test.yml run --rm backend-test ./bin/test lint     # StandardRB
docker compose -f docker-compose.test.yml run --rm backend-test ./bin/test security # Brakeman
docker compose -f docker-compose.test.yml run --rm backend-test ./bin/test system   # Browser tests

Frontend Tests

# Run all frontend checks
docker compose -f docker-compose.test.yml run --rm --no-deps frontend-test ./bin/test

# Individual commands
docker compose -f docker-compose.test.yml run --rm --no-deps frontend-test ./bin/test lint
docker compose -f docker-compose.test.yml run --rm --no-deps frontend-test ./bin/test type-check
docker compose -f docker-compose.test.yml run --rm --no-deps frontend-test ./bin/test build

Integration Tests

docker compose -f docker-compose.test.yml up --abort-on-container-exit

Documentation

License

See LICENSE for details.

About

Resilience Atlas - Evidence-based decision-making around resilience

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 22