Skip to main content

🛠️ Setting up Local Environment

Follow these steps to set up your local development environment for Rahat. The setup consists of two main parts:

  1. 🏗️ Setting up the core Rahat platform (rahat-platform and rahat-ui)
  2. 🎯 Setting up a specific project implementation (CVA by default)

📋 Prerequisites

Before you begin, ensure you've installed all the required dependencies mentioned in the Requirements page.


🏗️ Part 1: Setting up Core Rahat Platform

📥 Step 1: Clone the Core Repositories

# Clone the platform repository
git clone https://github.com/rahataid/rahat-platform.git
cd rahat-platform

# Bootstrap the platform
pnpm bootstrap # This will install all the dependencies run the required services and build the platform

# setup the
cp .env.example .env

# Run the platform
pnpm run start:dev

Part 2: Setting up the UI

# Clone the UI repository
git clone https://github.com/rahataid/rahat-ui.git
cd rahat-ui


# Bootstrap the UI
pnpm i # This will install all the dependencies run the required services and build the UI

# setup the
cp .env.example .env

# Run the UI
pnpm run dev

🎯 Part 2: Setting up Project Implementation

The CVA (Cash and Voucher Assistance) project demonstrates the basic implementation of Rahat.

# Clone the CVA project repository
git clone https://github.com/rahataid/rahat-project-rp.git
cd rahat-project-rp

# Bootstrap the CVA project
pnpm bootstrap # This will install all the dependencies run the required services and build the CVA project

# setup the
cp .env.example .env

# Run the CVA project
pnpm run dev

🎨 Other Project Implementations

Looking to set up a different Rahat project? Choose from our available implementations below:

🌾 C2C Project

Crypto Transfer Project.

View Setup Guide →

💝 Anticipatory Action

Antcipatory Action project.

View Setup Guide →

🏥 Cash Voucher Assistance

Cash Voucher assistance projects.

View Setup Guide →

🎓 Custom Projects

Custom Project setup

Note: Each project has its own specific requirements and configuration steps. Make sure to follow the detailed setup guide for your chosen implementation.

Want to create a custom implementation? Check out our Custom Project Setup Guide to learn how to build your own Rahat-based solution.


🚀 Running the Complete Stack

  1. Start the platform services:
# In rahat-platform directory
pnpm run start:dev

# In rahat-ui directory (new terminal)
pnpm run dev
  1. Start your project services:
# In rahat-cva directory (new terminal)
pnpm run dev

✅ Verify Your Setup

  1. Access the web application at http://localhost:3000
  2. Sign in with the default administrator credentials:
    • 👤 Email: admin@example.com
    • 🔑 Password: rahat123
  3. Check the API health at http://localhost:3001/api/health

🛠️ Development Scripts

The repository includes several helpful development scripts:

CommandDescription
pnpm run devStart all services in development mode
pnpm run buildBuild all packages
pnpm run testRun tests across all packages
pnpm run lintRun linting across all packages

❓ Troubleshooting

If you encounter any issues during setup, please refer to the Troubleshooting Guide for solutions to common problems.