Contributing
MountSQLI is a pnpm monorepo. Contributions follow a few conventions.
Repo layout
Section titled “Repo layout”mountsqli/ (pnpm workspace)├─ packages/ # schema, compiler, driver*, query, migration, auth, ...├─ examples/ # mount-app, express-app, cli-demo└─ docs/ # this documentation (Astro Starlight)Conventions
Section titled “Conventions”- ESM-only in every package.
- Drivers are thin — implement
Driver+ aDialect; no query logic. - Queries are data — add capabilities as
QueryPlannodes, not driver methods. - Types are the API — keep runtime code free of
anyin exported signatures. - Migrations are pure-then-applied — diff/generate are pure; only
Migratortouches the DB. - No generators, decorators, or bespoke DSL.
Local setup
Section titled “Local setup”pnpm installpnpm --filter @mountsqli/<pkg> typecheckpnpm --filter @mountsqli/<pkg> testCI runs build → typecheck → test on Node 24 for every push/PR.
Adding a feature
Section titled “Adding a feature”- Add the capability as a
QueryPlannode in@mountsqli/compiler. - Wire the builder method in
@mountsqli/query. - Translate it in each dialect/driver.
- Add a regression test (real driver preferred).
- Document it under the right docs folder.
Documentation
Section titled “Documentation”Docs live in docs/ as Markdown. Follow the existing structure: one concept per
page, frontmatter title + description, a Related section, and links to
neighbors. Build with pnpm --filter docs build.
Best practices
Section titled “Best practices”- Keep all
@mountsqli/*packages on the same version when releasing. - Add a regression test for every bug fix (see
issues/). - Update
CLAUDE.mdand docs when behavior changes.
Common mistakes
Section titled “Common mistakes”- Putting query logic in a driver (it belongs in the compiler/IR).
- Forgetting the
buildbeforetest(tests resolve types from builtdist).
Related
Section titled “Related”- Roadmap — what’s next.
- Architecture → How It Works — the model.
