Show HN: Typebase – A single-folder back end you write in TypeScript
Typebase is a single-folder backend solution that allows developers to write in TypeScript. With Typebase, you define your database schema, server actions, and authentication within a `typebase/` folder in your application. By using a single command, a fully typed server can be deployed, which your frontend can call like local functions.
Typebase provides idiomatic clients for various frameworks, such as Server Components, SvelteKit load functions, Nuxt plugins, and Expo SecureStore. Everything happens within your codebase, with code generation, schema pushes, and deployment handled by the CLI.
One noteworthy feature of Typebase is its implicit Row-Level Security (RLS), which lives in a SQL dialect that your editor doesn't typecheck. This means that one UPDATE policy grants write access to every column, including the ones you add in the future. This overly permissive clause was present at 2am during a review process, and despite the agent's slip-up, it was approved by the compiler.
Typebase takes a different approach to authorization compared to other solutions. Instead of relying on overly permissive clauses, your action declares the columns it accepts, and your authentication check runs in code before any of them reach the database. Adding a column will notify you, through the compiler, of who can write to it. This approach ensures that the same code your agent writes is the code your compiler checks, providing a more explicit and secure authorization system.
The creators of Typebase aimed to have backend functions that live within your codebase while being backed by a database you actually own. Currently, storage is not supported, but it is planned for the future roadmap. Although the source material does not contain any direct quotes, readers are encouraged to explore Typebase further by installing it via npm.
Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.