This website hosts mods or something idk what to say.
Follow these steps to set up and run the project on your local machine.
- Node LTS
- Docker for the database
- Bun (or npm/pnpm/yarn) for package management
- Supabase CLI for running the database
Clone the project repository to your local machine using the following command:
git clone https://github.com/rithik-b/beatmods.git
Navigate to the project directory and install the required dependencies:
cd beatmods
bun i
Copy the provided example environment file to create your own configuration:
cp .env.example .env
We will be updating this configuration with the values we need in the following steps.
Visit GitHub Developer Settings to create a new OAuth app. Fill in the required information, and set the callback URL to:
http://127.0.0.1:54321/auth/v1/callback
Copy the client ID and client secret generated here to their respective fields in .env
At this point, make sure docker is installed and running on your system.
Start the Supabase development local development stack using the following command:
bun run supabase
If you want supabase studio (to edit the database with a nice GUI) you can instead run
bun run supabase:studio
After this runs successfully, copy the secrets generated by this command into .env
If you lost these secrets, you can get them back by running
bunx supabase status
You would also need to run the database migrations so that the necessary database schemas are availaible. You can do so by running
bun run migrate
If you would like seed data (i.e. example mods and users in the database) you can run
bun run seed
Finally, start the Next.js development server using the following command:
bun dev