typicms/base
Composer 安装命令:
composer create-project typicms/base
包简介
A modular multilingual CMS built with Laravel, enabling developers to manage structured content like pages, news, events, and more.
关键字:
README 文档
README
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.
Table of contents
- Features
- Requirements
- Installation
- Available modules
- Artisan commands
- Change log
- Contributing
- Credits
- Licence
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 editing — TipTap 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
- SEO friendly — automatic
sitemap.xml, locale-awarellms.txt, and a reusable<x-json-ld>Blade component for structured data - Markdown responses — every public page can be served as Markdown by appending
.mdto the URL or sending anAccept: text/markdownheader - 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+
- MySQL, MariaDB, or PostgreSQL
For all server requirements, see the Laravel deployment documentation.
Installation
composer create-project typicms/typicms mywebsite
Go to https://mywebsite.test/admin and log in using a password.
Assets
Assets are bundled with Vite. Install Bun, then run:
-
Install npm packages:
bun install -
Start the development server:
bun run dev -
Build for production:
bun run prod
Locales configuration
- Set the locales in
config/typicms.php. The first key of this array is the main locale and must match the locale defined inconfig/app.php. - Set
main_locale_in_urlinconfig/typicms.phptotrueorfalsedepending 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.
-
Install the module with Composer:
composer require typicms/news -
Publish the views and migrations:
php artisan vendor:publish -
Run the database migration:
php artisan migrate
Module scaffolding
To generate a new custom module called Cats:
-
Create the module:
php artisan typicms:create cats -
The module is created in
/Modules/Cats. Customize it as needed. -
Add
TypiCMS\Modules\Cats\Providers\ModuleServiceProvider::class,tobootstrap/providers.php, in the TypiCMS Modules Service Providers section. -
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.
llms.txt
A locale-aware llms.txt file is generated automatically and served at /llms.txt. It lists published pages and module content so that LLM-based agents can discover and index the site.
JSON-LD
The Pages, News, Events, Places, and Partners modules ship with Schema.org structured data via the reusable <x-core::json-ld> Blade component. Use it in your own views to add structured data for any model:
<x-core::json-ld :schema="[ '@context' => 'https://schema.org', '@type' => 'Article', 'headline' => $model->title, ]" />
Markdown responses
Every public route can be served as Markdown thanks to spatie/laravel-markdown-response. Append .md to any URL (e.g. /en/about.md) or send an Accept: text/markdown header, and the same controller will return a Markdown representation of the page — handy for LLM consumption and feeding llms.txt clients.
Settings
Manage the website title, baseline, description, contact details (email, phone, address), logo, and other global options in the settings panel (/admin/settings).
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:
- Publish the module's views and migrations.
- Copy the module source to
/Modules/<Modulename>. - 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.
typicms/base 适用场景与选型建议
typicms/base 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 20.4k 次下载、GitHub Stars 达 1.62k, 最近一次更新时间为 2014 年 12 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cms」 「laravel」 「multilingual」 「Typi」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 typicms/base 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 typicms/base 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 typicms/base 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
GraphQL authentication for your headless Craft CMS applications.
Set Links with a specific language parameter
Supercharged text field validation.
i18n tools for SilverStripe
Integrate with Snipcart.
Follow, Favourite, Bookmark, Like & Subscribe.
统计信息
- 总下载量: 20.4k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1620
- 点击次数: 28
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-12-26