typicms/base

Multilingual CMS built with Laravel 5
20,322 1,610
Install
composer require typicms/base
Maintainer: Samuel De Backer

TypiCMS

Software License Larastan

TypiCMS is a modular multilingual content management system built with Laravel. Out of the box you can manage pages, events, news, places, menus, translations, and more.

TypiCMS screenshot

Table of contents

Features

  • Multilingual — full support for multiple languages with locale-prefixed URLs
  • Modular — install only the modules you need; publish and customize any of them
  • Dark mode — the admin panel supports both light and dark themes
  • Rich text editingTipTap editor with support for floating images, tables, YouTube embeds, iframes, and an HTML source view
  • Passkey and OTP authentication — secure, passwordless login options for admin users
  • Page sections — pages can have multiple content sections, each with its own template
  • Nestable pages and menus — drag-and-drop reordering with automatic URI generation
  • File management — upload and organize images, documents, and folders with Uppy, image cropping with Cropper.js, and SVG sanitization on upload
  • Roles and permissions — fine-grained access control via spatie/laravel-permission
  • History log — create, update, delete, online, and offline events are logged and shown in the dashboard
  • Vue.js 3 frontend powered by Vite and written in TypeScript

URLs

The CMS manages the following URL patterns:

Modules:

  • /en/events/slug-in-english
  • /fr/evenements/slug-en-francais

Pages:

  • /en/parent-page-slug/subpage-slug/page-slug
  • /fr/slug-parent/slug-sous-page/slug-page

Requirements

  • PHP 8.4+
  • One of the database engines supported by Laravel (MySQL, PostgreSQL, SQLite, SQL Server)

For all server requirements, see the Laravel deployment documentation.

Installation

Via the Laravel installer (recommended)

Install the Laravel installer if you haven't already:

composer global require laravel/installer

Then create a new project:

laravel new mywebsite --using=typicms/base

The installer will prompt you for database credentials and run the full TypiCMS setup automatically.

Via Composer

composer create-project typicms/base mywebsite
cd mywebsite
php artisan typicms:install

Go to http://mywebsite.test/admin and log in.

Assets

Assets are bundled with Vite. Install Bun, then run:

  1. Install npm packages:

    bun install
    
  2. Start the development server:

    bun run dev
    
  3. Build for production:

    bun run prod
    

Locales configuration

  1. Set the locales in config/typicms.php. The first key of this array is the main locale and must match the locale defined in config/app.php.
  2. Set main_locale_in_url in config/typicms.php to true or false depending on whether you want the main locale to appear in the URL.

Installation of a module

The following example installs the News module. After these steps, the module will appear in the admin sidebar.

  1. Install the module with Composer:

    composer require typicms/news
    
  2. Add TypiCMS\Modules\News\Providers\ModuleServiceProvider::class, to bootstrap/providers.php, in the TypiCMS Modules Service Providers section.

  3. Publish the views and migrations:

    php artisan vendor:publish
    
  4. Run the database migration:

    php artisan migrate
    

Module scaffolding

To generate a new custom module called Cats:

  1. Create the module:

    php artisan typicms:create cats
    
  2. The module is created in /Modules/Cats. Customize it as needed.

  3. Add TypiCMS\Modules\Cats\Providers\ModuleServiceProvider::class, to bootstrap/providers.php, in the TypiCMS Modules Service Providers section.

  4. Run the migration:

    php artisan migrate
    

Available modules

Each module can be published to be tracked by git and customized locally.

Pages

Pages are nestable with drag and drop. On a drop, URIs are regenerated and saved in the database. Each translation of a page has its own route. A page can be linked to a module and can have multiple sections, each using its own template.

The admin panel includes a searchable pages tree with keyboard-accessible expand/collapse controls.

Menus

Each menu has nestable entries. An entry can link to a page or a URL, and can optionally link to a specific section of a page.

Render an HTML menu in a Blade file with @menu('menuname').

Projects

Projects have categories. Project URLs follow this pattern: /en/projects/category-slug/project-slug.

Tags

Tags support polymorphic many-to-many relations, so they can be linked to any module. The tag input uses Tom Select.

Events

Events have starting and ending dates.

News

News module.

Contacts

Frontend contact form with admin-side records management. Notifications are sent to the visitor and the webmaster.

Partners

A partner has a logo, website URL, title, and body content.

Files

The file manager lets you upload and organize images, documents, and folders. File uploads use Uppy with drag-and-drop support and a compression step before upload. Images can be cropped using Cropper.js. SVG files are sanitized on upload. Images can be swapped in place from the file manager.

To store original images on a remote service such as Amazon S3 while serving cropped images from local disk, set FILESYSTEM_DRIVER=s3 in your .env file and configure croppa.php accordingly.

Users and roles

Admins can authenticate with a passkey or a one-time password in addition to a standard password. User registration can be enabled in the settings panel (/admin/settings). Roles and permissions are managed with spatie/laravel-permission. Admins can impersonate users.

Blocks

Blocks let you display custom content in your views.

Render a block in Blade with Blocks::render('blockname') or @block('blockname').

Translations

Translations can be managed in the database via the admin panel (/admin/translations).

Retrieve a translation using the standard Laravel helpers: __('Key'), trans('Key'), or @lang('Key').

Sitemap

A sitemap is generated automatically from all published pages. It is available at /sitemap.xml.

Settings

Manage the website title, logo, and other global options in the settings panel.

History

Create, update, delete, online, and offline events are logged in the database. The most recent records are shown on the back-office dashboard.

Artisan commands

Install TypiCMS

php artisan typicms:install

Run the initial migration and seed

php artisan typicms:database

This command is called automatically by typicms:install.

Create a superuser

php artisan typicms:user

Publish a module

To customize a module — for example, to add fields or a relation — publish it:

php artisan typicms:publish <modulename>

This will:

  1. Publish the module's views and migrations.
  2. Copy the module source to /Modules/<Modulename>.
  3. Remove the Composer package with composer remove typicms/<modulename>.

Once published, the module lives in /Modules/<Modulename> and is tracked by git, so changes are preserved across composer update runs.

Changelog

Please see CHANGELOG for more information on what has changed.

Contributing

Please see CONTRIBUTING for details.

Credits

License

TypiCMS is open-source software licensed under the MIT license.