This repo contains the Dashboard for Netor. There is another repo for the Bot and API.
- Install dependencies:
npm i
- Start the Postgres Database in Docker:
npm run docker
Note: The npm script will complete while Docker sets up the container in the background. Ensure that Docker has finished and your container is running before proceeding.
- Create a
.env
:
DATABASE_URL="<database url from docker, if in doubt use: 'postgresql://postgres:postgres@localhost:5432/postgres'>"
SESSION_SECRET="<can be anything>"
API_URL="<api url, get this through setting up the bot>"
SPECIAL_AUTH="<can be anything, must be the same for the bot and dashboard>"
DISCORD_APPLICATION_ID="<bot id, get this from discord developer dashboard>"
- Initial setup:
npm run setup
- Run the first build:
npm run build
- Start dev server:
npm run dev
This starts your app in development mode, rebuilding assets on file changes.
This project uses TypeScript. It's recommended to get TypeScript set up for your editor to get a really great in-editor experience with type checking and auto-complete. To run type checking across the whole project, run npm run typecheck
.
This project uses ESLint for linting. That is configured in .eslintrc.js
.
We use Prettier for auto-formatting in this project. It's recommended to install an editor plugin (like the VSCode Prettier plugin) to get auto-formatting on save. There's also a npm run format
script you can run to format all files in the project.