Installation Guide
Detailed installation and configuration instructions.
Installation Process Overview
System Requirements
Required
- Node.js ≥ 18
- Rust ≥ 1.70 (install using
rustup) - MySQL ≥ 5.7 or MariaDB ≥ 10.3
- Git
Recommended
- npm or pnpm package manager
- cargo (Rust package manager, installed with Rust)
Installation Steps
1. Install Node.js
Visit the Node.js official website to download and install.
Verify installation:
2. Install Rust
Install using rustup:
Verify installation:
3. Install MySQL
macOS
Ubuntu/Debian
Windows
Download the installer from the MySQL official website.
4. Clone Project
5. Install Project Dependencies
# Install root directory dependencies
npm install
# Install client dependencies
cd client && npm install && cd ..
6. Database Setup
Create Database
Run Migrations (if database already exists)
7. Configure Environment Variables
Create a .env file in the project root directory:
# Basic Services
PORT=5001
NODE_ENV=development
CLIENT_URL=http://localhost:3000
# Database
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_password
DB_NAME=rushchat
# WebSocket
REACT_APP_SOCKET_URL=http://localhost:5001
# Red Packet Contracts (Optional)
RED_PACKET_CONTRACT_ADDRESS=
SOLANA_RED_PACKET_PROGRAM_ID=
💡 Tip: You can copy
docs/ENVIRONMENT_TEMPLATE.mdas a template
8. Verify Installation
Check Database Connection
You should see the following tables: - users - messages - channels - sessions - etc...
Check Rust Compilation
Check Frontend Dependencies
Run in Development Mode
Start Backend
Start Frontend
Build for Production
Build Backend
Build Frontend
Build artifacts are in the client/build/ directory.
Next Steps
- 📖 Read Getting Started
- 🔧 Check Configuration
- 🚀 Check Deployment Guide