Category: Foundation

Library used as a base for projects

  • PHP GitHub Site Generator

    A lightweight PHP static site generator for GitHub projects that creates a professional documentation website with minimal configuration.

    Overview

    This tool automatically generates a static website based on your GitHub repository content. It pulls README.md and other Markdown files from your repo, converts them to HTML, and creates a fully functioning website with navigation, download page, and support functionality.

    Features

    • [x] Home page generated from README.md
    • [x] Additional Markdown pages (e.g., INSTALLATION.md, TROUBLESHOOTING.md)
    • [x] Download page with GitHub Releases information
    • [x] Support page with:
      • List of open GitHub issues
      • Contact form with email notifications
    • [x] Code syntax highlighting with highlight.js
    • [x] Sponsor page with donation links from GitHub FUNDING.yml

    Future Plans

    • Local caching for faster generation
    • Favicon customization
    • Theme customization options

    See in action

    Installation

    1. Clone this repository:
      git clone https://github.com/magicoli/php-site-generator.git
      cd php-site-generator
    1. Install dependencies:
      composer install
    1. Create configuration file:
      cp config.json.example config.json
    1. Edit config.json with your project details
    1. Generate the site:
      php generate.php
    1. Set up a cron task to automatically update your site:
      
      # Edit crontab
      crontab -e

    Add a line to run the generator hourly (adjust the path as needed)

    0 cd /home/path/to/php-site-generator && php generate.php >> /var/log/site-generator.log 2>&1

    The cron task will automatically rebuild your site on a regular schedule, keeping the content in sync with your GitHub repository.

    Configuration

    Edit config.json to configure your site:

    {
      "title": "My GitHub Project",
      "github_user": "user",
      "repo": "my-repo",
      "github_branch": "master",
      "github_token": "your_token_here", 
      "support_email": "support@example.com",
      "sender_email": "noreply@example.com",
      "output_folder": "output",
      "menu": [
        { "title": "About", "file": "/" },
        { "title": "Download", "file": "download" },
        { "title": "Installation", "file": "INSTALLATION.md" },
        { "title": "Troubleshooting", "file": "TROUBLESHOOTING.md" },
        { "title": "Support", "file": "support" }
      ]
    }

    Important configuration options:

    • github_token: Optional, helps avoid API rate limitations
    • support_email: Required for the support form to function
    • sender_email: Optional, defaults to support_email if not set
    • output_folder: your website root directory (e.g. /var/www/html)

    Project Structure

    
    /php-site-generator/
    ├── config.json            // Configuration for the site and pages
    ├── generate.php           // Main script to generate the static site
    ├── template.php           // HTML template for the pages
    ├── vendor/                // Composer dependencies (Parsedown)
    ├── assets/                // CSS, images
    │   └── style.css          // Custom styling
    └── pages/                 // Local Markdown files and templates
        ├── download.md        // Template for download page
        ├── support.md         // Template for support page
        └── partials/          // Reusable page components
            └── support_form.php // Support form template

    ../www/ // Generated static site (output folder defined in config.json) ├── assets │ └── style.css ├── download.html ├── index.html ├── installation.html ├── support.php // PHP for dynamic support form ├── support_form.php // Included in support.php └── troubleshooting.html

    How It Works

    The generate.php script:

    1. Loads your configuration
    2. Fetches content from your GitHub repository
    3. Processes Markdown files into HTML
    4. Creates special pages like download and support
    5. Assembles a complete website with navigation
    6. Outputs everything to your specified folder

    License

    AGPL-3.0

    Credits

  • Karen – Kickass Admin Resource Entitlement Normalizer

    Karen is a lightweight server configuration management system that simplifies the deployment and management of web server configurations.

  • AGNSTK Core Framework

    License: AGPL-v3 PHP Version CMS Agnostic

    This is the AGNSTK Core Framework – the foundational library that powers AGNSTK applications.

    ⚠️ This repository should NOT be used directly!

    Installation

    For new projects: Use the main AGNSTK application template instead:

    git clone https://github.com/magicoli/agnstk.git
    cd agnstk
    composer install
    composer run dev

    For existing projects: This core is automatically included as a git subtree in AGNSTK applications.

    What is this?

    This directory contains the core AGNSTK framework that should NOT be modified directly. It’s managed as a git subtree from the magicoli/agnstk-core repository.

    For Application Developers

    • DON’T EDIT files in this core/ directory
    • PUT YOUR CODE in the application root directories (src/, config/, etc.)
    • CONFIGURE your application by editing core/config/bundle.php
    • UPDATE THE CORE using git subtree pull --prefix=core https://github.com/magicoli/agnstk-core.git master --squash

    Bundle Configuration Setup

    After cloning your AGNSTK application, you need to enable bundle configuration tracking:

    1. Remove the ignore rule from your main .gitignore:
      # Remove this line from .gitignore:
      core/config/bundle.php
    1. Track your bundle config:
      git add core/config/bundle.php
      git commit -m "Add bundle configuration"
    1. Customize as needed – edit core/config/bundle.php to match your application structure.

    For AGNSTK Core Contributors

    If you want to contribute to the AGNSTK framework itself:

    1. Work on the core repository: https://github.com/magicoli/agnstk-core
    2. Changes will be pulled into applications via git subtree updates

    Architecture

    your-agnstk-app/
    ├── src/                    ← YOUR APPLICATION CODE
    ├── core/                   ← AGNSTK FRAMEWORK (this directory)
    │   ├── config/
    │   │   ├── bundle.php     ← YOUR CONFIGURATION
    │   │   └── bundle.example.php ← Template
    │   ├── app/               ← Framework services
    │   └── ...                ← Other framework files
    └── ...

    The core provides:

    • Laravel 12 foundation
    • AGNSTK services and helpers
    • Default pages and blocks
    • Multi-platform deployment adapters

    Updates

    Update the core framework:

    git subtree pull --prefix=core https://github.com/magicoli/agnstk-core.git master --squash

    This uses git subtree to pull the latest changes from agnstk-core while preserving your application code.


    Need help? Check the main README.md in the application root or visit https://agnstk.org

  • AGNSTK – Agnostic Glue for Non-Specific ToolKits

    One Core. Any CMS.

    License: AGPL-v3 PHP Version CMS Agnostic


    What is AGNSTK?

    AGNSTK (pronounced "ag-nostic") is the duct tape for your CMS plugins—except it’s reusable, elegant, and won’t leave sticky residue. It’s a single codebase that adapts to WordPress, Drupal, October CMS, Laravel, and more.

    Think of it as:

    • A Swiss Army knife for CMS development.
    • A universal adapter for your PHP tools.
    • The glue that binds your logic to any platform.

    Why Use AGNSTK?

    • Write once, deploy anywhere – No more rewriting for each platform.
    • Multiple deployment targets – CMS plugins, desktop apps, mobile apps, CLI tools, web apps.
    • Lightweight core – Only ~50KB of glue code (the rest is your logic).
    • No lock-in – Your business logic stays clean and portable.
    • Cross-platform – Windows, macOS, Linux support across all deployment targets.
    • Fun to say – "AGNSTK" sounds like a robot sneezing.

    Why "TransKit"? Because "ToolKit" was too boring. AGNSTK transforms your code to fit anywhere—like a chameleon, but for PHP.


    How It Works

    AGNSTK is built on Laravel, providing a robust core for your logic. Multiple deployment targets then make this core available across different platforms and interfaces.

    agnstk/
    ├── index.php              # Standalone web entry
    ├── console                # Command-line tool entry
    ├── exampleapp.php         # WordPress plugin entry
    ├── exampleapp.module      # Drupal module entry  
    ├── Plugin.php             # October CMS plugin entry
    ...                        # Other CMS-specific entry points
    ├── src/                   # Developer application code (YOUR CODE GOES HERE)
    │   ├── Blocks/            # HTML blocks for embedding
    │   ├── Pages/             # Page content providers
    │   ├── Menus/             # Menu definitions
    │   ├── Shortcodes/        # Shortcode handlers
    │   ├── Users/             # User management
    │   └── Services/          # Cache, sync, external services, etc.
    ├── core/                   # Laravel core (DO NOT MODIFY except core/config/bundle.php)
    │   ├── config/
    |   |   ├── bundle.php     #  (YOUR APP INITIAL SETTINGS)
    |   |   ├── bundle.example.php     # bundle.php template
    │   ...                    # Other core files (DO NOT MODIFY)
    ├── database/
    ├── routes/
    ...                        

    (Want another CMS or deployment target? Open an issue!)

    Deployment Targets

    Choose how to deploy your AGNSTK application:

    🌐 Web Applications

    • Standalone Laravel app: composer run devhttp://localhost:8000
    • CMS Plugins: WordPress, Drupal, October CMS, Joomla
    • REST API: JSON API for data sync across deployment targets

    🖥️ Desktop Applications

    • Cross-platform native: Tauri + embedded PHP runtime
    • Truly standalone: No PHP installation required, works offline
    • Data sync: Optional API integration for shared data
    • All major OS: Windows, macOS, Linux

    📱 Mobile Applications

    • Progressive Web Apps (PWA): Optimized web app experience, works offline
    • Native mobile apps: iOS and Android via Tauri Mobile
    • App store ready: Distribute through official app stores
    • Offline-first: Sync when connected, work when offline

    Command Line Tools

    • CLI interface: Access core features via terminal
    • Automation friendly: Perfect for scripts and DevOps workflows
    • API integration: Bulk operations and data management
    • Cross-platform: Same commands work everywhere

    Developers can enable any combination of these deployment targets for their application.

    Data Sync Architecture:

    • Standalone mode: Each deployment works independently with local data
    • Connected mode: Optional API sync allows shared data across all deployments
    • Hybrid approach: Mix standalone and connected deployments as needed
    • Offline-first: Apps work without internet, sync when available

    Installation

    For new projects: Clone this repository (which includes the core as a git subtree):

    git clone https://github.com/magicoli/agnstk.git my-app
    cd my-app
    composer install

    Enable bundle configuration tracking:

    
    # Remove this line from .gitignore:
    core/config/bundle.php

    Then track your bundle config:

    git add core/config/bundle.php git commit -m "Add bundle configuration"

    Then start the development server (Laravel-based standalone app):

    composer run dev

    The app will be available at http://localhost:8000.

    To update the core framework:

    git subtree pull --prefix=core https://github.com/magicoli/agnstk-core.git master --squash

    Example: Simple Service

    Creating a basic AGNSTK service is straightforward – just extend BaseService and implement the essentials:

    
    // src/Services/Example.php
    namespace YourAppServices;

    use AppServicesBaseService;

    class Example extends BaseService { /**

    • Configure your service */ public static function init(): void { if (static::$initialized) return;

    static::$label = (‘Example’); static::$uri = ‘/example’; static::$defaultTitle = (‘Example Page’); static::$defaultContent = _(‘Welcome to AGNSTK!’);

    parent::init(); }

    /**

    • Define what your service provides */ public static function provides(): array { if (!empty(static::$provides)) return static::$provides;

    static::init(); static::$provides = [ ‘shortcode’ => ‘example’, // Enables {{example}} shortcodes ‘page’ => [ // Creates /example page ‘title’ => static::$defaultTitle, ‘uri’ => static::$uri, ], ‘menu’ => [ // Adds menu item ‘label’ => static::$label, ‘uri’ => static::$uri, ‘enabled’ => true, ], ];

    return static::$provides; }

    /**

    • Your core functionality */ public function render(array $options = []): array { $content = $options[‘content’] ?? $this->content ?? static::$defaultContent;

    return [ ‘title’ => $this->title, ‘content’ => $content, ]; } }

    That’s it! Your service now automatically provides:

    • {{example}} shortcodes in content
    • /example page route
    • Example menu item
    • Block embedding capability

    Now use {{example}} in any CMS content!

    ExampleApp – AGNSTK Proof of Concept

    This is a CMS-agnostic application framework that allows you to write your core business logic once and deploy it across multiple platforms.

    Current Status

    AGNSTK is currently implemented as a Laravel 12 application with multiple deployment targets:

    • Laravel standalone app: Available at http://localhost:8000 when running composer run dev
    • WordPress plugin: Install as plugin with exampleapp.php as main file
    • Drupal module: Available in deploy/adapters/drupal/
    • October CMS plugin: Available in deploy/adapters/octobercms/
    • Desktop app: Tauri-based native application (in development)
    • Mobile PWA: Progressive Web App with offline capabilities (in development)
    • Mobile native: iOS/Android apps via Tauri Mobile (in development)
    • REST API: JSON API for cross-deployment data sync (in development)
    • CLI tool: Command-line interface (in development)

    Quick Test

    1. Standalone Laravel: Run composer run dev and visit http://localhost:8000
    2. WordPress: Copy the full project folder to your plugins directory and activate (for production, delete irrelevant deployment targets)

    Core Features

    • Laravel 12 framework providing robust AGNSTK core (hands-off for developers)
    • Configurable objects: Pages, Menus, Blocks, Shortcodes, Users, Services
    • Developer-friendly: Put your code in src/, configure via core/config/bundle.php
    • Bootstrap UI: Clean, responsive interface for web deployments
    • Markdown support: Content rendering with syntax highlighting
    • Cross-platform deployment: Same codebase runs on web, desktop, and CLI
    • Platform-specific adapters handle CMS integration and user authentication

    Contributing

    Code of Conduct: Be nice. We’re all just trying to glue things together. License: MIT (use it, break it, fix it).


    Made with ❤️ and duct tape by magicoli.