lib folder and best practives
What do you think about lib folder? I am moving from old project and want to move
in to typescript and into ct3 structure. Any tips on best practices?
6 Replies
Adding a message suggestion that already was made but I am afraid that utils folder is more for Utility functions and not for the functionality that I want there that seems very client side and relevant
by @qpixel (fine with pings)
i have a date format function, stuff for getting git revision/package.json version
i have a folder labeled "utils"
but also getAllArticles seems like hook, you could put it in a hooks folder ig?
My opinion on all of this is that it's subjective and there really isn't a "right" way to do it
I'm on my pc now, so here's a screenshot of my folder layout
Please note this was originally a t3 app but because of changing requirements I'm now using a graphql api that I don't fully control (for some resemblance of typesafety)
I'm currently deprecating trpc support
I hope to get a second opinion on this
You could look at the cal.com codebase iirc they were t3 app before t3 app was a thing
also i believe answer overflow is a t3 app