Repository navigation
ManaWG: a shared-flat app with Zod 4 at the API boundary #6737
Abuarchiv
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
ManaWG is a free app for flatmates: shared expenses, a cleaning rota, a shopping list, a calendar and chat. Zod 4 is the validation layer at its API boundary.
Request bodies go through a small
parseBodyhelper. It reads the JSON with a byte cap, runs the schema, and maps Zod issues to stable error codes, so route handlers answer400 <code>instead of leaking validation messages. The checks that span fields live insuperRefine, and the routes with several actions usediscriminatedUnion.Money is integer cents all the way down, and the settlement schema says so directly:
Repo: https://github.com/Abuarchiv/manawg (Apache-2.0)
Demo without an account: https://manawg.com/en/demo
I maintain it, and feedback on the Zod usage is welcome.
All reactions