{"id":13609828,"url":"https://github.com/cesurapp/pd-admin","last_synced_at":"2025-10-29T05:43:34.474Z","repository":{"id":48606198,"uuid":"134597095","full_name":"cesurapp/pd-admin","owner":"cesurapp","description":"Powerful Admin Dashboard for Symfony 5","archived":false,"fork":false,"pushed_at":"2022-03-31T10:27:37.000Z","size":5738,"stargazers_count":95,"open_issues_count":11,"forks_count":21,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-12-10T02:10:17.753Z","etag":null,"topics":["admin","admin-dashboard","pdadmin","php","symfony","symfony-application","symfony5","widget"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cesurapp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-23T16:25:38.000Z","updated_at":"2024-05-03T10:27:00.000Z","dependencies_parsed_at":"2022-09-06T08:54:17.899Z","dependency_job_id":null,"html_url":"https://github.com/cesurapp/pd-admin","commit_stats":null,"previous_names":["cesurapp/pd-admin","arrrray/pd-admin"],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesurapp%2Fpd-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesurapp%2Fpd-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesurapp%2Fpd-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesurapp%2Fpd-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cesurapp","download_url":"https://codeload.github.com/cesurapp/pd-admin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230423564,"owners_count":18223435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["admin","admin-dashboard","pdadmin","php","symfony","symfony-application","symfony5","widget"],"created_at":"2024-08-01T19:01:38.484Z","updated_at":"2025-10-29T05:43:34.388Z","avatar_url":"https://github.com/cesurapp.png","language":"PHP","readme":"![page-login](https://user-images.githubusercontent.com/8649070/120119713-efae3900-c1a1-11eb-88cf-481afb058b07.png)\n\n![page-admin](https://user-images.githubusercontent.com/8649070/120119714-f177fc80-c1a1-11eb-8853-3d60b5c1c4ed.png)\n\npdAdmin\n=========\nSupported **PHP8 and Composer 2**\n\nSymfony Powerful Dashboard \u0026 Admin. Developed with **Symfony 5**, **Vue 3**, **Bootstrap 5** framework.\n\nNo changes were made to the symfony structure, the current directory structure is used. A custom namespace for Admin has been created. This field is used for all administrator operations.\n\nThe interface is designed to be responsive using Twitter Bootstrap. The least possible dependency was tried to be used.\n\nProperties\n--------------------\n* Messenger was used for queuing.\n* PM2 has been set for background processes.\n* Cron processes are managed by PM2.\n* A special Data Table has been written to the panel (Vue3)\n* Supports CSV, Excel export.\n* Special package written for HTTP vs Mail logging.\n* JWT is used for API login.\n* Responsive design\n* Vue documentation is not yet available, see source file.\n\nInstallation\n--------------------\n1. Download pdAdmin\n    ```\n    composer create-project appaydin/pd-admin pdadmin\n    ```\n2. Create and configure the `.env` file.\n\n3. Create database schemas\n    ```\n    bin/console doctrine:schema:create --force\n    ```\n4. Run built-in web server\n     ```\n     symfony server:start --no-tls -d\n     ```\n5. Install \u0026 Build assets\n     ```\n     yarn install\n     yarn run build\n     ```\n6. Run Backround Process\n     ```\n     pm2 start\n\n     # Manuel\n     # bin/console messenger:consume -vv\n     # bin/console schedule:run\n     ```\n\nDocumentation\n--------------------\n\n* [User Management](#user-management)\n* [Multilingual System](#multilingual-system)\n* [Delegation](#delegation)\n* [System Settings](#system-settings)\n* [Create New Widget](#create-new-widget)\n* [Create New Menu](#create-new-menu)\n\n### User Management\nThere is [pd-user](https://github.com/appaydin/pd-user) for user management. All settings are in __config/packages/pd_user.yaml__ file.\n\n* __Create User:__\n    ```\n    bin/console user:create\n    ```\n* __Change User Password:__\n    ```\n    bin/console user:changepassword\n    ```\n* __Change User Roles:__\n    ```\n    bin/console user:role\n    ```\n\n### Multilingual System\nUser logon for multi language is used. Each user can choose his / her own language.\nWhen you log in, you are automatically redirected.\n\nNew languages can be added from the kernel settings. You need to translate manually for the new language.\n\n### Delegation\n[SensioFrameworkExtraBundle](https://symfony.com/doc/master/bundles/SensioFrameworkExtraBundle/annotations/security.html) is used with Symfony security component. There are three default user roles.\n\n* ROLE_USER\n* ROLE_SUPER_ADMIN\n\nROLE_SUPER_ADMIN has full authority. ROLE_USER authorities can be restricted and panel access can be turned off in the __security.yaml__ file.\n\n### System Settings\nSystem settings are stored in the database. All settings can be used as parameters after container assembly. Since all settings are compiled with the container\nit does not create any additional load on the system. Settings can be configured using Symfony Forms and added to the Settings menu from the outside via the \"Menu Event\" system.\nClear the cache after changes to system settings, otherwise the new settings will not be enabled.\n\nFor general settings, you can add it to __src/Admin/Forms/System/GeneralForm__\n\n__Add New Menu to Settings__:\n```php\n\u003c?php\n//src/Admin/Menu/SettingsMenu.php\n\nnamespace App\\Admin\\Menu;\n\nuse Pd\\MenuBundle\\Builder\\ItemInterface;\nuse Pd\\MenuBundle\\Builder\\Menu;\n\nclass SettingsMenu extends Menu\n{\n    public function createMenu(array $options = []): ItemInterface\n    {\n        // Create Root Item\n        $menu = $this-\u003ecreateRoot('settings_menu')-\u003esetChildAttr([\n            'class' =\u003e 'nav nav-pills',\n            'data-parent' =\u003e 'admin_config_general',\n        ]);\n\n        // Create Menu Items\n        $menu-\u003eaddChild('nav_config_general')\n            -\u003esetLabel('nav_config_general')\n            -\u003esetRoute('admin_config_general')\n            -\u003esetLinkAttr(['class' =\u003e 'nav-item'])\n            -\u003esetRoles(['ROLE_CONFIG_GENERAL'])\n            // Email\n            -\u003eaddChildParent('nav_config_email')\n            -\u003esetLabel('nav_config_email')\n            -\u003esetRoute('admin_settings_email')\n            -\u003esetLinkAttr(['class' =\u003e 'nav-item'])\n            -\u003esetRoles(['ROLE_SETTINGS_EMAIL']);\n\n        return $menu;\n    }\n}\n```\n\n### Create New Widget\nWidget system was created with Symfony \"EventDispatcher Component\".\nIt has an adjustable structure for each user and it can be specially designed with \"Twig Template\" engine.\nFor more information visit [pd-widget](https://github.com/appaydin/pd-widget)\n\nCreate New Admin Widget:\n```php\n\u003c?php\n//src/Admin/Widgets/AccountWidget.php\n\nnamespace App\\Admin\\Widgets;\n\nuse Pd\\WidgetBundle\\Builder\\Item;\nuse Pd\\WidgetBundle\\Event\\WidgetEvent;\nuse Doctrine\\ORM\\EntityManagerInterface;\nuse Symfony\\Component\\HttpFoundation\\Request;\n\nclass AccountWidget\n{\n    private $entityManager;\n\n    public function __construct(EntityManagerInterface $entityManager)\n    {\n        $this-\u003eentityManager = $entityManager;\n    }\n\n    /**\n     * Build Widgets.\n     *\n     * @param WidgetEvent $event\n     */\n    public function builder(WidgetEvent $event)\n    {\n        // Get Widget Container\n        $widgets = $event-\u003egetWidgetContainer();\n\n        // Add Widgets\n        $widgets\n            -\u003eaddWidget((new Item('user_statistics', 3600))\n                -\u003esetGroup('admin') // Widget Adds to \"Admin\" Group\n                -\u003esetName('widget_user_statistics.name')\n                -\u003esetDescription('widget_user_statistics.description')\n                -\u003esetTemplate('@Admin/Widget/userStatistics.html.twig')\n                -\u003esetRole(['ROLE_WIDGET_USERSTATISTICS'])\n                -\u003esetConfigProcess(function (Request $request) {\n                    /**\n                     * Controller for Widget Settings\n                     * The return value is stored in the user specific database\n                     */\n                    if ($type = $request-\u003eget('type')) {\n                        switch ($type) {\n                            case '1week':\n                                return ['type' =\u003e '1week'];\n                            case '1month':\n                                return ['type' =\u003e '1month'];\n                            case '3month':\n                                return ['type' =\u003e '3month'];\n                        }\n                    }\n\n                    return false;\n                })\n                -\u003esetData(function ($config) {\n                    /**\n                     * The return value can be used in the twig template.\n                     * The function will not execute unless you call it in the template.\n                     * You can use the database operations here.\n                     */\n                    // Set Default Config\n                    if (!isset($config['type'])) {\n                        $config['type'] = '1week';\n                    }\n\n                    // Create Statistics Data\n                    if ($config['type'] === '1month') {\n                        $data = ['chartDay' =\u003e '7'];\n                        // Create Data\n                    } else if ($config['type'] === '1month') {\n                        $data = ['chartDay' =\u003e '30'];\n                    } else {\n                        $data = ['chartDay' =\u003e '90'];\n                    }\n\n                    return $data;\n                })\n            );\n    }\n}\n```\n\n### Create New Menu\nThe menu system was created with Symfony \"EventDispatcher Component\".\nFor each menu created, Event is generated by default, can be turned off by menu configuration.\nFor more information visit the [pd-menu](https://github.com/appaydin/pd-menu)\n\nCreate Menu:\n```php\n\u003c?php\n// src/Admin/Menu/MainNav.php\n\nnamespace App\\Admin\\Menu;\n\nuse Pd\\MenuBundle\\Builder\\ItemInterface;\nuse Pd\\MenuBundle\\Builder\\Menu;\n\nclass MainNav extends Menu\n{\n    public function createMenu(array $options = []): ItemInterface\n    {\n        // Create ROOT Menu\n        $menu = $this-\u003ecreateRoot('main_menu', true); // Event enabled\n\n        // Create Dashboard\n        $menu-\u003eaddChild('nav_dashboard', 1)\n            -\u003esetLabel('nav_dashboard')\n            -\u003esetRoute('admin_dashboard')\n            -\u003esetRoles(['ROLE_DASHBOARD'])\n            -\u003esetExtra('label_icon', 'dashboard');\n\n        /*\n         * Create Account Section\n         */\n        $menu\n            -\u003eaddChild('nav_account', 5)\n            -\u003esetLabel('nav_account')\n            -\u003esetRoute('admin_account_list')\n            -\u003esetRoles(['ROLE_ACCOUNT_LIST'])\n            -\u003esetExtra('label_icon', 'people')\n                // Account List\n                -\u003eaddChild('nav_account', 1)\n                -\u003esetLabel('nav_account')\n                -\u003esetRoute('admin_account_list')\n                -\u003esetRoles(['ROLE_ACCOUNT_LIST'])\n                // Group List\n                -\u003eaddChildParent('nav_group', 2)\n                -\u003esetLabel('nav_group')\n                -\u003esetRoute('admin_account_group_list')\n                -\u003esetRoles(['ROLE_GROUP_LIST']);\n\n        return $menu;\n    }\n}\n```\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesurapp%2Fpd-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcesurapp%2Fpd-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesurapp%2Fpd-admin/lists"}