Built with Next.js v13 app/ directory and React Server Components.
git clone- Create
.env.localwith content from secret Discord thread npm inpm run dev
Open http://localhost:3000 with your browser to see the result.
If port 3000 is already taken, use npx kill-port 3000 to terminate the process that occupies the port if desired.
Before commit,
npm run lint:fixfixes all lint and formatting errors.npm run fmtfixes formatting errors only (cuz ESLint is hella slow).npm run lintchecks for lint and formatting errors without fixing them. This is included in a pre-commit hook and is executed automatically when you usegit commitor equivalent
git clone --depth=1 --branch=build- Create
.env.localwith relevant variables. npm installnpm run buildnpm start -p <port>
All incoming request first go through the middleware.ts.
The middleware does the following:
- Add
x-middleware-sessionheader storing information about the current user and their privileges. - Rewrite to relevant error pages when user is not authenticated/authorized.
The routes are written with the following ideas in mind:
- Prefer using server components
- Prefer fetching data on the server side