PHPackages                             vitexsoftware/digest-renderer - 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. vitexsoftware/digest-renderer

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

vitexsoftware/digest-renderer
=============================

HTML rendering library for accounting digest reports

20PHP

Since Mar 13Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/VitexSoftware/DigestRenderer)[ Packagist](https://packagist.org/packages/vitexsoftware/digest-renderer)[ RSS](/packages/vitexsoftware-digest-renderer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

DigestRenderer
==============

[](#digestrenderer)

A standalone PHP library for rendering digest data as HTML reports and dashboards.

Overview
--------

[](#overview)

This library takes structured data (associative arrays or JSON) from DigestModules and generates HTML output including tables, charts, and summary reports. It's designed to be reusable across different accounting systems and digest implementations.

Features
--------

[](#features)

- **Multiple Output Formats**: HTML pages, email-friendly HTML, PDF-ready markup
- **Responsive Design**: Bootstrap-based responsive templates
- **Customizable Themes**: Easy theme and styling customization
- **Chart Support**: Built-in chart generation for data visualization
- **Email Integration**: Optimized HTML for email clients
- **Modular Renderers**: Separate renderers for different module types

Installation
------------

[](#installation)

```
composer require vitexsoftware/digest-renderer
```

Basic Usage
-----------

[](#basic-usage)

```
use VitexSoftware\DigestRenderer\DigestRenderer;

// Load data from DigestModules
$digestData = json_decode(file_get_contents('digest_data.json'), true);

// Create renderer
$renderer = new DigestRenderer();

// Configure theme (optional)
$renderer->setTheme('bootstrap'); // or 'email', 'print'

// Render HTML
$html = $renderer->render($digestData);

// Save to file
file_put_contents('digest.html', $html);

// Or send by email
$emailRenderer = new DigestRenderer();
$emailRenderer->setTheme('email');
$emailHtml = $emailRenderer->render($digestData);
```

Themes
------

[](#themes)

### Bootstrap Theme (Default)

[](#bootstrap-theme-default)

- Responsive design
- Modern Bootstrap 5 components
- Interactive elements
- Chart.js integration

### Email Theme

[](#email-theme)

- Email client compatibility
- Inline CSS styles
- Table-based layouts
- Outlook compatibility

### Print Theme

[](#print-theme)

- Print-optimized styling
- Page break handling
- Monochrome-friendly colors

Module Renderers
----------------

[](#module-renderers)

Each module type has a dedicated renderer:

```
use VitexSoftware\DigestRenderer\Renderers\OutcomingInvoicesRenderer;
use VitexSoftware\DigestRenderer\Renderers\DebtorsRenderer;

// Render specific module
$invoiceRenderer = new OutcomingInvoicesRenderer();
$html = $invoiceRenderer->render($moduleData);
```

Customization
-------------

[](#customization)

### Custom Themes

[](#custom-themes)

```
$renderer = new DigestRenderer();
$renderer->setCustomCss('
    .digest-header { background: #custom-color; }
    .module-card { border: 1px solid #ccc; }
');
```

### Custom Templates

[](#custom-templates)

```
$renderer = new DigestRenderer();
$renderer->setTemplate('custom_template.php');
```

Data Structure
--------------

[](#data-structure)

The renderer expects data in this format:

```
{
    "digest": {
        "period": {"start": "2024-01-01", "end": "2024-02-01"},
        "company": {"name": "Company Name"},
        "timestamp": "2024-01-15T10:30:00Z"
    },
    "modules": {
        "outcoming_invoices": {
            "module_name": "outcoming_invoices",
            "heading": "Outcoming Invoices",
            "success": true,
            "data": {...}
        }
    }
}
```

License
-------

[](#license)

GPL-2.0-or-later

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance57

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![Vitexus](https://avatars.githubusercontent.com/u/2621130?v=4)](https://github.com/Vitexus "Vitexus (9 commits)")

### Embed Badge

![Health badge](/badges/vitexsoftware-digest-renderer/health.svg)

```
[![Health](https://phpackages.com/badges/vitexsoftware-digest-renderer/health.svg)](https://phpackages.com/packages/vitexsoftware-digest-renderer)
```

###  Alternatives

[efficiently/larasset

Larasset is a library for Laravel 5 which manage assets in an easy way.

684.8k](/packages/efficiently-larasset)[phpfluent/callback

Allows you execute callbacks in a more dynamic way

1159.2k1](/packages/phpfluent-callback)

PHPackages © 2026

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