Repository navigation
v2.2.0
The Users Release
This feature release of Open Scouting improves all aspects of user authentication and profile management. It also adds user session tracking, content reporting, repair mode on the admin page, and includes a major frontend cleanup.
Features
Frontend cleanup (#136)
- Every component in the frontend has been cleaned up. This includes the following:
- Comments in each component, with prop documentation if applicable.
- All components use Svelte 5 syntax.
- Many components had an improvement in type safety.
- Many components were refactored and sometimes split into more than one component.
- Functions in components got comments, parameter types, and return types.
- The location of some component files were moved around and better organized.
User session and authentication tokens (#197) (#149)
- Implemented user session tokens.
- These allow the server to keep track of what user created data on the server.
- No personally identifiable information is collected, data now just gets a relation for keeping track of what user created that data.
- This opens the door for better moderation and spam deletion down the road.
- Authentication tokens are no longer stored in
localStorage(thank goodness). - Both these tokens are stored in the browser cookies, and are included with requests made to the server.
- User data is now loaded from
page.server.ts, instead of network requests being made by every component that needs user data. - Backend
Dependshave been improved for requests. There are now additional dependencies for getting the user and session, and shortcut dependencies for getting an authenticated user or superuser.
Authentication improvements (#133)
- Every aspect of user authentication, account creation, and anything else the user may need to do with their account has been improved or added.
- There is now support for changing a user's email and password, creating and authenticating with passkeys, email and identity verification, a forgot password flow, and more.
- These features are all bundled into a universal authentication component, which can be used anywhere. This component wraps all of the individual components, and exposes nice bindable status props which can be listened to.
- These components are all mobile friendly, use a consistent style, offer keyboard navigation, and error handling.
- All of these new authentication flows also support running without any email verification available on the server.
- Users are strongly recommended to create a passkey when they create their account. This will allow them to recover their account even if the server doesn't support email verification.
- This also includes support for email tests in dev, using Mailpit.
Profile page (#134)
- Related to all these authentication improvements, there is now a new page for authenticated users to manage their user and profile details.
- This allows for setting a profile picture (scouting app social network when), changing their display name and team number, changing and verifying their email, changing their password, creating passkeys, and deleting their account.
- There is also support for editing the user's settings.
- A new settings system has been added, allowing settings to be quickly created using custom model fields with nice metadata that are automatically populated on the profile page.
- The user can edit their settings as they wish from here, and the only set up for adding a new setting is creating it in
models.py.
- Finally, the user can manage all their data they've ever submitted. From here, they can filter, sort, and delete content on the server they've created.
- Additionally, when the user goes to delete their account, there is an option to delete all of this data when the account is deleted.
Feature page (#182)
- The index page now includes some basic feature information about Open Scouting.
- There is also a stats widget for showing information about the data on the server.
- The footer at the bottom of the index page allows for quick links to other locations.
Content reporting (#183)
- User submitted content, like custom events, pit scouting answers, and team pits can be reported.
- Superusers can view these reports on the admin page, and after reviewing, can choose to delete the content or delete the report.
- More data will be reportable later in #203.
Pit scouting image question improvements (#176)
- Some mobile users had issues where using the native device camera applet would use enough RAM that the page would unload, making it difficult to upload pit scouting images.
- You can now take one or more photos directly in the app, and upload them to the server.
Repair mode (#140)
- A system has been added to the admin page, which allows superusers to fix broken database relations in events, game pieces, match scouting fields, match scouting submissions, match scouting answers, pit scouting fields, team pits, and pit scouting answers.
- These relations can break when content was reported and removed, or a match or pit scouting preset was imported and season or game piece data failed to be assigned correctly.
Other
- Improved response schemas for the data page, match scouting presets, pit scouting presets, and getting pits.
- Added name and active parameters to the local season_data table
- Seasons are now fetched from the local database in most cases
on_deletevalues for models have been improved. Most now set values to benull, so when a user account is deleted the data associated with that user is not deleted unless prompted.- Removed the link to the legacy server (#191).
- The pit scouting page will now scroll back to the last visited pit upon reloading the page. This can help #176.
- Add link refs from the authentication page (#196).
- Added a docker compose service for backing up the database (#192).
- Backups will be available in the admin page at some point in the future #208.
- Phosphor icons has now been updated to the new
<IconName>Iconsyntax (#148). - Updated docs (#204).
- All frontend and backend deps have been bumped.
- The admin page now stores the current page in the URL params, and will return to that page after a page reload.
Fixes
- Fixed an issue where creating custom events was missing the week parameter when creating events in the local db.
- Fixed an issue where collapsing a match scouting section clears progress (#177).
- Fixed an issue where data was failing to load on the data page if a match scouting answer had a value of
None. - Fixed an issue where seasons were failing to load into the filters on the data page.
- Fixed an issue where the service worker was trying to register in dev.
- Fixed an issue with favoriting events.
- Fixed an issue where match and pit scouting data couldn't be synced.
- Removed the broken black chart color (#194).
- Match and pit scouting fields couldn't be loaded on the admin page due to the wrong type as the default for
field.options. - Events couldn't be viewed on the admin page if an event was missing a season.
Updating
The following will need to be added to your server .env:
PUBLIC_MODE=prod # dev/prod
# Emails
PUBLIC_EMAIL_ENABLED=false
MAIL_USERNAME="open-scouting"
MAIL_PASSWORD="password"
MAIL_FROM="dev@open-scouting.com"
MAIL_PORT=1025
MAIL_SERVER="localhost"
MAIL_STARTTLS=false
MAIL_SSL_TLS=false
USE_CREDENTIALS=true
VALIDATE_CERTS=false
# Passkeys
PUBLIC_PASSKEY_NO_VERIFICATION_MINUTES=15What's Next
This was a large release, and took me quite a while to get through everything that I wanted to. Subsequent releases will hopefully be a bit smaller, and correspondingly a little more frequent. I am also about to be extra busy though, so perhaps not.
Next I plan to focus on organization support (#144). This will probably result in a lot of match and pit scouting refactoring, to make field editing a bit more robust.
Contributions are always welcome!