A lot of you have asked about my tech choices for
@languine_ai and in this long post I will describe my reasoning:
I started out with Cloudflare + Hono to build a REST API together with
@better_auth for authentication, D1 as the primary database connected with
@DrizzleORM.
While this approach worked well for the CLI, once I added the dashboard it slowed me down. While it's great to host your API on a separate endpoint keeping things "clean" I still felt that my velocity wasn't as optimal as I need it to be.
I came to the conclusion that I don't really need a REST API, and instead just need to expose something to the CLI and immediately went back to
@trpcio
I also moved off Cloudflare, keeping everything in Next.js deployed on
@vercel which means I have one codebase for the dashboard and API, deployed in seconds.
Because I changed from a single region D1 database to
@tursodatabase, it also made total sense to add the same regions in
@vercel for a really fast API globally.
With this setup, I can just focus on shipping without breaking anything because of the type safety all the way from Drizzle up to the client thanks to
@trpcio
Let me know if you have any other questions, and still the most important lesson, choose what makes you ship your product in front of your users as fast as possible
Now back to coding