This is the official source code for the game www.TheNinja-RPG.com.
The codebase relies on a variety of external services for e.g. auth, websockets, database, etc. Some of these are next to impossible to replicate locally, but provide free (or very cheap) tiers. To get up and running, it is therefore required to sign up for free accounts on the following services:
- https://clerk.com/ - for auth (required)
- https://uploadthing.com/ - for file uploads (optional)
- https://replicate.com/ - for AI inference (optional)
To get started, copy app/.env.example
to app/.env
and fill in all variables related to services (*CLERK*
, REPLICATE*
, UPLOADTHING*
).
make setup # Install bun locally
make install # Run bun install
make dbpush # Setup database tables
make seed # Seed database tables
make start # Start development server
- Go to
https://localhost:3000
to view site - Go to
https://localhost:3001
to manage database
The following videos on youtube are recommended to get a quick introduction to the project and the components of the tech stack:
- The official TheNinja-RPG youtube, TNR DevLog
- Next.js, Clerk, tRPC, Planetscale, tailwind: T3 Stack Tutorial
- Drizzle ORM: DrizzleORM Pitch
Various make
commands are available; type make help
at the root directory for list of available commands. Most importantly:
- Use
make bun add [package]
if you need to add some package - Use
make build
to build the project - Use
make makemigrations
to create migrations file for new database changes
This source code is released with no license, meaning that the work is under exclusive copyright. We do not wish for countless of online copies to be released and float around.