👋 I'm Alex & I tweet about web dev stuff Creator of @trpcio, work @square, scout @a16z

Malmö, Sweden
i wish typescript project references was fast
2
22
2,839
Alex / KATT 🐱 retweeted
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
13
3
106
12,893
Alex / KATT 🐱 retweeted
This is the most performant global app I have ever built, I love this foundation for @languine_ai 🧱 Next.js 🌍 @vercel (3 regions) 🔋 @tursodatabase (3 regions) tRPC from @alexdotjs for the CLI and together with RSC ⚡
16
17
297
52,264
Alex / KATT 🐱 retweeted
Apparently people dig this, here's how I structure my Next.js apps (details below)
this is how i structure my nextjs apps nowadays and it just feels right
42
62
1,869
313,964
Alex / KATT 🐱 retweeted
The most annoying problem for Zero's launch was what bug tracker to use. GitHub is way too slow, and Linear doesn't have public bugs or permissions – both required for OSS projects. This was driving me nuts, until I realized the only possible solution… ⏩ (link in reply)
26
47
437
134,563
Alex / KATT 🐱 retweeted
Replying to @alexdotjs
||nion type Inter&ection type
1
2
11
1,334
I still mix up the terms "union" and "intersection" all the time no matter how much typescript I write
5
1
41
4,208
for those of you that *don't* develop with a local db (eg postgres/mysql) - why don't you?
for those you of you that develop with a local db (eg postgres/msql) does your team have a specific process to bring it up locally?
8
29
9,793
My mum just asked me to get her a trpc t-shirt in exchange of having helped me with accounting for years and it made me very happy
2
27
1,876
I've never wanted a JaGUar less than today 😂
3
1
26
3,166
don't worry, I don't know what this tweet means either
11
1,046
"use trpc";
7
58
4,227
Alex / KATT 🐱 retweeted
tRPC is looking at deprecating our @tan_stack Query Integration in favour of something simpler and more tanstack native Come give us some feedback on the plans! (link below)
5
8
149
39,792
Alex / KATT 🐱 retweeted
TypeScript tip: stop using optional properties so much in your internal app logic. ❌ prop?: string; ✅ prop: string | undefined; Being explicit about undefined values eliminates the silent bugs that happen when you forget to provide a value.
62
95
1,321
157,621
Alex / KATT 🐱 retweeted
After 288 days, I have uploaded again on YouTube! I wanted to make this video for a very long time, the dilemma of setting up TypeScript in a monorepo is real so I show & compare 4 different ways of doing TypeScript in your monorepos. Give it a watch! 👇 link in replies.
5
10
66
7,093
Alex / KATT 🐱 retweeted
I have published a Typescript in Monorepos test repo where I compare project references & built packages on the TS LSP speed with 100 @trpcio routers. Youtube video on this coming soon, but it seems that built packages (no surprise) are king for speed. github.com/ixahmedxi/typescr…
2
1
41
3,290
Alex / KATT 🐱 retweeted
I'm looking for TypeScript consulting to support my full-time open-source work on @arktypeio! If your team struggles with... 🧩Writing complex types to optimize DX ☠️tsserver lag in editor 🧪Type testing or benchmarking I can help! If not, retweets also really help💖
3
33
106
19,465