* More mod info
* Downloading mods
* Run prepare
* User editing + icon editing
* Finish
* Some fixes
* Fix clippy errors
* Fix hash lookup
* Run prepare
* Run formatter
* Hotfixes for indexing
* Handles missing INDEX_CACHE_PATH environment variable
* Exits on startup if environment variables are missing. The flag
--allow-missing-vars disables this, but that is generally a bad
idea, since most environment variables are required (and the ones
that aren't should be marked as such).
* Disables the query loggers
* Upgrade meilisearch-sdk to 0.4.0 for MeiliSearch 0.16 support
* Fix swap of Forge and Fabric labeling
* Improve curseforge and local indexing
This should make curseforge indexing more efficient, and reuses
some of the normal local indexing for the queued indexing of
recently created mods.
* Unify impls for single and multiple routes for mods and versions
This uses the same backend for the single and multiple query
routes so that they no longer return inconsistent information.
* Cache valid curseforge mod ids to reduce request load
This caches the ids of minecraft mods and reuses them on indexing
to reduce the amount of unused addons that are returned.
* Add types to game_versions, allow filtering by version type
- Fixes an issue with version numbers in the initial mod indexing
queue
- Modifies the /api/v1/categories/game_versions route to take an
optional query parameter `type` to filter the listed game versions
- Creating tags is now idempotent
- Creating game_versions now requires a JSON body that specifies
the version type
* Implement automatic indexing of new Minecraft versions
It's currently set to run every 6 hours and isn't configurable; we
could add config for it, but it doesn't seem likely to be rate
limited or have issues with frequency.
* Support for using a master key
* Expand scope of PR, add wrapper struct, add files to intitial versions/mods
* Change changelog path, run formatter
* Split file changes into different PR
* Formatting, rename main variable
Co-authored-by: Aeledfyr <aeledfyr@gmail.com>
* Change header name
* Add default bio value
* Remove default
* Make name null
* Run prepare
* Add new API Routes for requesting multiple of an item
* Run formatter
* Simplify get mods query
* Run prepare
* Refactor to use one query for most routes, change version create route to have mod_id in data
* More fixes
* Merged mod file upload in version creation, mod creation and
version file add to one function; This makes sure that they are
consistent
* Made some fields on `User` optional: `github_id`, `avatar_url`, `bio`.
* We may not want to publicly show the `github_id` to everyone
with access to the API
* If we allow non-github users, some of those fields would be
invalid; some oauth providers may not have avatars or bios
* Made CORS origins should configurable
* Made `--reconfigure-indices` and `--reset-indices` exit after
completion instead of starting the server
* feat: Implement more database methods & add mod and version routes
* feat: Implement deleting mods/versions & implement categories
* feat: Implement routes for categories, game versions & loaders
* feat: Reorganize API routes in a (hopefully) usable way
* Creation Stuff
* Make it work
* Response structs + Mod ID validation
* Run code formatter
* Push local changes
* Finish up version creation - fix comments, impl file creation
* fix: Add sqlx prepare data
Co-authored-by: Aeledfyr <aeledfyr@gmail.com>
This also adds a commandline argument library (gumdrop) for dealing
with indices - reseting, reconfiguring, and skipping them. I don't
know which library is best for this case, but gumdrop has shorter
compile times and many fewer dependencies than clap, which is why
I chose it.
* feat(indexing): Reindex curseforge & local database at an interval
* fix(indexing): Use strings for meilisearch primary key
Fixes#17 by prefixing curseforge ids with "curse-" and local ids
with "local-".
* feat(indexing): Add newly created mods to the index more quickly
* feat(indexing): Implement faceted search, update to meilisearch master
Fixes#9, but only uses faceted search for categories. It should
be reasonably simple to add support for versions, but it may not
be as useful due to the large number of versions and the large
number of supported versions for each mod.
* feat(indexing): Allow skipping initial indexing
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* WIP Switch to Postgres
* feat(postgres): more work on porting to postgres, now compiles
* feat(docker-compose): Changed the docker-compose.yml file to use postgres.
* Update docker, documentation, gh actions...
* Remove bson dependency
* Remove bson import
* feat: move mock filehost to trait rather than cargo feature
* feat(postgres): transactions for mod creation, multipart refactor
* fix: Add Cargo.lock so that sqlx functions
* Update sqlx offline build data
* fix: Use SQLX_OFFLINE to force sqlx into offline mode for CI
* Default release channels
* feat(postgres): refactor database models to fit postgres models
* fix: Fix sqlx prepare, fix double allocation in indexing
* Add dockerfile (#40)
Co-authored-by: Charalampos Fanoulis <charalampos.fanoulis@gmail.com>
Co-authored-by: Aeledfyr <aeledfyr@gmail.com>
Co-authored-by: redblueflame <contact@redblueflame.com>
Co-authored-by: Jai A <jai.a@tuta.io>
Co-authored-by: Valentin Ricard <redblueflame1@gmail.Com>
Co-authored-by: Charalampos Fanoulis <charalampos.fanoulis@gmail.com>
* fix(mod-creation): fix actix server data & mod creation route
* feat(file-host): implement mock file hosting
This implements a mock file hosting system backed by the system's
filesystem. It mirrors the API of the backblaze integration, but
puts the files directly on disk in the path specified by the
MOCK_FILE_PATH environment variable (defaults to /tmp/modrinth).
The mock file hosting is enabled by default using cargo features
to allow people to work on modrinth without access to a valid
backblaze account and setup. To enable backblaze, specify the
cargo feature "backblaze" when running, ex. `cargo run --features
backblaze`.
* feat(file-hosting): implement basic backblaze API error handling
* fix(mod-creation): fix extension parsing, use base62 ids for paths
fix(file-hosting): reduce unnecessary allocations
* fix: fix auth with docker mongodb
* fix: fix failing checks
* fix: remove testing files
* refactor: improve error handling
* fix: specify bind address instead of port
* fix: remove temporary testing file
* fix(errors): change error names to snake_case
* refactor(errors): split indexing error types, remove unused errors
* feat: add env variable checking at program start
This just checks whether the enviroment variables exist and can
parse to the given type and gives a warning if they can't. This
should prevent cases where the program fails at runtime due to
checking an environment variable that doesn't exist.
* chore: Removed everything not needed, and added base for rewrite
feat(error_handling): Added 404 general cache
feat(index): Added informations about the app in the / route.
* feat(indexing): Brought back the indexing, with conditions to make it easier
* fix: Fixed build error with a forgotten call
* feat: Add Docker development enviroment (#19)
* ci: add a *lot* of new actions
* fix: rename linting action
* fix: invalid yaml begone(?)
* ci: Added cache to speed up build times
* fix(ci): 🦀ed the yaml errors
* fix(ci): fixed a missing hyphen
* ci: Added matrix of rust versions, and changed way to install rust toolchain
* fix(ci): Added names to build with the matrix so it's easier to find the source of the problem
* style(ci): Added eof lines
* refactor: Finished moving the search.rs file to a separate module.
* Search Endpoint
* refactor: Moved around functions and struct for a better understanding of what it does.
* chore: Change env default settings to resolve conversation
* refactor: Removed #[use_macros]
fix: Fixed meilisearch address from env
* chore: Added email to Aeledfyr
* fix: Brought back the dotenv variables
* style: Ran `cargo fmt`
Co-authored-by: Charalampos Fanoulis <charalampos.fanoulis@gmail.com>
Co-authored-by: Jai A <jai.a@tuta.io>