[PR #83] [CLOSED] Add server-documentation plugin #103

Closed
opened 2026-05-07 00:18:07 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/pelican-dev/plugins/pull/83
Author: @gavinmcfall
Created: 1/18/2026
Status: Closed

Base: mainHead: main


📝 Commits (10+)

  • 9c4c150 Add server-documentation plugin for Pelican Panel
  • 20614ec fix: Filament v4 imports and PHPStan level 6 compliance
  • 4142e1a fix: code style and remaining PHPStan issues
  • 9ddec46 fix: additional Pint style fixes
  • bda8e15 fix: method chaining indentation in Document.php
  • e2b582d Fix phpdoc_align style issues
  • afb98e5 Fix PHPStan type annotations and ignore comments
  • e329467 Fix PHPStan ignore comments and Pint style
  • e223d34 Use comment-style phpstan ignore for enum check
  • b621948 Fix phpstan-ignore-line for enum_exists check

📊 Changes

46 files changed (+4053 additions, -0 deletions)

View changed files

server-documentation/LICENSE (+21 -0)
server-documentation/README.md (+362 -0)
server-documentation/composer.json (+27 -0)
server-documentation/config/server-documentation.php (+72 -0)
server-documentation/database/factories/DocumentFactory.php (+98 -0)
server-documentation/database/factories/DocumentVersionFactory.php (+47 -0)
server-documentation/database/migrations/2024_01_01_000001_create_documents_table.php (+35 -0)
server-documentation/database/migrations/2024_01_01_000002_create_document_versions_table.php (+28 -0)
server-documentation/database/migrations/2024_01_01_000003_create_document_server_table.php (+27 -0)
server-documentation/database/migrations/2024_01_01_000004_update_documents_type_column.php (+42 -0)
server-documentation/database/migrations/2024_01_01_000005_add_unique_constraint_to_documents_slug.php (+22 -0)
server-documentation/database/migrations/2024_01_01_000006_add_performance_indexes_and_fix_slug_constraint.php (+87 -0)
server-documentation/docs/images/admin-create-document.png (+0 -0)
server-documentation/docs/images/admin-documents-list.png (+0 -0)
server-documentation/docs/images/admin-edit-document.png (+0 -0)
server-documentation/docs/images/player-view.png (+0 -0)
server-documentation/docs/images/server-admin-view.png (+0 -0)
server-documentation/docs/images/server-mod-view.png (+0 -0)
server-documentation/docs/images/version-history-preview.png (+0 -0)
server-documentation/docs/images/version-history-restore.png (+0 -0)

...and 26 more files

📄 Description

WIP - 2025-01-19

I am making an architectural change to better fit into the native roles and permission structure build my the Pelican team
I will move this back to a draft until that is complete

Summary

A documentation management plugin for Pelican Panel that allows administrators to create, organize, and distribute documentation to server users with granular permission-based visibility.

Features

  • Rich text editor with WYSIWYG editing (formatting, lists, code blocks, tables)
  • 4-tier permission system (Host Admin, Server Admin, Server Mod, Player)
  • Global and server-specific documentation
  • Server assignment during creation with egg-based filtering
  • Version history with preview and restore functionality
  • Markdown import/export with YAML frontmatter support
  • Drag-and-drop reordering in relation managers
  • Audit logging with configurable channel
  • Caching with tag support and fallback for non-tagging drivers

Security

  • HTML sanitization on markdown import
  • Authorization checks on all endpoints
  • Rate limiting on version creation (30-second debounce)
  • XSS prevention via html_input escaping

Infrastructure

  • Cross-database compatibility (MySQL, PostgreSQL, SQLite)
  • Comprehensive test suite with Pest PHP
  • Model factories for testing
  • Configurable via environment variables
  • MIT License

Test plan

  • Install plugin via Admin Panel → Plugins
  • Create documents with each permission tier
  • Test server assignment during document creation
  • Verify permission filtering (each tier sees correct documents)
  • Test markdown import/export
  • Verify version history and restore functionality
  • Run unit tests: php artisan test --filter=ServerDocumentation

Summary by CodeRabbit

  • New Features

    • Server Documentation plugin: create, edit, organize, link, and mark documents as global
    • Full version history: preview, restore, change summaries, audit logging
    • Markdown import/export with frontmatter support and filename generation
    • Admin and server UI pages for browsing, selecting, and viewing documents with permission-based visibility and a permission guide
  • Documentation

    • Added README and MIT license for the plugin
  • Style

    • New stylesheet for rendered document content
  • Localization

    • English translation strings for the Documents UI

✏️ Tip: You can customize this high-level summary in your review settings.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/pelican-dev/plugins/pull/83 **Author:** [@gavinmcfall](https://github.com/gavinmcfall) **Created:** 1/18/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (10+) - [`9c4c150`](https://github.com/pelican-dev/plugins/commit/9c4c1500a5ced932e6b2f04ba5e294b7f94643af) Add server-documentation plugin for Pelican Panel - [`20614ec`](https://github.com/pelican-dev/plugins/commit/20614eccfc09784eee1e8e87142036aa39a2b924) fix: Filament v4 imports and PHPStan level 6 compliance - [`4142e1a`](https://github.com/pelican-dev/plugins/commit/4142e1aed4d1213b6be87db7e05d81ff9fc86f66) fix: code style and remaining PHPStan issues - [`9ddec46`](https://github.com/pelican-dev/plugins/commit/9ddec4660ba8283ace35afe86f68c1c1781dec2d) fix: additional Pint style fixes - [`bda8e15`](https://github.com/pelican-dev/plugins/commit/bda8e15caa00432e119c80cb1c78361925debb73) fix: method chaining indentation in Document.php - [`e2b582d`](https://github.com/pelican-dev/plugins/commit/e2b582d5dd8a751a68c50add2abf90bfa31bd073) Fix phpdoc_align style issues - [`afb98e5`](https://github.com/pelican-dev/plugins/commit/afb98e54185220a659f196abdb5aa927a6b53fda) Fix PHPStan type annotations and ignore comments - [`e329467`](https://github.com/pelican-dev/plugins/commit/e329467f1805bf4cc42490036ef690471ee59b48) Fix PHPStan ignore comments and Pint style - [`e223d34`](https://github.com/pelican-dev/plugins/commit/e223d341dc2a92d62d69d9bd834ac1b1c3145569) Use comment-style phpstan ignore for enum check - [`b621948`](https://github.com/pelican-dev/plugins/commit/b6219484442b69f2e8295b6d64b02a32ff53e34e) Fix phpstan-ignore-line for enum_exists check ### 📊 Changes **46 files changed** (+4053 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `server-documentation/LICENSE` (+21 -0) ➕ `server-documentation/README.md` (+362 -0) ➕ `server-documentation/composer.json` (+27 -0) ➕ `server-documentation/config/server-documentation.php` (+72 -0) ➕ `server-documentation/database/factories/DocumentFactory.php` (+98 -0) ➕ `server-documentation/database/factories/DocumentVersionFactory.php` (+47 -0) ➕ `server-documentation/database/migrations/2024_01_01_000001_create_documents_table.php` (+35 -0) ➕ `server-documentation/database/migrations/2024_01_01_000002_create_document_versions_table.php` (+28 -0) ➕ `server-documentation/database/migrations/2024_01_01_000003_create_document_server_table.php` (+27 -0) ➕ `server-documentation/database/migrations/2024_01_01_000004_update_documents_type_column.php` (+42 -0) ➕ `server-documentation/database/migrations/2024_01_01_000005_add_unique_constraint_to_documents_slug.php` (+22 -0) ➕ `server-documentation/database/migrations/2024_01_01_000006_add_performance_indexes_and_fix_slug_constraint.php` (+87 -0) ➕ `server-documentation/docs/images/admin-create-document.png` (+0 -0) ➕ `server-documentation/docs/images/admin-documents-list.png` (+0 -0) ➕ `server-documentation/docs/images/admin-edit-document.png` (+0 -0) ➕ `server-documentation/docs/images/player-view.png` (+0 -0) ➕ `server-documentation/docs/images/server-admin-view.png` (+0 -0) ➕ `server-documentation/docs/images/server-mod-view.png` (+0 -0) ➕ `server-documentation/docs/images/version-history-preview.png` (+0 -0) ➕ `server-documentation/docs/images/version-history-restore.png` (+0 -0) _...and 26 more files_ </details> ### 📄 Description # WIP - 2025-01-19 ``` I am making an architectural change to better fit into the native roles and permission structure build my the Pelican team I will move this back to a draft until that is complete ``` ## Summary A documentation management plugin for Pelican Panel that allows administrators to create, organize, and distribute documentation to server users with granular permission-based visibility. ### Features - Rich text editor with WYSIWYG editing (formatting, lists, code blocks, tables) - 4-tier permission system (Host Admin, Server Admin, Server Mod, Player) - Global and server-specific documentation - Server assignment during creation with egg-based filtering - Version history with preview and restore functionality - Markdown import/export with YAML frontmatter support - Drag-and-drop reordering in relation managers - Audit logging with configurable channel - Caching with tag support and fallback for non-tagging drivers ### Security - HTML sanitization on markdown import - Authorization checks on all endpoints - Rate limiting on version creation (30-second debounce) - XSS prevention via html_input escaping ### Infrastructure - Cross-database compatibility (MySQL, PostgreSQL, SQLite) - Comprehensive test suite with Pest PHP - Model factories for testing - Configurable via environment variables - MIT License ## Test plan - [ ] Install plugin via Admin Panel → Plugins - [ ] Create documents with each permission tier - [ ] Test server assignment during document creation - [ ] Verify permission filtering (each tier sees correct documents) - [ ] Test markdown import/export - [ ] Verify version history and restore functionality - [ ] Run unit tests: `php artisan test --filter=ServerDocumentation` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Server Documentation plugin: create, edit, organize, link, and mark documents as global * Full version history: preview, restore, change summaries, audit logging * Markdown import/export with frontmatter support and filename generation * Admin and server UI pages for browsing, selecting, and viewing documents with permission-based visibility and a permission guide * **Documentation** * Added README and MIT license for the plugin * **Style** * New stylesheet for rendered document content * **Localization** * English translation strings for the Documents UI <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:18:07 +02:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/plugins#103
No description provided.