Joseph Ferano 9b753cf103 Porting database from SQLite to PostgreSQL
- New Postgres table schemas
- Using Stored Procedures with transactions that validate business logic
- User Ids now use UUID
- Updated and simplified all endpoints to call the stored procedures

Notes: There are still a few things missing that broke because of the migration,
in particular, because we moved a lot of the business logic into the database,
we now require that certain data that lived in the game-config.json to be
present in the database as well, to prevent cheating and truly have a single
source of truth.
2023-03-30 14:13:30 +07:00
2023-03-19 10:21:19 +07:00
2023-03-19 10:21:19 +07:00
2023-02-09 21:38:59 +07:00
2023-02-09 21:38:59 +07:00
2023-02-24 13:37:07 +07:00

#Moon Miners

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev

Dotenv

Fill the following out:

DB_USER=
DB_PASSWORD=
DB_HOST=
DB_PORT=
DB_DATABASE=

API Endpoints

POST /user/login check if user exists GET /user/USER_ID/stakes get stake event POST /user/USER_ID/stakes/claim claim stake POST /user/USER_ID/stakes/start start stake GET /user/USER_ID/bank-account get balance PUT /user/USER_ID/bank-account sell resource GET /user/USER_ID/inventory-items get inventory items POST /user/USER_ID/inventory-items buy item GET /user/USER_ID/staking-sources get staking sources POST /user/USER_ID/staking-sources create staking source

Description
No description provided
Readme 19 MiB
Languages
TypeScript 78.6%
PLpgSQL 20.1%
JavaScript 0.6%
Python 0.5%
Dockerfile 0.2%