Show HN: Typebase – A single-folder back end you write in TypeScript (typebase.io)
I built Typebase, a library that gives you Convex's DX with Supabase's openness.
After trying Supabase I liked how fast it is to spin up a DB and auth, but really didn't like using RLS and SQL for authorization. With Convex I loved how your server "lives" in your code, but disliked the DB model and the realtime-first defaults.
With Typebase you just write TS files inside a typebase/ folder in your existing repo. You can define your DB tables inside a schema.ts file and export server functions that your frontend calls like local functions, fully typed. Auth is built in.
Then one CLI command uploads your server to any of the available providers (Vercel, Cloudflare Workers or Deno Deploy for the servera and Neon for the DB), or generates the code so you can deploy it wherever you want.
Built on top of oRPC, Drizzle, and better-auth.
Happy to answer any questions or feedback!
63 comments
[ 0.26 ms ] story [ 12.6 ms ] threadNote that you can run Convex on top of your own Postgres, and we do this for our internal apps, with very nice performance (plenty for our internal use cases).
So good. I laughed out loud at this.
Also Supabase at that time wasn't reliable and it's not really made for self-hosting. Felt almost as bad as Github stability these days.
Still, based on this limited experience, I've been avoiding RLS and supabase.
On Cloudflare, it should use the `@neondatabase/serverless` driver configured here https://github.com/typebase-io/monorepo/blob/fa3af0b71126caa...
Looks an awful lot like a orpc, just built on top of drizzle instead of raw queries. I'm sure some people want this, but it seems like gross duct tape that will bite you in three years
> * None of these people exist. We checked. Twice. Legal is chill
Maybe I’m just the old man yelling at the clouds, but can we not have some integrity and actually put the truth out there? There is nothing wrong with using AI, but we’re still responsible for our work.
> Looks an awful lot like a orpc, just built on top of drizzle instead of raw queries
Typebase is built on top of oRPC, the idea with Typebase is that you can build everything on super simple way and Typebase will take care of the rest.
Personally not for me. These are very productive once you learn the shape they expect.
But the wheel needs to be reinvented on how to do everything.
I ran have straight forward verbose code with no hidden control flow
nextjs dx is a special kind of hell. disclaimer: im just a simple rails guy.
It's yet another backend framework, added that it only runs on vercel infrastructure.
There are better front end and back end servers, those that simply rely on nodejs to serve. Next.js does that, without vercel.
I'd say we disagree on the simplicity then: hydration, nextjs API reinventions of every interaction else 'use client' as an escape hatch which means it runs on the client but then what does the non 'use client' code do if nextjs is not a client-facing framework?
I’m reminded of this essay discussing frameworks versus libraries [0].
[0] https://tomasp.net/blog/2015/library-frameworks/
What we do is have the server just serve the page and let the client handle most of the rendering.
It’s novel and innovative
Not that that layer isn't important. We ended up building something like this at Ingram, nextkit: https://github.com/ingram-technologies/nextkit - but we distribute it as a set of micro libraries that work well together rather than a unified framework. (Auth is nk-auth, built on top of betterauth, and sql is nk-db, built on top of drizzle)
You got to pretty much the same conclusions we did though regarding the "why".
I love your approach, fake testemonials and all.
Was the video generated by AI?
What didn't work for me is the build step. In a bigger project it should be normal to have this but I really love to interactively build and having to restart and rebuild after each change is issue for me.
For the local build we have the 'generate-server --watch' command and I want to add an option so on every rebuild it runs another command, something like 'generate-server --watch --command "pnpm run dev"' so on every change the server runs the latest version of the code.
For when you upload to a server theres no much we can do because the builds on the server take too long, something we have on the roadmap is having our own server provider and the number 1 priority is that is so fast that you can deploy a new version on every local change.