38701-vm/README.md
Flatlogic Bot 5db61988c3 sadiq
2026-02-23 06:39:28 +00:00

100 lines
3.8 KiB
Markdown

# Premium Car Marketplace Afghanistan (2026 Edition) 🇦🇫
A professional, university-level final-year project designed for the **LAMP stack** (Linux, Apache, MySQL, PHP). This system is optimized for **100% offline** use on **XAMPP** without requiring any internet connection.
---
## 🎯 Project Overview
This platform is a comprehensive single-vendor car marketplace where users can browse, search, and simulate the purchase of premium vehicles. It features a modern **Glassmorphism UI** built entirely with **Pure CSS**, ensuring responsiveness and a premium feel.
### Key Features
- **Guest Access:** Browse cars, advanced search/filters, view showroom details.
- **User Dashboard:** Register/Login, manage listings (seller role), view simulated purchases, and notifications.
- **Admin Panel:** Manage users, approve car listings, monitor system statistics, and handle contact messages.
- **Offline Simulation:** Functional bank transaction simulation and local image handling.
- **Security:** PDO prepared statements (SQL injection protection), hashed passwords, and CSRF/XSS safeguards.
---
## 🏗 Tech Stack
- **Backend:** PHP 8.x (Vanilla)
- **Database:** MariaDB / MySQL
- **Frontend:** Pure CSS (CSS Grid, Flexbox, Variables), Vanilla JavaScript
- **Local Assets:** No CDNs used (everything is bundled locally)
---
## 🚀 Installation Steps (XAMPP Guide)
### 1. Copy Project Files
- Install XAMPP on your computer.
- Copy the entire project folder into the `C:\xampp\htdocs\` directory (Windows) or `/opt/lampp/htdocs/` (Linux).
- Rename the folder to `afg_cars` for easy access.
### 2. Start Apache & MySQL
- Open the **XAMPP Control Panel**.
- Click **Start** next to **Apache**.
- Click **Start** next to **MySQL**.
### 3. Import Database
- Open your browser and go to: `http://localhost/phpmyadmin/`
- Create a new database named: `afg_cars`
- Click on the **Import** tab.
- Choose the file located at: `db/database.sql` inside the project folder.
- Click **Go** at the bottom to complete the import.
### 4. Configure Database (if needed)
- Open `db/config.php` in a text editor.
- Ensure the credentials match your local setup:
```php
define('DB_HOST', 'localhost');
define('DB_NAME', 'afg_cars');
define('DB_USER', 'root');
define('DB_PASS', ''); // XAMPP default is empty
```
### 5. Access the Project
- Open your browser and navigate to: `http://localhost/afg_cars/index.php`
---
## 🔐 Default Credentials (Demo)
### System Administrator
- **Email:** `admin@gmail.com`
- **Password:** `12345678`
### Regular User
- **Email:** `user@gmail.com`
- **Password:** `12345678`
---
## 📁 Folder Structure
- `admin/`: Administrative tools and dashboard.
- `user/`: Personal dashboard for registered users.
- `assets/`: Local CSS, JS, and UI images.
- `db/`: Database configuration, setup scripts, and SQL dump.
- `includes/`: Reusable components (Header, Footer, Navbar).
- `uploads/`: Directory for uploaded car images.
---
## 🧠 Notes for University Presentation
- **Architecture:** The project follows an MVC-like pattern for separation of concerns.
- **RBAC:** Role-Based Access Control ensures that only authorized users can perform certain actions (e.g., only admins can approve listings).
- **SEO:** On-page SEO meta tags are dynamically generated.
- **Performance:** Optimized for speed with minimal assets and clean code.
---
## 🛠 Troubleshooting Common Errors
- **DB Connection Failed:** Ensure MySQL is running in XAMPP and credentials in `db/config.php` are correct.
- **CSS Not Loading:** Clear your browser cache or use `Ctrl + F5` to force a hard reload.
- **Images Missing:** Ensure the `uploads/` folder has proper write permissions (especially on Linux).
---
**Design Goal:** Modern, Premium, and Responsive. No frameworks used.
**Version:** 1.0.0 (2026 Edition)
**Ready for academic submission.**