EDHTop16 is open-source and welcoming to new contributions! Please see our issues tab for work we need help with! The application is written using Next.js, Relay, and Prisma. The following prerequisites are required for local development:
- Node.js
- Postgresql
To set up a Postgresql instance suitable for local development:
CREATE DATABASE edhtop16;
CREATE USER edhtop16;
ALTER ROLE edhtop16 WITH superuser;
Then clone this repository and create a new file named .env
with the following
contents:
DATABASE_URL="postgresql://edhtop16@localhost:5432/edhtop16"
Finally, run the following commands to install dependencies and initialize a local database with some test data:
npm install
npx prisma migrate dev
The test database should be initialized with anonymized data from a few tournaments, suitable for debugging and testing new features.
After a local database has been set up, run the following to start the application:
npm run dev
Docker is used to run EDHTop16 is production, and we recommend testing with it locally before submitting a PR. To get this working, install Docker Desktop on your system.
To build:
docker build -f Dockerfile -t unit-app .
To run:
docker run -p 8000:8000 --env 'DATABASE_URL=postgresql://edhtop16@localhost:5432/edhtop16' --env 'TOPDECK_GG_API_KEY=<your topdeck api key>
To test visit http://localhost:8000
Made possible by @znayer and the TopDeck.gg Team