i'm working on a new project that I started a while ago but paused immediately because I was so busy i restarted it this week from scratch.
It's called formgen.If you've ever built a complex form (with validation, conditional fields, etc.), you know the pain. You define your data structure and validation rules in a zod schema...and then you have to manually re-describe the entire thing again in your UI code. You wire up every input, repeat labels, write error handlers...it's repetitive, boring, and error-prone.
so what if your zod schema was the only thing you needed?,it'll automatically generate a fully functional, type-safe, accessible form with proper labels, error messages, and everything?
ui generation is totally optional, and it works fully headless with tRPC integration for type-safe backend communication.that's the goal for formgen. a schema-first, framework-agnostic form engine.
It's called formgen.If you've ever built a complex form (with validation, conditional fields, etc.), you know the pain. You define your data structure and validation rules in a zod schema...and then you have to manually re-describe the entire thing again in your UI code. You wire up every input, repeat labels, write error handlers...it's repetitive, boring, and error-prone.
so what if your zod schema was the only thing you needed?,it'll automatically generate a fully functional, type-safe, accessible form with proper labels, error messages, and everything?
ui generation is totally optional, and it works fully headless with tRPC integration for type-safe backend communication.that's the goal for formgen. a schema-first, framework-agnostic form engine.
🔥9❤1
it'll be built on tanstack so you can use it on different frameworks and different validation libraries like zod, arktype, or joi, will be supported. it automatically handles nested objects, arrays, and conditional fields, so complex forms work out-of-the-box.
even without ui, formgen is useful,it keeps your form state, validation, and backend integration fully consistent and type-safe. with tRPC integration, your backend calls use the same schema, so no duplicated dto or parsing errors. headless mode and overrides let you handle edge cases or custom behavior while staying fully declarative. this makes it practical for any project, even if you just want a robust, type-safe form engine without auto-generated ui.
even without ui, formgen is useful,it keeps your form state, validation, and backend integration fully consistent and type-safe. with tRPC integration, your backend calls use the same schema, so no duplicated dto or parsing errors. headless mode and overrides let you handle edge cases or custom behavior while staying fully declarative. this makes it practical for any project, even if you just want a robust, type-safe form engine without auto-generated ui.
this is by far the most complex project I've ever attempted.i have no idea if I can fully pull it off. But I'm going to continur build it in public, learn everything I can, and share the process. The worst case scenario is I learn. The best case is I build a tool that makes building form easier.
🔥2
Sam's Archive
this is by far the most complex project I've ever attempted.i have no idea if I can fully pull it off. But I'm going to continur build it in public, learn everything I can, and share the process. The worst case scenario is I learn. The best case is I build…
why is it complex?
> the abstraction leakage problem: this is my biggest challenge. my goal is to abstract away all the complexity, but forms are inherently complex and need to leak.
> a textarea that needs a custom onblur handler to call an api and validate a single field..how does that fit into my metadata? i’ll need an escape hatch, and designing that escape hatch so it doesn’t become the only way people use the library is critical.
> nested arrays and objects.this is where every form library’s simplicity goes to die..tanstack form handles the state for this well, but my job is to generate the ui for it. automatically generating "add" and "remove" buttons that are styled correctly for every possible ui plugin (shadcn, mantine, mui) is pain. the level of customization needed for a complex array form is so high that my automatic rendering might be abandoned immediately for the headless mode.that's why the ui is optional.
> the headless mode is my salvation (and my admission of defeat).
<field name="name"> {({ field, error }) => ( ... )} </field>
this is the most important part of my entire proposal.
> the abstraction leakage problem: this is my biggest challenge. my goal is to abstract away all the complexity, but forms are inherently complex and need to leak.
> a textarea that needs a custom onblur handler to call an api and validate a single field..how does that fit into my metadata? i’ll need an escape hatch, and designing that escape hatch so it doesn’t become the only way people use the library is critical.
> nested arrays and objects.this is where every form library’s simplicity goes to die..tanstack form handles the state for this well, but my job is to generate the ui for it. automatically generating "add" and "remove" buttons that are styled correctly for every possible ui plugin (shadcn, mantine, mui) is pain. the level of customization needed for a complex array form is so high that my automatic rendering might be abandoned immediately for the headless mode.that's why the ui is optional.
> the headless mode is my salvation (and my admission of defeat).
<field name="name"> {({ field, error }) => ( ... )} </field>
this is the most important part of my entire proposal.
⚡3
I’m trying this build-in-public thing on X too, show your boy some love there.🥹
https://x.com/SamuelFikre_/status/1967830135484321950
https://x.com/SamuelFikre_/status/1967830135484321950
❤3
so this guy from x contacted me today to collab on the formgen project. i didn't know him before but he is followed by people in the photo, which is good.ig he is a good dev..i'm really surprised by this.
x is actually mad.
x is actually mad.
🔥20
Audio
started making music again like a week ago in fl studio after 6 years. cause i needed some hobby and this is a better alternative to scrolling.
and yeah this is my first try it is not mixed and mastered and it is made with default plugins in fl so it doesn’t sound that good but yeah i love it and i love tizita.
dont listen to it with earphones bc it is not mixed yet.
and yeah this is my first try it is not mixed and mastered and it is made with default plugins in fl so it doesn’t sound that good but yeah i love it and i love tizita.
dont listen to it with earphones bc it is not mixed yet.
🔥6❤2
Forwarded from DoughNut 🍩
Well ended up creating a package so maybe if ur using elysia it'll help
https://www.npmjs.com/package/tsuki-logger
https://www.npmjs.com/package/tsuki-logger
🔥2
if something doesn't appeal to you personally, it doesn't mean it's overrated.
💯4😁1
Forwarded from El-mom: The other channel
Okay, so I get all the "adulthood sucks", "wish I was a kid again" mnamn to some certain extent. But I mean... Isn't adulthood kinda nice?
Sure, you're busy and working and stressed most of the time, but if all goes well, you know yourself a lot more and are secure in yourself, you have curated a group of close people that make you feel alive, you are calmer and have a sort of slow routine (which you hopefully don't hate), and you have God. I know there's a big "if all goes well" here, but adulthood could be as nice as childhood, no?
(I'm open to counterarguments)
Sure, you're busy and working and stressed most of the time, but if all goes well, you know yourself a lot more and are secure in yourself, you have curated a group of close people that make you feel alive, you are calmer and have a sort of slow routine (which you hopefully don't hate), and you have God. I know there's a big "if all goes well" here, but adulthood could be as nice as childhood, no?
(I'm open to counterarguments)
❤5