Overview

To prepare the mobile app and analysis engine for new seasons and competitions, we must associate the new season data in the DB. In this document, databases and collections will be referred to in the following syntax: database/collection.

complist/data

  1. Create new competition listing

Example entry:

{
    "competition": "2022iacf",
    "friendlyName": "2022 Iowa Regional - Cedar Falls, IA"
}

The OID attribute will automatically be generated by MongoDB. The competition attribute should be the same identifier as is used in The Blue Alliance to facilitate interoperability between the two platforms.

The friendlyName attribute will be displayed at the top of the app, thus it should contain useful information about the current competition. At a minimum it should contain the name of the competition and the location.

teamlist/competitions

  1. Create new team listing (if applicable) While our team already has a team entry, if a new team is joining they will need to have a new team listing created. The object structure is as follows:
  • team (string): Team number
    • example: "2022"
  • currentCompetition (string): The competition identifier for the team's current competition, as created above.
    • example: "2022iacf"
  • authorizedDomains (array): An array of domains from which users may sign in using their issued Google accounts.
    • example: ["imsa.edu"]
  • authorizedUsers (array): An array of users that do not belong to the above domain but should also be allowed to sign in. This feature is useful for mentors, etc.
    • example: ["mentor@frc2022.com", "student@frc2022.com"]

Example entry:

{
   "team":"2022",
   "currentCompetition":"2022iacf",
   "authorizedDomains":[
      "imsa.edu"
   ],
   "authorizedUsers":[
      "mentor@frc2022.com",
      "student@frc2022.com"
   ],
}
  1. Set team's currentCompetition attribute to current competition identifier.

rbac/roles

Define a team's technical administrators so that those users can perform privileged operations from the API (such as editing the match config or changing the active competition.

Create a new entry with the following structure for each user:

  • roles (array): An array of roles that a user has.
    • example: ["admin", "broadcast"]
  • team (string): Team number
    • example: "2022"
  • id (string): The user's identifier (email for social logins, and CLIENT_ID for API keys).
    • example: "dsingh@imsa.edu"

Example entry:

{
   "team":"2022",
   "id":"dsingh@imsa.edu",
   "roles":[
      "admin"
   ]
}

teamlist/nicknames

Ensure that the nicknames for all teams at this competition is present in this object. You can find this data on The Blue Alliance or other FRC sources. The object key should be the team number, and the key's value should be the team's nickname. Since this list is not changed per competition, some teams may already be present as we have competed with them before.

configs/match and config/pit

These configs need to be created to configure the scouting application for each new competition. Refer to previous competitions' configs for guidance. The object structure is as follows:

  • team (string): Team number
    • example: "2022"
  • competition (string): The competition identifier for the team's current competition, as created above.
    • example: "2022iacf"
  • config (array): Array of tabs that are presented in the scouting screen.
    • Each screen is an object, with the only key in the object being the name of the tab.
    • The value for this key is an array of objects, with each object being a widget that is presented on the tab.
    • The widget contains three attributes: name (human-readable name of the data), key (JSON key for the data), widget (type of the widget: {segment, stepper, text-area}, options? (for segments only, the radio button options the user can select.))

Example entry:

{
	"team": "2022",
	"competition": "2022iacf",
	"config": [{
			"Auto": [{
				"name": "Segment example (like radio)",
				"key": "segment-example",
				"widget": "segment",
				"options": ["Option 1", "Option 2", "Option 3"]
			}]
		},
		{
			"Teleop": [{
				"name": "Stepper example (increment number)",
				"key": "stepper-example",
				"widget": "stepper"
			}]
		},
		{
			"Notes": [{
				"name": "Text area example",
				"key": "text-area-example",
				"widget": "text-area"
			}]
		}
	]
}

data_scouting/matches

The API needs an entry of each match at each competition. Each match at each competition has its own entry in the database, with the following structure:

  • owner (string): The team that owns this entry (team that is scouting)
    • example: "2022"
  • competition (string): The competition this match is at
    • example: "2022iacf"
  • match (int): Match number
    • example: 1
  • teams (array): Array of team numbers in the match. The first three entries should be on the blue alliance, and the last 3 on the red alliance.
  • scouters (array<string|object>): Each array item corresponds to the same position team in the teams array. If the team is not being scouted, the element should be false. The API will change this element to the scouter information (scouter name and ID) when the team is being scouted.

Example entry:

{
   "teams":[
      "5350",
      "5133",
      "3734",
      "63",
      "1675",
      "8160"
   ],
   "scouters":[
      false,
      {
         "name":"Scouter 2",
         "id":"190334453606510070000"
      },
      {
         "name":"Scouter 3",
         "id":"174581233308818200000"
      },
      {
         "name":"Scouter 4",
         "id":"118006453019498350000"
      },
      {
         "name":"Scouter 5",
         "id":"129904896377139080000"
      },
      false
   ],
   "match":1,
   "competition":"2020ilch",
   "owner":"2022"
}

Populating at the competition

Follow the instructions at titanscouting/tra-scripts to input the practice and qualifier match schedule as they are released on The Blue Alliance. Requires Python 3.6+. You must be a member of the titanscouting GitHub organization to view this repo.