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
| Package | Responsibility |
|---|---|
comon_orm | parser, validator, formatter, code generation, query models, in-memory adapter, migration metadata |
comon_orm_postgresql | PostgreSQL runtime adapter, introspection, shared-database migrations |
comon_orm_sqlite | VM-oriented SQLite runtime adapter, introspection, rebuild-aware migrations |
comon_orm_sqlite_flutter | Flutter 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.
Architecture
Follow the flow from schema source to generated client and runtime adapters.
Platforms and limitations
See what is production-ready today and where the boundaries still are.
Choosing a runtime
Choose between PostgreSQL, SQLite, Flutter SQLite, and in-memory based on workload and deployment shape.
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.