Skip to main content

Command Palette

Search for a command to run...

I Built a Production-Grade E-Commerce Platform in 3 Months — GitHub Copilot Was My Co-Founder

How a solo developer used AI mentorship to build a frameworkless, secure backend engine.

Updated
11 min read
I Built a Production-Grade E-Commerce Platform in 3 Months — GitHub Copilot Was My Co-Founder
S
I'm Ahmer, a full-stack developer and Software Engineering student passionate about building real-world web solutions. I explore web development, AI, and software design — and share what I learn through tutorials, dev logs, and personal projects. Currently growing my skills, one commit and one concept at a time.

What I Built

Let me be honest with you first — when I started Commerza, I genuinely didn't know if I would ever finish it.

I'm a 19-year-old software engineering student from Pakistan. Not from some well-funded university. Not from a bootcamp in San Francisco. I'm doing a 4-year BSE at HITMS and a 3-year Advanced Diploma in Software Engineering at Aptech Pakistan, side by side, trying to become a full-stack developer with real skills — not just tutorial-following muscle memory.

Commerza is a production-grade PHP + MySQL e-commerce platform. Full storefront. Full admin panel. Real payments (COD + Stripe). Enterprise-level security — CSRF protection, Google reCAPTCHA v2 and v3, rate limiting, audit logs, stock locking, SMTP failover, Argon2id password hashing, SQL injection defenses across every user-facing mutation path.

The kind of stuff you'd expect from a team. Not one broke student coding at 2am.

And no — it wasn't a "weekend project". This thing has:

  • 80 PHP files
  • 339 total tracked files
  • 136 commits
  • PHP 62.6% | JavaScript 20.8% | CSS 15.0% | PowerShell 1.6%

Stack: HTML · CSS · JavaScript · jQuery · Bootstrap · PHP · MySQL · JSON · XML · SEO

It has a dark mode (OrangeRed + Black) and a light mode (NavyBlue + White). It has Cloudinary integration, Redis/APCu caching layers, ClamAV upload scanning, sub-admin role management, a product trash bin, coupon campaigns, review eligibility enforcement, OAuth via Google and Facebook, customer blacklists, and a CI security gate that runs on every push.

This is Commerza.

And GitHub Copilot — with Claude Sonnet 4.6, Claude Opus 4.6, and GPT-5.2-Codex — built probably 78% of the backend alongside me.


Demo

🔗 GitHub: github.com/ahmershahdev/commerza

(Screenshots Below)

Commerza storefront homepage displaying a minimalist, high-end hero slider for premium products with clean navigation links and light mode active.

Commerza custom checkout system in dark mode showing form fields and a dynamic math security question fallback panel triggered on localhost when Google reCAPTCHA is inactive.

Customer order history dashboard within the Commerza user account profile showing order details, order IDs, and real-time high-value COD email verification status updates.

Commerza central admin dashboard UI displaying real-time e-commerce key performance indicators, total revenue, order metrics, customer counts, and a recent orders log table.

Commerza administrative management dashboard showing the custom sub-admin account creation wizard with modular role profiling options like Operations Manager and Customer Support.


The Comeback Story

Where It Started

January 2026. I had the idea. I wanted to build something I could actually show to a client or employer — not a todo app, not a blog engine. Something real. An e-commerce platform from scratch. No Laravel, no framework crutch. Raw PHP. Because I wanted to understand every layer.

The first month? I was mostly doing frontend. HTML structure. CSS design system. Bootstrap grid. jQuery interactions. I wrote those by hand. Clean, methodical, slow. Every component manually. The product cards. The navbar. The cart page. The admin sidebar.

You can see it in my commit history. Slow, small, frontend commits. One file at a time.

Then I hit the backend wall.

I stared at the PHP folder for three days. I knew PHP basics. But production PHP is a different animal. PDO vs mysqli. Prepared statements everywhere, not just "when you feel like it". CSRF tokens — what are they, really, and where do they go? Argon2id vs bcrypt — does it matter for a student project? (Yes. It does.)

The stuff I thought would take me "a few days" started looking like months of work. Email automation — SMTP with a failover to a backup transport? Rate limiting that doesn't break normal users? reCAPTCHA v3 with score thresholds and action validation?

I'd have been done in 6-8 months. Maybe.

Enter Copilot

I'd been using GitHub Copilot casually for code completion. But sometime in early February 2026, I started actually talking to it. Using the agent mode. Giving it context. Describing what I needed. Letting it write entire systems.

The shift was dramatic.

Here's one of the first real "wow" moments. I needed SMTP failover. My plan was: try primary SMTP, if it fails, fail the email. Copilot suggested something I hadn't considered — a dual-route architecture where the primary and secondary share a duplicate-suppression check so you don't accidentally send the same email twice if both routes are responsive at once.

I did not know that was a real pattern. I learned it in the tool. Not from a YouTube tutorial. Not from StackOverflow. From watching Copilot write it and then asking it to explain why.

The final architecture for backend/mailer/mailer.php:

// Simplified illustration of the SMTP failover logic Copilot introduced
function send_mail(string \(to, string \)subject, string $html_body): bool {
    $primary   = smtp_transport('primary');
    $secondary = smtp_transport('fallback');

    // Suppress duplicate route — if both point to same host/account, skip fallback
    if (same_transport(\(primary, \)secondary)) {
        return attempt_send(\(primary, \)to, \(subject, \)html_body);
    }

    if (attempt_send(\(primary, \)to, \(subject, \)html_body)) {
        return true;
    }

    // Primary failed — try fallback
    return attempt_send(\(secondary, \)to, \(subject, \)html_body);
}

Small thing. But I would not have thought of the duplicate suppression check. That detail would have caused a real bug in production.

What Copilot Built

Let me be specific. Here's what GitHub Copilot generated — or heavily scaffolded — with me reviewing, testing, and iterating:

Email Automation System

  • SMTP primary + fallback routing (mailer.php)
  • Security code generation + 15-minute expiry OTP for 2FA and password resets
  • Cart expiry reminder emails (send_engagement_reminders.php)
  • Wishlist expiry reminder emails
  • Monthly profit report emails (monthly_profit_report.php)
  • Weekly analytics report emails (weekly_analytics_report.php)

Admin Panel Systems

  • Coupon management (create, activate, validate, campaign control)
  • Product review moderation with delivery-status eligibility enforcement
  • Product trash bin with restore workflow and storefront exclusion logic
  • Sub-admin lifecycle (invite, email verify, roles, suspend/reactivate, delete + immediate session revocation)
  • Security event monitoring UI

Security Infrastructure

  • Google reCAPTCHA v3 verification with strict score threshold (0.65 default), action validation, hostname checking, challenge_ts freshness
  • reCAPTCHA v2 fallback when v3 isn't active for a flow
  • Honeypot field embedded in CAPTCHA widget
  • Fallback CAPTCHA challenge (arithmetic + knowledge, hashed answer per nonce, attempt lockout)
  • Rate limiting across all sensitive endpoints
  • PDO helper layer for controlled incremental migration from mysqli prepared statements
  • security_helpers.php — centralized Argon2id/bcrypt hashing, password policy enforcement, rehash logic
  • CI security gate via .github/workflows/security-gate.yml — static checks on every push + dynamic probes when SECURITY_BASE_URL is configured

Checkout Hardening

  • Stock locking with SELECT ... FOR UPDATE during order placement
  • Idempotency key consumption to block duplicate form submissions
  • High-value COD OTP threshold (email OTP for orders above configurable limit)
  • Refund and review blacklist enforcement across all user-facing mutation paths

The Before vs. After

Dimension Before Copilot After Copilot
PHP files written ~8 (basic CRUD) 80 tracked PHP files
Security posture basic input escaping 3-level security model (baseline → sensitive forms → critical money paths)
Email system single PHP mail() call SMTP failover + 6 automation scripts
Estimated time to complete 6–8 months 3–4 months
Things I knew I didn't know PDO vs mysqli stock locking, CSP nonces, Argon2id, idempotency keys
Things I didn't know I didn't know SMTP duplicate suppression, COD OTP threshold patterns, APCu/Redis cache layering discovered through Copilot's generated code

The last row is the real one. The things I didn't know I didn't know.


My Experience with GitHub Copilot

The Models Matter

I used three models across this project:

Claude Sonnet 4.6 — my daily workhorse. Fast, accurate for PHP, good at following context across multiple files. When I was iterating quickly on storefront logic or admin UI, Sonnet was my go-to. It understood my existing codebase structure without me re-explaining every time.

Claude Opus 4.6 — for the scary parts. When I needed the CAPTCHA hybrid system designed, or when I was trying to figure out the checkout security model (transaction boundaries, row locking, idempotency), I reached for Opus. Slower, but it reasoned through edge cases I wouldn't have caught. The "Level 1, Level 2, Level 3 security severity model" in my README — that framework came out of an Opus session.

GPT-5.2-Codex — I used this mostly for breakpoint testing, spotting logic flaws, checking SQL injection vectors, and validating security helpers. Different model, different angle on the same code. Like having a second pair of eyes that reads code differently. Copilot's multi-model architecture made this seamless — I could switch within the same workflow.

As of April 2026, GitHub Copilot supports model selection for both Claude and Codex agents, with Claude Sonnet 4.6 and Claude Opus 4.6 available for Anthropic tasks, and GPT-5.2-Codex, GPT-5.3-Codex, and GPT-5.4 available for OpenAI Codex tasks.

What Actually Happened in Practice

It wasn't magic. Let me be clear.

I wrote every single frontend file by hand. Copilot suggestions during HTML/CSS work were mostly noise — I ignored them. The jQuery interactions, the Bootstrap grid, the storefront layouts — that's mine, manually typed.

Where Copilot exploded in value was PHP systems logic. The kind of code where one missed edge case means a security hole or a race condition in checkout. The kind of code where you need to know patterns you've never been taught.

A real example: I knew I needed "CSRF protection." What I didn't know was where exactly to validate the token (before any database operation, not after), or that regenerating the token after each validated request is a meaningful hardening step. Copilot wrote it the right way. I read the code, asked it why, it explained. That's not just autocomplete — that's mentorship encoded into a tool.

What I Pushed Back On

Copilot is not always right. A few things I rejected or significantly modified:

  • It initially generated SQL using string concatenation in a few helper queries — I pushed back and forced prepared statements everywhere
  • One version of the reCAPTCHA logic didn't validate hostname or challenge_ts — I asked for hardening and got a stricter implementation
  • The first version of the rate limiter didn't have burst tolerance — it would have flagged fast-typing legitimate users. I caught it in testing

The right model is: you're the architect. Copilot is a very fast contractor who sometimes cuts corners. Review everything.

On Learning While Using AI

Here's the thing people don't say enough: AI-assisted development taught me more than it replaced. I learned PDO, Argon2id, CSP nonces, idempotency keys, stock locking, Cloudinary server-side signing, APCu caching, and Redis connection pooling — all through reading, testing, and interrogating code that Copilot generated. If I'd been alone, I'd have written simpler code and never encountered these patterns at all.

The alternative wasn't "I would have learned this from scratch." The alternative was "I would have shipped something less secure and less complete."

GitHub Copilot agent mode in VS Code: active code generation session, PHP security helpers file open


Conclusion

Commerza is archived now — May 5, 2026. I archived it not because I abandoned it, but because it reached a state I'm actually satisfied with. 339 files. 80 PHP files. 136 commits. A CI security gate. A dual-SMTP mailer. An admin panel I'd actually use.

Is it perfect? No. There are things I'd change. The PDO migration is incomplete — the README says so honestly. Some admin UI pages are rougher than others. There's a lot of room to grow.

But it exists. It runs. It handles real security concerns that most tutorial-based PHP projects completely ignore.

That's the difference three months and GitHub Copilot made.

I'm not a "vibe coder." I'm not someone who just prompts and ships. Copilot was my accelerator, my pattern library, and — genuinely — my teacher on the backend. The frontend was mine. The architecture decisions were mine. The testing, the debugging, the "wait this doesn't make sense, let me re-read the generated code at 1am" — all mine.

If you're a student developer who thinks AI tools are "cheating": they're not. They're the closest thing to a senior developer pair-programming with you that most of us will ever get access to, for free. Use them intelligently. Read everything they generate. Push back when it's wrong. Ask why.

That's how you build a production-grade e-commerce platform in 3 months instead of 8.


Links:


Built by Syed Ahmer Shah — BSE student, HITMS BSE, Aptech ADSE, Pakistan. 2026.


Find Me Across the Web

Comments (11)

Join the discussion
N
Najim9d ago

This is probably one of the biggest shifts happening in software right now.

A few years ago, building a production-grade platform in 3 months with a very small team would’ve sounded unrealistic. Now AI tools can remove huge amounts of repetitive work:

boilerplate debugging documentation scaffolding refactoring test generation

But I think the most valuable part is not “AI replacing developers.” It’s that developers can finally spend more time on architecture, product decisions, UX, and business logic instead of fighting repetitive code.

The interesting part is that the best developers now aren’t necessarily the fastest typers. They’re the ones who know how to collaborate effectively with AI tools without losing engineering judgment.

N
Najim9d ago

I'm seeing that shift too. It's no longer "take this prompt and build me Facebook-grade app". It's more like: "here's what I want to do and both of us are going to work side-by-side".

I don't generate any code from these coding agents without using the plan feature. Allows me to see what it's thinking and to know if it actually fits what I want.

N
Najim9d ago

Kudos! On completing the project👏. This is where AI coding tools become genuinely interesting not just for speed, but for execution leverage. Building a production-grade platform in 3 months is impressive, but the bigger shift is how developers are starting to treat copilots less like autocomplete and more like collaborative infrastructure.

D

👍

T
Tahir17d ago

The transition from a traditional solo developer workflow to an AI-assisted "co-founder" velocity is a massive shift. What used to take an entire engineering team a quarter—handling everything from database migrations to infrastructure as code—can now be orchestrated by a single engineer who knows how to review and audit code effectively. The breakdown of your prompting strategy for complex data modeling shows exactly how the developer's role has evolved from syntax writing to high-level system architecture.

S

You summarized the shift perfectly, Tahir. The role is definitely moving from "code writer" to "system orchestrator." When you can offload the syntax and boilerplate, your primary job becomes designing boundaries and reviewing code critically. It changes the timeline completely, turning a solo developer into a small engineering team. Thanks for the great insight.

T
Tahir17d ago

Building an e-commerce platform in three months is a massive undertaking, but the real takeaway here is how you used Copilot as a lever rather than a crutch. It is easy to let generative tools spit out spaghetti code to move fast, but maintaining strict architectural boundaries and focusing on comprehensive test coverage is what actually makes a project "production-grade." Using AI to accelerate the boilerplate so you could focus on critical paths like the checkout state machine and payment gateway reliability is a great example of modern engineering leverage.

S

The temptation to just accept whatever the AI generates is the biggest trap right now. If you don't enforce strict architectural boundaries early on, AI will just help you build a massive technical debt mountain much faster. Using it to clear out the boilerplate so I could focus on edge cases in the checkout state machine was exactly the goal. I appreciate the thoughtful feedback.

S

Copilot is great at local context, but it struggles with complex, distributed state timing. I used it to scaffold standard transaction blocks, but the actual concurrency logic required deep manual review. It's a great assistant, but definitely not a replacement for system design!

S

You hit on the exact boundary where the tool reaches its limits. While it can generate clean boilerplate or local CRUD functions instantly, it lacks the holistic mental model needed for asynchronous operations and distributed state. The concurrency logic and race-condition checks had to be fully mapped out on a whiteboard before writing a single line of code. It really underscores the point that AI speeds up the typing, but not the actual system thinking.

M
M. Sahil17d ago

The decision to utilize Copilot's multi-model architecture specifically for edge cases and security helpers was highly strategic. Three months is an incredibly tight timeline for a scratch-built platform, and this write-up serves as a great case study on how AI can amplify velocity when guided by a disciplined developer.

S

The multi-model approach was essential for maintaining that pace. Using different models for distinct tasks—like leveraging one for rapid edge-case brainstorming and another for strict security linting—acted as a force multiplier. Tight timelines require you to optimize your tooling, and treating AI as an ensemble of specialized assistants was the only way to hit the three-month mark without sacrificing architectural integrity.

F
Faiq17d ago

Building a production-ready platform in raw PHP without relying on a framework is a massive achievement. Your analogy of treating Copilot as a fast contractor while you remained the chief architect is spot on. It highlights exactly why deep domain knowledge is required to catch security gaps that AI might introduce during rapid code generation.

S

Building without a framework meant there was no built-in safety net for things like SQL injection, CSRF protection, or session hijacking, which is exactly why the "contractor" mental model was necessary. If you accept AI-generated code blindly in a raw PHP environment, you are essentially importing unvetted third-party dependencies into your core logic. Deep domain knowledge isn't optional here; it's the primary line of defense.

V

What strikes me most here is the discipline required to pull this off. Usually, when people use AI assistants, they fall into 'scope creep' because generating code becomes too easy. Kudos to you for keeping the guardrails up and launching in 3 months. If you had to estimate, what percentage of your time was spent reviewing/debugging AI code versus actually mapping out system architecture and business logic?

S

To give you an honest estimate, the breakdown was roughly 40% mapping out architecture and business logic, 40% rigorously reviewing, debugging, and refactoring the AI-generated code, and only about 20% actual hands-on writing. The discipline lay in resisting the urge to let the AI build "cool side features." Every prompt was strictly bound to the technical specification document created on day one, which is the only reason scope creep didn't tank the timeline.

The Engineering Logs

Part 2 of 14

Unfiltered documentation of my journey through Full-Stack development, AI integration, and the hard truths of building scalable systems.

Up next

Swapping Go for Rust: 10x Cheaper K8s Ingress

How a $4,200 AWS bill forced a startup to dump Go-based ingress for Rust—and slashed infrastructure costs by 90%.