A monolithic classified ads marketplace built with PHP, MySQL, HTML5/CSS3 and Bootstrap 5, inspired by local buy-and-sell platforms. This project emphasizes software architecture fundamentals, secure authentication mechanisms, relational database integrity, and clean separation of concerns without relying on external frameworks.
- Secure user registration and login system.
- Session-based authentication.
- Password hashing using BCRYPT.
- Centralized route protection via
auth-guard.php. - User profile management interface.
- Secure session validation for protected pages.
- Full CRUD operations for listings.
- Secure image upload support.
- Reverse chronological marketplace feed.
- Keyword-based search on listing titles.
- Ownership verification before editing or deleting ads.
- Save listings to a personal favorites collection.
- Dedicated "My Favorites" page.
- Prevention of duplicate favorite entries through database constraints.
-
Context-aware conversations linked to listings.
-
One unique chat room per:
- Listing
- Buyer
- Seller
-
Timestamped messaging history.
- User management dashboard.
- User promotion to administrator role.
- Account suspension and deletion.
- Administrative action safeguards.
- Protection against self-deletion and self-suspension.
| Layer | Technology |
|---|---|
| Backend | PHP |
| Database | MySQL |
| Frontend | HTML5 |
| Styling | Bootstrap 5 / CSS3 |
| Authentication | PHP Sessions |
Input sanitization is enforced using:
mysqli_real_escape_string($conn, $input);Identifier lookups are strictly cast:
$postId = (int) $_GET['id'];Passwords are hashed using:
password_hash($password, PASSWORD_BCRYPT);- Server-side authorization checks.
- Session validation before sensitive actions.
- Ownership verification for content modifications.
- Prevention of self-account deletion.
- Prevention of self-suspension.
- Verification of administrator privileges before mutations.
luky/
│
├── config/
│ ├── database.php # Database connection
│ ├── database.sql # Database schema
│ └── init_db.php # Database initialization script
│
├── public/
│ ├── auth/ # Authentication pages
│ ├── components/ # Reusable UI components
│ ├── handlers/ # Form processing & business logic
│ ├── security/ # Security utilities and guards
│ ├── uploads/ # Uploaded listing images
│ ├── user/ # User-related pages
│ │
│ ├── admin.php # Administration dashboard
│ ├── details.php # Listing details page
│ ├── index.php # Marketplace homepage
│ ├── search.php # Search results page
│ └── style.css # Global stylesheet
│
└── README.md
| Directory | Purpose |
|---|---|
config/ |
Database configuration and initialization scripts |
auth/ |
Login and registration features |
components/ |
Shared layouts, headers, footers, and reusable UI parts |
handlers/ |
Form submissions and business logic processing |
security/ |
Authentication guards and security utilities |
uploads/ |
User-uploaded images |
user/ |
Profile management and user-specific pages |
Place the project inside your local web server directory.
C:/wamp64/www/luky/
- Open phpMyAdmin
- Create a database named:
luky_db
- Select collation:
utf8mb4_general_ci
- Import:
database.sql
or execute
init_db.php
located at the root of the project.
- Launch WampServer.
- Left-click the WampServer icon in the system tray.
- Navigate to:
Tools → Add a Virtual Host
- Fill in the form:
Virtual Host Name:
luky.local
Project Path:
C:/wamp64/www/luky/public
- Click Start the creation of the VirtualHost.
- Once the process is complete, restart WampServer if prompted.
WampServer will automatically:
- Create the Apache virtual host configuration.
- Update the Windows hosts file.
- Configure the local domain.
Open your browser and visit:
http://luky.local
This project demonstrates:
- Session-based authentication
- Secure password management
- Relational database design
- Foreign key constraints
- CRUD application architecture
- PHP application structuring
- User authorization workflows
- Administrative role management
- Messaging system implementation
Developed as a group project for the Web Development course during the B1 (Bachelor Year 1) program at ECE Engineering School.
Feel free to modify, extend, and use it as a learning resource.
For educational and portfolio purposes only.