First-party database adapters for SethuCMS.
Logos are trademarks of their owners and appear only to name the databases SethuCMS works with.
| Package | What it is | Status |
|---|---|---|
packages/memory |
In-memory reference adapter. For tests, demos and as a template. | Ready |
packages/postgres |
PostgreSQL adapter (parameterized SQL, TLS on, read-only by default). | Tested on PostgreSQL 16 |
packages/sql-kit |
Shared SQL dialects, builders and table creation used by the three SQL adapters. | Tested |
packages/sqlite |
SQLite files inside one allowed folder. Needs Node 22.5+. | Tested on real SQLite |
packages/mysql |
MySQL / MariaDB. | Tested on MySQL 8 and MariaDB 11 |
packages/mongodb |
MongoDB (sampled or declared shapes). | Tested on MongoDB 7 |
packages/firestore |
Firestore. | Tested on the Firestore emulator. Experimental |
"Tested on" means the real server (or Google's emulator for Firestore), run in CI. Run the live tests against your own server before relying on one (see below and sethucms-docs/docs/18-adapters.md). SQL Server and DynamoDB are not started.
Every adapter must pass the conformance suite from
@sethucms/adapter-sdk before it is released.
These packages depend on @sethucms/core and @sethucms/adapter-sdk, which are not
published yet. Until they are, package.json links them from sibling folders, so clone
the three repos side by side:
~/sethucms/ (core lives in packages/core; build it first)
~/sethucms-adapter-sdk/ (build it second)
~/sethucms-adapters/ (this repo)
(cd ../sethucms/packages/core && pnpm install && pnpm build)
(cd ../sethucms-adapter-sdk && pnpm install && pnpm build)
pnpm install
pnpm testOnce core and the SDK are published to npm, delete the pnpm.overrides block in the
root package.json; the ^0.0.0 ranges then resolve from the registry.
Set SETHUCMS_TEST_MYSQL_URL (for example mysql://root@127.0.0.1:3306) or SETHUCMS_TEST_MONGO_URL (for example mongodb://127.0.0.1:27017) to run the MySQL and MongoDB live tests. They create and drop a scratch database. Use a throwaway server.
The Postgres live tests skip unless you point them at a throwaway database:
SETHUCMS_TEST_PG_URL=postgres://postgres@127.0.0.1:5432/postgres pnpm testNever point this at a database with data you care about.