Domain Driven Backend Architecture #1376
danielyogel
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
This project might be of interest too: https://github.com/CarterGrimmeisen/zod-prisma |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was wondering if anyone tried to use a granular/domain-driven way of backend architecture (while using tRPC or similar).
Something a bit like GraphQL - where you add a resolver per entity (entity may be a field or a larger entity), then the they add to each other to create the final endpoints.
I find this more domain driven and DRY.
For example, in my backend (tRPC/Zod, Prisma ORM) - each time I add a new field to the backend - I have to add it separately to:
In a more domain-driven approach, I would add all of those in one place that describe the field, then some framework would build the final queries/mutations (while not losing type-safety).
I think something like https://github.com/sledorze/morphic-ts would help here.
Any comment is welcome.
Beta Was this translation helpful? Give feedback.
All reactions