Your next Angular Query Builder ๐
April 30, 2026 ยท View on GitHub
Your next Angular Query Builder ๐
NgQubee is a query builder for Angular. Compose your API requests without re-inventing the wheel.
- Reactive โ URIs emitted as RxJS observables, state held in Angular Signals
- Pagination ready โ typed
PaginatedCollection, fluent navigation (nextPage,lastPage,goToPage) - Test-driven โ 495+ specs
- Multi-driver support: JSON:API, Laravel (pagination-only), Spatie Query Builder, NestJS (
nestjs-paginate), PostgREST / Supabase, and Strapi
๐ Documentation
Full documentation lives at ng-qubee.andreatantimonaco.me โ driver guides, query-builder API, pagination helpers, auto-generated API reference, and version history.
This README is intentionally minimal. For everything beyond install + a five-line example, head to the docs site.
Requirements
- Angular โฅ 16 (uses Signals)
- RxJS ^6.5.0 || ^7.0.0
Install
npm i ng-qubee
Drivers
A driver must be specified in the configuration:
| Driver | Backend | Wire format snapshot |
|---|---|---|
| JSON:API | Any JSON:API-compliant backend | filter[field]=value, sort=-field, page[number]=N&page[size]=N |
| Laravel | Plain Laravel pagination | limit=N&page=N (pagination only) |
| Spatie | Spatie Laravel Query Builder | filter[field]=value, sort=-field |
| NestJS | nestjs-paginate | filter.field=$op:value, sortBy=field:DESC |
| PostgREST | PostgREST / Supabase | col=eq.value, order=col.asc, limit=N&offset=M |
| Strapi | Strapi v4 / v5 headless CMS | filters[field][$eq]=value, sort[0]=field:asc, pagination[page]=N&pagination[pageSize]=N |
Per-driver guides โ wire format, supported operators, response parsing, customisation โ live on the docs site.
Quick start
import { bootstrapApplication } from '@angular/platform-browser';
import { DriverEnum, NgQubeeService, provideNgQubee, SortEnum } from 'ng-qubee';
bootstrapApplication(AppComponent, {
providers: [provideNgQubee({ driver: DriverEnum.STRAPI })]
});
// In a component or service:
constructor(private _qb: NgQubeeService) {}
this._qb
.setResource('articles')
.addFilter('status', 'published')
.addSort('createdAt', SortEnum.DESC)
.setLimit(10)
.generateUri()
.subscribe(uri => console.log(uri));
// โ /articles?filters[status][$eq]=published&sort[0]=createdAt:desc&pagination[page]=1&pagination[pageSize]=10
The full query-builder API, pagination helpers, per-driver feature matrices, and TypeScript types are documented at ng-qubee.andreatantimonaco.me.
License
MIT ยฉ Andrea Tantimonaco