Play Money is a prediction market platform. This codebase is structured as a monorepo using Turborepo, containing multiple standalone apps and shared feature packages.
- apps: Standalone apps, such as
web
,backend
, etc. - packages: Shared libraries split by feature, colocating backend and frontend logic together.
- Node.js >= 18
- npm
-
Clone the repository:
git clone https://github.com/casesandberg/play-money.git
-
Install dependencies:
npm install
-
Set up postgres database:
- Follow the Installation instructions.
- Set a password during installation and accept default settings for other options.
- Open a terminal and run:
psql -U postgres
- Enter the password you set during installation.
- Create a new database for local development:
CREATE DATABASE playmoney;
-
Set up environment variables:
- Create a
.env
file based on the.env.example
file provided. - (Reach out to @casesandberg to get the shared dev env if you wish)
- Create a
-
Start development servers:
npm run dev
- This will start all necessary servers:
- Web app: localhost:3000
- Backend server: localhost:3001
- Database viewer: localhost:5555
- Storybook: localhost:6006
- This will start all necessary servers:
- Eslint and Prettier are used to enforce consistent code style.
- Before merging a pull request, please format your code:
npm run format
- Alternatively, use a code editor that formats on file save.
- Make sure your code adheres to the style guidelines.
- Feel free to reach out to maintainers for questions or clarifications.