Prerequisites
Before you begin, ensure you have the following installed:- Node.js (v18 or higher)
- pnpm (package manager)
- Rust and Cargo (for Solana program development)
- Solana CLI (v2.0 or higher)
- PostgreSQL (v14 or higher)
- Redis (for WebSocket server job queue)
- Git
SolBid enforces pnpm as the package manager. The
preinstall script will prevent installations with npm or yarn.Clone the repository
Set up the Solana program
The Solana program is located in theprograms/ directory and uses native Solana development (not Anchor).
Set up the Next.js app
The Next.js application is located in thenext-app/ directory.
Configure environment
Create a
.env file in the next-app/ directory. See the Environment variables page for required variables.Set up database
Start development server
Set up the WebSocket server
The WebSocket server is located in thews/ directory and handles real-time game updates.
Start development server
Running all components
For full local development, you need to run all three components simultaneously:Build for production
To create production builds:Next.js app
Next.js app
WebSocket server
WebSocket server
dist/ directory.Solana program
Solana program
Troubleshooting
Prisma client errors
Prisma client errors
If you encounter Prisma client errors, regenerate the client:
Package manager errors
Package manager errors
SolBid requires pnpm. If you see installation errors, make sure you’re using pnpm:
Solana program build errors
Solana program build errors
Ensure you have the correct Solana version installed:
Next steps
- Configure environment variables for all components
- Learn about the database schema
- Explore the Solana Program API and REST API