Back to browse
Schemic – your database schema, in the Zod API you know

Schemic – your database schema, in the Zod API you know

by msanchezdev·Jun 20, 2026·1 point·0 comments

AI Analysis

●●SolidBig BrainSlick

Find-replace z. to s. migrates existing Zod schemas to database-backed types.

Strengths
  • True Zod superset with database-specific flavors like s.varchar() alongside s.string().
  • Live diff against running database catches schema drift before migration.
  • Single schema file generates DDL, migrations, and TypeScript types together.
Weaknesses
  • Postgres driver still in progress, SurrealDB is the only complete implementation.
  • Competes with Drizzle, Prisma, and Kysely in crowded ORM-adjacent space.
Target Audience

TypeScript developers, backend engineers

Similar To

Drizzle ORM · Prisma · Zod

Post Description

I want you to give a look to a tool I have been working on for a while, Schemic. It's a tool that lets you author your database schema in Typescript, you forget about the DDL and just think on your database's native lingo.

I'd say the strongest points of the project is that it's a SUPERSET of the popular validation library Zod (https://zod.dev), which I'd say shines in representing typescript's type system in code. Schemic wraps it with database-specific flavour (opt-in, for precision) so you can do `s.string()` (zod drop-in, will work with any driver you choose) or `s.varchar()` (flavour added by the postgres driver).

I would like you to check it out and to the SurrealDB project (https://surrealdb.com/), right now that's the most complete driver, I'm working on getting the Postgres driver ready as well so more people can try it out.

Adoption is simple: `bunx @schemic/cli pull` will introspect your database and generate all schema files for you.

Extra bit: the resulting structure after a pull is concise enough that helps any AI agent understand the database easily. They are already good in both Typescript and Zod.

Similar Projects