Email newsletter project based on Zero to Production in Rust.
- User subscribes to newsletter (user status is set to "pending confirmation")
- User receives a confirmation email with generated token
- User confirms email (user status is set to "confirmed")
- User gets sent an email every time new issue drops
- OWASP guidelines
- Password hashing + salt (argon2id hasher with work parameters)
- Protection against preimage attacks, dictionary attacks, timing attacks
- Postgres with
sqlx
and support for offline mode (for docker building)- Compile-time correctness checks of queries
- SQL for queries
- Async support
- Database migrations
- Database transactions
- Fly.io Docker app deploy with Postgres cluster
- Zero-downtime deployments (incremental migrations and code updates)
- Image size optimization (minimal runtimes, multi-stage builds)
- Image build run time optimization (caching dependencies binary with
cargo-chef
)
- Unit testing (
reqwest
) - Integration testing
- Property-based testing (
quickcheck
andfake
) - Continuous Integration (GitHub actions)
- Continuous Deployment (fly.io)
log
logging,tracing
spansbunyan
formatting layer
- Parse, don't validate -> maintaining invariants with newtype pattern
lettre
- Custom error generation with
thiserror
andanyhow
- Enum error types for control flow
- Multithreaded execution
- Actix extractors with
serde
- Actix middleware
- Actix cookies
config
- Hierarchical configuration files
- Environment variables parsing
secrecy