跳到正文
GitHub·· 7 天前AI 评分10

TheNinjaRPG 官方源码开源:基于 T3 Stack 的忍者题材网页游戏

studie-tech/TheNinjaRPG

AI 导读

TheNinja-RPG.com 官方源代码已在 GitHub 发布,采用 Next.js、Clerk、tRPC、PlanetScale、tailwind 组成的 T3 Stack 与 Drizzle ORM 构建。

正文

This is the official source code for the game www.TheNinja-RPG.com.

💻 Setting up locally

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:

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 http://localhost:3000 to view the site (use localhost, not 127.0.0.1, or Next.js chunks 403)
  • Go to http://127.0.0.1:3001 to manage the database

📚 Learning Guide

The following videos on youtube are recommended to get a quick introduction to the project and the components of the tech stack:

🔖 Local Development Guide

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

🔒 Licensing

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.

来源:GitHub · github.com