eca-devtools / docsystem
In-app documentation and tracking system per URL/page for development environments.
Requires
- php: ^8.3
- illuminate/database: ^11.0|^12.0|^13.0
- illuminate/filesystem: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
- livewire/livewire: ^3.0|^4.0
README
Development-only in-app documentation and activity tracking system, per URL/page.
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
- Visit any page while authenticated.
- A floating indigo button appears in the bottom-right corner.
- 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)
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