This guide walks you through cloning the Spades Online repository, configuring your environment, running the database migrations, and starting the server locally. By the end you will have a fully functional game server running on your machine with the built-in web client accessible in your browser — no build step required.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Antonelli-Tech-Solutions/spades/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure you have the following installed and running on your machine:
- Node.js 18+ — the server uses ES Modules and native
node:crypto - PostgreSQL — any recent version; used for player accounts, game history, and social data
- Redis — any recent version; used for sessions, lobby state, presence, and pub/sub
Setup
Clone and install
Clone the repository and install dependencies. There is no build step — the server runs directly from source using Node.js ES Modules.
Start PostgreSQL and Redis
Make sure both services are running before you proceed. If you installed them via a package manager or Docker, start them with your usual commands. Your connection strings will look something like these:Create the
spades database in PostgreSQL if it does not already exist:Set environment variables
The server reads all configuration from environment variables. Only two are required to start:Replace
user and password with your PostgreSQL credentials. See the Environment Variables reference for the full list of optional settings.Run database migrations
Apply all five migrations in order. Each file is idempotent (
CREATE TABLE IF NOT EXISTS) so it is safe to re-run them.Start the server
Start the server with:The server listens on port
3000 by default. Open http://localhost:3000 in your browser to access the web client. You should see the Spades Online sign-in screen.Development Shortcuts
Skip email verification
If you do not have an SMTP server configured, verifying accounts via email is not possible. SetDEV_AUTO_VERIFY=true when starting the server to mark new registrations as verified immediately — no email is sent and you can log in straight away:
Bot players
You can fill any empty seat at a table with a bot player to test gameplay without needing four human players. The table host sends a request specifying the target seat:GET /api/tables/:tableId/state as normal. Once all four seats are filled (by any mix of humans and bots), the game starts automatically.
Running Tests
DATABASE_URL to be set and will be skipped if it is absent.
To run the linter separately:
test/integration directory. The same check runs in CI before the test suite.
Next Steps
Environment Variables
Configure SMTP email, custom ports, rate limiting, and more.
Architecture
Understand how the WebSocket engine, Redis pub/sub, and game state machine work together.