ThinkAdmin Documentation
website·Indexed 32 days ago
https://thinkadmin.topA backend management development framework built on ThinkPHP and Composer, compatible with ThinkPHP 6 and 8. It features a plugin-based ecosystem, RBAC permission management, and a suite of development helpers including QueryHelper, FormHelper, and SaveHelper. The framework provides core capabilities for asynchronous tasks, multi-language support, and integrated file upload and Excel export systems.
What's inside ThinkAdmin
- ThinkPlugsWemall is a distribution mall plugin for ThinkAdmin. It provides a comprehensive e-commerce system including product management (categories, specifications, inventory), order processing (payment, shipping, refunds), membership levels, discounts, coupons, promotional posters, agent commissions, and withdrawals. It supports multiple front-ends including WeChat Mini Programs, H5 mobile pages, and a full administrative backend.
Overview of zoujingli/qrcode features
The
zoujingli/qrcodelibrary is a fork ofendroid/qr-codethat supports PHP 7.1+. Key capabilities include:- Generation of QR codes in PNG, SVG, and EPS formats.
- Customization of colors, size, and margins.
- Support for various error correction levels.
- Ability to embed logos and add text labels.
- Batch generation of QR codes.
Overview of ThinkAdmin Storage Drivers
ThinkAdmin provides a unified file storage entry point via
think\admin\Storage. The active driver is determined by thestorage.typesystem configuration. Supported drivers include:local: Local server storagealist: Self-hosted Alist storageqiniu: Qiniu Cloudupyun: Upyun USStxcos: Tencent Cloud COSalioss: Alibaba Cloud OSS
Key configuration keys include
storage.allow_exts(allowed extensions) andstorage.name_type(naming strategy). Note that the system explicitly forbids executable extensions like.sh,.asp,.bat,.cmd,.exe, and.phpregardless of configuration.Overview of Admin.js Framework
Admin.js is the core JavaScript library for ThinkAdmin, designed to simplify backend development by encapsulating common tasks into utility functions and components. It is built on top of jQuery and integrates with LayUI for UI components like tables and modals. The framework supports a Single Page Application (SPA) model using HASH routing and allows developers to implement functionality directly via HTML data attributes.Overview of QueryHelper for database queries
QueryHelper is a tool provided by the ThinkAdmin framework to simplify database query operations. It acts as a shortcut for SQL queries, automatically handling common logic such as pagination, search condition assembly (based on URL parameters or form data), and sorting, reducing the need for repetitive manual SQL or ThinkORM code in controllers.Overview of ThinkPlugsCenter for ThinkAdmin
ThinkPlugsCenter is the plugin service management center for ThinkAdmin. It provides a unified entry point to display installed plugins, reads Composer metadata and plugin configurations to show names, documentation, and authorization info, and automatically integrates plugin center access into the admin menu via installation migrations. Since version v1.0.28, it no longer loads online plugin information, making it suitable for secure operation in intranet (offline) environments.Overview of ThinkLibrary
ThinkLibrary is the core foundation library for ThinkAdmin. It provides essential base classes, helpers, and services required by ThinkAdmin and its associated plugins. It is not a standalone business plugin but a dependency for the admin framework.
Technical Requirements:
- PHP version:
>=7.1 - Compatible frameworks:
topthink/framework^6.0,^8.0, or any version (*).
- PHP version:
Overview of ThinkAdmin Plugin Ecosystem
ThinkAdmin uses a Composer-based plugin mechanism to manage core components, backend modules, WeChat modules, member plugins, and paid plugins. Plugins can be installed as needed or copied locally into the project for secondary development.
Key usage guidelines:
- Read documentation regarding authorization, dependencies, and uninstall instructions before installation.
- Install only what is needed; new projects typically only require basic components and backend modules.
- Be cautious when updating plugins like Admin, Wechat, or Static, as they may overwrite directories or static resources. Backup customized content or use local development.
Overview of ThinkAdmin Framework
ThinkAdmin is an open-source admin development framework based on ThinkPHP, licensed under the MIT protocol. It is compatible with ThinkPHP 6 and ThinkPHP 8. The framework provides foundational capabilities for backend permissions, menus, configuration, files, tasks, storage, and plugin-based extensions, making it suitable for rapidly building maintainable management backends.Overview of ThinkAdmin Database Migrations
ThinkAdmin uses Phinx migration scripts to manage database structures, initialization data, and global menus for plugins. This ensures consistency across different environments (development, production) and allows for version-controlled database changes. Migration files are typically stored instc/databasewithin a plugin and copied to the project'sdatabase/migrationsdirectory during installation.Overview of ThinkPlugsWorker
ThinkPlugsWorker is a base service plugin based on Workerman 4.x / 5.x. It provides thexadmin:workercommand to start HTTP services and configure custom Workerman or GatewayWorker processes. It supports process management (start, stop, reload, restart, status) on Linux and basic management (start, stop, status) on Windows. It can run in the background using the--daemonflag, with logs and PID files stored by default insafefile/worker/.Overview of ThinkPlugsAccount
ThinkPlugsAccount is a multi-terminal account plugin for ThinkAdmin. It manages terminal accounts, mobile phone binding, official member accounts, and interface tokens. It supports multiple login methods including WeChat Service Accounts, WeChat Mini Programs, Apps, H5, and PC. The system uses a progression model where users start as temporary users (usid) and upgrade to official users (unid) by binding a verified mobile phone number.