cocomon

Core

What comon_orm is, how the packages fit together, and when to use each path.

Core

comon_orm is a schema-first ORM for Dart inspired by Prisma, but designed around Dart and Flutter use cases instead of trying to mirror the whole Prisma surface.

Package split

PackageResponsibility
comon_ormparser, validator, formatter, code generation, query models, in-memory adapter, migration metadata
comon_orm_postgresqlPostgreSQL runtime adapter, introspection, shared-database migrations
comon_orm_sqliteVM-oriented SQLite runtime adapter, introspection, rebuild-aware migrations
comon_orm_sqlite_flutterFlutter SQLite runtime on top of the sqflite ecosystem and app-side local upgrade helpers

Product model

The system is built around one source of truth: schema.prisma.

From there, the project gives you four connected layers:

  • schema parsing and validation
  • generated Dart client code
  • provider-specific runtime adapters
  • migration or upgrade workflows

That split matters because runtime usage and schema rollout are intentionally different concerns. Generating the client is not the same thing as applying schema changes to a live database.

When comon_orm is a good fit

  • you want a typed Dart API generated from schema instead of handwritten SQL wrappers
  • you want PostgreSQL or SQLite support with a consistent generated-client shape
  • you want reviewed migrations for shared databases
  • you need a separate Flutter local SQLite path that stays explicit instead of pretending app-local upgrades are the same as backend rollout

Fastest path into the project

Start with the QuickStart page when you are new to the workflow. Come back to Core when you need package boundaries, architecture, and platform constraints.

On this page