Live Demo → https://shohancs.com/projects/Local_Farm_Market/
GitHub Repository → github.com/shohancs/Local_Farm_Market
A production-ready, secure, and scalable online marketplace that connects local farmers directly with customers. Built from scratch using raw PHP & MySQL – no frameworks – proving deep understanding of core web technologies.
- Clean, maintainable code structure with proper separation of concerns
- Complete user role system: Customer → Seller → Admin
- Real payment gateway integration (SSLCommerz – supports sandbox & live)
- Admin approval workflow for seller products (prevents fake listings)
- Location-based delivery logic
- Secure authentication, prepared statements, password hashing, file validation
- Responsive UI with Bootstrap 5 + custom CSS
- Fully functional cart, checkout, order tracking & review system
- Deployed on real shared hosting (cPanel) – not just localhost
This is not a tutorial project – it's a real-world deployable application.
| Role | Direct Link | Credentials |
|---|---|---|
| Public Website | Open Site | – |
| Customer | Customer Login | user@gmail.com / 12345 |
| Seller Dashboard | Seller Panel | seller@gmail.com / 12345 |
| Admin Panel | Admin Panel | admin@gmail.com / 12345 |
Feel free to place orders, add products (as seller), approve/reject listings (as admin) – everything works end-to-end.
| Feature | Description |
|---|---|
| Category-wise Product Browsing | Dairy, Pure Meat, Fresh Milk, Sweets, Whole-Cow Deals, etc. |
| Shopping Cart & Checkout | Session-based cart with real-time total calculation |
| SSLCommerz Payment Gateway | Sandbox + Live mode ready (BD's most popular gateway) |
| Location-based Delivery | Delivery area determined from user's address |
| Seller Product Approval Flow | All listings stay pending → Admin verifies authenticity → published |
| Multi-role Dashboard | Separate panels for Customer, Seller & Super Admin |
| Order Tracking & Reviews | Customers can track orders and leave ratings/comments |
| Blog Management | Admin can create and publish articles |
| Secure File Uploads | Only allowed image types, renamed files, size limits |
| Layer | Technology |
|---|---|
| Backend | PHP 8+ |
| Database | MySQL (optimized schema with proper relationships) |
| Frontend | HTML5, CSS3, Bootstrap 5, Vanilla JS |
| Payment | SSLCommerz (Bangladesh) – Sandbox + Live |
| Security | sha1(), prepared statements, input sanitization, CSRF-ready structure |
| Deployment | cPanel Shared Hosting (real production environment) |
- Passwords hashed with
PASSWORD_DEFAULT - All queries use prepared statements (MySQLi)
- Input validation + sanitization (client + server side)
- Restricted file uploads (type, size, renaming)
- Session management with regeneration
- HTTPS enforced in production
/
├── assets/ # CSS, JS, images
├── uploads/ # Product & seller images
├── admin/ # Full admin panel
├── seller/ # Seller dashboard
├── includes/
│ ├── config.php # Core configuration
│ ├── db.php # Database connection
│ └── functions.php # Reusable helper functions
├── index.php # Homepage
├── login.php
├── register.php
├── cart.php
├── checkout.php
└── farm_market.sql # Database dump
- Clone the repository
- Import
farm_market.sqlinto your MySQL server - Update
includes/config.phpwith your database credentials - Add SSLCommerz Sandbox API keys (instructions included in comments)
- Make the following folders writable:
uploads/seller_photos/
- Run the project in browser:
👉 http://localhost/Local_Farm_Market/
| Table | Purpose |
|---|---|
| users | Role-based authentication (admin/seller/customer) |
| sellers | Farmer profile info |
| categories | Product categories |
| products | Full product details with pending/published status |
| orders | Customer order data |
| order_items | Items within each order |
| comments | Product reviews & ratings |
| blogs | Blog management for SEO & content |
Shohanur Rahman Shohan
Full-Stack Software Engineer
Available for Remote, Freelance & Full-time roles
- 🌐 Portfolio: https://shohancs.com
- 📧 Email: shohancs.dev@gmail.com
- 🔗 LinkedIn: https://linkedin.com/in/shohancs
