Plan & Soil E-Portal – PHP + MySQL Demo Project
==============================================

Quick Start
-----------
1. Copy the 'plan_soil_eportal' folder into your web server root, for example:
   - XAMPP: C:\xampp\htdocs\plan_soil_eportal
   - WAMP:  C:\wamp\www\plan_soil_eportal

2. Ensure MySQL is running and that the credentials in config/config.php match
   your local environment (default: root / no password).

3. In your browser, open:
   http://localhost/plan_soil_eportal/seed.php

   This will:
   - Create the database 'plan_soil_eportal'
   - Create all tables
   - Insert a default SUPER ADMIN and some sample data (categories, products,
     soil types, advisory rules, and knowledge base articles).

   Admin credentials:
   - Email:    admin@plansoil.local
   - Password: Admin@123

4. Front Office (User module)
   - Home / Landing page with hero section, top categories and featured products:
       http://localhost/plan_soil_eportal/
   - Register / Login users
   - Manage plots and soil info
   - Request rule-based advisory for a plot
   - Browse catalog, add to cart and place Cash-on-Delivery orders
   - View orders and print simple invoice (HTML)

5. Back Office (Admin module)
   - Login using the admin credentials above on the same login page:
       http://localhost/plan_soil_eportal/login.php
   - On successful login with an admin role, you are redirected to:
       http://localhost/plan_soil_eportal/admin/dashboard.php

   Admin features implemented:
   - Dashboard with KPIs (today’s orders, low stock, new users, support & soil)
   - Category management (CRUD)
   - Product management (CRUD) with image upload
   - Soil types management (CRUD)
   - Rule-based advisory management (CRUD)
   - Knowledge base (articles / crop / soil) management
   - User list and activate/deactivate user
   - Order list and status change workflow (Pending → Confirmed → Dispatched → Delivered / Cancelled)

Technology Stack
----------------
- PHP 8+ (plain PHP, no framework)
- MySQL / MariaDB
- Bootstrap 5 (via CDN) for professional design
- Session-based authentication
- Simple PDO-based data access layer

NOTE
----
This is a clean but simplified educational project. You can extend it further
by adding:
- More validation and security (CSRF tokens, stricter input cleaning)
- Detailed soil test workflow and manual advisory override by admin
- Full crop plan templates, task reminders and notification system
- Downloadable PDF invoices using TCPDF/FPDF if allowed by your college.

