arocapi implements the RO-Crate API for data collections, packaged as a Fastify plugin. You mount it into your own Fastify app and bring your storage, search index and access rules; arocapi serves the routes for entities, files, search and RO-Crate metadata, following the PILARS protocols for long-term archival repositories.
Documentation: https://arocapi.crate-works.org
pnpm add arocapiv5 is in beta, and the documentation site describes it. Until it is released, install it with
pnpm add arocapi@beta. Changes merged to main are published under the beta tag.
The v4 documentation is the README at the v4.0.1 tag.
You need Node.js 22.18 or later, pnpm, and Docker with Docker Compose.
pnpm install
docker compose up -d # Postgres, OpenSearch and the Oni UI
pnpm generate # generate the Prisma client
pnpm db:migrate # apply migrations
pnpm seed # load the sample data in example/data
pnpm dev # build and serve src/index.dev.ts on http://localhost:9000.env holds the local connection URLs and is committed, so don't put secrets in it.
| Command | What it does |
|---|---|
pnpm lint |
Biome, type checking, the docs examples type check and knip |
pnpm test |
Start the test containers, apply migrations and run every test |
pnpm test src/app.test.ts |
Run one test file |
pnpm test:watch |
Run the tests in watch mode |
pnpm test:coverage |
Run the tests with an HTML coverage report |
pnpm dbconsole |
Open a psql console on the development database |
pnpm --filter website dev |
Run the documentation site locally |
pnpm --filter website build |
Build the documentation site, checking its diagrams and every link |
Commit messages follow Conventional Commits; they decide the next version. See TESTING.md for the test setup and RELEASING.md for releases.