Skip to content

MondelLightweight TypeScript ODM for MongoDB

If you know the MongoDB driver, you know Mondel. Typed collections. Zod validation. Serverless-ready. Zero magic.

Mondel Logo
typescript
import { defineSchema, s } from "mondel";

export const userSchema = defineSchema("users", {
  timestamps: true,
  fields: {
    email: s.string().required().unique(),
    role: s.enum(["ADMIN", "USER"]).default("USER"),
    metadata: s.object({
      active: s.boolean(),
    }),
  },
});

export const schemas = [userSchema] as const;

Not another heavy ORM

Mondel is a thin ODM: plain documents in, plain documents out. No Active Record classes, no hidden hooks, no hydration layer.

You wantUse
Typed db.users.create / findManyMondel
Full driver power (watch, exotic ops)db.users.getCollection()
Indexes & validators in deploynpx mondel push
Relations engine / SQL migrationsNot Mondel — see Comparison

Next steps

Released under the MIT License. · llms.txt