2718 Online is a scouting web app for FRC team 2718 (and friends). It helps teams record and analyze data during competitions.
- Record scouting reports for individual robots during a match
- Record pit scouting
- View combined data from scouting, TBA, Statbotics, etc.
- Create pick lists
You need the following installed on your computer:
- Node.js
- pnpm
- Git
On Ubuntu/Linux:
# Install Node.js (LTS version)
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
# Install pnpm
npm install -g pnpmOn Windows/Mac:
- Download and install Node.js from nodejs.org
- Install pnpm: Open a terminal and run
npm install -g pnpm
In the project folder, run:
pnpm installThe app uses SQLite via Drizzle ORM. On first run, push the schema to create the database:
DATABASE_URL=file:local.db pnpm run db:pushIf you modify the schema in src/lib/server/db/schema.ts, run the same command again to apply the changes. See Database Commands for more detail.
This will run the app locally so you can see changes as you code:
pnpm run devOpen the link shown in the terminal (usually http://localhost:5173) in your web browser.
To create a production build (for deployment):
pnpm run buildTo preview the production build locally:
pnpm run previewThe project uses Drizzle ORM with SQLite. The schema lives in src/lib/server/db/schema.ts.
All commands need DATABASE_URL set, either via .env or as a prefix:
DATABASE_URL=file:local.db pnpm run <command>| Command | When to use |
|---|---|
pnpm run db:push |
Most common. Apply schema changes directly to the local database without generating migration files. Use this during development when you change the schema and want to update local.db immediately. |
pnpm run db:generate |
Generate SQL migration files in drizzle/ from your schema changes. Use this when you want a versioned migration record (e.g., before deploying to production or sharing schema changes with teammates). |
pnpm run db:migrate |
Apply the generated migration files in drizzle/ to the database. Run this after db:generate to execute the migrations. |
pnpm run db:studio |
Open Drizzle Studio, a visual browser-based database editor, to inspect and edit data. |
During development (quick iteration):
- Edit
src/lib/server/db/schema.ts - Run
DATABASE_URL=file:local.db pnpm run db:push
When creating a versioned migration (e.g., for production):
- Edit
src/lib/server/db/schema.ts - Run
DATABASE_URL=file:local.db pnpm run db:generate— creates a.sqlfile indrizzle/ - Run
DATABASE_URL=file:local.db pnpm run db:migrate— applies it to the database - Commit both the schema change and the generated migration file
Note:
db:pushis convenient but bypasses migration history. Preferdb:generate+db:migratefor any schema change that needs to run on a shared or production database.
- If you see errors about missing packages, make sure you ran
pnpm install. - If you get a 'command not found' error for pnpm, try closing and reopening your terminal, or check your installation.
- If you change code and don't see updates, refresh your browser or restart the dev server.
pnpm run dev– Start the development serverpnpm run build– Build the app for productionpnpm run preview– Preview the production buildpnpm run lint– Check code for style issuespnpm run format– Format code automaticallypnpm run db:push– Apply schema changes to the local databasepnpm run db:generate– Generate migration files from schema changespnpm run db:migrate– Apply generated migration filespnpm run db:studio– Open Drizzle Studio to browse/edit the database