note: Name means the name of the game in Pascal case, YYYY means the year of the game (i.e. Name = Reefscape, YYYY = 2025)
- add a file to
src/data
namedgame_YYYY.rs
- add structs that match your data (see
src/data/game_2025.rs
for an example), and can be (de)serialized with serde. also make sure the main one is calledGameDataYYYY
and implementsInto<Vec<String>>
. - add
NameYYYY(GameDataYYYY)
intoGameSpecificData
insrc/data.rs
(this must match theGame
value in the frontend) - add
GameSpecificData::NameYYYY(data) => fields.append(&mut data.into())
toGameData
'sInto<Vec<String>>::into
insrc/data.rs
- set up the frontend
- set up a Google Cloud Console project, and make a service account that can access your spreadsheet
- make a file called
settings.json
:
{
"root": "/warp7api/scouting",
"address": "127.0.0.1",
"port": 42069,
"frontend": "*",
"credentials_path": "service_account.json",
"spreadsheet_id": "<your spreadsheet ID>",
"main_worksheet": "Raw Data",
"test_worksheet": "Test Data"
}
- run the backend and send a report to it from your frontend to make sure it works
- set up nginx or something to proxy the frontend and backend onto the same domain, and secure everything. (this step is, although just generally good advice, mainly to prevent friction from CORS)
sample nginx config:
events {
}
http {
server {
listen 443 ssl;
server_name <domain>;
ssl_certificate C:/Certbot/live/<domain>/fullchain.pem;
ssl_certificate_key C:/Certbot/live/<domain>/privkey.pem;
location / {
proxy_pass http://localhost:3000;
}
location /warp7api/scouting {
proxy_pass http://localhost:42069;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
}