Development Setup
This documentation page was initially generated by AI to bootstrap the documentation structure. Content may be incomplete or contain inaccuracies. We welcome contributions to improve it.
This guide will help you set up a local development environment for CHASE.
Prerequisites
Before you begin, ensure you have the following installed:
- Node.js 20.x or later
- Bun (recommended) or npm/yarn
- Docker and Docker Compose
- Git
Getting the Code
Clone the repository:
git clone https://github.com/DeutscheModelUnitedNations/munify-chase.git
cd munify-chase
Installation
Install dependencies using Bun:
bun install
Or with npm:
npm install
Database Setup
CHASE uses PostgreSQL. Start the database with Docker:
docker compose up -d postgres
Run database migrations:
bun run prisma migrate dev
Seed the database with sample data (optional):
bun run prisma db seed
Authentication Setup
CHASE requires an OIDC provider for authentication. For local development, you can use:
Option 1: Mock OIDC Provider
Start the included mock provider:
docker compose up -d mock-oidc
Option 2: External Provider
Configure your .env file with your OIDC provider details:
OIDC_ISSUER=https://your-provider.com
OIDC_CLIENT_ID=your-client-id
OIDC_CLIENT_SECRET=your-client-secret
Environment Configuration
Create a .env file from the example:
cp .env.example .env
Key environment variables:
| Variable | Description |
|---|---|
DATABASE_URL | PostgreSQL connection string |
OIDC_ISSUER | Authentication provider URL |
OIDC_CLIENT_ID | OAuth client ID |
OIDC_CLIENT_SECRET | OAuth client secret |
Running the Development Server
Start the development server:
bun run dev
The application will be available at http://localhost:3000.
Running Tests
Run the test suite:
bun test
Run tests with coverage:
bun test --coverage
Common Issues
Database Connection Errors
Ensure PostgreSQL is running:
docker compose ps
Check your DATABASE_URL in .env.
Authentication Errors
Verify your OIDC configuration and ensure the provider is accessible.
Next Steps
- Contributing Guide - How to contribute to CHASE
- GitHub Repository - Source code and issues