A documentation management plugin for Pelican Panel that allows administrators to create, organize, and distribute documentation to server users with granular permission-based visibility.
- Rich Text Editor - Full WYSIWYG editing with formatting, lists, code blocks, tables, and more
- 4-Tier Permission System - Control who sees what documentation based on their role
- Global & Server-Specific Docs - Create documentation that appears on all servers or only specific ones
- Server Assignment During Creation - Assign documents to servers with egg-based filtering when creating
- Version History - Track changes with automatic versioning, rate-limited to prevent spam
- Markdown Import/Export - Import
.mdfiles or export documents for backup/migration - Server Panel Integration - Documents appear in the player's server sidebar with search
- Admin Panel Integration - Full CRUD management with filtering, search, and bulk actions
- Drag-and-Drop Reordering - Easily reorder documents in relation managers
- Audit Logging - All document operations are logged for accountability
Full document management with Import Markdown action, type badges, and global indicators
Permission type selector with all 4 tiers visible in dropdown
Rich text editor with Servers relation manager showing linked servers
Server admins see "Server Admin", "Server Mod", and "Player" documents (4 docs)
Server mods see "Server Mod" and "Player" documents, including the Moderator Handbook (3 docs)
Players only see documents marked as "Player" type (2 docs)
Version table with change summaries showing character diff (e.g., "+2 chars")
Preview modal showing full content of a previous version
Confirmation dialog before restoring a previous version
New version created with "Restored from version X" summary
Pelican Panel has two built-in permission contexts:
- Admin Panel - Root admins and users with admin roles
- Server Panel - Server owners and subusers with granular permissions
However, for documentation, we needed more nuance. A game server host typically has:
- Infrastructure documentation - Only for the hosting team (network configs, security policies)
- Server administration guides - For server owners renting/managing servers
- Moderator handbooks - For trusted users helping manage game servers
- Player-facing docs - Rules, guides, and welcome messages for everyone
Pelican's native permissions don't map cleanly to these roles, so we created a virtual permission tier system that infers user roles from their existing Pelican permissions.
| Tier | Badge | Who Can See | How It's Determined |
|---|---|---|---|
| Host Admin | π΄ Red | Root Admins only | user.isRootAdmin() |
| Server Admin | π Orange | Server owners + admins with Server Update/Create | Server ownership OR admin panel server permissions |
| Server Mod | π΅ Blue | Subusers with control permissions | Has control.* subuser permissions (start/stop/restart/console) |
| Player | π’ Green | Anyone with server access | Default - anyone who can view the server |
Higher tiers see all documents at their level and below:
- Host Admin sees: Host Admin, Server Admin, Server Mod, Player
- Server Admin sees: Server Admin, Server Mod, Player
- Server Mod sees: Server Mod, Player
- Player sees: Player only
| Document | Type | Global | Use Case |
|---|---|---|---|
| Infrastructure Security Policy | Host Admin | Yes | Internal security guidelines for your hosting team |
| Server Administration Guide | Server Admin | Yes | SOPs for anyone managing a server |
| Moderator Handbook | Server Mod | Yes | Guidelines for trusted helpers with console access |
| Welcome to Our Servers! | Player | Yes | Community rules visible to all players |
| Minecraft Server Info | Player | No | Server-specific information for one server only |
- Pelican Panel v1.0+
- PHP 8.2+
- Download the plugin zip or clone to your plugins directory
- Navigate to Admin Panel β Plugins
- Click Install next to "Server Documentation"
- Run migrations when prompted
# Copy plugin to plugins directory
cp -r server-documentation /var/www/html/plugins/
# Run migrations
php /var/www/html/artisan migrateNote: This plugin has no external composer dependencies - it uses Pelican's bundled packages only.
- Go to Admin Panel β Documents
- Click New Document
- Fill in:
- Title - Display name for the document
- Slug - URL-friendly identifier (auto-generated from title)
- Type - Permission tier (Host Admin, Server Admin, Server Mod, Player)
- All Servers - Toggle to show on every server
- Published - Toggle to hide from non-admins while drafting
- Sort Order - Lower numbers appear first in lists
- Server Assignment (if "All Servers" is disabled):
- Optionally filter servers by Egg (game type)
- Select servers using checkboxes
- Use "Select All" / "Deselect All" for bulk selection
- Write your content using the rich text editor
- Click Save
You can also attach documents to servers after creation:
- Edit the document
- Scroll to the Servers relation manager
- Click Attach and select servers
- Use drag-and-drop to reorder documents
Or from the server side:
- Go to Admin Panel β Servers β [Server] β Documents tab
- Click Attach and select documents
- Use drag-and-drop to reorder
- Go to Admin Panel β Documents
- Click Import Markdown
- Upload a
.mdfile - Optionally enable "Use YAML Frontmatter" to extract metadata:
---
title: My Document
slug: my-document
type: player
is_global: true
is_published: true
sort_order: 10
---
# Document Content
Your markdown content here...- Edit any document
- Click the Download icon in the header
- Document downloads as
.mdwith YAML frontmatter
- Edit any document
- Click the History icon (shows badge with version count)
- View previous versions with timestamps and editors
- Click Preview to see old content
- Click Restore to revert to a previous version
All settings can be configured via environment variables or by publishing the config file:
# Cache Settings
SERVER_DOCS_CACHE_TTL=300 # Cache TTL for document queries (seconds, 0 to disable)
SERVER_DOCS_BADGE_CACHE_TTL=60 # Cache TTL for navigation badge count (seconds)
# Version History
SERVER_DOCS_VERSIONS_TO_KEEP=50 # Max versions per document (0 = unlimited)
SERVER_DOCS_AUTO_PRUNE=false # Auto-prune old versions on save
# Import Settings
SERVER_DOCS_MAX_IMPORT_SIZE=512 # Max markdown import file size (KB)
SERVER_DOCS_ALLOW_HTML_IMPORT=false # Allow raw HTML in imports (security risk)
# Permissions
SERVER_DOCS_EXPLICIT_PERMISSIONS=false # Require explicit document permissions
# Audit Logging
SERVER_DOCS_AUDIT_LOG_CHANNEL=single # Log channel for audit eventsBy default, users with server management permissions (update server or create server) can manage documents. Set SERVER_DOCS_EXPLICIT_PERMISSIONS=true to require explicit document permissions instead.
The plugin registers these Gates:
viewList documentview documentcreate documentupdate documentdelete document
To extend access to other admin roles, modify the registerDocumentPermissions() method in the ServiceProvider.
The plugin uses Pelican's standard extensibility patterns:
// In another plugin or service provider
use Starter\ServerDocumentation\Filament\Admin\Resources\DocumentResource;
// Modify the form
DocumentResource::modifyForm(function (Form $form) {
return $form->schema([
// Add custom fields
]);
});
// Modify the table
DocumentResource::modifyTable(function (Table $table) {
return $table->columns([
// Add custom columns
]);
});server-documentation/
βββ composer.json # PSR-4 autoloading (no external deps)
βββ config/server-documentation.php # Configuration options
βββ plugin.json # Plugin metadata
βββ database/
β βββ factories/ # Model factories for testing
β βββ migrations/ # Database schema
βββ lang/en/strings.php # Translations (i18n ready)
βββ resources/
β βββ css/ # Document content styling
β βββ views/filament/ # Blade templates
βββ tests/
β βββ Unit/ # Unit tests (Pest)
β βββ Enums/
β βββ Models/
β βββ Policies/
β βββ Services/
βββ src/
βββ Enums/ # DocumentType enum
βββ Models/ # Document, DocumentVersion
βββ Policies/ # Permission logic
βββ Providers/ # Service provider
βββ Services/ # DocumentService, MarkdownConverter
βββ Filament/
βββ Admin/ # Admin panel resources
βββ Concerns/ # Shared traits (HasDocumentTableColumns)
βββ Server/ # Server panel pages
documents
βββ id, uuid
βββ title, slug (unique)
βββ content (HTML from rich editor)
βββ type (host_admin, server_admin, server_mod, player)
βββ is_global, is_published
βββ sort_order
βββ author_id, last_edited_by
βββ timestamps, soft_deletes
document_versions
βββ id, document_id
βββ title, content (snapshot)
βββ version_number
βββ edited_by, change_summary
βββ created_at
document_server (pivot)
βββ document_id, server_id
βββ sort_order
βββ timestamps
The plugin includes comprehensive unit tests using Pest PHP:
# Run all tests
cd /path/to/pelican-panel
php artisan test --filter=ServerDocumentation
# Run specific test file
php artisan test plugins/server-documentation/tests/Unit/Services/DocumentServiceTest.php
# Run with coverage
php artisan test --filter=ServerDocumentation --coverage- DocumentService - Version creation, caching, permission checks
- MarkdownConverter - HTMLβMarkdown conversion, sanitization, frontmatter
- DocumentType Enum - Hierarchy levels, visibility, options
- DocumentPolicy - Authorization for admin and server panel
- Document Model - Events, scopes, relationships
This plugin was developed for Pelican Panel. Contributions welcome!
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
php artisan test --filter=ServerDocumentation - Submit a pull request
MIT License - see LICENSE for details.
- Built for Pelican Panel
- Uses Pelican's bundled League CommonMark for MarkdownβHTML parsing
- Built-in HTMLβMarkdown converter for exports (no external dependencies)