Full Site Build - Prompt Series

50 numbered, copy-pasteable prompts to build a complete production e-commerce website from zero. Every phase, every feature - nothing left out.

Intermediate 1-3 day project Lesson 18 of 20

How to Use This List

We build a PHP e-commerce site for selling digital products. Each prompt builds on the previous. Run them in Claude Code in your project folder. After every 10 prompts: test thoroughly, fix any issues, then continue.

Project: "RubanShop" - digital products store (themes, plugins, templates)

Phase 1: Foundation (P1-P10)

P1 - Project initialization
> Initialize RubanShop - a PHP e-commerce site for digital products.
  Create directory structure, CLAUDE.md, config files, .htaccess.
  Stack: PHP 8.2, MySQL 8, Bootstrap 5.3, no frameworks.
  Create all empty placeholder files with correct PHP file headers.
P2-P10 (condensed)
P2: Create the complete database schema:
    products, categories, users, orders, order_items,
    downloads, reviews, coupons, wishlists tables.
    Include all FK relationships, indexes, and seed data for 5 categories.

P3: Build includes/header.php and footer.php with responsive navbar
    (logo, search bar, cart icon with count, login/register links).

P4: Build assets/css/style.css - complete stylesheet:
    CSS variables, typography, card styles, buttons, responsive grid.

P5: Create config/app.php and config/db.php with environment variable support.

P6: Build the homepage (index.php):
    Hero with search, featured products grid (8 products), top categories,
    new arrivals, testimonials section, newsletter signup.

P7: Build the category listing page (category.php?slug=X):
    Filter bar (price range, rating, sort), product grid,
    pagination, category description, breadcrumb.

P8: Build the product detail page (product.php?slug=X):
    Product images gallery, title/price/description, purchase button,
    tabs (description, screenshots, reviews), related products.

P9: Build the search page (search.php?q=X):
    Results with highlighted search term, filter by category/price/rating,
    "did you mean" spelling suggestion, no results message.

P10: Create a shared functions.php:
     formatPrice(), generateSlug(), getStarRating(), timeAgo(),
     sanitizeInput(), redirect(), flashMessage().

Phase 2: Catalog (P11-P20)

P11-P20 (condensed)
P11: Create ProductModel.php:
     findAll(), findById(), findBySlug(), findByCategory(),
     search(), getFeatured(), getNew(), incrementViews().

P12: Create CategoryModel.php:
     findAll(), findBySlug(), getTree() (nested categories),
     getWithProductCount().

P13: Add product reviews system:
     reviews table, ReviewModel, review form on product page,
     star rating display, average rating calculation,
     admin approval required before showing.

P14: Build the wishlist feature:
     Add/remove from wishlist (AJAX), wishlist page,
     move to cart button, share wishlist link.

P15: Build the product comparison feature:
     Add up to 4 products to compare, comparison table
     showing specs side by side, sticky compare bar.

P16: Build the admin - Product Management:
     List all products, Create/Edit/Delete forms,
     image upload (multiple images per product),
     bulk status change, CSV import.

P17: Build the admin - Category Management:
     Tree view of categories (parent/child),
     drag-to-reorder, add/edit/delete.

P18: Build the admin - Reviews Management:
     List pending reviews, approve/reject/delete,
     reply to review, bulk approve.

P19: Add product image gallery with lightbox:
     Multiple images per product, thumbnail strip,
     fullscreen lightbox, keyboard navigation.

P20: Add product tags and tag search:
     tags table, many-to-many product_tags,
     tag cloud on sidebar, click-to-filter.

Phase 3: Commerce (P21-P30)

P21-P30 (condensed)
P21: Build the shopping cart (session-based):
     Add/remove/update quantity, cart sidebar,
     cart page with order summary, save cart for logged users.

P22: Build the checkout flow (single page):
     Customer details, payment method selection,
     order summary, place order button, success page.

P23: Integrate Razorpay payment:
     Create order, payment form, verify payment webhook,
     mark order as paid, send confirmation email.

P24: Create OrderModel.php:
     create(), findById(), findByUser(), updateStatus(),
     getWithItems(), generateInvoice().

P25: Build digital product delivery:
     Secure download links (token-based, expiry 24h),
     download limit per order, downloads page for users,
     email with download link after payment.

P26: Add coupon/discount system:
     coupon codes (% off, flat amount, free shipping),
     apply at checkout, validate (expiry, usage limit, min order),
     admin coupon management.

P27: Build the order management admin:
     Order list with filters (status, date, customer),
     order detail view, change status (pending/processing/delivered/refunded),
     print invoice.

P28: Add invoice PDF generation:
     PDF using mPDF or FPDF, company logo, order details,
     download button in order history and admin.

P29: Build refund processing:
     Razorpay refund API integration,
     refund request form for users,
     admin approve/reject/process refund.

P30: Add affiliate/referral system:
     Unique referral links for users,
     track referred purchases, credit commission to referrer,
     affiliate dashboard showing earnings/payouts.

Phase 4: Accounts (P31-P40)

P31-P40 (condensed)
P31: Build complete user authentication:
     Register, login, logout, remember me,
     Google OAuth (optional), email verification.

P32: Build password reset flow:
     Forgot password form, secure token email,
     reset password form, invalidate token on use.

P33: Build user dashboard:
     Overview (orders, downloads, wishlist counts),
     Recent orders table, quick links.

P34: Build user profile settings:
     Edit name/email/phone/avatar,
     change password (with current password verification),
     notification preferences.

P35: Build order history page:
     All user orders with status, filter by status/date,
     re-download purchased products.

P36: Build user notification system:
     In-app bell icon notifications,
     email notifications (order status, new products),
     notification preferences in settings.

P37: Add social login (Google):
     Google OAuth 2.0, create or link account,
     profile photo from Google, handle email conflicts.

P38: Build subscription / membership system:
     Monthly/yearly plans,
     Razorpay subscriptions, plan benefits (discount, early access),
     upgrade/downgrade/cancel.

P39: Add two-factor authentication (2FA):
     TOTP app-based (Google Authenticator),
     QR code setup, backup codes,
     enforce 2FA for admin users.

P40: Build user admin panel:
     List all users, filter/search,
     view user profile and orders,
     ban/unban user, manually assign role/plan.

Phase 5: Production (P41-P50)

P41-P50 (condensed)
P41: SEO meta tags + sitemap:
     Dynamic meta per page, Open Graph, Twitter Card,
     XML sitemap for all pages/products, robots.txt.

P42: Performance optimization:
     Image lazy loading, CSS/JS minification,
     DB query caching with file cache or Redis,
     proper HTTP cache headers.

P43: Security hardening:
     CSRF on all forms, rate limiting on login/contact,
     .htaccess deny access to sensitive dirs,
     Content Security Policy headers.

P44: Add blog/content marketing:
     Blog index + single post pages,
     categories, tags, related posts,
     admin blog editor with image upload.

P45: Add live search (AJAX):
     Instant search results as user types,
     results show product name/image/price,
     keyboard navigation, click to go to product.

P46: Add email marketing integration:
     Mailchimp or SendGrid,
     newsletter signup with double opt-in,
     automated welcome email,
     abandoned cart email.

P47: Build analytics dashboard (admin):
     Daily/weekly/monthly revenue chart,
     top selling products, conversion rate,
     user registrations over time.

P48: Add error handling and logging:
     Custom 404 and 500 pages,
     log all PHP errors to /storage/logs/error.log,
     email admin on critical errors.

P49: Write all tests:
     PHPUnit for all models and services,
     test DB transactions, test email sending (mock),
     test payment flow (mock Razorpay).

P50: Deployment checklist prompt:
     "Create a deployment checklist and script for deploying
     to a Linux server: git pull, composer install,
     DB migration, clear cache, set permissions,
     enable maintenance mode during deploy."
Adapt to your project type

This series uses e-commerce as the example. For an agency site, replace Phase 3 (Commerce) with a portfolio/case studies section. For a SaaS app, replace it with subscription billing and feature gating. For a blog, replace it with content management. The structure (Foundation, Catalog, Core Feature, Accounts, Production) applies to every web project.

Frequently Asked Questions

No. The phases are sequential (you need a database before you can build catalog pages) but within each phase you can skip or reorder. Use the prompts that match your project. For a non-e-commerce site, Phase 3 (Commerce) does not apply - skip it and use the approach for your own feature set.

1-3 days for an experienced developer using this guide. 3-5 days for a beginner who takes time to understand each output. The AI does the coding work; you spend time reviewing, testing, and providing corrections where needed.