The Quests System is an important feature that facilitates users to explore the world, unlock achievements and potentially receive rewards. A quest is a series of steps or tasks that a user has to complete. Each step or task has an acceptance criteria to consider it as done. A quest designer has to define the steps and the order or the path to the end, so the quest is finished when those steps are completed.
Before start, make sure you have these installed:
- Rust | you can use this Development setup guide
- docker-compose | used for DB and Redis
Before running the Quests server you need Postgres and Redis instances, you can start both by running:
$ make runservicesIn order to run the Quests Server:
$ cargo run -p quests_serverAlso, you can run it in watch mode by installing cargo-watch and using the command to run the server:
$ cargo install cargo-watch
$ cargo watch -x 'run -p quests_server'The RUST_LOG environment variable can be used to specify the log level, for example:
$ RUST_LOG=debug cargo run -p quests_serverSee these docs to understand the possible values.
You can use cargo test or leverage on the Makefile to guarantee services tear up and down (DB and Redis):
make tests: run all testsmake test-server: run server specific testsmake test-db: run database specific testsmake test-protocol: run protocol specific testsmake message-broker: run message broker specific testsmake test-system: run system specific tests
Here is a highlevel architecture overview that can help to understand the project strucuture and components: