The backend server for Lovat, a scouting system used to scout teams and matches in the First Robotics Competition
Developed by FRC Team 8033, @HighlanderRobotics
- Node.js v22.20.0
- Git (latest version)
- PostgreSQL (latest version)
- Node Version Manager (nvm) - makes it way easier to work with multiple node versions
In your terminal, run
git clone https://github.com/HighlanderRobotics/lovat-server.Ensure you're using the correct version of Node.js and npm. If you have nvm, you can do this by running the following:
nvm install 22.20.0
nvm useTo install dependencies from package.json:
npm installto get the correct version of node
Find the .env.example file and make a copy. Rename it to .env and fill in the empty fields.
- In
DATABASE_URLreplaceusernamewith your username (the text to the left of the @ when you run a command),passwordwith any random password, andpostgreswithlovat-dev. - Get a TBA API key by creating an account and getting a "READ API key". Paste the key into
TBA_KEY - Set
AUTH0_DOMAINtolovat.us.auth0.com - You don't really need to fill in the other fields
Run
npm run devand your server should start. If you make any changes to a file and save, the server will restart automatically. To stop the server, press Ctrl + C
The server will automatically populate matches, tournaments, etc, on initial startup. If having a larger set of data makes testing easier, you might be provided with a database dump containing a more realistic example of what the production database looks like. Obtain the file and run the following.
pg_restore -d "postgresql://YOUR_CONNECTION_STRING" /path/to/your/backup --clean --if-exists --no-owner
# example
pg_restore -d "postgresql://johndoe:mytopsecretpassword@localhost:5432/lovat_dev" ~/Downloads/lovat-backup-2025-12-25.dump --clean --if-exists --no-owner