README
This monorepo is build with following stack:
- DB: Postgres
- Caching: Redis
- Baas: Directus
- ORM: Drizzle
- API: Rest + Graphql
- Frontend: NextJS
- Docker & Docker Engine latest version
- pnpm latest version
git clone https://github.com/rickylabs/table-football-challenge.gitcd apps/frontend
cp .env.example .env.local
cp .env.example .env.productionFor Windows & Mac user change NEXT_PUBLIC_DIRECTUS_API value as suggested in comment below:
NEXT_PUBLIC_DIRECTUS_API=http://172.17.0.1:8055
# prefer this if you're on Windows or Mac NEXT_PUBLIC_DIRECTUS_API=http://host.docker.internal:8055cd table-football-challengemake build-staging
# Go grab a coffee
make start-stagingWait for your builds to complete
Open http://localhost:3000 with your browser to see the frontend app.
Open http://localhost:8055 with your browser to see the admin dashboard
Directus may take a few seconds to spin up for the first time since it depends on DB.
You can monitor your services with docker dashboard to see when they are ready.

More info about the frontend setup here: Frontend README
OpenAPI and GraphQL SDL specs available here (using postman with admin token): OpenAPI GraphQL SDL
All existing users have password "Pass4directus". You can manage existing users and data from Directus admin dashboard (default pswd: "d1r3ctu5"). Or you can manage tables directly from Drizzle studio (see below to run studio in DEV mode). You can directly register new users from the frontend app.
Only players that have participated in at least one game will be shown in the leaderboard.
To work with the dev config follow below steps
1: Start the dev server.
make start-devDocker frontend service will run in "watch" mode (see: https://www.docker.com/blog/announcing-docker-compose-watch-ga-release/ ) allowing you to live edit your frontend code with docker.
You can now open your favorite editor and edit NextJS project under apps/frontend
2: if you want to inspect DB you can simply run from root folder
pnpm run studio You can now open https://local.drizzle.studio/?port=3001
