# 🚀 Hostinger Production Deployment Guide
## Maharashtra Municipal Property & Revenue ERP Platform
**Target URL:** [https://property-erp.omiai.in/](https://property-erp.omiai.in/)  
**Brand & Technology Partner:** Developed by OMIAI TECH LLP  
**System Architecture:** Modern PHP 8.2+ MVC / MySQL 8.x / Apache / LiteSpeed Web Server  

---

## 📋 Pre-Flight Checklist
- [x] Hostinger Web Hosting Plan (Premium, Business, or Cloud) active.
- [x] Domain `omiai.in` configured with DNS pointing to Hostinger.
- [x] Database dump prepared: `database/property_erp_omiai_production.sql` (13.5 MB, 426 ULBs, 2,551+ employee login credentials, 2,556+ commissioner directives).
- [x] Apache / LiteSpeed front-controller `.htaccess` in root and `public/.htaccess`.
- [x] Font: **Poppins** + **Noto Sans Devanagari** loaded via Google Fonts.
- [x] Branding: **Developed by OMIAI TECH LLP** integrated in footer across all views.

---

## 🛠️ Step 1: Subdomain Setup on Hostinger

1. Log in to your **Hostinger hPanel** (`https://hpanel.hostinger.com`).
2. Navigate to **Websites** &rarr; Select `omiai.in` &rarr; Click **Manage**.
3. In the left menu, search for **Subdomains** (under Domains).
4. Enter:
   - **Subdomain Name:** `property-erp` (Full subdomain will be `property-erp.omiai.in`).
   - **Custom folder for subdomain:** Check the box and set folder to:
     `public_html/property-erp/public` *(Recommended for best security)*  
     *OR* `public_html/property-erp` *(Supported via root `.htaccess`)*.
5. Click **Create**.

---

## 🗄️ Step 2: Create MySQL Database & Import Data

1. In hPanel, go to **Databases** &rarr; **Management**.
2. Under **Create a New MySQL Database and Database User**:
   - **Database Name:** e.g., `u123456789_property_erp`
   - **Username:** e.g., `u123456789_property_admin`
   - **Password:** *Enter a strong secure password* (Save this for Step 4).
3. Click **Create**.
4. Scroll down to **List of Current MySQL Databases And Users**.
5. Find the newly created database and click **Enter phpMyAdmin**.
6. Inside phpMyAdmin:
   - Click the **Import** tab at the top.
   - Click **Choose File** and select `database/property_erp_omiai_production.sql`.
   - Ensure character set is set to **utf8mb4**.
   - Click **Import** / **Go** at the bottom.
   - *Wait 10–20 seconds until you see: "Import has been successfully finished, queries executed."*

---

## 📁 Step 3: Upload Application Code

### Method A: Hostinger File Manager (Quickest)
1. In hPanel, go to **Files** &rarr; **File Manager** &rarr; Access files of `omiai.in`.
2. Open directory: `public_html/property-erp/`.
3. Compress the project folder into a `.zip` file on your local computer:
   - Include: `app/`, `public/`, `routes/`, `views/`, `.htaccess`, `server.php`, `.env.example`, `manifest.json`, `sw.js`.
4. In File Manager, click **Upload** &rarr; Select the `.zip` file.
5. Right-click the uploaded `.zip` file and click **Extract** into `public_html/property-erp/`.
6. Ensure the directory structure looks like:
   ```
   public_html/property-erp/
   ├── .htaccess
   ├── .env
   ├── app/
   ├── database/
   ├── public/
   │   ├── .htaccess
   │   ├── index.php
   │   └── assets/
   ├── routes/
   └── views/
   ```

### Method B: Git Deployment via hPanel
1. In hPanel, search for **Git**.
2. Connect your Git repository (Branch: `main`).
3. Set destination folder: `public_html/property-erp`.
4. Click **Create** &rarr; **Deploy**.

---

## ⚙️ Step 4: Configure Production Environment (`.env`)

1. In File Manager, create or edit the `.env` file in `public_html/property-erp/`.
2. Enter your Hostinger credentials:

```ini
# =========================================================================
# MAHARASHTRA MUNICIPAL PROPERTY & REVENUE MANAGEMENT ERP
# Production Environment Configuration for Hostinger
# URL: https://property-erp.omiai.in/
# Developed by OMIAI TECH LLP
# =========================================================================

APP_NAME="Maharashtra Municipal Property & Revenue ERP"
APP_ENV=production
APP_DEBUG=false
APP_URL=https://property-erp.omiai.in

# Hostinger MySQL Database Credentials
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=u123456789_property_erp
DB_USERNAME=u123456789_property_admin
DB_PASSWORD="YourStrongPasswordHere"

# Localization & Portal Metadata
DEFAULT_LOCALE=mr
SUPPORTED_LOCALES=mr,en
TIMEZONE=Asia/Kolkata
PORTAL_DEVELOPER="OMIAI TECH LLP"
PORTAL_VERSION=2026.3.0
```

3. Save the file.

---

## 🔒 Step 5: Enable Free SSL Certificate

1. In hPanel, search for **SSL** (under Security).
2. Look for `property-erp.omiai.in`.
3. Click **Install SSL** (Hostinger installs a Lifetime Free Let's Encrypt SSL).
4. Turn on the toggle for **Force HTTPS**.

---

## 🐘 Step 6: Verify PHP Configuration

1. In hPanel, go to **Advanced** &rarr; **PHP Configuration**.
2. Select **PHP 8.2** or **PHP 8.3** (Recommended).
3. Under **PHP Extensions**, ensure the following are enabled (standard on Hostinger):
   - `pdo_mysql`
   - `mbstring`
   - `json`
   - `curl`
   - `gd`
4. Click **Save**.

---

## 👥 Authentication & Access Roster

Once deployed, visit **`https://property-erp.omiai.in/login`**:

### 1. Default Password for All Accounts
```
Maha@Ulb2026!
```

### 2. High Authority Executive Logins
- **प्रधान सचिव (Principal Secretary - UDD):** `ps.udd`
- **संचालक (Director - DMA):** `director.dma`
- **विभागीय आयुक्त (Divisional Commissioners):** `divcomm.pune`, `divcomm.chhatrapati`, `divcomm.konkan`, `divcomm.nagpur`, `divcomm.nashik`, `divcomm.amravati`
- **जिल्हाधिकारी (District Collectors):** `collector.pune`, `collector.ahilya`, etc.

### 3. Municipal Local Body Logins (426 ULBs)
- **महानगरपालिका (30):** `ahilyanagar.corp`, `akola.corp`, `amravati.corp`, `pune.corp`, `csmc.corp`, `thane.corp`, etc.
- **नगरपरिषद (247):** `aarni.mc`, `achalpur.mc`, `ahmedpur.mc`, `akkalkot.mc`, `akluj.mc`, `akot.mc`, `alibag.mc`, etc.
- **नगर पंचायत (148):** `aheri.np`, `ajara.np`, `akole.np`, `anadur.np`, `ashti.np`, etc.

### 4. Employee Logins (Role-Based Access)
- **क्षेत्रीय निरीक्षक (Field Inspector):** `inspector.aarni`, `inspector.ahilya`, etc.
- **कॅशियर (Cashier):** `cashier.ahilya`, `cashier.pune`, etc.
- **कनिष्ठ अभियंता (Junior Engineer):** `engr.aheri`, `engr.aarni`, etc.
- **विधी अधिकारी (Legal Officer):** `legal.pune`, `legal.ahilya`, etc.

---

## 🎯 Verification Checklist After Deployment

Test the following key URLs on `https://property-erp.omiai.in/`:

| Module / Feature | Production URL | Expected Result |
| :--- | :--- | :--- |
| **Login Portal** | `https://property-erp.omiai.in/login` | 4 Tabs: Quick ULB, Higher Authority, Employee Login, Standard |
| **Main Dashboard** | `https://property-erp.omiai.in/dashboard` | Local body overview, complexes, auditoriums, mangal offices |
| **Executive Banner** | `https://property-erp.omiai.in/dashboard` | Commissioner guidance & staff login counters |
| **Directives Hub** | `https://property-erp.omiai.in/commissioner/directives` | Statutory role SOP matrix, active directives, staff task assignment |
| **Staff Access Hub** | `https://property-erp.omiai.in/staff/access` | All ULB employees roster, grant/revoke login access, reset password |
| **Staff Personal View** | `https://property-erp.omiai.in/staff/guidance` | Employee role mandate, assigned tasks, start/complete actions |
| **426 ULBs Directory** | `https://property-erp.omiai.in/ulbs` | Searchable directory of 426 local bodies with instant switch |
| **State Dashboard** | `https://property-erp.omiai.in/state-dashboard` | 8-Tier executive governance across 30 Corps, 247 Councils, 148 Panchayats |
| **DCB Report** | `https://property-erp.omiai.in/reports/dcb` | Demand, Collection & Balance report (म.व.शि.) |
| **QR Property Hub** | `https://property-erp.omiai.in/qr/directory` | Public vs Officer masked QR property records |
| **Hall Bookings** | `https://property-erp.omiai.in/halls` | Calendar view, slot booking, anti-double-booking validation |
| **Field Inspection** | `https://property-erp.omiai.in/field-inspections/assigned` | Mobile PWA inspection, GPS capture, photo upload |

---
**Developed by OMIAI TECH LLP** • Unified Maharashtra Municipal Property & Revenue Management ERP Platform
