# Persian Office Automation SaaS

<p align="center">
  <a href="https://wordpress.org/plugins/persian-office-automation/">
    <img src="https://img.shields.io/wordpress/plugin/v/persian-office-automation?logo=wordpress&logoColor=white&label=WordPress.org&color=21759B" alt="Latest version on WordPress.org" />
  </a>
  <a href="https://wordpress.org/plugins/persian-office-automation/">
    <img src="https://img.shields.io/wordpress/plugin/installs/persian-office-automation?logo=wordpress&logoColor=white&label=active%20installs&color=46b450" alt="Active installs" />
  </a>
  <a href="https://wordpress.org/plugins/persian-office-automation/">
    <img src="https://img.shields.io/wordpress/plugin/dt/persian-office-automation?logo=wordpress&logoColor=white&label=downloads&color=0073AA" alt="Total downloads" />
  </a>
</p>

<h3 align="center">مخزن رسمی وردپرس · WordPress Plugin Directory</h3>

<p align="center">
  <a href="https://wordpress.org/plugins/persian-office-automation/"><b>دانلود، بررسی امتیاز و نصب مستقیم از وردپرس</b></a>
</p>
<p align="center">
  <a href="https://wordpress.org/plugins/persian-office-automation/"><b>Download, reviews &amp; one-click install — WordPress.org</b></a>
</p>
<p align="center">
  <a href="https://wordpress.org/plugins/persian-office-automation/"><code>https://wordpress.org/plugins/persian-office-automation/</code></a>
</p>

---

[![WordPress](https://img.shields.io/badge/WordPress-6.0%2B-21759B?logo=wordpress)](https://wordpress.org/plugins/persian-office-automation/)
[![PHP](https://img.shields.io/badge/PHP-7.4%2B-777BB4?logo=php)](https://php.net)
[![License](https://img.shields.io/badge/License-GPLv2-green.svg)](https://www.gnu.org/licenses/gpl-2.0.html)

**سیستم جامع دبیرخانه، مکاتبات و اتوماسیون اداری برای وردپرس**  
A full-featured office automation, correspondence (Dabirkhane) and task management system for WordPress.

---

## فهرست / Table of Contents

- [معرفی (فارسی)](#معرفی-فارسی)
- [Introduction (English)](#introduction-english)
- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Changelog](#changelog)
- [Project Structure](#project-structure)
- [Developer](#developer)
- [License](#license)

---

## معرفی (فارسی)

**اتوماسیون اداری فارسی (نسخه SaaS)** یک پلاگین وردپرس است که سایت شما را به یک **دبیرخانه و اتوماسیون اداری** کامل تبدیل می‌کند. با این پلاگین می‌توانید نامه‌های وارده و صادره را ثبت و پیگیری کنید، مکاتبات داخلی و جلسات را مدیریت کنید، وظایف را به کاربران اختصاص دهید و با **تقویم شمسی (جلالی)** و داشبورد و گزارشات، گردش کار اداری را دیجیتال کنید.

### ویژگی‌های کلیدی

- **صندوق ورودی (دبیرخانه):** دریافت، ارجاع و پیگیری نامه‌ها با صندوق ورودی، ارسالی‌های من، در انتظار، ستاره‌دار و آرشیو.
- **نامه‌های وارده و صادره:** ثبت شماره، مرجع، موضوع، فرستنده/گیرنده، اولویت، تاریخ و ضمیمه با پشتیبانی آرشیو و جستجو.
- **مکاتبات داخلی:** ارسال و دریافت یادداشت‌های داخلی بین واحدها و کاربران.
- **وظایف (Tasks):** ایجاد وظیفه، اختصاص به کاربر، وضعیت (لیست/کانبان)، چک‌لیست، ثبت زمان و نظرات.
- **جلسات:** ثبت جلسات، تاریخ و مکان، شرکت‌کنندگان و یادداشت.
- **سربرگ سازمانی:** قالب سربرگ با لوگو، نام سازمان، بسمه‌تعالی و پاورقی برای چاپ نامه وارده، صادره و داخلی.
- **یادداشت روزانه فردی:** دفترچه شخصی روی تقویم شمسی با حال‌وهوا، برچسب و پین؛ نمایش در تقویم کاری.
- **فرآیندهای کسب‌وکار (اختیاری):** فعال‌سازی گردش کار و چارت سازمانی از تنظیمات، فقط وقتی سازمان به آن نیاز دارد.
- **تقویم:** نمایش تقویم شمسی با رویدادهای نامه، جلسه، وظیفه و یادداشت روزانه.
- **گزارشات:** گزارشات آماری برای مدیر (دسترسی با نقش مدیر).
- **نقش‌ها و دسترسی:** قابلیت‌های سفارشی (مثل `persian_oa_create_letter`, `persian_oa_view_letter`) برای کنترل دسترسی دقیق.
- **تاریخ شمسی (جلالی):** پشتیبانی کامل از تاریخ جلالی در فرم‌ها و لیست‌ها.
- **رابط کاربری:** داشبورد و منوی فارسی با طراحی واکنش‌گرا.

---

## Introduction (English)

**Persian Office Automation SaaS** is a WordPress plugin that turns your site into a full **office automation and correspondence (Dabirkhane)** system. Register and track incoming and outgoing letters, manage internal memos and meetings, assign tasks to users, and digitize workflow with **Jalali (Persian) calendar**, dashboard and reports.

### Key capabilities

- **Cartable (Inbox):** Receive, refer and track letters via Inbox, Sent, Pending, Starred and Archive.
- **Incoming & outgoing letters:** Register number, reference, subject, sender/recipient, priority, date and attachments with archive and search.
- **Internal correspondence:** Send and receive internal memos between departments and users.
- **Tasks:** Create tasks, assign to users, status (list/kanban), checklists, time logging and comments.
- **Meetings:** Register meetings, date and location, attendees and notes.
- **Letterheads:** Organizational templates (logo, name, basmala, footer) for viewing and printing incoming, outgoing and internal letters.
- **Daily notes:** Personal Jalali journal with mood, tags, pinning and calendar visibility.
- **Optional business processes:** Enable workflow and org-chart modules from settings when needed.
- **Calendar:** Jalali calendar view with letter, meeting, task and daily-note events.
- **Reports:** Statistical reports for administrators.
- **Roles & capabilities:** Custom capabilities (e.g. `persian_oa_create_letter`, `persian_oa_view_letter`) for fine-grained access control.
- **Jalali date:** Full support for Persian (Jalali) dates in forms and lists.
- **UI:** Persian dashboard and menu with a responsive layout.

---

## Features

| Feature | فارسی | English |
|--------|--------|---------|
| Cartable (Inbox, Sent, Pending, Starred, Archive) | ✅ | ✅ |
| Incoming letters (register, view, edit, referral) | ✅ | ✅ |
| Outgoing letters (register, view, edit) | ✅ | ✅ |
| Internal letters | ✅ | ✅ |
| Task management (list, kanban, checklist, comments) | ✅ | ✅ |
| Meetings | ✅ | ✅ |
| Letterhead templates (view / print) | ✅ | ✅ |
| Daily notes (personal Jalali journal) | ✅ | ✅ |
| Optional business process / org chart | ✅ | ✅ |
| Jalali calendar | ✅ | ✅ |
| Reports (admin) | ✅ | ✅ |
| User & role management | ✅ | ✅ |
| Settings (general, upload, numbering, workflow, categories) | ✅ | ✅ |
| Notifications (admin bar) | ✅ | ✅ |
| Multi-language ready (text domain) | ✅ | ✅ |

---

## Requirements

- **WordPress:** 6.0 or higher  
- **PHP:** 7.4 or higher  
- **MySQL:** 5.6+ / MariaDB 10.1+

---

## Installation

### From source (Git)

1. Clone the repository into your plugins directory:
   ```bash
   cd wp-content/plugins
   git clone https://github.com/alireza-aminzadeh/persian-office-automation-wordpress.git persian-office-automation
   ```
2. In WordPress admin go to **Plugins** and activate **Persian Office Automation SaaS**.
3. Open **اتوماسیون اداری** in the admin menu and complete settings if needed.
4. Ensure users have the right capabilities (Administrators have full access by default).

### Manual install

1. Download the plugin (ZIP from Releases or clone as above).
2. Upload the `persian-office-automation` folder to `wp-content/plugins/`.
3. Activate the plugin from the **Plugins** screen.
4. Use **اتوماسیون اداری** to configure and use the system.

### First run

- Activation creates the required database tables and default roles/capabilities.
- Go to **اتوماسیون اداری → تنظیمات** to set general, upload, numbering, category and optional business-process options.
- Add letterheads under **سربرگ‌ها** for official letter print layout. Daily notes are private to each user.

---

## Changelog

### 3.0.17

- Organizational letterhead templates (logo, organization name, basmala, footer) for incoming, outgoing and internal letters
- Letterhead applied on letter view and print screens
- Personal daily notes with Jalali calendar, mood, tags and pinning
- Daily notes shown on the working calendar
- Optional business-process module (workflow settings and org-chart entry) behind a settings toggle
- New database tables for letterheads and daily notes, removed on uninstall

### 3.0.14

- Maintenance / version alignment with the WordPress.org listing

---

## Project Structure

```
persian-office-automation/
├── assets/                 # CSS, JS, fonts
├── includes/
│   ├── Application/       # DTOs, Services (business logic)
│   ├── Core/               # Plugin bootstrap (Plugin.php)
│   ├── Domain/             # Interfaces
│   ├── Infrastructure/     # Database, Repositories
│   └── Presentation/      # Admin (Controllers, Views, Assets), Frontend (Shortcodes)
├── languages/              # .pot and translations
├── office-automation.php   # Main plugin file
├── uninstall.php           # Uninstall cleanup
├── readme.txt              # WordPress.org readme
└── README.md               # This file
```

Architecture follows **Clean Architecture**-style layering: Domain → Application → Infrastructure → Presentation.

---

## Developer

**Alireza Aminzadeh**  
- GitHub: [@alireza-aminzadeh](https://github.com/alireza-aminzadeh)  
- LinkedIn: [alirezaaminzadeh](https://linkedin.com/in/alirezaaminzadeh)

---

## License

GPL v2 or later. See [LICENSE](https://www.gnu.org/licenses/gpl-2.0.html) or `readme.txt` in the plugin root.

---

*Persian Office Automation SaaS — دبیرخانه و اتوماسیون اداری برای وردپرس*
