PHPackages                             uganoga/uganoga - 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. uganoga/uganoga

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

uganoga/uganoga
===============

Obfuscate JavaScript files for Laravel projects.

01PHP

Since Dec 25Pushed 1y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Uganoga - JavaScript Obfuscator for Laravel Projects
====================================================

[](#uganoga---javascript-obfuscator-for-laravel-projects)

Uganoga is a lightweight and efficient package for obfuscating JavaScript files in Laravel projects. It provides an easy-to-use Artisan command to obfuscate your JavaScript files and save them in a designated output directory. This is "ideal" for enhancing the security of your front-end code. Worked for me and few other devs, not sure if it'll work for you. uganoga.

---

Features
--------

[](#features)

- Obfuscates JavaScript files by encoding them.
- Configurable input and output paths for flexibility.
- Integrates seamlessly with Laravel.
- Simple and straightforward (hopefully) Artisan command for execution.

---

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

[](#installation)

### Via Composer

[](#via-composer)

To install the package, use Composer:

```
composer require uganoga/uganoga
```

---

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

[](#configuration)

### Publishing Configuration

[](#publishing-configuration)

After installation, publish the configuration file:

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

This will create a `config/uganoga.php` file where you can specify the input paths for your JavaScript files and the output path for the obfuscated files.

### Default Configuration

[](#default-configuration)

The default configuration file looks like this:

```
return [
    'input_paths' => [
        base_path('resources/js'), // Input directory for JavaScript files
    ],
    'output_path' => public_path('js'), // Output directory for obfuscated files
];
```

You can modify this file to match your project's requirements.

---

Usage
-----

[](#usage)

### Add JavaScript Files

[](#add-javascript-files)

Ensure your JavaScript files are located in the input paths specified in the configuration file (e.g., `resources/js`).

For example, create a sample JavaScript file:

```
mkdir -p resources/js
echo "console.log('Hello, Uganoga!');" > resources/js/example.js
```

### Run the Obfuscation Command

[](#run-the-obfuscation-command)

To obfuscate the JavaScript files, run the following Artisan command:

```
php artisan uganoga:obfuscate
```

This command will:

1. Read all JavaScript files from the configured `input_paths`.
2. Obfuscate the content.
3. Save the obfuscated files to the configured `output_path`.

### Output

[](#output)

After running the command, you will find the obfuscated JavaScript files in the `public/js` directory (or your configured output path).

Example of an obfuscated file:

```
eval(atob('Y29uc29sZS5sb2coIkhlbGxvLCBVZ2Fub2dhISIpOw=='));
```

---

Testing
-------

[](#testing)

### Serve Your Laravel Application

[](#serve-your-laravel-application)

Start the Laravel development server:

```
php artisan serve
```

Access your obfuscated file:

```
http://127.0.0.1:8000/js/example.js

```

### Validate Obfuscation

[](#validate-obfuscation)

Verify that the file served is obfuscated and still functional.

---

Advanced Usage
--------------

[](#advanced-usage)

### Custom Configuration

[](#custom-configuration)

You can specify multiple input paths or change the output directory by editing the `config/uganoga.php` file:

```
return [
    'input_paths' => [
        base_path('resources/js'),
        base_path('custom/js'),
    ],
    'output_path' => public_path('secure-js'),
];
```

---

Development
-----------

[](#development)

### Local Testing

[](#local-testing)

If you are testing the package locally before publishing:

1. Add a path repository to your Laravel project’s `composer.json`:

```
"repositories": [
    {
        "type": "path",
        "url": "../uganoga"
    }
]
```

2. Require the package:

```
composer require uganoga/uganoga:dev-main
```

---

Contributing
------------

[](#contributing)

Contributions are welcome! If you encounter any issues or have feature requests, well, that's not my problem :D

---

License
-------

[](#license)

Do whatever you want to do...

---

Acknowledgements
----------------

[](#acknowledgements)

- None.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

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/d04848d0ad6b039edc420a4c8c9ed43864455110ea2c797acb379163174983fa?d=identicon)[cavecave](/maintainers/cavecave)

---

Top Contributors

[![cave](https://avatars.githubusercontent.com/u/627098?v=4)](https://github.com/cave "cave (3 commits)")

### Embed Badge

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

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

PHPackages © 2026

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