Prepare → Secure Store → Compose → Send — a PHP report stack that stays fast on legacy Laravel and plain PHP, with honest scale labeling on the public demo.
Part of the Lorapok Ecosystem — Building the future of AI-driven developer tools.
PHP 5.6 → current · Laravel 4.1 → currently supported
Site: reportkit.lorapok.tech · API: reportkit-api.lorapok.tech/v1/health
Repo: Maijied/Reportkit-Core
License: Lorapok-NCL-1.0 — free to use and modify; not free to sell
Modern stacks often fail under report load — one monolithic query, one heavy pipe, timeouts for everyone. ReportKit takes the opposite path: chunked prepare, in-memory secure store, zero re-query during export, then compose and send.
Left: monolithic query → unstable pipe → timeouts. Right: filters → week chunks → secure store → Excel/CSV/PDF/email with 0 re-query.
| Modern pattern (fails) | ReportKit pattern (scales) |
|---|---|
| One giant SQL per request | Week-chunked reads (concurrency cap) |
| Re-query on every page/export | Secure store — merge once, slice many times |
| Opaque “billions of rows” claims | Provenance badges: live · synthetic · measured · cached |
| Framework version as the story | Architecture as the story — old framework, new pipeline |
All public demo data is fictional (dummy operators, hub routes, fares). No real customer or production data is used.
| Resource | URL |
|---|---|
| Website | reportkit.lorapok.tech |
| Docs | reportkit.lorapok.tech/docs |
| Interactive demo | reportkit.lorapok.tech/demo |
| Demo API | reportkit-api.lorapok.tech/v1/health |
| Discussions | GitHub Discussions — see categories below |
flowchart LR
subgraph prepare [Prepare]
F[Filters validated]
W[Week chunks × N]
DB1[(Database A)]
DB2[(Database B)]
F --> W
W --> DB1
W --> DB2
end
subgraph store [Secure store]
M[Merged rows in memory]
DB1 --> M
DB2 --> M
end
subgraph compose [Compose]
D[Dedupe by key]
S[Sort + slice]
M --> D --> S
end
subgraph send [Send]
DT[DataTables JSON]
X[Excel / CSV / PDF / Email]
S --> DT
S --> X
end
Rules
- Prepare —
DateRangeChunkersplits the window into weekly ranges; each chunk hits the DB with indexed filters. - Secure store — merged result set lives in memory (PHP) or Worker memory for the request lifecycle.
- Compose —
PseudoPaginatordedupes, sorts, searches, slices — no second round-trip to the database. - Send — one response shape (DataTables JSON, export, email) with a provenance label on every number.
graph TB
subgraph mono ["Maijied/Reportkit-Core"]
C["reportkit-core<br/>engine"]
LL["reportkit-laravel-legacy<br/>Laravel 4.1–5.4"]
L["reportkit-laravel<br/>Laravel 5.5+"]
U["reportkit-ui<br/>npm"]
W["reportkit-website<br/>Astro + Worker + D1"]
end
LL --> C
L --> C
U --> C
W -->|docs + demo| C
W -->|docs + demo| L
W -->|docs + demo| U
| Directory | Package | Role |
|---|---|---|
| reportkit-core/ | reportkit/core |
Chunker, paginator, row sources, exports — no Laravel |
| reportkit-laravel-legacy/ | reportkit/laravel-legacy |
Service provider + facades for Laravel 4.1–5.4 |
| reportkit-laravel/ | reportkit/laravel |
Modern Laravel adapter |
| reportkit-ui/ | @lorapok-labs/reportkit-ui |
DataTables + ReportKit browser helpers |
| reportkit-website/ | — | Docs site (GitHub Pages) + Cloudflare Worker demo API |
See MONOREPO.md for CI path filters, secrets, release tags (core/v*, laravel/v*, ui/v*, …), and Packagist mirror runbook.
Production reports often span a live database and an archive. ReportKit merges them with explicit dedupe and ordering:
use ReportKit\Laravel\Facades\ReportKit;
$source = ReportKit::merged([
ReportKit::connection('mysql', fn ($q, $f) =>
$q->from('trips')->whereBetween('booked_at', [$f['start_date'], $f['end_date']])),
ReportKit::connection('mysql_archive', fn ($q, $f) =>
$q->from('trips')->whereBetween('booked_at', [$f['start_date'], $f['end_date']])),
])->dedupeBy('trip_id')->orderBy('booked_at', 'desc');Public demo (Cloudflare D1) mirrors this model:
| Database | Years | Operator link | Indexes |
|---|---|---|---|
reportkit_live |
2018 → present | trips.operator_id → operators.id |
booked_at, operator_id, composites |
reportkit_archive |
2012 → 2017 | trips.operator_code → live operators.code |
booked_at, operator_code, composites |
Overlap rows (trip_id prefix X-) exist in both DBs to exercise cross-database dedupe.
flowchart LR
Site["reportkit.lorapok.tech<br/>Astro / GitHub Pages"]
API["reportkit-api.lorapok.tech<br/>Cloudflare Worker"]
L[(D1 reportkit_live)]
A[(D1 reportkit_archive)]
Site -->|PUBLIC_DEMO_API_URL| API
API --> L
API --> A
| Endpoint | Purpose |
|---|---|
GET /v1/health |
Service + research metadata |
GET /v1/data |
DataTables JSON (mode=live or mode=synthetic) |
GET /v1/trace |
Per-stage timings (live / archive / merge) |
GET /v1/stats |
Row counts + provenance |
GET /v1/weeks |
Weekly ranges for chunking UI |
Scale honesty
| Mode | Rows | Meaning |
|---|---|---|
live |
~1M seeded (500k + 500k) | Real dual-D1 merge on dummy indexed data |
synthetic |
50,000,000 virtual | Deterministic generator, 2012 → present, O(1) paging |
cached |
Bundled fixtures | Fallback when API or quota unavailable |
Research notes: reportkit-website/docs/RESEARCH.md
| Component | Supported range |
|---|---|
| PHP | 5.6 → current |
| Laravel (modern adapter) | 5.5 → 12 / 13 |
| Laravel (legacy adapter) | 4.1 – 5.4 |
| Browser UI | npm @lorapok-labs/reportkit-ui |
composer require reportkit/core:^0.1@beta reportkit/laravel:^0.1@beta
php artisan reportkit:install --publish-assets
php artisan reportkit:make Sales --route=admin/sales --preset=hybridcomposer require reportkit/core:^0.1@beta reportkit/laravel-legacy:^0.1@beta
php artisan reportkit:install --with-config --publish-assets
php artisan reportkit:make Sales --route=admin/salesnpm install @lorapok-labs/reportkit-ui@betaPackagist mirror details for Laravel packages: reportkit-website/docs/PACKAGIST-MONOREPO.md
| Host | Type | Target | Notes |
|---|---|---|---|
reportkit.lorapok.tech |
CNAME | Maijied.github.io |
GitHub Pages (DNS-only until TLS ready) |
reportkit-api.lorapok.tech |
Worker route | Cloudflare Worker | Single-level subdomain; proxied when zone is on Cloudflare |
Full step-by-step (D1, secrets, seed, verify): reportkit-website/SETUP-DNS.md
Enable reportkit-api (summary)
- Ensure
lorapok.techis on Cloudflare (same account as Worker). - Cloudflare dashboard → Workers & Pages → reportkit-demo-api → Domains → add
reportkit-api.lorapok.tech(proxied). Remove anyapi.reportkit.lorapok.techentry first (nested hostname breaks Free SSL). - Deploy Worker via CI (Actions → Deploy Worker) — do not edit the bundled JS in Cloudflare.
- In Cloudflare DNS for
lorapok.tech, confirm Name:reportkit-api, Proxy: proxied (usually auto-created by step 2). - Verify:
curl -s https://reportkit-api.lorapok.tech/v1/health
Until DNS is live, use https://reportkit-demo-api.mdshuvo40.workers.dev as a temporary API URL.
| Workflow | Trigger | Purpose |
|---|---|---|
| Seed D1 (manual) | Actions dispatch | Batched dummy seed (research = 500k + 500k) |
| Deploy Worker | Push worker/** |
Worker + D1 bindings + custom route |
| Deploy site | Push site (excl. worker) | GitHub Pages + PUBLIC_DEMO_API_URL |
| Orchestrate beta release | Dispatch | Core → Laravel → UI → site |
Secrets live on Reportkit-Core only — see MONOREPO.md.
Local plan and checklist: PLAN.md
| Document | Purpose |
|---|---|
| LICENSE | Lorapok-NCL-1.0 — free to use and modify; commercial use and sale require permission |
| CODE_OF_CONDUCT.md | Community standards |
| CONTRIBUTING.md | How to contribute |
| SECURITY.md | Vulnerability reporting |
License summary: ReportKit is open to use and modify. You may not sell the Software, offer it as a paid product or service, or use it commercially without a written license from Lorapok Labs. Contact mdshuvo40@gmail.com for commercial terms.
- One monorepo, one secrets panel, path-filtered CI
- Do not push package source to Shohoz Azure remotes
- Archive deprecated split repos when convenient
- Never claim 50M rows are physically stored on free-tier D1 — use provenance labels
Use GitHub Discussions for questions, ideas, and integration help. Reserve Issues for confirmed bugs and actionable tasks.
| Category | Purpose |
|---|---|
| All discussions | Browse every thread |
| Announcements | Releases, roadmap, and maintainer updates |
| General | Open conversation about ReportKit |
| Ideas | Feature proposals and design feedback |
| Polls | Community votes on direction |
| Q&A | Installation, adapters, demo API, and usage help |
| Show and tell | Integrations, reports, and demos you have built |
Please read CODE_OF_CONDUCT.md before posting.
Mohammad Maizied Hasan Majumder
Creator · mdshuvo40@gmail.com · Lorapok Labs
Developed by Lorapok Labs. ReportKit is an independent open-source project by the author; it is not a fork of any proprietary host application.
Lorapok Non-Commercial License 1.0 (Lorapok-NCL-1.0)
Copyright © 2026 Mohammad Maizied Hasan Majumder / Lorapok Labs
Free to use and modify. Not free to sell or use commercially without a separate agreement from Lorapok Labs.

