This is my implementation of the book Zero to Production in Rust by Luca Palmieri.
Code is similar to the original, but not exactly the same. It is not a copy-paste of the original code from the book.
Some improvements have been made by me.
One of the most notable improvements that I've made is the usage of the rstest crate for testing. The crate helps us in writing tests.
It allows for test parameterization, for example. The feature allows for having unique test names and customized error messages per test case.
Files in the src/domain directory contain some examples and alternative implementations.
So, some things have been implemented two or even three times, but in a different way, for the sake of example.
The src/domain directory also contains some useful notes about input name and email validation (similar, but different notes).
- Actix Web (actix-web), as web framework
- Tokio, as an asynchronous runtime
- Docker, for containerization
- PostgreSQL, as RDBMS
- sqlx, as an async SQL toolkit for Rust
- reqwest, as an HTTP client for sending e-mails and for integration testing
- tracing, for collecting scoped, structured, event-based diagnostic information
- rstest, for testing
- wiremock, for HTTP mocking for black-box testing
- config, for configuration
- secrecy, for more careful handling of secret values
- validator, for input validation
- fake, for generating fake data for testing
- quickcheck, for property-based testing
A full list of crates used can be found in Cargo.toml.