Skip to content

PolyXGO/polycms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PolyCMS

Modern, Modular Content Management System
Built with Laravel 12 Β· Vue 3 Β· Tailwind CSS Β· GraphQL

License PHP Laravel Vue.js PostgreSQL MySQL


Overview

PolyCMS is an open-source content management system for modern web applications, inspired by the WordPress plugin and theme ecosystem but built on top of the Laravel framework. It is designed to provide a complete foundation for content publishing, e-commerce, multi-language support, and extensible module architecture β€” powered by a Vue 3 admin panel with data served entirely through RESTful APIs.

Whether you're building a blog, a documentation site, an online store, or a multi-tenant SaaS platform, PolyCMS aims to give you a comprehensive starting scaffold so you can ship quickly and extend easily through integrated modules and themes. In particular, themes in PolyCMS follow a multi-theme architecture β€” one Main theme and an unlimited number of Sub themes can run side by side on the same installation.

We hope this ready-made foundation proves useful for building your next website, blog, or web app, saving you from having to start completely from scratch.


✨ Key Features

πŸ“ Content Management

  • Block Editor β€” Rich TipTap-based editor with drag-and-drop blocks (Hero, Gallery, CTA, Pricing, Tabs, Accordion, and more)
  • Posts & Pages β€” Full CRUD with categories, tags, authors, SEO metadata, and scheduled publishing
  • Media Library β€” Centralized asset manager with image optimization, variant generation, and cloud storage support
  • Taxonomy System β€” Flexible categories, tags, and custom taxonomies with hierarchical nesting

πŸ›’ E-Commerce

  • Product Catalog β€” Products with variants, pricing, inventory, and attribute management
  • Payment Gateways β€” Built-in PayPal and SePay (QR code for Vietnamese banks) integrations, with extensible gateway API
  • Order Management β€” Complete order lifecycle with status tracking and transaction history
  • Multi-Currency β€” Dynamic currency switching with live exchange rate support

🌐 Internationalization

  • Multi-Language β€” Full i18n with per-locale content, URL slugs, and admin interface translation
  • SEO Optimized β€” Auto-generated meta tags, Open Graph, JSON-LD structured data, canonical URLs, and sitemap generation
  • Regional Variants β€” Support for locale variants (e.g., en-US, vi-VN) with proper hreflang handling

πŸ”Œ Module System

  • Hot-Pluggable Modules β€” Install, activate, and deactivate modules without touching core code
  • Hook & Filter System β€” WordPress-inspired action/filter hooks for deep customization
  • GraphQL API β€” Auto-discovered schemas per module via Lighthouse
  • REST API β€” Sanctum-authenticated /api/v1 endpoints with rate limiting and token management

🎨 Theme System

  • Multi-Theme Architecture β€” One Main theme with unlimited Sub themes active simultaneously; switch or preview themes without downtime
  • Landing Page Builder β€” Visual block-based page construction with pre-built templates
  • Theme Hooks β€” header_scripts, footer_scripts, after_body_open, and more for flexible injection
  • Responsive β€” All bundled themes are mobile-first and fully responsive

πŸ” Security & Authentication

  • Laravel Sanctum β€” Token-based API authentication with scoped abilities
  • Google 2FA β€” TOTP two-factor authentication via Google Authenticator
  • Role & Permission β€” Granular RBAC via Spatie Permission with per-module permission registration
  • Cookie Consent β€” GDPR/CCPA-compliant consent banner with configurable policies

βš™οΈ Administration

  • Modern Admin Panel β€” Vue 3 SPA with dark mode, command palette, and responsive layout
  • Settings Hub β€” Centralized settings management with module-contributed setting groups
  • Menu Builder β€” Drag-and-drop visual menu editor with nesting support
  • Widget System β€” Configurable widget areas with per-theme widget zones
  • Backup & Restore β€” Full database and file backup with one-click restore

🧩 Bundled Modules

Module Description
SampleModule Developer reference blueprint β€” demonstrates all available hooks, CRUD, admin pages, and patterns
CookieConsent GDPR/CCPA-compliant cookie consent banner
Google2FA Google Authenticator TOTP two-factor authentication
PaypalGateway PayPal payment gateway for e-commerce
SepayGateway SePay QR Code payment gateway (Vietnamese banks)
BannerSlider Promotional banner management with scheduling and responsive slider
Backup Full backup & restore system with cloud storage integration

Pro Edition includes additional modules: Accounting, Data Builder (API management & visual reporting), Remote Server Manager, SEO Optimizer, Demo Builder, and more. Visit polycms.org for details.


πŸ› οΈ Technology Stack

Layer Technology
Backend Laravel 12 (PHP 8.2+)
Frontend Vue.js 3 (Composition API), TypeScript
Styling Tailwind CSS 3
Editor TipTap (ProseMirror)
API REST (Sanctum) + GraphQL (Lighthouse)
Database PostgreSQL 16+ (recommended) / MySQL 8+
Build Vite 7
State Pinia
Auth Laravel Sanctum, Spatie Permission

πŸ“¦ Installation

Requirements

  • PHP 8.2+
  • Composer 2+
  • Node.js 18+ & npm
  • PostgreSQL 16+ (recommended) or MySQL 8+

Quick Start

# Clone the repository
git clone https://github.com/PolyXGO/polycms.git
cd polycms/polycms

# Install dependencies
composer install
npm install

# Configure environment
cp .env.example .env
php artisan key:generate

# Setup database
# Edit .env with your database credentials
# Tip: Set CACHE_STORE=file for first-time migration
php artisan migrate
php artisan db:seed

# Link storage
php artisan storage:link

# Start development server
npm run dev:all

The admin panel is available at http://localhost:8000/admin

Default admin account:

  • Email: admin@polycms.org
  • Password: 1

⚠️ Change the default password immediately after first login.

One-Command Setup

composer setup

This runs the full setup pipeline: install dependencies, generate key, run migrations, link storage, and build assets.

Web UI Installer

For shared hosting or non-CLI deployments, PolyCMS includes a built-in Web Installer. Simply upload the files to your server and navigate to:

https://your-domain.com/install

The installer will guide you through:

  1. System Requirements β€” PHP version, extensions, directory permissions
  2. Database Configuration β€” Enter your MySQL or PostgreSQL credentials
  3. Run Migrations β€” Create all database tables automatically
  4. Admin Account β€” Set up your administrator email and password
  5. Finish β€” Generates storage/installed.lock and redirects to the admin panel

πŸ’‘ The /install route is automatically disabled once installation is complete.


⏱️ Background Tasks

PolyCMS uses Laravel's Task Scheduler for background operations (backups, email campaigns, syncs).

Production (Cron)

* * * * * cd /path/to/polycms && php artisan schedule:run >> /dev/null 2>&1

Local Development

php artisan schedule:work

πŸ“ Project Structure

polycms/
β”œβ”€β”€ app/                    # Core application (Models, Controllers, Services)
β”‚   β”œβ”€β”€ Http/Controllers/   # Web & API controllers
β”‚   β”œβ”€β”€ Models/             # Eloquent models
β”‚   └── Services/           # Business logic services
β”œβ”€β”€ config/                 # Configuration files
β”œβ”€β”€ database/               # Migrations, seeders, factories
β”œβ”€β”€ graphql/                # Core GraphQL schemas
β”œβ”€β”€ lang/                   # Language files (en, vi, ...)
β”œβ”€β”€ modules/Polyx/          # Installable modules
β”‚   β”œβ”€β”€ SampleModule/       # Developer reference module
β”‚   β”œβ”€β”€ CookieConsent/      # GDPR consent
β”‚   β”œβ”€β”€ Google2FA/          # Two-factor auth
β”‚   └── ...
β”œβ”€β”€ resources/
β”‚   β”œβ”€β”€ js/admin/           # Vue 3 admin SPA
β”‚   β”œβ”€β”€ js/                 # Frontend scripts
β”‚   └── css/                # Stylesheets
β”œβ”€β”€ routes/                 # Web, API, auth routes
β”œβ”€β”€ themes/                 # Installable themes
β”‚   β”œβ”€β”€ flexiwhite/         # Clean multi-purpose theme
β”‚   β”œβ”€β”€ fleximyta/          # Business & e-commerce theme
β”‚   └── flexidocs/         # Documentation & wiki theme
└── public/                 # Public assets

πŸ”§ Development

Creating a Module

Modules follow a Vendor/Module namespace convention and live in modules/<Vendor>/<ModuleName>/. The built-in modules use the Polyx vendor namespace, but you can use any vendor name for your own modules (e.g., Acme, MyCompany, your brand name).

Use SampleModule as your blueprint:

modules/
β”œβ”€β”€ Polyx/                   # Official PolyCMS vendor (built-in modules)
β”‚   β”œβ”€β”€ SampleModule/        # Developer reference
β”‚   β”œβ”€β”€ Backup/
β”‚   └── ...
└── Acme/                    # Your custom vendor namespace
    └── MyModule/
        β”œβ”€β”€ module.json              # Module metadata & dependencies
        β”œβ”€β”€ src/
        β”‚   β”œβ”€β”€ MyModuleServiceProvider.php
        β”‚   β”œβ”€β”€ Http/Controllers/
        β”‚   β”œβ”€β”€ Models/
        β”‚   └── routes/
        β”œβ”€β”€ resources/admin/
        β”‚   β”œβ”€β”€ routes.ts            # Vue admin routes
        β”‚   └── views/               # Vue components
        β”œβ”€β”€ graphql/                 # Module GraphQL schemas
        └── database/               # Migrations

The module identifier format is Vendor.ModuleName (e.g., Acme.MyModule). PolyCMS auto-discovers all modules by scanning every modules/*/ vendor directory for module.json manifests.

Creating a Theme

Themes live in themes/<theme-name>/ and require:

my-theme/
β”œβ”€β”€ theme.json               # Theme metadata
β”œβ”€β”€ config/theme.php         # Theme options schema
β”œβ”€β”€ functions.php            # Hook registrations
β”œβ”€β”€ resources/views/         # Blade templates
β”œβ”€β”€ public/css/              # Compiled CSS
└── public/js/               # Compiled JS

Useful Commands

# Development server (Vite + Laravel concurrent)
npm run dev:all

# Production build
npm run build

# Run tests
composer test

# Code formatting
vendor/bin/pint

πŸ“„ License

PolyCMS Community Edition is open-source software licensed under the MIT License.


πŸ”— Links


Made with ❀️ by PolyXGO

HeraSpec Development

This project uses HeraSpec for spec-driven development.

Quick Start

# Initialize HeraSpec (if not already done)
heraspec init

# List active changes
heraspec list

# View a change
heraspec show <change-name>

# Validate changes
heraspec validate <change-name>

Project Structure

  • heraspec/project.md - Project overview and configuration
  • heraspec/specs/ - Source of truth specifications
  • heraspec/changes/ - Active changes in progress
  • heraspec/skills/ - Reusable skills for AI agents
  • AGENTS.heraspec.md - AI agent instructions

Working with Changes

  1. Create a change: Ask AI to create a HeraSpec change, or create manually
  2. Refine specs: Review and update delta specs in heraspec/specs/<change-name>/
  3. Implement: Follow tasks in heraspec/changes/<change-name>/tasks.md
  4. Archive: Run heraspec archive <change-name> --yes when complete

Skills

Add skills to your project:

# List available skills
heraspec skill list

# Add a skill
heraspec skill add ui-ux
heraspec skill add unit-test

# View skill details
heraspec skill show ui-ux

For more information, see the HeraSpec documentation.


This section is automatically updated by heraspec init. Last updated: 2026-05-03