Copy everything below this line from to the ending and paste into your README.md file.
# پنل مدیریت میکروسرویس متارنگ (Microservice Admin Panel)
پنل مدیریت مدرن و مقیاسپذیر برای سامانه متارنگ، ساخته شده با **Laravel 11**، **Blade**، **Vue 3** و **ابزارهای مدرن فرانتاند**.
[](https://php.net)
[](https://laravel.com)
[](https://vuejs.org)
[](LICENSE)
## ✨ ویژگیها
- **معماری میکروسرویس** – آماده اتصال به سرویسهای مجزای متارنگ
- **ترکیب Blade + Vue 3** – قدرت SEO و سرعت Blade با تعاملپذیری Vue
- **مدیریت جامع کاربران و نقشها** – سیستم ACL توکار
- **مدیریت ترجمهها** – از طریق API و کامپوننتهای Vue
- **پروفایل کاربری** – ویرایش اطلاعات و آپلود تصویر
- **باکس آپلود فایل پیشرفته (`FileInput`)** – با پشتیبانی از حالت بارگذاری
- **کامپوننت جدول پویا (`TableAction`)** – برای نمایش و عملیات روی دادهها
- **دارک/لایت مود** – از طریق `useBreakpoint` و قابلیتهای مدرن CSS
- **مدیریت ناوبری** – کامپوننت `Breadcrumb` یکپارچه
- **فرانتاند سریع با Vite** – هات ریلود، TypeScript، PostCSS
## 📋 پیشنیازها
- PHP 8.2 یا بالاتر
- Composer
- Node.js 18+ و NPM
- MySQL 8.0 / PostgreSQL / MariaDB
- Redis (اختیاری – برای کش و صف)
## 🚀 مراحل نصب و راهاندازی
### 1. کلون مخزن
```bash
git clone https://github.com/iranpsc/microservice-admin-panel.git
cd microservice-admin-panel
composer installcp .env.example .env
php artisan key:generateسپس اطلاعات پایگاه داده و سرویسهای جانبی را در .env ویرایش کنید:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=metarang_admin
DB_USERNAME=root
DB_PASSWORD=
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379npm installnpm run devبرای ساختن نسخه تولید:
npm run buildphp artisan migrate --seedسیدر
ReplaceImagesUrlSeederآدرس API کارت ملی را بهروز میکند.
php artisan storage:linkphp artisan serveو در ترمینال مجزا (برای فرانتاند):
npm run devپنل ادمین در آدرس http://localhost:8000 در دسترس است.
├── app/
│ ├── Http/
│ │ ├── Controllers/ (کنترلرهای API و Web)
│ │ └── Middleware/
│ ├── Models/ (User, Role, Translation, ...)
│ └── Services/ (لایه سرویس برای میکروسرویسها)
├── database/
│ ├── migrations/ (جدولهای users, roles, translations, ...)
│ └── seeders/ (ReplaceImagesUrlSeeder و ...)
├── resources/
│ ├── js/
│ │ ├── components/ (کامپوننتهای Vue: FileInput, TableAction, Breadcrumb)
│ │ ├── composables/ (useBreakpoint و ...)
│ │ └── pages/ (صفحات Vue – مدیریت ترجمه، پروفایل و ...)
│ └── views/ (فایلهای Blade اصلی که Vue در آنها مانت میشود)
├── routes/
│ ├── web.php (مسیرهای Blade و صفحات اصلی)
│ └── api.php (APIهای مدیریت ترجمه، پروفایل، دیتابیس)
├── public/ (فونتها، فایلهای استاتیک)
├── vite.config.js (تنظیمات Vite با پشتیبانی از Vue)
└── package.json (Vue, @vitejs/plugin-vue, tailwindcss, ...)
| دستور | توضیح |
|---|---|
npm run dev |
اجرای Vite در حالت توسعه (Hot reload) |
npm run build |
ساختن نسخه بهینهشده برای production |
npm run preview |
پیشنمایش نسخه production به صورت محلی |
- PSR-12 برای کد PHP
- استفاده از Route Model Binding
- استفاده از Form Requests برای اعتبارسنجی
- استفاده از Services و Repository Pattern برای لایه دسترسی به داده (پیشنهادی)
- نامگذاری توابع:
camelCase– متغیرها:snake_case
- استفاده از Composition API و
<script setup> - کامپوننتها: PascalCase (مثل
FileInput.vue) - کامپوزابلها: useCamelCase (مثل
useBreakpoint) - استایلها: Tailwind CSS (در فایل کامپوننت با
<style scoped>) - ترجیحاً از TypeScript برای props و emits استفاده شود
- از Conventional Commits استفاده کنید:
feat: add new button componentfix: resolve image upload issue in FileInputchore: update dependencies
php artisan testتستهای واحد و ویژگی در پوشه tests/ قرار دارند.
- تمام APIها با Laravel Sanctum (یا JWT) محافظت میشوند.
- خروجیها در Blade با
{{ }}و در Vue با{{ }}خودکار XSS-safe هستند. - برای آپلود فایل، نوع و سایز فایل در
FileInputاعتبارسنجی میشود.
- مخزن را فورک کنید.
- یک برنچ جدید ایجاد کنید (
git checkout -b feature/awesome-feature). - تغییرات خود را کامیت کنید (
git commit -m 'feat: add awesome feature'). - پوش کنید (
git push origin feature/awesome-feature). - یک Pull Request ایجاد کنید.
لطفاً قبل از PR، تستها را اجرا کرده و از کیفیت کد اطمینان حاصل کنید.
این پروژه تحت لایسنس MIT منتشر شده است – برای جزئیات به فایل LICENSE مراجعه کنید.
- تیم متارنگ برای زیرساخت میکروسرویس
- مشارکتکنندگان:
abbasajorlou1371وtheAwmin - اکوسیستم بزرگ Laravel و Vue.js
💡 نکته: این مخزن در حال توسعه است. برای گزارش باگ یا پیشنهاد ویژگی، از Issues استفاده کنید.
---
## English Version
A modern, scalable admin panel for the Metarang system, built with Laravel 11, Blade, Vue 3, and modern frontend tooling.
- Microservice Architecture – Ready to connect with Metarang's separate services
- Blade + Vue 3 Hybrid – SEO power and Blade speed with Vue interactivity
- Comprehensive User & Role Management – Built-in ACL system
- Translation Management – Through API and Vue components
- User Profile – Edit information and upload images
- Advanced File Upload (
FileInput) – With loading state support - Dynamic Data Table (
TableAction) – Display and operations on data - Dark/Light Mode – Via
useBreakpointand modern CSS features - Navigation Management – Integrated
Breadcrumbcomponent - Fast Frontend with Vite – Hot reload, TypeScript, PostCSS
- PHP 8.2 or higher
- Composer
- Node.js 18+ and NPM
- MySQL 8.0 / PostgreSQL / MariaDB
- Redis (optional – for caching and queues)
git clone https://github.com/iranpsc/microservice-admin-panel.git
cd microservice-admin-panelcomposer installcp .env.example .env
php artisan key:generateThen edit database and service credentials in .env:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=metarang_admin
DB_USERNAME=root
DB_PASSWORD=
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379npm installnpm run devFor production build:
npm run buildphp artisan migrate --seedThe
ReplaceImagesUrlSeederupdates the Melli Card API endpoints.
php artisan storage:linkphp artisan serveAnd in a separate terminal (for frontend):
npm run devThe admin panel will be available at http://localhost:8000
├── app/
│ ├── Http/
│ │ ├── Controllers/ (API and Web controllers)
│ │ └── Middleware/
│ ├── Models/ (User, Role, Translation, ...)
│ └── Services/ (Service layer for microservices)
├── database/
│ ├── migrations/ (users, roles, translations tables)
│ └── seeders/ (ReplaceImagesUrlSeeder, etc.)
├── resources/
│ ├── js/
│ │ ├── components/ (Vue components: FileInput, TableAction, Breadcrumb)
│ │ ├── composables/ (useBreakpoint, etc.)
│ │ └── pages/ (Vue pages – translation mgmt, profile, etc.)
│ └── views/ (Main Blade files where Vue mounts)
├── routes/
│ ├── web.php (Blade routes and main pages)
│ └── api.php (APIs for translations, profile, database)
├── public/ (Fonts, static files)
├── vite.config.js (Vite config with Vue support)
└── package.json (Vue, @vitejs/plugin-vue, tailwindcss, ...)
| Command | Description |
|---|---|
npm run dev |
Run Vite in development mode (Hot reload) |
npm run build |
Build optimized production version |
npm run preview |
Preview production build locally |
- PSR-12 for PHP code
- Use Route Model Binding
- Use Form Requests for validation
- Use Services and Repository Pattern for data access layer (recommended)
- Naming:
camelCasefor methods –snake_casefor variables
- Use Composition API and
<script setup> - Components: PascalCase (e.g.,
FileInput.vue) - Composables: useCamelCase (e.g.,
useBreakpoint) - Styling: Tailwind CSS (in component with
<style scoped>) - Prefer TypeScript for props and emits
- Use Conventional Commits:
feat: add new button componentfix: resolve image upload issue in FileInputchore: update dependencies
php artisan testUnit and feature tests are located in the tests/ directory.
- All APIs are protected with Laravel Sanctum (or JWT)
- Outputs are XSS-safe using
{{ }}in both Blade and Vue - File uploads are validated for type and size in
FileInput
- Fork the repository
- Create a new branch (
git checkout -b feature/awesome-feature) - Commit your changes (
git commit -m 'feat: add awesome feature') - Push to the branch (
git push origin feature/awesome-feature) - Open a Pull Request
Please run tests and ensure code quality before submitting a PR.
This project is open-sourced under the MIT license – see the LICENSE file for details.
- Metarang team for microservice infrastructure
- Contributors:
abbasajorlou1371andtheAwmin - The great Laravel and Vue.js ecosystems
💡 Note: This repository is under active development. For bugs or feature requests, use Issues.
**END OF README**