Overview
The problem
Service businesses, like barbershops and salons, manage staff, products and billing in scattered tools. The idea was to bring it all together, with team invites and a monthly subscription.
A multi-tenant platform: the owner creates the business, invites the staff and registers products. Everyone signs in with Google or with an e-mail one-time code, and the subscription plan decides how many businesses fit.
Decisions and why
- Use cases with interface dependencies
- Repositories, mailer and generators come through the constructor: the use case does not know whether it is Prisma or memory.
- Invites with a temporary password and role
- Nobody keeps the password the owner typed: on first access the person changes it and confirms the role.
- Google or e-mail code sign-in
- One less password to forget, and the e-mail is verified on the way.
- Plan limits in the use case
- The business rule blocks before writing; the front-end only shows the upgrade screen.
- ULIDs and short slugs
- Time-sortable ids and URLs that do not expose internal ids.
requestresponse
Pick a scenario above to watch the message travel through the architecture.