Skip to content

Package Overview

rapiq is a family of small packages around one shared data structure — the Query. Install only what each side of your application needs; @rapiq/core is a peer dependency of everything else.

The map

PackageRole
@rapiq/coreQuery AST, defineQuery + condition helpers, schema system, parser base classes, errors
@rapiq/parser-simpleParses plain object/array input (URL-query-like "simple" dialect)
@rapiq/parser-expressionParses function-call filter expressions (and(eq(name, 'John'), …))
@rapiq/parser-mongoParses MongoDB-style filter documents ({ age: { $gte: 18 } })
@rapiq/codec-url-simpleURL query-string encoder & decoder for the simple dialect
@rapiq/codec-url-expressionURL codec carrying nested filter compounds in one filter=and(...) param
@rapiq/codec-urlRegistry dispatching between URL dialects via the in-band codec param
@rapiq/sqlDialect-agnostic SQL adapter (pg, mysql, sqlite, mssql, oracle presets)
@rapiq/typeormApplies a Query to a TypeORM SelectQueryBuilder
@rapiq/memoryEvaluates a Query against in-memory objects & arrays

Which packages do I need?

A frontend that builds and sends queries:

sh
npm install @rapiq/core @rapiq/codec-url-simple

An HTTP API backed by TypeORM:

sh
npm install @rapiq/core @rapiq/codec-url-simple @rapiq/sql @rapiq/typeorm

An HTTP API composing SQL by hand:

sh
npm install @rapiq/core @rapiq/codec-url-simple @rapiq/sql

Something in-process — guards, tests, mock backends:

sh
npm install @rapiq/core @rapiq/memory

Then add per feature:

Dependency layers

Foundation
Each band depends only on the bands above it — internal dependencies are peer dependencies, so npm installs nothing you didn't ask for.

All packages are ESM-only, ship TypeScript types, and share the same export shape (single entry point).

Released under the MIT License.