Bounty Board is a platform where users can post and claim bounties. The system consists of two servers:
- Main Server (Next.js) – Handles frontend and user interactions.
- Verus Server (Express.js) – Manages authentication, payments, and external integrations for verus.
- Database (MongoDB) – Stores users, bounties, and transactions.
- Frontend: React, Tailwind CSS
- Backend: Express.js, Next.js
- Database: MongoDB
- Authentication: JWT (JSON Web Tokens)
- API Communication: REST API between servers
Before installing and running this project, make sure you have the following installed on your system:
-
MongoDB – Database for storing bounties and users
- Download & Install MongoDB
- Ensure MongoDB is running:
mongod --version
-
Nginx – Used as a reverse proxy for production
- Install on Ubuntu/Debian:
sudo apt update && sudo apt install nginx -y - Install on macOS (Homebrew):
brew install nginx
- Install on Ubuntu/Debian:
-
Node.js (v18+) – Required for running Next.js and Express
- Download Node.js
- Check installation:
node -v
-
Yarn – Package manager for dependencies
- Install globally:
npm install -g yarn
- Verify installation:
yarn -v
- Install globally:
- Clone the repository:
$ git clone https://github.com/darkddev/bounty-board.git
$ cd bounty-board- Install dependencies
- Install for the Main Server:
$ cd web
$ yarn install- Install for Verus Server
$ cd verus
$ yarn install- Set up environment variables: Create a .env file in web(main server) and verus(server).
🌍 Main Server (.env)
NEXT_PUBLIC_APP_URL=https://bountyboard.com
MONGODB_URI=mongodb://localhost:27017/bountyboard
SESSION_SECRET=your_secret_key🔐 Verus Server (.env)
APP_URL=https://bountyboard.com
CHAIN="VRSC"
CHAIN_IADDRESS="i5w......B6MGV"
API="https://api.verus.services"
SIGNING_IADDRESS="iAv9t.....PAdtk"
PRIVATE_KEY="UxC9.....pmW1xnP"- Configure Nginx:
Create a new Nginx configuration file:
$ sudo nano /etc/nginx/sites-available/bountyboardAdd the following configuration:
server {
# listen 5000;
listen 80;
server_name yourdomain.com; # Change to your domain or IP
location / {
proxy_pass http://localhost:3000; # Next.js Main Server
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}Enable the configuration:
$ sudo ln -s /etc/nginx/sites-available/bountyboard /etc/nginx/sites-enabled/Restart nginx:
$ sudo systemctl restart nginx- Start the Database (MongoDB):
Ensure MongoDB is running locally
- Start the Verus Server (Express.js):
$ cd verus
$ yarn startRuns on http://localhost:9000
Or you can run the verus server using pm2
$ cd verus
$ pm2 start "yarn start" --name verus-server- Start the Main Server (Next.js):
$ cd web
$ yarn build
$ yarn startRuns on http://localhost:3000
Or you can run the verus server using pm2
$ cd verus
$ yarn build
$ pm2 start "yarn start" --name main-server