RPG (rpg.hackclub.com) is a gamified YSWS where you defeat bosses and earn treasure by spending time on personal projects.
Earn a physical trading card + stickers of the bosses you helped defeat, plus bonus loot 👀 for all adventurers.
This project uses Next.js, React, TailwindCSS, and Prisma, as well as Auth.js.
-
Clone the repository.
git clone https://github.com/phthallo/rpg && cd rpg
-
Install dependencies. (install bun)
bun install
-
Configure a Prisma Postgres database. Make note of the connection URL you are given.
-
Configure a Slack app for use with authentication (the 'Sign in with Slack feature). Paste the provided manifest.json file when prompted to replicate the default settings.
Under OAuth & Permissions, change the Redirect URL to a public url where you can access this project from. Don't have one? Follow the steps here.
-
With the values of
DATABASE_URL
,CLIENT_ID
andCLIENT_SECRET
obtained from steps 3 and 4, fill out the.env.example
file as.env
. Set theAUTH_URL
to the Redirect URL used in configuring Step 4. SetAUTH_SECRET
to a randomly generated string. -
Seed the database.
bun prisma db seed
-
Start the development server, as well your Ngrok instance and visit your Ngrok URL[^1] in the browser.
bun run dev
-
Clone the repository.
git clone https://github.com/phthallo/rpg
-
Build and start the container. Two Dockerfiles exist - one for the main website (
web
), and the other for the Slack bot (bot
) which messages users who have been in battles for longer than five hours, every twelve hours.docker compose up -d --build
- resolve eslint errors
- known issue: if user kills a boss, the modal closes automatically and disables scroll
- if a user kills a boss and people are in a session, they will not be able to stop their session
- admin panel does not refresh reviewed session status automatically
- add hackatime v2 project integration (for rpg v2)
- per-project time tracking