Skip to content

hackclub/rpg

Repository files navigation

rpg

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.

Development

This project uses Next.js, React, TailwindCSS, and Prisma, as well as Auth.js.

  1. Clone the repository.

    git clone https://github.com/phthallo/rpg && cd rpg
    
  2. Install dependencies. (install bun)

    bun install 
    
  3. Configure a Prisma Postgres database. Make note of the connection URL you are given.

  4. 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.

  5. With the values of DATABASE_URL, CLIENT_ID and CLIENT_SECRET obtained from steps 3 and 4, fill out the .env.example file as .env. Set the AUTH_URL to the Redirect URL used in configuring Step 4. Set AUTH_SECRET to a randomly generated string.

  6. Seed the database.

    bun prisma db seed
    
  7. Start the development server, as well your Ngrok instance and visit your Ngrok URL[^1] in the browser.

    bun run dev
    

Docker

  1. Clone the repository.

    git clone https://github.com/phthallo/rpg 
    
  2. 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
    

To do:

  • 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

About

Are you ready to level up?

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •