Table of Contents
Shade Paradise: My Bachelor’s E-commerce Project
For my Bachelor’s final project, I built an e-commerce website called Shade Paradise. This project taught me a lot about web development, databases, and even Docker. Let me share what I learned!
What is Shade Paradise?
Shade Paradise is an e-commerce website where people can buy sunglasses online. I built it from scratch using:
- HTML, CSS, and JavaScript for the frontend
- PHP for the backend
- MySQL for the database
The Technology Stack
Here’s a breakdown of the technologies I used and what each one does:
| Technology | Purpose | What I Learned |
|---|---|---|
| HTML | Structure the web pages | Semantic markup, accessibility |
| CSS | Style the website | Responsive design, Flexbox, Grid |
| JavaScript | Add interactivity | DOM manipulation, form validation |
| PHP | Server-side processing | Sessions, database connections, MVC pattern |
| MySQL | Store and retrieve data | Database design, SQL queries, relationships |
| Docker | Development environment | Containerization, environment consistency |
Key Features of Shade Paradise
The website includes several features that you’d expect from a real e-commerce store:
User Features
| Feature | Description | Technologies Used |
|---|---|---|
| User Registration | Create an account | PHP, MySQL, JavaScript validation |
| Product Browsing | View products by category | HTML, CSS, PHP, MySQL |
| Shopping Cart | Add and remove items | JavaScript, PHP Sessions |
| Checkout Process | Complete purchases | PHP, MySQL, JavaScript |
| Order History | View past orders | PHP, MySQL |
| User Reviews | Rate and review products | PHP, MySQL, JavaScript |
Admin Features
| Feature | Description | Technologies Used |
|---|---|---|
| Product Management | Add, edit, delete products | PHP, MySQL |
| Order Management | View and update order status | PHP, MySQL |
| User Management | Manage user accounts | PHP, MySQL |
| Analytics Dashboard | View sales statistics | PHP, MySQL, JavaScript charts |
Database Design
The database was one of the most challenging and educational parts of the project. Here’s a simplified version of the database schema:
| Table | Purpose | Key Fields |
|---|---|---|
| users | Store user information | id, name, email, password, role |
| products | Store product details | id, name, description, price, image, category_id |
| categories | Group products | id, name, description |
| orders | Track customer orders | id, user_id, total, status, created_at |
| order_items | Link products to orders | id, order_id, product_id, quantity, price |
| reviews | Store product reviews | id, product_id, user_id, rating, comment |
“A well-designed database makes everything else in your application easier. Spend time getting it right!” - My professor
Challenges and Solutions
Building Shade Paradise wasn’t always smooth sailing. Here are some challenges I faced:
Challenge 1: Shopping Cart Persistence
Problem: When users refreshed the page, their shopping cart would empty.
Solution: I learned about PHP sessions and how to store cart data server-side, making it persist across page loads.
// Initialize the session
session_start();
// Add item to cart
if (!isset($_SESSION['cart'])) {
$_SESSION['cart'] = array();
}
$_SESSION['cart'][$product_id] = $quantity;
Challenge 2: Responsive Design
Problem: The website looked good on desktop but broke on mobile devices.
Solution: I implemented a mobile-first approach using CSS media queries and flexible layouts.
/* Mobile first design */
.product-grid {
display: grid;
grid-template-columns: 1fr;
gap: 20px;
}
/* Tablet */
@media (min-width: 768px) {
.product-grid {
grid-template-columns: repeat(2, 1fr);
}
}
/* Desktop */
@media (min-width: 1024px) {
.product-grid {
grid-template-columns: repeat(4, 1fr);
}
}
Challenge 3: Development Environment Consistency
Problem: The website worked on my computer but had issues when I showed it to my professor on his machine.
Solution: This is where Docker came in and changed everything (more on that below).
How Docker Saved Our Project
Before learning about Docker, we faced a common problem in development: “It works on my machine!” Docker solved this by creating consistent environments.
What is Docker?
Docker is a tool that packages your application and all its dependencies into a standardized unit called a container. Think of it like a shipping container for code.
How Docker Helped Us
| Before Docker | After Docker |
|---|---|
| Different PHP versions causing bugs | Everyone using exact same PHP version |
| Database connection issues | Standardized database setup |
| Hours spent setting up environments | New team members up and running in minutes |
| “Works on my machine” problems | Consistent behavior across all systems |
Our Docker Setup
We created a docker-compose.yml file that defined our entire development environment:
version: '3'
services:
# PHP and Apache server
web:
build: .
ports:
- "8080:80"
volumes:
- ./src:/var/www/html
depends_on:
- db
# MySQL database
db:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: shade_paradise
MYSQL_USER: user
MYSQL_PASSWORD: password
volumes:
- db_data:/var/lib/mysql
# phpMyAdmin for database management
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- "8081:80"
environment:
PMA_HOST: db
depends_on:
- db
volumes:
db_data:
With this setup, anyone could clone our repository and run docker-compose up to have an identical development environment in minutes!
Lessons Learned
Building Shade Paradise taught me many valuable lessons:
- Plan your database carefully - A good database design makes everything else easier
- User experience matters - Even small details like form validation improve the site
- Version control is essential - Git saved us many times when we broke something
- Responsive design from the start - It’s harder to add mobile support later
- Docker is amazing for development - Consistent environments save time and frustration
Future Improvements
If I were to continue developing Shade Paradise, here’s what I’d add:
| Feature | Description | Technologies to Use |
|---|---|---|
| Payment Gateway | Real payment processing | Stripe or PayPal API |
| Search Functionality | Better product search | Elasticsearch |
| Recommendation System | Suggest products to users | Machine learning algorithms |
| Performance Optimization | Faster page loads | Caching, CDN, image optimization |
| Admin Mobile App | Manage store on the go | React Native |
Conclusion
Building Shade Paradise was challenging but incredibly rewarding. I learned not just about individual technologies like PHP and MySQL, but how to integrate them into a complete application. Most importantly, I discovered the power of tools like Docker that solve real-world development problems.
“The best way to learn is by building something real. Theory only takes you so far.” - My own realization during this project
I’m excited to continue learning and building on these skills in my future career!


