https://github.com/nerdherd/nerdscout
The scouting app of Nerd Herd 687.
https://github.com/nerdherd/nerdscout
flask frc python
Last synced: 3 months ago
JSON representation
The scouting app of Nerd Herd 687.
- Host: GitHub
- URL: https://github.com/nerdherd/nerdscout
- Owner: nerdherd
- License: gpl-3.0
- Created: 2025-09-20T20:01:05.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-10-07T04:46:53.000Z (9 months ago)
- Last Synced: 2025-10-07T06:28:04.849Z (9 months ago)
- Topics: flask, frc, python
- Language: HTML
- Homepage:
- Size: 13.4 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

NerdScout
The scouting app of Nerd Herd 687.
## About
NerdScout is a scouting app for the *FIRST* Robotics Competition, aiding in data collection during matches. Scouts watch matches and use NerdScout to record what a robot did during a match, from scoring to defense to fouls.
Pit scouting is also included, allowing scouts to ask prewritten questions to teams and input their answers into the app.
NerdScout then aggregates this data into tables for analytical use during Alliance Selection, along with providing stats for each team in many areas.
NerdScout also incorporates NerdPredict, a game where team members predict match results in order to gain the most points.
## Setup
### MongoDB setup
#### MongoDB Community Edition
MongoDB Community Edition is the self hosted version of MongoDB, helpful for development.
1. Download [MongoDB Community Edition](https://www.mongodb.com/try/download/community)
2. (optional) Install [MongoDB Compass](https://www.mongodb.com/try/download/compass), the GUI explorer for MongoDB. The installer is usually included with MongoDB Community Edition.
3. Create a folder to store the database. This can be anywhere, but `/database` is ignored by git in this repo.
4. Start the database
To start the database on Windows:
```powershell
\path\to\exe\mongod.exe --dbpath "\path\to\database"
```
or on Mac:
```bash
/path/to/executable/mongod --dbpath "/path/to/database"
```
5. (optional) Open Compass and create a connection. By default, if you're running locally, your connection string should be `mongodb://localhost:27017`
6. Once you verify it works, create the file `mongoDB` in the `secrets` directory and paste in you connection string. Again, it is `mongodb://localhost:27017` by default.
> Unless you change how you're hosting MongoDB, you shouldn't have to change your connection string.
#### Atlas and Other Hosting
Place your MongoDB connection string in `secrets/mongoDB` and Compass, either beginning in `mongodb://` or `mongodb+srv://`. For more information, visit the [MongoDB Documentation](https://www.mongodb.com/docs/manual/reference/connection-string/).
> Unless you change how you're hosting MongoDB, you shouldn't have to change your connection string.
### Secret key setup
Create a file `secretKey` in the `secrets` directory with whatever text you want. This acts as the key for all of the encryption. Once you've set it, do not change it, unless you are resetting the database.
### The Blue Alliance setup
If you don't already have one, create a [The Blue Alliance](https://www.thebluealliance.com/) account
Under account, scroll to Read API Keys and create a new key.
Create a new file `theBlueAlliance` in the `secrets` directory and paste in the key.
> Unless you delete it or your account with The Blue Alliance, you shouldn't have to change API key.
### Python setup
Make sure you have Python 3 installed. If you don't have it, check out ["Properly Installying Python" from The Hitchhiker's Guide to Python](https://docs.python-guide.org/starting/installation/) for more information.
Create a terminal in the directory NerdScout is located in. Then, make a virtual environment and activate it.
For Windows:
```powershell
py -m venv .venv
.venv\Scripts\activate
```
For Mac:
```bash
python3 -m venv .venv
source .venv/bin/activate
```
Now install the required packages. On Windows:
```powershell
py -m pip install -r requirements.txt
```
and on Mac:
```bash
python3 -m pip install -r requirements.txt
```
You can deactivate the virtual environment with the deactivate keyword.
```bash
deactivate
```
The next time you want to run NerdScout, simply run the activation script. On Windows:
```powershell
.venv\Scripts\activate
```
On Mac:
```bash
source .venv/bin/activate
```
## Running
Before running, ensure:
- All required secrets are added. Check /secrets/README.md for the full list.
- The database is running
- The virtual environment is active
Run the script using:
```bash
flask run
```
or use debug mode.
```bash
flask run --debug
```
This should open a development server and display an IP Address. Navigate to this IP address to view NerdScout.
The server included with Flask is **not** meant for production use. There are many options for running WSGI (Web Server Gateway Interface) servers suitable for production. Check out the [Flask documentation](https://flask.palletsprojects.com/en/stable/deploying/) for more information.