eca-devtools/docsystem

In-app documentation and tracking system per URL/page for development environments.

Maintainers

Package info

github.com/papirri/eca-devtools-docsystem

pkg:composer/eca-devtools/docsystem

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.1.0 2026-03-28 10:06 UTC

This package is auto-updated.

Last update: 2026-03-28 10:10:57 UTC


README

Development-only in-app documentation and activity tracking system, per URL/page.

DocSystem floating button

Features

Feature Details
๐Ÿ“„ Page docs Each URL gets its own doc record, auto-detected
๐Ÿ”– Versioning Multiple versions per page (title, description, author)
๐Ÿ“… Timeline Full activity log with metadata
๐Ÿ“ Notes Types: avance, pregunta, error, nota
๐Ÿ“Ž Files Upload files with version history
๐Ÿ” Diff viewer Line-by-line diff for text files (LCS algorithm)
๐Ÿ›ก๏ธ Dev only Auto-disabled in production environment
๐Ÿงน Purge One-command full cleanup

Requirements

  • PHP 8.3+
  • Laravel 11 / 12 / 13
  • Livewire v3 or v4
  • Tailwind CSS (already in your project)

Installation

1. Require the package

composer require eca-devtools/docsystem

2. Publish and run migrations

php artisan vendor:publish --tag=docsystem-migrations
php artisan migrate

3. (Optional) Publish config

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

The floating button is injected automatically into every HTML response for authenticated users in non-production environments โ€” no layout changes needed.

4. Add Tailwind source (required for compiled CSS setups)

If your project uses Tailwind with a compiled build (Vite / webpack), the panel's utility classes won't be generated unless you tell Tailwind to scan the package views. Add this line to your CSS entry file (e.g. resources/css/app.css):

@source '../../vendor/eca-devtools/docsystem/resources/views/**/*.blade.php';

Then rebuild your assets:

npm run build
# or, during development:
npm run dev

If you skip this step the button will be injected into the HTML but will appear invisible due to missing styles.

Usage

  1. Visit any page while authenticated.
  2. A floating indigo button appears in the bottom-right corner.
  3. Click it to open the panel.

Tabs

Tab Actions
Documentation Create / edit version records with title, version number & description
Timeline Read-only activity log ordered by newest first
Notes Add typed notes (avance, pregunta, error, nota)
Files Upload files, add new versions, download, or compare (diff) text files

File diff

For text-based files (.txt, .md, .json, .php, .js, etc.) a Diff button appears between versions. It renders a side-by-side line-level comparison using a built-in LCS algorithm โ€” no external library required.

Configuration (config/docsystem.php)

return [
    'enabled'          => env('DOCSYSTEM_ENABLED', true),
    'storage_path'     => env('DOCSYSTEM_STORAGE_PATH', 'doc-system'),
    'max_file_size'    => env('DOCSYSTEM_MAX_FILE_SIZE', 10240), // KB
    'text_extensions'  => ['txt','md','json','php','js','ts', ...],
    'note_types'       => ['avance','pregunta','error','nota'],
    'event_types'      => ['created','updated','note_added','file_uploaded',
                           'file_updated','file_deleted'],
];

Commands

Purge (cleanup)

php artisan docsystem:purge

This command:

  • Only runs in local / non-production environments
  • Asks for explicit confirmation
  • Drops all package database tables (doc_pages, doc_versions, doc_events, doc_notes, doc_files, doc_file_versions)
  • Deletes all files from storage/app/public/doc-system

Database tables

Table Description
doc_pages One record per unique URL path
doc_versions Version history per page
doc_events Timeline / activity log
doc_notes Typed notes per page
doc_files Logical file entities (groups versions)
doc_file_versions Individual uploaded file versions

Screenshots (placeholders)

Floating button Floating button

Documentation tab Documentation tab

Timeline tab Timeline tab

Notes tab Notes tab

Files + Diff tab Files tab

Production safety

The package automatically refuses to boot if:

app()->environment('production') === true

No routes, no Livewire components, no commands will be registered in production. Zero overhead.

Uninstall

# 1. Run purge to clean database tables and files
php artisan docsystem:purge

# 2. Remove the package
composer remove eca-devtools/docsystem

# 3. Remove the component tag from your layout
# (delete the <livewire:docsystem-panel /> line)

# 4. (Optional) Remove published config
rm config/docsystem.php

License

MIT