ThinkAdmin Documentation

website·Indexed 32 days ago

https://thinkadmin.top

A 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.

Tokens
83.4K
Snippets
416
Records
542
Agent score
61%

What's inside ThinkAdmin

  1. Overview of ThinkPlugsWemall

    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.
  2. Overview of zoujingli/qrcode features

    The zoujingli/qrcode library is a fork of endroid/qr-code that 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.
  3. Overview of ThinkAdmin Storage Drivers

    ThinkAdmin provides a unified file storage entry point via think\admin\Storage. The active driver is determined by the storage.type system configuration. Supported drivers include:

    • local: Local server storage
    • alist: Self-hosted Alist storage
    • qiniu: Qiniu Cloud
    • upyun: Upyun USS
    • txcos: Tencent Cloud COS
    • alioss: Alibaba Cloud OSS

    Key configuration keys include storage.allow_exts (allowed extensions) and storage.name_type (naming strategy). Note that the system explicitly forbids executable extensions like .sh, .asp, .bat, .cmd, .exe, and .php regardless of configuration.

  4. 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.
  5. 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.
  6. 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.
  7. 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 (*).
  8. 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.
  9. 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.
  10. 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 in stc/database within a plugin and copied to the project's database/migrations directory during installation.
  11. Overview of ThinkPlugsWorker

    ThinkPlugsWorker is a base service plugin based on Workerman 4.x / 5.x. It provides the xadmin:worker command 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 --daemon flag, with logs and PID files stored by default in safefile/worker/.
  12. 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.