PHPackages                             webmavens/triki-obfuscator - 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. [Database &amp; ORM](/categories/database)
4. /
5. webmavens/triki-obfuscator

ActiveLibrary[Database &amp; ORM](/categories/database)

webmavens/triki-obfuscator
==========================

Laravel package for database obfuscation using Triki

0.0.2(1y ago)1681MITPHP

Since Apr 21Pushed 1y ago2 watchersCompare

[ Source](https://github.com/webmavens/triki-obfuscator)[ Packagist](https://packagist.org/packages/webmavens/triki-obfuscator)[ RSS](/packages/webmavens-triki-obfuscator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Triki - Laravel Obfuscated Database Dump Package
================================================

[](#triki---laravel-obfuscated-database-dump-package)

Introduction
------------

[](#introduction)

Triki is a Laravel package that provides an obfuscated database dump using the Triki Crystal obfuscator. This package allows you to specify tables and columns to obfuscate while keeping selected columns intact.

Requirements
------------

[](#requirements)

- Laravel
- PHP
- MySQL/pgSQL
- [Crystal Language installed on your system/server](https://crystal-lang.org/install/)

Important Note (For SQLite users)
---------------------------------

[](#important-note-for-sqlite-users)

If you are using **SQLite**, the dump will **not obfuscate** any data. It will only generate and download a plain SQL file containing the selected tables.

- There is **no need to use or modify** the `obfuscator.cr` file for SQLite.
- Ensure `sqlite3` is installed on your server/system:

```
sudo apt install sqlite3

## Installation

To install the package, run the following command:

```sh
composer require webmavens/triki-obfuscator
```

Configuration
-------------

[](#configuration)

```
php artisan vendor:publish --tag=triki-config
```

### Environment Variables

[](#environment-variables)

Ensure your `.env` file contains database credentials:

```
DB_DATABASE=your_database
DB_USERNAME=your_username
DB_PASSWORD=your_password

```

Ensure your `.env` file contains mail configuration:

```
MAIL_MAILER=
MAIL_HOST=
MAIL_PORT=
MAIL_USERNAME=
MAIL_PASSWORD=

```

### Middleware Authentication Key

[](#middleware-authentication-key)

To protect Triki routes, add an authentication key in your `.env` file(If you not set, it will be `web-mavens` by default):

```
TRIKI_AUTH_KEY=your_secure_key

```

### Optional Route Protection

[](#optional-route-protection)

Configure Authorized Emails: Update the `config/triki.php` file to enable authentication and define the allowed emails:

```
'auth' => [
    'enabled' => true,
    'authorized_emails' => [
        'your.email@example.com',
        'another@example.com',
    ],
],
```

If you want to more secure your route then use authorized\_emails in `config/triki.php`

Usage
-----

[](#usage)

### Accessing the Dump Page

[](#accessing-the-dump-page)

You can access the dump interface via the following URL in your browser:

```
http://yourdomain.com/triki/download?auth_key=web-mavens

```

When prompted, enter the authentication key specified in your `.env` file.

### Generating a Dump

[](#generating-a-dump)

1. Select the tables you want to **keep** in the database dump (unchecked tables will be ignored).
2. Provide an email address where the notification will be sent.
3. Click **Start Dump**.

Obfuscation Logic
-----------------

[](#obfuscation-logic)

The `obfuscator.cr` file in the root directory determines which columns to obfuscate. Example:

```
require "triki"

obfuscator = Triki.new({
  "users" => {
    "email" => :email,
    "password" => :keep,
  },
})

obfuscator.fail_on_unspecified_columns = false
obfuscator.globally_kept_columns = %w[id created_at updated_at]
obfuscator.obfuscate(STDIN, STDOUT)
```

If a table is not specified, it will be included in the dump without obfuscation. check  for more detaisl.

Queue Job for Dump Generation
-----------------------------

[](#queue-job-for-dump-generation)

The dump generation process runs as a queued job to avoid timeouts. Ensure your queue worker is running:

```
php artisan queue:work
```

Support
-------

[](#support)

For any issues, feel free to create an issue in the [GitHub repository](https://github.com/webmavens/triki).

License
-------

[](#license)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance48

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 55.6% 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 ~8 days

Total

2

Last Release

384d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e073f589fa8589f8ad99461399e6ca6de1accfb94030fb0526707e17faa8ff5?d=identicon)[webmavens](/maintainers/webmavens)

---

Top Contributors

[![webmavensteam](https://avatars.githubusercontent.com/u/66576112?v=4)](https://github.com/webmavensteam "webmavensteam (5 commits)")[![sawan-webmavens](https://avatars.githubusercontent.com/u/456840?v=4)](https://github.com/sawan-webmavens "sawan-webmavens (4 commits)")

### Embed Badge

![Health badge](/badges/webmavens-triki-obfuscator/health.svg)

```
[![Health](https://phpackages.com/badges/webmavens-triki-obfuscator/health.svg)](https://phpackages.com/packages/webmavens-triki-obfuscator)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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