Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
401 commits
Select commit Hold shift + click to select a range
4d4f4a0
Merge branch 'main' into dependabot/npm_and_yarn/eslint-9.18.0
renatodellosso Jan 13, 2025
24fb93a
Merge pull request #404 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Jan 13, 2025
c2eb198
Add log for incoming requests
renatodellosso Jan 13, 2025
c778321
Merge branch 'main' of github.com:Decatur-Robotics/Gearbox
renatodellosso Jan 13, 2025
ca0f6e4
Fix formatting
renatodellosso Jan 13, 2025
e67f495
Increment package version
renatodellosso Jan 13, 2025
8efe6f2
actually use http
renatodellosso Jan 13, 2025
943f121
Infer types for DbInterface
renatodellosso Jan 14, 2025
7b3ea49
1.1.7
gearbox4026 Jan 14, 2025
a66720b
Fix formatting
renatodellosso Jan 14, 2025
226e887
Merge branch 'use-mongo-anywhere' of github.com:Decatur-Robotics/Gear…
renatodellosso Jan 14, 2025
508a3cf
Use port 80 in docker-start
renatodellosso Jan 14, 2025
8486d91
Merge branch 'main' into use-mongo-anywhere
renatodellosso Jan 14, 2025
aaadad6
More formatting fixes
renatodellosso Jan 14, 2025
98d83b8
Merge branch 'use-mongo-anywhere' of github.com:Decatur-Robotics/Gear…
renatodellosso Jan 14, 2025
6fd6ff2
quantitativeReportLayout and pitReportLayout finished!
Tr01ler Jan 14, 2025
d7d0cfa
Converted DbInterfaces to mongo-anywhere
renatodellosso Jan 14, 2025
9a805a3
Remove unused tests and function for in memory db
renatodellosso Jan 14, 2025
402bfd0
Merge pull request #409 from Decatur-Robotics/use-mongo-anywhere
BanEvading Jan 16, 2025
c88eb56
Log inbound requests
renatodellosso Jan 16, 2025
e6cf3a8
Use https bool
renatodellosso Jan 16, 2025
350eaf5
Merge branch 'main' of github.com:Decatur-Robotics/Gearbox
renatodellosso Jan 16, 2025
54504f7
Fix formatting
renatodellosso Jan 16, 2025
4a35ad5
Side quest: added ComparativePercentMulti
Tr01ler Jan 16, 2025
c422d20
Add dockerignore, rename enviroment, and remove gitpod
renatodellosso Jan 17, 2025
67bbd46
Bump package versions in package-lock.json to 1.1.8 and update depend…
renatodellosso Jan 17, 2025
53e597e
Bump version to 1.1.9
renatodellosso Jan 17, 2025
601b572
Save build from ci to reuse in cd
renatodellosso Jan 17, 2025
d4a0498
Bump unified-api
renatodellosso Jan 17, 2025
0674ccc
Bump version to 1.1.11 and update unified-api dependencies
renatodellosso Jan 17, 2025
6ee86d4
Bump version to 1.1.12 and update unified-api-nextjs and unified-api …
renatodellosso Jan 17, 2025
7968244
Bump unified-api
renatodellosso Jan 18, 2025
4b27054
Add .env.production
renatodellosso Jan 18, 2025
901f7ca
Null check in initial event data
renatodellosso Jan 18, 2025
1e48a83
[npm]: Bump next from 15.1.4 to 15.1.5
dependabot[bot] Jan 20, 2025
e9c9354
[npm]: Bump eslint-config-next from 15.1.4 to 15.1.5
dependabot[bot] Jan 20, 2025
737395f
1.1.13
gearbox4026 Jan 20, 2025
87428f8
[npm]: Bump next-auth from 4.24.10 to 4.24.11
dependabot[bot] Jan 20, 2025
65bf1df
1.1.13
gearbox4026 Jan 20, 2025
3348b07
[npm]: Bump @types/node from 22.10.2 to 22.10.7
dependabot[bot] Jan 20, 2025
9593555
1.1.13
gearbox4026 Jan 20, 2025
ab71f2a
[npm]: Bump resend from 4.0.1 to 4.1.1
dependabot[bot] Jan 20, 2025
bd5408e
1.1.13
gearbox4026 Jan 20, 2025
846fc32
1.1.13
gearbox4026 Jan 20, 2025
c3c8a3d
Merge pull request #412 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Jan 20, 2025
23d56e4
Merge pull request #413 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Jan 20, 2025
77e7f5d
Merge pull request #415 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Jan 20, 2025
26c706c
Merge pull request #416 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Jan 20, 2025
7239248
Merge branch 'main' into dependabot/npm_and_yarn/next-auth-4.24.11
renatodellosso Jan 20, 2025
a5aa2b5
Merge pull request #414 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Jan 20, 2025
c54460a
Remove allow transparency
renatodellosso Jan 20, 2025
5f656c3
Refactor Homepage component: simplify number formatting and update JS…
renatodellosso Jan 20, 2025
3539a84
Add Gearbox version to footer
renatodellosso Jan 24, 2025
9a41e1c
Rename package variable
renatodellosso Jan 24, 2025
506afe4
Get started links to sign in if user isn't signed in. Closes #301
renatodellosso Jan 24, 2025
7099840
Add /dev/ subroute
renatodellosso Jan 24, 2025
ec2c9c3
Fix pamphlet import
renatodellosso Jan 24, 2025
947f754
Added /dev/leveling page
renatodellosso Jan 24, 2025
1e0baec
Format leveling page
renatodellosso Jan 24, 2025
d780719
Changed API failure text
renatodellosso Jan 24, 2025
d1fd433
Update README.md
renatodellosso Jan 25, 2025
766821b
Added tests for Utils.ts
renatodellosso Jan 27, 2025
d820202
Fix formatting for Utils.ts tests
renatodellosso Jan 27, 2025
c50bfa2
Added tests for TOA
renatodellosso Jan 27, 2025
a3bfc7e
[npm]: Bump eslint-config-next from 15.1.5 to 15.1.6
dependabot[bot] Jan 27, 2025
1cc44da
[npm]: Bump postcss from 8.4.49 to 8.5.1
dependabot[bot] Jan 27, 2025
137e03e
1.1.15
gearbox4026 Jan 27, 2025
63e8a11
1.1.15
gearbox4026 Jan 27, 2025
e73798f
[npm]: Bump next from 15.1.5 to 15.1.6
dependabot[bot] Jan 27, 2025
cc3f077
[npm]: Bump react-hot-toast from 2.4.1 to 2.5.1
dependabot[bot] Jan 27, 2025
81bed9d
1.1.15
gearbox4026 Jan 27, 2025
7a9a28c
1.1.15
gearbox4026 Jan 27, 2025
61eb27f
Add tests for FakeData.ts
renatodellosso Jan 27, 2025
e0ae141
Format FakeData.test.ts
renatodellosso Jan 27, 2025
f3e48c8
Add tests for Xp.ts
renatodellosso Jan 27, 2025
1121244
Add tests for competition handling
renatodellosso Jan 27, 2025
7856814
Formatting fixes
renatodellosso Jan 27, 2025
b4a5325
Add more tests for CompetitionHandling.ts
renatodellosso Jan 28, 2025
3ce59f3
Fix formatting
renatodellosso Jan 28, 2025
6b32847
statslayout done
Tr01ler Jan 28, 2025
66be7c2
Merge branch 'main' into user-analytics-cs-ia
renatodellosso Jan 29, 2025
47a0b21
Fix build issues
renatodellosso Jan 29, 2025
4133067
Fix formatting
renatodellosso Jan 29, 2025
74aec2e
Fake users now have sign in dates
renatodellosso Jan 29, 2025
48c36bb
Fix team creation page
renatodellosso Jan 29, 2025
d982941
Merge branch 'main' into user-analytics-cs-ia
renatodellosso Jan 29, 2025
aef2963
Refactor team name update logic in CreateTeam component
renatodellosso Jan 29, 2025
694a250
Merge branch 'main' into user-analytics-cs-ia
renatodellosso Jan 29, 2025
4a5bf42
1.1.15
gearbox4026 Jan 29, 2025
acfa336
Merge branch 'main' into dependabot/npm_and_yarn/eslint-config-next-1…
renatodellosso Jan 29, 2025
e0dbfe0
pitStatsLayout!
Tr01ler Jan 30, 2025
dc2c918
Merge pull request #419 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Jan 31, 2025
fed2639
Merge pull request #420 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Jan 31, 2025
d67446e
Merge branch 'main' into dependabot/npm_and_yarn/next-15.1.6
renatodellosso Jan 31, 2025
21bf97b
Merge pull request #423 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Jan 31, 2025
84a7d61
Merge branch 'main' into dependabot/npm_and_yarn/next-15.1.6
renatodellosso Jan 31, 2025
4ef75de
Merge pull request #422 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Jan 31, 2025
5fea226
Fixed bug with sign in with email
renatodellosso Feb 1, 2025
b9087a1
Merge branch 'main' of github.com:Decatur-Robotics/Gearbox
renatodellosso Feb 1, 2025
753e064
Add repairUser function
renatodellosso Feb 1, 2025
5d9346c
Add user repair scripts and update README with usage instructions
renatodellosso Feb 1, 2025
6e66364
Add getCommandLineInput function for user prompts in repairUsers script
renatodellosso Feb 1, 2025
fc2bf67
Fix formatting
renatodellosso Feb 1, 2025
fecac39
Fix build
renatodellosso Feb 1, 2025
c659a2e
Fix formatting in Utils
renatodellosso Feb 1, 2025
a4a6e80
More logging for repairUsers script
renatodellosso Feb 1, 2025
3eb8cf1
Fix formatting in repairUsers script
renatodellosso Feb 1, 2025
f36896a
Even more logging repairUsers script
renatodellosso Feb 1, 2025
5efb0d7
JSON output in repair users script
renatodellosso Feb 1, 2025
9dbe1d2
Yet more logging repairUsers script
renatodellosso Feb 1, 2025
afe52f1
Added conversion of ID to ObjectId in repairUser
renatodellosso Feb 1, 2025
3f77be6
Fixed repairUser call in Auth.ts not working on new email sign in use…
renatodellosso Feb 1, 2025
5251198
Formatting
renatodellosso Feb 1, 2025
141c386
Email sign in session stopped working, then started working again. I …
renatodellosso Feb 1, 2025
1dbbee4
Cleaned up my code from last night
renatodellosso Feb 1, 2025
ad344f4
Fix formatting
renatodellosso Feb 1, 2025
a3db7b7
Add duration for request logs
renatodellosso Feb 1, 2025
58bc14f
Formatting index.ts
renatodellosso Feb 1, 2025
c6bd8a5
1.1.16
renatodellosso Feb 1, 2025
b70f6b5
Merge branch 'user-analytics-cs-ia' into updating-cs-ia
renatodellosso Feb 3, 2025
f55a19f
Merge pull request #426 from Decatur-Robotics/updating-cs-ia
renatodellosso Feb 3, 2025
d292c95
Fixed sign in
renatodellosso Feb 3, 2025
9662ee5
Fix login times for email users, sort bars in user analytics
renatodellosso Feb 3, 2025
2ccd9fe
[npm]: Bump resend from 4.1.1 to 4.1.2
dependabot[bot] Feb 3, 2025
56961cc
1.1.17
gearbox4026 Feb 3, 2025
26f9a2b
[npm]: Bump @types/node from 22.10.7 to 22.13.0
dependabot[bot] Feb 3, 2025
aa1acea
1.1.17
gearbox4026 Feb 3, 2025
690f50b
Merge pull request #430 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Feb 3, 2025
b744896
Merge pull request #427 from Decatur-Robotics/dependabot/npm_and_yarn…
renatodellosso Feb 3, 2025
90838c4
Average points and badges
Tr01ler Feb 3, 2025
6a1365f
Extra badge
Tr01ler Feb 3, 2025
e3a099c
CD for AWS
renatodellosso Feb 3, 2025
22276c8
Merge branch 'main' of github.com:Decatur-Robotics/Gearbox
renatodellosso Feb 3, 2025
c9344be
Changed environment to Production for CD
renatodellosso Feb 3, 2025
e525179
Formatting tweaks
renatodellosso Feb 3, 2025
83f63db
Merge branch 'main' into user-analytics-cs-ia
renatodellosso Feb 4, 2025
4d49b89
Bumped version, decreased wait accuracy, removed repairUser console.log
renatodellosso Feb 4, 2025
2db79c7
Remove Session User log
renatodellosso Feb 4, 2025
210c001
Update version to 1.1.18 and add LocalStorageDbInterface for managing…
renatodellosso Feb 5, 2025
3c67d5c
Refactor LocalStorageDb component for improved readability and format…
renatodellosso Feb 5, 2025
487809a
Fix formatting
renatodellosso Feb 5, 2025
36686ed
Merge pull request #434 from Decatur-Robotics/main
renatodellosso Feb 5, 2025
f5706e9
Added demo page for LocalStorageDb
renatodellosso Feb 6, 2025
df8d0c3
1.1.19
gearbox4026 Feb 6, 2025
eb30661
Format db demo page
renatodellosso Feb 6, 2025
850cb4f
Merge branch 'local-storage-db-interface' of github.com:Decatur-Robot…
renatodellosso Feb 6, 2025
31e988f
Merge pull request #435 from Decatur-Robotics/local-storage-db-interface
renatodellosso Feb 6, 2025
fc52ada
Merge pull request #436 from Decatur-Robotics/main
Tr01ler Feb 6, 2025
bcbc7cd
Added enums to the layout
Tr01ler Feb 7, 2025
74cf8af
I added the enums to layout wrong but I fixed it I think
Tr01ler Feb 7, 2025
d11afbd
I did it wrong again.
Tr01ler Feb 7, 2025
2f021f3
test
Tr01ler Feb 7, 2025
9137cab
untest
Tr01ler Feb 7, 2025
ac1bf02
Removed unnecessary cageheight thing
Tr01ler Feb 7, 2025
d28afae
Gave AutoCoralScoredLevelFour it's own special little section
Tr01ler Feb 7, 2025
e83f4ea
Bump unified-api-nextjs
renatodellosso Feb 7, 2025
3b12e6a
Add basic sw and manifest
renatodellosso Feb 8, 2025
e16e859
fixed a bajillion bugs
Tr01ler Feb 8, 2025
46e4e16
More PWA work
renatodellosso Feb 10, 2025
4e2c26a
Merge branch 'main' into user-analytics-cs-ia
renatodellosso Feb 10, 2025
934a11a
Comment user analytics route
renatodellosso Feb 10, 2025
d6d6b4d
Merge branch 'user-analytics-cs-ia' of github.com:Decatur-Robotics/Ge…
renatodellosso Feb 10, 2025
836371c
Fix formatting
renatodellosso Feb 10, 2025
17d5a2b
Merge pull request #424 from Decatur-Robotics/user-analytics-cs-ia
BanEvading Feb 10, 2025
299f52e
Restrict updateTeam access.
AllenGong12 Feb 10, 2025
f42a466
1.1.20
gearbox4026 Feb 10, 2025
cd45525
Merge pull request #439 from Decatur-Robotics/AllenGong12-patch-1
renatodellosso Feb 10, 2025
7c934f9
Move to serwist
renatodellosso Feb 10, 2025
9bdf8e1
Add offline fallback page
renatodellosso Feb 10, 2025
f98a794
Fix offline page revisioning
renatodellosso Feb 10, 2025
1543962
1.1.20
gearbox4026 Feb 10, 2025
93217d2
Fix formatting
renatodellosso Feb 10, 2025
a1bf62d
Merge branch 'pwa' of github.com:Decatur-Robotics/Gearbox into pwa
renatodellosso Feb 10, 2025
93209d4
Merge branch 'main' into pwa
renatodellosso Feb 10, 2025
8b60e7c
Merge pull request #441 from Decatur-Robotics/pwa
renatodellosso Feb 10, 2025
c2109fa
Better data counters on index
renatodellosso Feb 10, 2025
c725109
Container in pit reports, require auth in quant reports
renatodellosso Feb 10, 2025
fa7f6cb
Im embarassingly proud of this
BanEvading Feb 11, 2025
99c7156
1.1.20
gearbox4026 Feb 11, 2025
6d27abe
Merge branch 'main' into reefscape
renatodellosso Feb 11, 2025
80004e1
Bug fixes again!
Tr01ler Feb 13, 2025
e9ee3d3
Merge branch 'reefscape' of https://github.com/Decatur-Robotics/Gearb…
Tr01ler Feb 13, 2025
b963b97
Sync changes
Tr01ler Feb 13, 2025
06d0956
Prettier fixes
Tr01ler Feb 13, 2025
896165d
Order leagues
renatodellosso Feb 13, 2025
8d1ca4c
White season covers instead of black ones
renatodellosso Feb 13, 2025
b7ce795
Remove accidental files
renatodellosso Feb 13, 2025
c7072b9
Disable
renatodellosso Feb 13, 2025
940739d
Add note about auto in pit reports
renatodellosso Feb 13, 2025
0bf4dc3
Polishing
Tr01ler Feb 13, 2025
e40847b
Merge branch 'reefscape' of https://github.com/Decatur-Robotics/Gearb…
Tr01ler Feb 13, 2025
b56cac6
Fix infinite useEffect loop in useInterval
renatodellosso Feb 13, 2025
ad00cb3
Merge branch 'reefscape' of github.com:Decatur-Robotics/Gearbox into …
renatodellosso Feb 13, 2025
76cc5e0
I HATE YOU PRETTIER!
Tr01ler Feb 13, 2025
93befe4
Merge branch 'reefscape' of https://github.com/Decatur-Robotics/Gearb…
Tr01ler Feb 13, 2025
f5ece95
I have no idea why this would fix it but it's worth a shot
Tr01ler Feb 13, 2025
8c27397
Actually fix infinite useEffect loop in useInterval
renatodellosso Feb 13, 2025
574ec73
Merge branch 'reefscape' of github.com:Decatur-Robotics/Gearbox into …
renatodellosso Feb 13, 2025
0e1c245
Version update
Tr01ler Feb 13, 2025
82845e7
Merge branch 'reefscape' of https://github.com/Decatur-Robotics/Gearb…
Tr01ler Feb 13, 2025
ea4dd05
Fix formatting in comp index
renatodellosso Feb 13, 2025
d9c85db
Merge branch 'reefscape' of github.com:Decatur-Robotics/Gearbox into …
renatodellosso Feb 13, 2025
7a5e5c1
Lint fix maybe???
Tr01ler Feb 13, 2025
c57c989
Merge branch 'reefscape' of https://github.com/Decatur-Robotics/Gearb…
Tr01ler Feb 13, 2025
0cc7590
Merge pull request #442 from Decatur-Robotics/reefscape
Tr01ler Feb 13, 2025
a13e152
Mostly works, issue with assigning alliance status
BanEvading Feb 13, 2025
456d00f
This should fix it
BanEvading Feb 13, 2025
313a6aa
changes
BanEvading Feb 14, 2025
72467d4
FIXXED IT!
BanEvading Feb 14, 2025
a1cc6a7
Added dynamic text for alliances vs teams
BanEvading Feb 14, 2025
63c70d7
Fixed Typos
BanEvading Feb 14, 2025
dd03965
Further added dynamic text for alliances
BanEvading Feb 14, 2025
9ebf5aa
1.1.21
gearbox4026 Feb 14, 2025
9fd4941
Merge branch 'main' into alliances
renatodellosso Feb 14, 2025
d469613
Removed console import
BanEvading Feb 14, 2025
8f2928b
Merge branch 'alliances' of https://github.com/Decatur-Robotics/Gearb…
BanEvading Feb 14, 2025
1e445d0
Fixed Build and Unit Test issues
BanEvading Feb 14, 2025
771b0b5
Fixed Formatting
BanEvading Feb 14, 2025
12aa658
Fixed Formatting using Prettier
BanEvading Feb 14, 2025
0236ac2
Merge pull request #445 from Decatur-Robotics/alliances
BanEvading Feb 14, 2025
8188b34
Better speedtest
renatodellosso Feb 16, 2025
15a7d9f
Remove "not allied" and "allied" from createTeam page
renatodellosso Feb 16, 2025
820262a
Use CachedDb
renatodellosso Feb 16, 2025
29fd2b0
Add cache stats page and fix pit reports
renatodellosso Feb 16, 2025
991a333
Format numbers in cache stats
renatodellosso Feb 16, 2025
3d3bf31
Fix team loading in stats page
renatodellosso Feb 17, 2025
8b29ceb
Fix picklists overwriting before they load
renatodellosso Feb 17, 2025
cf7020b
Fix pit report comment removal in scouter management
renatodellosso Feb 17, 2025
880a127
1.2.2
gearbox4026 Feb 17, 2025
3302ce6
Merge branch 'main' into cache
renatodellosso Feb 17, 2025
cb14117
Complete save picklists deps array
renatodellosso Feb 17, 2025
78c4261
Disable verbose logging for cache
renatodellosso Feb 17, 2025
fa15cca
Merge pull request #446 from Decatur-Robotics/cache
renatodellosso Feb 17, 2025
13ca31a
Increased cache TTL
renatodellosso Feb 17, 2025
1fc4345
Add dev index, fix camel case for serializeDatabaseObject[s]
renatodellosso Feb 18, 2025
caa1731
Fix build issue with missing SMTP password
renatodellosso Feb 18, 2025
664a516
Don't try to overwrite team _id in createSeason
renatodellosso Feb 18, 2025
7da72cb
Fix event page error: event not found when rankings don't exist
renatodellosso Feb 18, 2025
b4f8bce
Add undershoot deadband for wait
renatodellosso Feb 18, 2025
aa1de31
Fix _id overwrite error in createCompetition
renatodellosso Feb 18, 2025
ab2467f
publishing
BanEvading Feb 24, 2025
b84dba8
Don't use cache in sign in flow
renatodellosso Feb 24, 2025
acde19c
1.2.3
gearbox4026 Feb 24, 2025
790097a
Reuse db in auth flow
renatodellosso Feb 24, 2025
b78ba52
Reduce getDatabase calls in Auth
renatodellosso Feb 24, 2025
7b9d17f
Add log for sign in callback
renatodellosso Feb 24, 2025
27245d5
Merge branch 'main' into zeroes
BanEvading Feb 24, 2025
f4d1995
Format Auth
renatodellosso Feb 24, 2025
70f203f
Merge branch 'main' into zeroes
renatodellosso Feb 24, 2025
56f7054
Merge pull request #449 from Decatur-Robotics/zeroes
renatodellosso Feb 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
node_modules
tests
.git
.github
.next
.swc
.vscode
coverage
certs
.env
.env.test
tsconfig.tsbuildinfo
5 changes: 5 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Only put NEXT_PUBLIC variables here!
# We have to include these at build time, so this file is used to inject them into the build process.
NEXT_PUBLIC_API_URL=/api/
NEXT_PUBLIC_SLACK_CLIENT_ID=10831824934.7404945710466
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=G-1BFJYBDC76
6 changes: 5 additions & 1 deletion .env.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
NEXT_PUBLIC_API_URL=http://localhost:3000/api

DEVELOPER_EMAILS=["[email protected]"]
DEVELOPER_EMAILS=["[email protected]"]

TOA_URL=https://example.com
TOA_APP_ID=123
TOA_KEY=456
16 changes: 16 additions & 0 deletions .github/workflows/auto_approve_dependabot_prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Dependabot auto-approve
on: pull_request

permissions:
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'Decatur-Robotics/Gearbox'
steps:
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
40 changes: 25 additions & 15 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
name: CD

on: [workflow_call, workflow_dispatch]
on:
workflow_call:
secrets:
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
workflow_dispatch:

permissions:
packages: write

jobs:
build_and_push:
push:
runs-on: ubuntu-latest
environment: Test
environment: Production
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Create certs directory
run: mkdir certs

- name: Build and export
uses: docker/build-push-action@v6
env:
DOCKER_BUILD_SUMMARY: false
- name: Download artifact
uses: actions/download-artifact@v4
with:
tags: ghcr.io/decatur-robotics/gearbox:latest
outputs: type=docker,dest=/tmp/gearbox.tar
context: . # Needed for Docker to find files made during the workflow

name: gearbox
path: /tmp

- name: Load image
run: |
docker load --input /tmp/gearbox.tar
Expand All @@ -37,4 +38,13 @@ jobs:
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u decatur-robotics --password-stdin

- name: Push to GHCR
run: docker push ghcr.io/decatur-robotics/gearbox:latest
run: docker push ghcr.io/decatur-robotics/gearbox:latest

- name: Install AWS CLI
uses: unfor19/install-aws-cli-action@v1

- name: Configure AWS
run: aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} && aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} && aws configure set region us-east-1

- name: Deploy to ECS
run: aws ecs update-service --cluster gearbox --service gearbox --force-new-deployment
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ jobs:
with:
tags: ghcr.io/decatur-robotics/gearbox:latest
outputs: type=docker,dest=/tmp/gearbox.tar

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: gearbox
path: /tmp/gearbox.tar

unit_test:
runs-on: ubuntu-latest
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/increment_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Increment Version

on:
workflow_call:
workflow_dispatch:
pull_request_target:
branches: [main]
types: [opened]

jobs:
increment:
runs-on: ubuntu-latest
if:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }} # We need to checkout the head branch, not the temporary merge branch
persist-credentials: false

- name: Setup Node.js environment
uses: actions/[email protected]

- name: Set name
run: git config user.name "Gearbox Bot"

- name: Set email
run: git config user.email "[email protected]"

- name: Increment patch number
run: npm version patch

- name: Push changes
Comment on lines +30 to +33

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical

Potential execution of untrusted code on a privileged workflow (
pull_request_target
)
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GIT_PUSH_TOKEN }}
branch: ${{ github.head_ref }}
Comment on lines +12 to +37

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
11 changes: 7 additions & 4 deletions .github/workflows/onpush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
ci:
uses: ./.github/workflows/ci.yml

# cd:
# needs:
# - ci
# uses: ./.github/workflows/cd.yml
cd:
needs:
- ci
uses: ./.github/workflows/cd.yml
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Comment on lines +15 to +20

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts

/public/sw.js
/public/sw.js.map
/public/workbox-*
/public/fallback-*
/certs/*.*

/certs/*.*
# PWA
public/sw.js
public/swe-worker*
11 changes: 0 additions & 11 deletions .gitpod.yml

This file was deleted.

7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ LABEL org.opencontainers.image.licenses=CC-BY-NC-SA-4.0
WORKDIR /app

COPY package*.json ./
RUN npm i
RUN npm ci

COPY . .

RUN npm run build

EXPOSE 443
EXPOSE 80

CMD npm run start
# ENTRYPOINT [ "bash" ] # Uncomment to operate the terminal in the container
CMD ["/usr/local/bin/npm", "run", "start"]
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Gearbox: Intuitive, Powerful Scouting at [4026.org](https://4026.org)

The final incarnation of Scout Janssen.

Rewritten fully in Typescript, written to be easy to maintain and modular.
Features full feature parity with SJ2, whilst remaining simpler, faster and cooler.

## Features

- Automatic match generation
- Match assignment (both automatic and manual)
- Pre-generated forms
Expand All @@ -17,9 +19,16 @@ Features full feature parity with SJ2, whilst remaining simpler, faster and cool
- Public data sharing (optional)
- Sub-5-minute setup

## Status

![CI Checks](https://github.com/Decatur-Robotics/Gearbox/actions/workflows/ci.yml/badge.svg)<br/>
![Formatting](https://github.com/Decatur-Robotics/Gearbox/actions/workflows/format.yml/badge.svg)<br/>
![Autoversioning](https://github.com/Decatur-Robotics/Gearbox/actions/workflows/increment_version.yml/badge.svg)

## Setup

### Prerequisites

- Node.js
- NPM
- A MongoDB instance
Expand All @@ -36,33 +45,48 @@ Features full feature parity with SJ2, whilst remaining simpler, faster and cool
- A Resend audience ID

### Installation

1. Clone the repository
1. Run `npm install`
1. Add the secrets to a `.env` file

### Running

#### Development

1. Run `npm run dev`

#### Production

1. Run `npm run build`
1. Run `npm run start`

##### Deployment

See the [Gearbox-Terraform](https://github.com/Decatur-Robotics/Gearbox-Terraform) repo.

#### Tests

1. Run `npm run test`

#### Scripts

There's a few scripts in the /scripts folder that can be run with `npx tsx scripts/<script_name>.ts`.

## Contributing

You've made it past set up and are ready to contibure to the future of scouting - here's how.

We recommend you start with issues labelled `good first issue` to get a feel for the codebase. Fork the repo (unless you're part of Decatur Robotics, in which case make a new branch) and then make a pull request to the main branch. We'll review it and, if it looks good, merge it.

## Contibutors

<a href="https://github.com/Decatur-Robotics/Gearbox/graphs/contributors">
<img src="https://contrib.rocks/image?repo=Decatur-Robotics/Gearbox" />
</a>

Made with [contrib.rocks](https://contrib.rocks).

## Licensed under a CC BY-NC-SA 4.0 license

Read the license [here](LICENSE.md).
8 changes: 4 additions & 4 deletions components/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { useCurrentSession } from "@/lib/client/useCurrentSession";
import { User } from "@/lib/Types";
import { levelToClassName } from "@/lib/Xp";
import { BsGearFill } from "react-icons/bs";

export default function Avatar(props: {
user?: User | undefined;
scale?: string | undefined;
user?: { image: string | undefined; level: number; admin?: boolean };
scale?: string | undefined; // Use "scale-75" for 75% scale, etc.
imgHeightOverride?: string | undefined;
showLevel?: boolean | undefined;
borderThickness?: number | undefined;
onClick?: () => void | undefined;
className?: string | undefined;
online?: boolean;
gearSize?: number;
}) {
const { session, status } = useCurrentSession();
const user = props.user ?? session?.user;
Expand Down Expand Up @@ -39,7 +39,7 @@ export default function Avatar(props: {
</div>
{admin ? (
<div className="absolute z-10 -bottom-2 -left-2 text-slate-300 animate-spin-slow">
<BsGearFill size={36}></BsGearFill>
<BsGearFill size={props.gearSize ?? 36}></BsGearFill>
</div>
) : (
<></>
Expand Down
4 changes: 3 additions & 1 deletion components/Container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ export default function Container(props: ContainerProps) {
imgHeightOverride="h-11"
showLevel={false}
borderThickness={2}
gearSize={24}
/>
</Link>
) : (
Expand Down Expand Up @@ -361,7 +362,8 @@ export default function Container(props: ContainerProps) {

<Link href={`/${selectedTeam?.slug}`}>
<button className="btn btn-ghost normal-case bg-base-100">
<BiHome className="text-2xl"></BiHome>Team Home
<BiHome className="text-2xl"></BiHome>
{selectedTeam?.alliance ? "Alliance Home" : "Team Home"}
</button>
</Link>

Expand Down
Loading
Loading