Course: Programming with Free AI Tools — Build Real Websites and Apps
Module: 17 of 17
Audience: Ages 15–25, beginners
Focus: A capstone project where you combine everything you learned (HTML, CSS/Bootstrap, JavaScript, PHP, MySQL, authentication, security, and deployment) to build and ship a real, responsive e-commerce store — with AI as your assistant, not your replacement.
Core principle: AI writes code fast, but you are the engineer. Read every line, test every feature, secure every input, and never paste AI output you cannot explain. Verify before you trust.
Unlike earlier modules that are organized into short lessons, the Final Project is organized into 4 milestones. Each milestone is a chunk of the store you build over roughly one week. Instead of "theory then coding," each milestone gives you Requirements, Tasks, and a Checklist to complete, plus everything you need to succeed: learning objectives, instructor notes, a presentation outline, a live demonstration, AI prompts, starter and final code, exercises, homework, and a quiz.
A responsive online store called AI Shop with:
| Milestone | Title | Duration |
|---|---|---|
| 1 | Project Setup and Database Schema | ~1 week (8–10 hrs) |
| 2 | Product Catalog and User Authentication | ~1 week (10–12 hrs) |
| 3 | Shopping Cart and Checkout Flow | ~1 week (10–12 hrs) |
| 4 | Admin Panel and Deployment | ~1 week (10–12 hrs) |
Every milestone submission and your final store are graded on these five criteria. Keep them in mind at every step.
| Criterion | Weight | What graders look for |
|---|---|---|
| Correctness | 40% | Features actually work: login, catalog, cart, checkout, admin CRUD all function without errors. |
| Code readability and style | 20% | Consistent indentation, clear names, small functions, separated config, no dead code. |
| Use of AI tools (prompts shown, output verified) | 20% | You include the prompts you used and evidence you tested/verified the AI output. |
| Security awareness | 10% | Prepared statements, hashed passwords, output escaping, validated input, protected admin. |
| Documentation and comments | 10% | A clear README, helpful inline comments, and setup instructions. |
Reminder shown in every milestone: save your AI prompts and note what you changed after verifying the output. "I asked, I read, I tested, I fixed" is the workflow graders reward.
ai-shop/
├── config.php # DB connection + app settings (never commit real secrets)
├── db/
│ └── schema.sql # CREATE TABLE + seed data
├── includes/
│ ├── header.php # shared top of page + nav
│ ├── footer.php # shared bottom of page
│ ├── auth.php # login helpers + require_login()
│ └── functions.php # helpers: e(), money(), redirect()
├── public/ # pages users visit
│ ├── index.php # catalog / home
│ ├── product.php # product detail
│ ├── login.php
│ ├── register.php
│ ├── logout.php
│ ├── cart.php
│ └── checkout.php
├── admin/ # protected admin area
│ ├── index.php # dashboard / product list
│ ├── product-form.php # add/edit product
│ └── product-delete.php
├── assets/
│ ├── css/style.css
│ └── img/
└── README.md
Duration: ~1 week (8–10 hours of work)
http://localhost/ai-shop/public/.ai_shop exists with all core tables and correct relationships.DECIMAL(10,2) — never FLOAT.VARCHAR(255) column; hashing happens in Milestone 2).config.php, not scattered across pages..gitignore excludes secrets and local artifacts.ai-shop/ folder structure shown in the overview..gitignore.db/schema.sql with all tables + seed data and import it via phpMyAdmin.config.php using PDO with exception mode enabled.includes/functions.php, includes/header.php, and includes/footer.php.public/index.php that connects to the DB and prints "DB connected" to prove the wiring works.mysqli for the capstone: cleaner API, named placeholders, and consistent exceptions.PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION so mistakes surface loudly during development.DECIMAL: FLOAT causes rounding errors (0.1 + 0.2 != 0.3).DESCRIBE products; and a SELECT on seed data before moving on.root/empty is a dev-only convenience.ai_shop.db/schema.sql, run it, and confirm 5 tables appear.DESCRIBE products; and SELECT * FROM products; to verify seed data.config.php, then load public/index.php to see "DB connected".git add . then git commit -m "Milestone 1: setup + schema".