Server & Database Setup - bym-refitted/backyard-monsters-refitted GitHub Wiki
Before proceeding with the setup, please ensure the following tools are installed:
Tool | Download Link | Notes |
---|---|---|
Git | git-scm.com/downloads | Required for cloning the repository and version control |
PostgreSQL | postgresql.org/download | Database server |
pgAdmin | Usually bundled with PostgreSQL | Optional but recommended database management tool |
Redis | redis-windows releases | Choose the cygwin.zip version (not the service) |
Node.js | nodejs.org | LTS version recommended |
Beekeeper Studio | beekeeperstudio.io | Optional database management tool |
We have adopted PostgreSQL with MikroORM due to its advanced transaction handling, JSONB support, and strong consistency guaranteesβmaking it ideal for scalable, high-performance applications.
-
Download PostgreSQL
Install it here. We recommend allowing the installer to include pgAdmin (it should by default). -
Set the Password
During installation, set the password for thepostgres
user todev12345
β this matches the default in our.env
file. If you choose a different password, be sure to update.env
. -
Create the Database
Open pgAdmin, expand Servers, and create a new database calledbym
.
We use Redis to store user tokens, providing fast and efficient in-memory read/writes.
-
Choose the
cygwin.zip
version (not the service). -
Extract the ZIP to a folder (e.g., Desktop).
-
Run
redis-server.exe
to launch Redis.

Our backend is a Node.js web server using Koa with TypeScript.
-
Open your terminal and navigate to the server directory:
cd server
-
Install dependencies:
npm install
-
Initialize the database tables:
npm run db:init
-
Compile and run the server:
npm run db:init
If successful, the admin dashboard will be available at http://localhost:3001/
Configuration can be modified via the
.env
file.
For managing your database, we recommend using Beekeeper Studio.
- Open Beekeeper β New Connection β Select PostgreSQL
- Use the following details:
Connection Type: PostgreSQL
Connection Mode: Host & Port
Host: localhost
Port: 5432
User: postgres
Password: dev12345 (or your custom one)
Default Database: bym
- Give it a name and connect.
- Your tables will appear on the left panel.
- Right-click a table β View Data.
- If you haven't run the game yet, tables will be empty.
- After starting the server and running the game, refresh to view populated data.