🛠️ Setting up Local Environment
Follow these steps to set up your local development environment for Rahat. The setup consists of two main parts:
- 🏗️ Setting up the core Rahat platform (rahat-platform and rahat-ui)
- 🎯 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
CVA Project Setup (Recommended for New Users)
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:
🎓 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
- Start the platform services:
# In rahat-platform directory
pnpm run start:dev
# In rahat-ui directory (new terminal)
pnpm run dev
- Start your project services:
# In rahat-cva directory (new terminal)
pnpm run dev
✅ Verify Your Setup
- Access the web application at
http://localhost:3000
- Sign in with the default administrator credentials:
- 👤 Email:
admin@example.com
- 🔑 Password:
rahat123
- 👤 Email:
- Check the API health at
http://localhost:3001/api/health
🛠️ Development Scripts
The repository includes several helpful development scripts:
Command | Description |
---|---|
pnpm run dev | Start all services in development mode |
pnpm run build | Build all packages |
pnpm run test | Run tests across all packages |
pnpm run lint | Run linting across all packages |
❓ Troubleshooting
If you encounter any issues during setup, please refer to the Troubleshooting Guide for solutions to common problems.