PHPackages                             owlookit/quickrep - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. owlookit/quickrep

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

owlookit/quickrep
=================

Quickrep, a PHP reporting engine for Laravel

1.0.4(2mo ago)0511↑50%Apache-2.0JavaScriptPHP &gt;=8.1.0

Since Sep 12Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/OWLOOKIT/quickrep)[ Packagist](https://packagist.org/packages/owlookit/quickrep)[ RSS](/packages/owlookit-quickrep/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (14)Versions (51)Used By (0)

Quickrep Reporting Engine
=========================

[](#quickrep-reporting-engine)

![Version](https://camo.githubusercontent.com/51ee27cc8188be6733d93a33cf72ce4c67c624a2c64228e20209e43823f58697/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e332d626c75652e737667)![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)![PHP](https://camo.githubusercontent.com/02e906e563d40e216663529f486a1408292388f26f8da5044dee7be36f3b99a5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e302d3737376262342e737667)![Laravel](https://camo.githubusercontent.com/59d6ae828244a64a51aece19a9e1cb1416d9d89cd027002e4bf286a7f08e93b1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d25334525334431302e782d6666326432302e737667)

A PHP reporting engine for Laravel that turns SQL (and Query Builders) into rich, interactive, web-based reports.

---

What Quickrep is
----------------

[](#what-quickrep-is)

Quickrep lets report authors focus primarily on **data selection** (SQL `SELECT`) while the engine handles:

- interactive tabular reports (paging/filter/sort)
- cards / tree / graph viewers (depending on installed viewers)
- CSV/XLSX exports
- report JSON API

Historically Quickrep assumed a single SQL database (MySQL/MariaDB).
Starting with **v1.0.1**, Quickrep supports a **3-layer database topology** that enables scalable analytics in production systems.

---

Core Reporting Features
-----------------------

[](#core-reporting-features)

- Write SQL → get interactive report UI
- Server-side paging for large datasets
- Download results (CSV/XLSX)
- JSON API endpoints
- Per-row decorations (links/buttons/html)
- One report = one PHP class (SQL + formatting + behavior)
- Request inputs available inside reports (`getInput()`, URL segments, etc.)
- **Builder support**: `GetSQL()` can return Query Builder / Eloquent Builder

---

Architecture (v1.0.1)
---------------------

[](#architecture-v101)

Quickrep Engine v1.0.1 uses **three connections**:

LayerPurposeDatabaseSOURCEWhere report SQL runs (analytics data)PostgreSQL (`appstats`)CACHECached report tables (paging/filtering)ManticoreSearchCONFIGEngine metadata (sockets/meta/wrenches)PostgreSQL (`appapi`)### Why this topology?

[](#why-this-topology)

- SOURCE contains **materialized views** and aggregated analytics (fast &amp; predictable).
- CACHE isolates expensive browsing operations (filtering/paging) from PostgreSQL.
- CONFIG stores report lifecycle metadata and socket/wrench configuration without coupling to analytics.

> Key goal: even if analytics systems are overloaded or down, the **main application remains operational**.

---

Diagram
-------

[](#diagram)

 ```
graph LR
    subgraph SOURCE["SOURCE: PostgreSQL (appstats)"]
        MV["Materialized Views / Aggregates"] --> Q["Report SQL"]
    end

    subgraph CACHE["CACHE: ManticoreSearch"]
        T["Cached Report Tables"]
    end

    subgraph CONFIG["CONFIG: PostgreSQL (appapi)"]
        META["quickrep_meta / sockets / wrenches"]
    end

    subgraph ENGINE["Quickrep Engine"]
        R["Report Files (PHP)"] --> Q
        Q --> T
        META --> ENGINE
    end

    subgraph API["API / Viewers"]
        T --> TAB["Tabular (DataTables)"]
        T --> CARD["Cards / Tree / Graph viewers"]
    end

    style SOURCE fill:#f9f,stroke:#333,stroke-width:2px
    style CACHE fill:#bbf,stroke:#333,stroke-width:2px
    style CONFIG fill:#ffd,stroke:#333,stroke-width:2px
    style ENGINE fill:#eef,stroke:#333,stroke-width:2px
    style API fill:#bfb,stroke:#333,stroke-width:2px
```

      Loading Documentation

Current docs (v1.0.1) • Architecture: documentation/01-architecture.md • DB topology: documentation/02-database-topology.md • Creating reports: documentation/03-creating-reports.md • Materialized views: documentation/04-materialized-views.md • Caching (Manticore): documentation/05-caching-and-manticore.md • Failure isolation: documentation/06-failure-isolation.md • Deployment &amp; config: documentation/07-deployment-and-config.md • Troubleshooting: documentation/08-troubleshooting.md

Legacy docs (pre-1.0.1)

If you see references in older blog posts or forks, these legacy doc names map to the new ones: • documentation/Architecture.md → documentation/01-architecture.md • documentation/ControlCaching.md → documentation/05-caching-and-manticore.md • documentation/ConfigFile.md → documentation/07-deployment-and-config.md • documentation/Troubleshooting.md → documentation/08-troubleshooting.md

⸻

Quick Start (Production TopIQ-style)

This is the recommended production setup for high-load LMS analytics: • SOURCE: PostgreSQL appstats (analytics + materialized views) • CACHE: ManticoreSearch manticore (report cache tables) • CONFIG: PostgreSQL appapi via quickrep\_config connection (meta/sockets/wrenches)

1. Install

```
composer require owlookit/quickrep
php artisan quickrep:install
```

2. Configure DB connections

In your Laravel app (config/database.php) define: • appstats (pgsql) — analytics DB • manticore (mysql) — manticore mysql-protocol endpoint • quickrep\_config (pgsql) — points to your main app DB (appapi), with emulate prepares

Example (quickrep\_config only):

```
'quickrep_config' => [
    'driver' => 'pgsql',
    'host' => env('APPAPI_DB_HOST', env('DB_HOST')),
    'port' => env('APPAPI_DB_PORT', env('DB_PORT', 5432)),
    'database' => env('APPAPI_DB_DATABASE', env('DB_DATABASE')),
    'username' => env('APPAPI_DB_USERNAME', env('DB_USERNAME')),
    'password' => env('APPAPI_DB_PASSWORD', env('DB_PASSWORD')),
    'charset' => 'utf8',
    'prefix' => '',
    'prefix_indexes' => true,
    'schema' => 'public',
    'options' => extension_loaded('pdo_pgsql') ? [
        PDO::ATTR_EMULATE_PREPARES => true,
    ] : [],
],
```

3. Set env vars

```
QUICKREP_SOURCE_DB_CONNECTION=appstats
QUICKREP_CACHE_DB_CONNECTION=manticore
QUICKREP_CONFIG_DB_CONNECTION=quickrep_config
```

4. Clear config cache

```
php artisan config:clear
php artisan cache:clear
```

5. Run migrations for meta/sockets

```
php artisan migrate
```

6. Create your first report

```
php artisan quickrep:make_tabular YourNewReportName
```

Open: • /Quickrep/YourNewReportName • or API endpoint: /api/Quickrep/YourNewReportName?...

⸻

Prerequisites • PHP &gt;= 8.0 recommended • Laravel &gt;= 9.x recommended • PostgreSQL for SOURCE (analytics) • PostgreSQL for CONFIG (main app DB) • ManticoreSearch for CACHE

⸻

Installation (General)

```
composer require owlookit/quickrep
php artisan quickrep:install
```

Note: In v1.0.1 topology, quickrep:install is mainly scaffolding. You should configure the three connections explicitly.

Routes

You should see routes similar to:

```
php artisan route:list | grep Quickrep
```

Example patterns: • Quickrep/{report\_key} • QuickrepCard/{report\_key} • QuickrepTree/{report\_key} • QuickrepGraph/{report\_key} • api/Quickrep/{report\_key} • api/Quickrep/{report\_key}/Summary • api/Quickrep/{report\_key}/Download

⸻

Configuration (v1.0.1)

Edit config/quickrep.php.

Required connections

```
QUICKREP_SOURCE_DB_CONNECTION=appstats
QUICKREP_CACHE_DB_CONNECTION=manticore
QUICKREP_CONFIG_DB_CONNECTION=quickrep_config
```

```
•	QUICKREP_SOURCE_DB_CONNECTION — where report SQL runs (PostgreSQL analytics)
•	QUICKREP_CACHE_DB_CONNECTION — where cache tables live (Manticore)
•	QUICKREP_CONFIG_DB_CONNECTION — where meta/sockets/wrenches are stored (PostgreSQL main app DB)

```

PgBouncer compatibility

If you use PgBouncer (transaction pooling) or any environment that resets prepared statements, CONFIG DB should enable:

```
PDO::ATTR_EMULATE_PREPARES => true
```

Make Your First Report

Create a report class:

```
php artisan quickrep:make_tabular YourNewReportName
```

Open: • /Quickrep/YourNewReportName • or API endpoint: /api/Quickrep/YourNewReportName?...

⸻

Writing Reports

GetSQL()

GetSQL() is the core of a report. It may return: • string • array • QueryBuilder • EloquentBuilder • array of the above

Builder example:

```
public function GetSQL()
{
    return DB::connection(quickrep_source_db())
        ->table('mv_school_activity')
        ->select(['school_id', 'active_users', 'total_visits']);
}
```

Inputs

Use request inputs: • getInput($key) — GET/POST/JSON input • URL segments: • $this-&gt;getCode() • $this-&gt;getParameters()

⸻

Caching Model (v1.0.1)

In v1.0.1, caching is not just an optimization — it is a core part of performance isolation. • SQL executes in SOURCE (PostgreSQL) • Results are stored in CACHE (Manticore) • UI queries (filter/paging/sort) run against CACHE

This prevents the browser/UI from generating heavy workload on PostgreSQL.

⸻

Failure Isolation

If SOURCE (appstats) or CACHE (manticore) is unavailable, the API endpoints respond with HTTP 503:

```
{
  "ok": false,
  "error": "Reports backend unavailable"
}
```

This ensures analytics failures do not crash the main application.

⸻

Materialized Views (Recommended)

For predictable performance, build reports on top of materialized views: • precompute expensive joins/aggregations • refresh asynchronously (cron/queue) • avoid heavy computations during report execution

See: documentation/04-materialized-views.md

⸻

Sockets / Wrenches (Advanced Feature)

Quickrep supports a “socket/wrench” concept for dynamic parameterized reports:

```
$this->getSocket('someWrenchName');
```

In v1.0.1, sockets/wrenches live in CONFIG DB (PostgreSQL / appapi). Migrations create: • quickrep\_socket • quickrep\_socketsource • quickrep\_socket\_user • quickrep\_wrench • quickrep\_meta

This allows interactive parameter selection in reports without hardcoding options.

⸻

Updating Quickrep

In your project root:

```
composer update owlookit/quickrep
php artisan quickrep:install
```

If you use view packages like quickrepbladetabular, follow their upgrade notes.

⸻

Uninstall

```
composer remove owlookit/quickrep
composer clear-cache
```

Troubleshooting

See: documentation/08-troubleshooting.md

Common issues: • prepared statement does not exist → enable PDO::ATTR\_EMULATE\_PREPARES on CONFIG DB connection • syntax error near "\\”` → ensure cache connection is Manticore (MySQL protocol) • report hangs during refresh → use REFRESH MATERIALIZED VIEW CONCURRENTLY

⸻

License

MIT (see LICENSE file if present).

⸻

Why "Quickrep"?

Quickrep was developed by Owlookit LLC to make reporting on complex LMS/CMS/claims datasets simpler and faster by focusing on SQL-driven report definitions.

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance85

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~26 days

Recently: every ~92 days

Total

49

Last Release

75d ago

Major Versions

0.4.4 → 1.0.02026-02-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/c33af33b83afd252b6267919c1c2ae25f4003ed69841c7f8d689e9e6ac236523?d=identicon)[vrusua](/maintainers/vrusua)

---

Top Contributors

[![vrusua](https://avatars.githubusercontent.com/u/2073317?v=4)](https://github.com/vrusua "vrusua (78 commits)")

---

Tags

laravelreportingreports

### Embed Badge

![Health badge](/badges/owlookit-quickrep/health.svg)

```
[![Health](https://phpackages.com/badges/owlookit-quickrep/health.svg)](https://phpackages.com/packages/owlookit-quickrep)
```

###  Alternatives

[spatie/laravel-analytics

A Laravel package to retrieve Google Analytics data.

3.2k5.7M57](/packages/spatie-laravel-analytics)[patricktalmadge/bootstrapper

Twitter Bootstrap markup generator

557407.2k4](/packages/patricktalmadge-bootstrapper)[entrepreneur-interet-general/bulletins

Bulletins is a simple weekly retrospective tool for multiple projects or teams

122.6k](/packages/entrepreneur-interet-general-bulletins)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
