Installation
The Rahat Project C2C is a monorepo designed to facilitate a Crypto-2-Crypto flow. This project includes advanced features such as:
- 💰 Deposit Token Feature with QR code functionality
- 👥 User Roles and Permissions with whitelisting for disbursement transactions
- ✅ Disbursement Approvals with detailed execution information
- 🔐 Multi-sig Disbursement Flow directed back to the safe wallet
⚠️ Important: This project is dependent on the
rahat-platform
project, which must be set up and running before starting the Rahat Project C2C.
🎯 Prerequisites
Before setting up the C2C project, ensure your system has the following dependencies installed:
- 🐳 Docker: Version 20.10.7 or higher
- 🟢 Node.js: Version 20.10.0 or higher
- 📦 pnpm: Version 6.16.1 or higher
🚨 Required: Rahat Platform Setup
Before beginning the C2C project setup, ensure the rahat-platform
project is set up and running by following the instructions in the Setting up Local Environment guide.
The rahat-platform must be:
- ✅ Successfully cloned and installed
- ✅ Database initialized and running
- ✅ API service running on
http://localhost:3001
- ✅ Web application running on
http://localhost:3000
🚀 Setup and Running Locally
Step 1: Clone the C2C Project
Clone the Rahat Project C2C repository using the following command:
git clone git@github.com:rahataid/rahat-project-c2c.git
cd rahat-project-c2c
Step 2: Bootstrap the Project
Navigate to the project directory and bootstrap the project using pnpm:
pnpm bootstrap
This command will:
- Install all dependencies across the monorepo
- Set up project workspaces
- Configure inter-package dependencies
Step 3: Environment Configuration
Create and configure your environment files:
# Copy environment configuration
cp .env.example .env
Important: Configure your environment variables to connect with your running rahat-platform instance.
Step 4: Start the Project
Start the project using the following command:
pnpm start
This will start all necessary services for the C2C project.
🎯 Key Features
💰 Crypto-2-Crypto CVA Flow
Deposit Token Feature
- QR Code Integration: Users can deposit via wallet or generate a QR code for easy sharing
- Flexible Deposit Options: Support for multiple deposit methods
👥 User Roles and Permissions
- Whitelisting System: Implement whitelisting for users who can access disbursement transactions
- Role-Based Access Control: Granular permissions for different user types
✅ Disbursement Approvals
- Detailed Execution Information:
- Track the person who executed the last transaction
- Include timestamps instead of just dates
- Comprehensive audit trail
🔐 Multi-Sig Disbursement
- Secure Disbursement Flow: Multi-signature process for enhanced security
- Safe Wallet Integration: Direct flow back to the safe wallet
🛠️ Development Scripts
The C2C project includes several helpful development scripts:
Command | Description |
---|---|
pnpm bootstrap | Install dependencies and set up workspaces |
pnpm start | Start all services in development mode |
pnpm build | Build all packages |
pnpm test | Run tests across all packages |
pnpm lint | Run linting across all packages |
✅ Verify Your Setup
-
Ensure rahat-platform is running:
- API:
http://localhost:3001/api/health
- Web App:
http://localhost:3000
- API:
-
Access the C2C project interface
-
Test the deposit token feature with QR code generation
-
Verify user roles and permissions are working correctly
🔗 Related Documentation
🆘 Troubleshooting
If you encounter issues during setup:
- Ensure rahat-platform is running: The C2C project depends on the core platform
- Check Docker services: Ensure PostgreSQL and Redis are running
- Verify Node.js version: Use Node.js 20.10.0 or higher
- Clear cache: Try
pnpm store prune
and reinstall dependencies
For more detailed troubleshooting, refer to the Troubleshooting Guide.