Experience seamless on-chain gaming, decentralized finance, and NFT trading all in one revolutionary platform powered by multiple blockchains.
Play to earn, own your assets, and compete in the ultimate blockchain gaming ecosystem with featured games and leaderboards.
Trade, stake, and earn with advanced DeFi protocols designed for the gaming ecosystem with real-time liquidity pools and trading data.
Welcome! ๐ This guide will walk you through setting up the Decentralized Gaming & DeFi Platform on your computer for development or testing. No prior coding knowledge is required โ just follow the steps carefully.
Before setting up the Decentralized Gaming & DeFi Platform, you need to install three tools:
Node.js allows you to run JavaScript on your computer. Our project requires version 22.
Install:
- Go to the Node.js download page.
- Download the LTS (Long-Term Support) version 22 for your operating system (Windows, macOS, or Linux).
- Run the installer and follow the instructions.
- โ Important: During installation, check the box: "Automatically install the necessary tools"
Verify installation: Open your terminal (Command Prompt on Windows, Terminal on macOS/Linux) and run:
node -vExpected output:
v22.x.x
๐ก Node.js automatically installs npm (Node Package Manager), so you don't need to install npm separately.
npm is used to install the extra libraries our project needs.
Verify installation (already installed with Node.js):
npm -vExpected output:
10.x.x
Git lets you download and manage the project's source code.
Install:
- Go to the Git official website.
- Download the correct version for your operating system.
- Run the installer โ keep the default settings unless you know otherwise.
Verify installation:
git --versionExpected output:
git version 2.x.x
Once you have Node.js, npm, and Git installed, follow these steps:
Copy the project from Bitbucket to your computer:
git clone https://bitbucket.org/arcadix-app/mvp/src/mainMove into the project folder:
cd mainInstall all required software packages (both frontend and backend):
npm installThis may take a few minutes. After success, you'll see a new folder called node_modules inside the project.
Run the project locally (both frontend and backend):
npm run dev- Your default browser should open automatically.
- If not, open http://localhost:8080 manually.
- You should now see the Decentralized Gaming & DeFi Platform running ๐
The platform includes a powerful backend server that provides APIs and real-time updates for all features.
- RESTful APIs for Gaming, DeFi, NFT, Launchpad, and Governance
- WebSocket Support for real-time market data and game updates
- Mock Data System with realistic gaming and DeFi data
- Security Features including CORS, rate limiting, and Helmet protection
- Comprehensive Error Handling and logging
- Server URL: http://localhost:3001
- Health Check: http://localhost:3001/health
- API Base: http://localhost:3001/api
- WebSocket: ws://localhost:3001
GET /api/gaming/games- List all gamesGET /api/gaming/games/:id- Get game detailsGET /api/gaming/leaderboard- Gaming leaderboardPOST /api/gaming/games/:id/start- Start game sessionPOST /api/gaming/games/:id/end- End game session
GET /api/defi/pools- List liquidity poolsGET /api/defi/overview- DeFi market overviewGET /api/defi/leaderboard- DeFi leaderboardPOST /api/defi/swap- Execute token swaps
GET /api/nft/collections- List NFT collectionsGET /api/nft/nfts- List all NFTsPOST /api/nft/nfts/:id/list- List NFT for salePOST /api/nft/nfts/:id/buy- Buy NFT
GET /api/launchpad/projects- List launchpad projectsPOST /api/launchpad/projects/:id/participate- Participate in IDO
GET /api/governance/proposals- List governance proposalsPOST /api/governance/proposals/:id/vote- Vote on proposal
The backend provides real-time updates via WebSocket:
const ws = new WebSocket('ws://localhost:3001');
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
switch (data.type) {
case 'market_data_update':
// Handle market data updates
break;
case 'game_update':
// Handle game updates
break;
case 'defi_update':
// Handle DeFi updates
break;
}
};npm run dev:backendThe backend server logs all API requests, WebSocket connections, and errors to the console.
Create a .env file in the backend directory:
PORT=3001
NODE_ENV=development
FRONTEND_URL=http://localhost:8080The React frontend provides a modern, responsive interface for all platform features.
- Responsive Design - Works on desktop, tablet, and mobile
- Real-time Updates - Live data from WebSocket connections
- Modern UI Components - Built with Radix UI and Tailwind CSS
- Type Safety - Full TypeScript support
- State Management - TanStack React Query for server state
- Application URL: http://localhost:8080
- Development Server: http://localhost:8080
- Build Output:
dist/directory
npm run dev:frontendnpm run build:frontendnpm run dev # Start frontend AND backend simultaneouslynpm run dev:frontend # Start only frontend
npm run dev:backend # Start only backendnpm run build # Build both frontend and backend
npm run build:frontend # Build only frontend
npm run build:backend # Build only backendnpm run lint # Lint frontend code
npm run clean # Clean all build artifactsconst response = await fetch('http://localhost:3001/api/gaming/games');
const games = await response.json();
console.log(games.data); // Array of gamesconst ws = new WebSocket('ws://localhost:3001');
ws.onopen = () => {
ws.send(JSON.stringify({
type: 'subscribe',
action: 'market_data'
}));
};const response = await fetch('http://localhost:3001/api/user/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email, password })
});curl http://localhost:3001/healthExpected: {"status":"OK","timestamp":"...","uptime":...}
Open http://localhost:8080 in your browser Expected: DApp homepage loads successfully
curl http://localhost:3001/api/gaming/gamesExpected: JSON response with games data
Use browser console or a WebSocket testing tool to connect to ws://localhost:3001
Port Already in Use
- Frontend (8080): Change port in
vite.config.ts - Backend (3001): Change port in
.envfile
Dependencies Missing
npm installBackend Won't Start
- Check if port 3001 is available
- Verify
.envfile exists - Check console for error messages
Frontend Won't Load
- Check if port 8080 is available
- Verify all dependencies are installed
- Check browser console for errors
WebSocket Connection Failed
- Ensure backend is running
- Check firewall settings
- Verify WebSocket URL format
- Check the console output for error messages
- Verify all prerequisites are installed correctly
- Ensure no other services are using the required ports
- Check the backend logs for API errors
โ That's it! You now have the Decentralized Gaming & DeFi Platform running locally with both frontend and backend fully operational.
- Explore the APIs: Test different endpoints using tools like Postman or curl
- Modify the Frontend: Edit React components in the
src/directory - Extend the Backend: Add new routes in
backend/src/routes/ - Customize Data: Modify mock data in
backend/src/data/mockData.js - Add Real Database: Replace mock data with MongoDB or PostgreSQL
- Deploy: Build and deploy to your preferred hosting platform
Happy coding! ๐