Reviewed the download count PR work and made some changes:
- Updated the download link route to include the mod's slug for easier identification.
- Moved rate limiter from the route middleware (the entire controller) to just the show method in the controller.
- Created a ModVersionPolicy that the controller can check against.
- Moves download increment logic into the model.
- Defers the call to the download increment logic (now run in the background)
- Updated the route to have a name, and the downloadUrl methods to build the URL dynamically using the route name.
- Wrote some tests to check URL building, download counting, and rate limiting.
# Conflicts:
# app/Http/Controllers/ModVersionController.php
# app/Providers/AppServiceProvider.php
Installs Scribe for (mostly) automatic API documentation. Does a pretty good job and it's pretty painless to set-up. I'll have to configure it to work in the CI and to ensure that the static files are being pushed to production as they should be, but this is a good start.
- Download counts were taking too long to calculate dynamically, so we're keeping track of a total count with observers and queued job.
- Optimized the SQL used to order a mod listing by mod version update times.
This update gives mod versions a supported SPT version field that accepts a semantic version. The latest supported SPT version will be automatically resolved based on the semvar.
Next up: I need to update the ModVersion to SptVersion relationship to be a many-to-many and expand the resolution to resolve multiple versions.
- Updates dependancies
- Added time to mod component
- Implement naturalSort function into homepage queries
Short todo:
- Migrate top navigation from old-build
- Mod detail page
Worked on:
- Mod component templating
- Added dark mode styles for homepage
- Added benchmarking to the wolt import command
- Added MySQL natural sort function
Short todo:
- Add updated time to mod component
- Implement naturalsort function into homepage queries and measure performance difference
- Migrate top navigation from old-build