Expand description
Auth potions: simple signup flow showcasing a Repository and a Directive.
This module provides a minimal end-to-end example of a signup use case:
- A domain entity (User)
- A repository port (UserRepository)
- An adapter (InMemoryUserRepository)
- A directive (SignUpUser) with validation
- A small application function to wire it together
Copy, paste, and adapt as needed.
Revision History
- 2025-10-07T11:43:00Z @AI: Migrate to v0.4 QueryRepository API; remove id-centric methods; add filter-based querying; fix ID generation.
Structs§
- InMemory
User Repository - A simple in-memory adapter implementing the user repository.
- Sign
UpUser - Directive representing a signup request.
- User
- Domain entity representing a user.
Enums§
Traits§
- User
Repository - Repository port for users, extending the generic Repository.
Functions§
- execute_
signup - Application helper that executes the signup flow.