com um clique
node-next-model
node-next-model contém 22 skills coletadas de tamino-martinius, com cobertura ocupacional por repositório e páginas de detalhe dentro do site.
Skills neste repositório
Use `@next-model/supabase-connector` to back a `@next-model/core` Model with Supabase via `@supabase/supabase-js` (PostgREST). One connector for both server (service_role) and browser (anon) — only the client/key differs. Triggers include "Supabase connector", "Model on Supabase", "PostgREST ORM". DDL/transactions/raw SQL are unsupported (manage schema with Supabase migrations).
arktype schema bridge for next-model — a single `@next-model/arktype` object type drives the Model's `init` coercer, `validators`, AND `createTable` columns. Triggers on "arktype model", "type-syntax schema", "single source of truth Model + DB", or any request to wire arktype into next-model.
Use when wiring `@next-model/aurora-data-api-connector` to talk to AWS Aurora Serverless v1 over the RDS Data API. Triggers include "Aurora connector", "RDSDataClient", "Lambda + Aurora", and HTTP-based access to Aurora Postgres or MySQL clusters with no VPC tunnel.
Core of `@next-model/core`, a typed promise-based ORM and Model factory for TypeScript. Trigger when the user wants to "define a model", build chainable queries with `filterBy`, set up a `MemoryConnector`, declare associations, write a schema DSL, attach validators, enable soft delete, or otherwise reach for an ORM API surface (`Model({...})`, `defineSchema`, `defineTable`, `unscoped`, `paginate`, `transaction`).
Use `@next-model/express-rest-api` to expose a `@next-model/core` Model as a conventional REST resource on Express 5. Triggers include "expose model over Express REST", "REST adapter", "8 default CRUD actions", "auth hooks per action", and "response mapping".
GraphQL schema generator for `@next-model/graphql-api` — turns any next-model `Model` into typeDefs + resolvers with 6 default CRUD operations (list/get/count/create/update/delete), per-operation auth hooks, and per-row response mapping. Use when triggers like "expose model over GraphQL", "GraphQL CRUD", or "graphql-http" appear, or when wiring a Model into Apollo/Yoga/graphql-http.
SQL connector for `@next-model/core` backed by Knex 3, supporting sqlite3, Postgres, MySQL, MariaDB, Oracle, and MSSQL through any Knex client. Triggers include "Knex connector", "multi-dialect", "Knex pool", and "schema migrations through Knex" — reach for this when you want one connector that targets multiple SQL dialects through Knex rather than a native single-dialect connector.
Use `@next-model/local-storage-connector` to back a `@next-model/core` Model with the browser's `localStorage` (or any `Storage`-shaped object). Inherits from `MemoryConnector`, so all in-memory query semantics carry over verbatim — only persistence and id management differ. Triggers include "browser persistence", "offline-first", "client-side ORM", and "localStorage adapter".
Native MariaDB connector for `@next-model/core`. `@next-model/mariadb-connector` extends the MySQL connector and uses MariaDB's `RETURNING *` for `INSERT`/`DELETE` to skip the SELECT-after-write dance. Use when the user mentions "MariaDB connector", targets MariaDB 11 / 10.5+, asks about the `RETURNING` clause, or wants `JSON_VALID` enforcement on JSON columns.
Native MongoDB connector for `@next-model/core` built directly on the official `mongodb` Node driver, with one collection per model and core filter operators translated to native Mongo query language. Trigger when the user mentions "MongoDB connector", `@next-model/mongodb-connector`, "ObjectId primary key", "Mongo collection per model", or wiring a next-model Model against MongoDB.
Native MySQL connector for `@next-model/core`, built directly on `mysql2` with no Knex layer. Use when the user mentions `@next-model/mysql-connector`, "mysql2", "MySQL 8", a "MySQL connector", configuring a "mysql pool", `lastInsertId` / `insertId`, or wiring NextModel models against a single MySQL database.
Native PostgreSQL connector for `@next-model/core` built directly on `node-postgres` (`pg`) — no Knex layer. Trigger when working with `@next-model/postgres-connector`, "node-postgres / pg", PostgreSQL pools, `RETURNING *`, or asks like "Postgres connector", "PostgreSQL pool", "pg.Pool".
Use `@next-model/redis-connector` to back a `@next-model/core` Model with Redis (via node-redis), storing one HASH per row and one ZSET of ids per table. Triggers include "Redis connector", "key-value model", and "cache-as-storage" — pick this when you want Model semantics on top of Redis.
Index and selection guide for the @next-model TypeScript ORM monorepo. Use when the user asks about next-model, NextModel, the @next-model/* packages, or wants to pick the right adapter (connector / API adapter / validator bridge) for a use case. Triggers on database/storage layer questions, "which connector should I use", REST/GraphQL/Next.js exposure of models, schema migrations, or schema-driven model definitions.
Native SQLite connector for next-model, built directly on `better-sqlite3` with no Knex layer. Use when the user mentions `@next-model/sqlite-connector`, the "SQLite connector", `better-sqlite3`, a `:memory:` database, WAL mode / `better-sqlite3` pragma options, or schema reflection (`PRAGMA table_info` / `PRAGMA index_list`) for migration generation.
TypeBox schema bridge for next-model — `@next-model/typebox` turns one TypeBox `TObject` into a Model's `init` coercer, `validators` list, AND `createTable` columns. Triggers on "TypeBox model", "JSON Schema model", or "single source of truth Model + DB" when the project already uses `@sinclair/typebox`.
`@next-model/valkey-connector` is the Valkey connector for next-model. It extends `RedisConnector` and is wire-compatible with Redis, so behavior is identical. Triggers include "Valkey connector", "Valkey", "Redis fork", or migrating a Redis-backed app to Valkey.
Zod schema bridge for `@next-model/zod` — turns one zod object schema into a Model `init` coercer, `validators`, AND `createTable` columns at the same time. Trigger when the user says "zod model", "infer model from zod", "single source of truth for Model + DB schema", wants their existing zod schema to drive both run-time validation and DDL, or asks how to wire `fromZod(...)` into `Model({...})`.
CLI and library (`@next-model/migrations-generator`, `nm-generate-migration`) that scaffolds timestamped migration files for `@next-model/migrations` and reflects a live database into a typed `defineSchema(...)` file via the `schema-from-db` subcommand. Trigger on requests like "scaffold a migration", "generate migration file", "create migration stub", or "reflect schema from a live db".
Connector-agnostic schema migration runner for `@next-model/migrations`. Provides a `Migrator` plus `SchemaCollector` typed-snapshot writer, supports `up`/`down` and Rails-style reversible `ChangeMigration` bodies, and emits `IrreversibleMigrationError` when an auto-inversion would be unsafe. Triggers include "schema migration runner", "rollback migrations", "alterTable migration", `defineAlter`, and any `next-model` schema versioning task.
`@next-model/nextjs-api` — Next.js App Router adapter that turns a `@next-model/core` Model into a route handler module exporting `{ GET, POST, PATCH, DELETE }`. Same per-action auth + response-mapping hook surface as `@next-model/express-rest-api`, no Express. Trigger when the user wants to expose a model in Next.js, build an App Router CRUD route, set up `app/api/<resource>/route.ts` handlers, or deploy a model-backed REST endpoint to Vercel.
React reactivity bindings for `@next-model/core`. Use when wiring next-model data into a React 18/19 app — exposes `useModel` (chainable query builder with `.fetch()` / `.watch()` terminals) and `useInvalidateKeys` for key-based refetch. Triggers include "React hook for next-model", "live model state", "subscribe to a model", "watch a next-model query".