← Back to portfolio Haciendo Testing QA

SmartShop Lab

Omnichannel e-commerce QA lab (web + mobile + API) with an AI store assistant, Lumina. Built to practice full-stack TypeScript and a layered test strategy: E2E, contracts, API, load and LLM quality.

Open the live store, read published QA reports, or clone the monorepo and run the same suites locally — including an agentic QE setup so coding agents follow a consistent QA workflow, plus CI that gates PRs and ships evidence to GitHub Pages.

Live demo tip: the API runs on Render’s free tier, so the first catalog request can take ~30–60s (cold start). The shop shows a splash and retries /api/products with backoff — no manual refresh needed — then the catalog appears automatically.

SmartShopLab neon logo: shopping bag with a QA checkmark and circuit traces

01Overview

Objective and what it demonstrates: an educational store (web, mobile and API) for practicing a full QA strategy, not a production shop.

Objective: a controlled, educational lab to practice omnichannel E2E, API contracts, load testing and AI-quality evaluation — without exposing private client data. It is not a production store.

Function: a synced e-commerce store (web + mobile) with an assistant. Browse catalog, cart and chat on the hosted web, or clone the monorepo and run every suite locally.

Layered testing

UI regression, contracts, API, capacity and LLM quality live in separate suites instead of one flaky pile.

Agentic QE

AGENTS.md entry point, a project-agnostic skill pack and pinned MCP servers so coding agents do QA consistently.

CI with three roles

A PR gate, evidence published to GitHub Pages, and a scheduled canary that never blocks a PR.

Finding → fix

An accessibility bug followed from issue to fix to regression test, traced with @atc ids.

02Screenshots

Web and app looks: the real interface, plus the QA reports published on GitHub Pages.

Neon design system with dark mode by default (the header toggle switches to light) on both web and mobile.

Web · React + Vite

Mobile · Expo Go on Android

QA evidence · GitHub Pages

03Test layers

What each layer covers. Each testing layer lives in its own suite, so a failure points to one clear cause.

  • Playwright web E2E

    Purchase flow + chat UI against ai-mock. Chromium, no API key.

  • Maestro mobile E2E

    Catalog/cart in Expo Go. Optional real LLM + judge flow.

  • Pact contracts

    Consumer/provider green path + isolated magicField demo break.

  • Newman API

    Health, products, cart, AI chat — plus intentional FAIL demo.

  • k6 load

    ~40 s capacity: p95/p99, errors, timeouts — not model quality.

  • AI evals LLM quality

    Heuristic probes + LLM-as-judge rubric scoring via OpenRouter.

  • Canary synthetic

    Hosted web + API content probe every 6 hours. Never blocks a PR.

  • Agentic QE agents

    AGENTS.md + skill pack + MCP (@atc, @p0 smoke).

  • Reports GitHub Pages

    HTML evidence published on every main push.

Suite matrix (local)

#SuiteCommandExpected
1Playwrightnpm run test:web8 passed
2Pact consumernpm run test:contract:consumer3/3
3Pact providernpm run test:contract:providerGreen
3bPact demo FAILnpm run test:contract:provider:demo-failExpected FAIL (magicField)
4Newman OKnpm run test:api-postman0 failed
5Newman demo FAILnpm run test:api-postman:failAssert count === 999 fails
6k6npm run test:load~40 s, thresholds OK

Playwright specs: purchase-flow, ai-chat and tests/architecture/catalog-cart.spec.ts (Components + Fixtures, titles carry @atc:ATC-CART-NNN, priorities as @p0 / @p1).

04Structure

How the monorepo is organized: product apps on top, six test suites and the quality platform below.

SmartShopLab monorepo: product apps, six test suites and the quality platform SmartShopLab backend/ Express · TS · ai-mock web-frontend/ React · Vite · Tailwind mobile-app/ RN · Expo · NativeWind tests/ six QA suites e2e-web Playwright e2e-mobile Maestro performance k6 api-integration Postman · Newman contract-tests Pact ai-evals rules + LLM judge QUALITY PLATFORM monitoring/synthetic/ Canary: hosted web + API packages/agentic-qe/ + AGENTS.md Skill pack · rules · .mcp.json .github/workflows/ → Pages pipeline · canary · qa-reports Demo hosting: web on Vercel · API on Render · QA HTML on GitHub Pages

05AI strategy

Two lanes for AI quality: a deterministic mock for stable UI checks, and a real LLM scored by a judge.

The mock answers “does chat work?”; the judge answers “is the answer acceptable for the store?”. Two lanes, two goals.

Web lane uses a deterministic mock; app lane uses a real LLM plus an LLM judge WEB · DETERMINISTIC MOCK · CI, NO KEY · npm run test:web Playwright Chat UI (FAB → send) backend/ai-mock.ts Assert reply text · stable UI APP · REAL LLM + JUDGE · QUALITY DEMO · npm run test:mobile:ai Maestro Lumina (Expo Go) OpenRouter LLM LLM judge catalog rubric pass=true k6 measures capacity (p95/p99, errors, timeouts) — not model quality. OpenRouter free-model daily quotas are low: retries and fallbacks burn the budget quickly.

06CI/CD

Three workflows with different roles: a blocking PR gate, published reports, and a canary that only observes.

Three workflows: PR gate, reports to GitHub Pages, and a scheduled canary PULL REQUEST / MANUAL · pipeline.yml (orchestrator) TestBuild Smoke @p0 specs Gate blocks the merge + Regression manual run with stage=regression PUSH TO MAIN · qa-reports.yml Install Run suites web · API · contract · load Build reports site GitHub Pages EVERY 6 HOURS · synthetic.yml Canary (Node, no deps) Probe hosted web + API right content, not just “up” Never blocks a PR Stages are reusable workflows (_*.yml) composed by the orchestrator · product CD: Vercel (web) · Render (API)
WorkflowTriggerWhat happens
pipeline.ymlPull request / manualOrchestrator: TestBuild → Smoke → Gate (manual stage=regression adds full Regression)
synthetic.ymlEvery 6 hours / manualCanary against the hosted web + API — never blocks a PR
qa-reports.ymlPush to main / manualInstall → run web/API/contract/load → build reports site → deploy GitHub Pages

The qa-reports-pages concurrency group uses cancel-in-progress, so newer pushes cancel older runs. Pages hosts QA HTML, not the store UI. Secrets are names only: OPENROUTER_API_KEY on Render and in a gitignored .env.ai-evals.

07Agentic QE

How coding agents are set up to do QA work here, with project rules kept apart from reusable skills.

How coding agents (Cursor, Claude Code, OpenCode) are set up to do QA work in this repo. Skills never hold project values — URLs, ports and quirks live only in the Project profile of AGENTS.md, so the same pack is reusable elsewhere.

PieceWhereRole
Entry pointAGENTS.mdMonorepo map, non-negotiables and a Project profile (URLs, commands, quirks, intentional failures)
Skill packpackages/agentic-qe/Five project-agnostic skills; the registry says which one to load
Rule bridge.cursor/rules/Makes the agent read AGENTS.md and the registry before QA work
MCP servers.mcp.jsonplaywright (explore the running UI) and context7 (library docs), versions pinned
Test patterntests/e2e-web/architecture/Components + Fixtures, specs traced with @atc:ATC-<AREA>-NNN

Five skills · one at a time, chosen by task

  1. shift-left-refinement

    Turn a diff or story into a test plan before writing automation.

  2. agentic-exploratory-testing

    Explore a flow through UI, API and state; log findings.

  3. playwright-architecture-automation

    Write specs with the Components + Fixtures pattern.

  4. release-gate-signoff

    Aggregate evidence into GO / GO_WITH_RISK / NO-GO.

  5. synthetic-observability-triage

    Classify a canary or CI failure and pick one next action.

08Finding → fix

A real accessibility finding followed through its issue, fix and regression test.

One finding tracked end to end, from the report to the regression test.

  1. Finding

    The cart button read Cart with 1 items and every add-to-cart button shared the same accessible name. Logged as issues #2 and #3 with priority labels.

  2. Fix

    PR #7: singular form for one item and Add to Cart: <product> names. Visible text stays first (WCAG 2.5.3 Label in Name).

  3. Verification

    @atc:ATC-CART-005 fails on the old label (Received: "Cart with 1 items") and passes on the fix; locators use the new accessible names.

  4. Closure

    The PR carried Closes #2 and Closes #3, so merging it closed both issues.

09Try it

Three ways to try the lab, from no installation to a full local run.

A

Hosted demo

No clone · browse the store + reports

Open the Vercel web, check catalog, cart and chat (ai-mock). Optional API and report links below.

B

Local web + API + suites

Clone · Playwright, Pact, Newman, k6

Start the API with npm run dev, then run each suite. Suites 3–6 need the API running; k6 needs its binary.

C

Mobile (Expo Go)

Clone · app UI + Maestro / AI judge

Android AVD + Expo Go SDK 52, Metro and the API running. No public APK/IPA/QR.

Quick start · six steps

  1. Clone & install

    npm install installs every workspace.

  2. Browsers

    Install Chromium for Playwright, after npm install.

  3. Verify setup

    npm run test:web starts API + web itself: 8 passed.

  4. Run the stack

    npm run dev → API :3001, web :5173.

  5. Other suites

    Pact, Newman and k6 against the running API.

  6. Mobile & reports

    Maestro on Expo Go; npm run reports:collect for HTML.

git clone https://github.com/haciendotestingqa/SmartShopLab.git
cd SmartShopLab
npm install
npx playwright install --with-deps chromium   # macOS: npx playwright install chromium

npm run test:web                  # 8 tests, expected: all passed

# Local stack (API :3001 + web :5173) — keep open for suites 3–6
npm run dev

npm run test:contract:consumer
npm run test:contract:provider
npm run test:api-postman
npm run test:load

# Smoke subset that gates PRs
cd tests/e2e-web && npx playwright test tests/architecture --grep @p0

Mobile + Maestro (Android emulator)

cp mobile-app/.env.example mobile-app/.env     # EXPO_PUBLIC_API_URL=http://10.0.2.2:3001
npm run dev:backend                            # terminal 1
npm run start -w mobile-app                    # terminal 2 → press "a" for Expo Go
npm run test:mobile -- tests/e2e-mobile/flows/catalog-and-cart.yaml   # terminal 3
npm run test:mobile:ai                         # real LLM + judge (needs .env.ai-evals)

Heads-up: the web suite uses the deterministic mock and needs no key. Only the AI suites need OPENROUTER_API_KEY in .env.ai-evals — restart the backend after editing it.

smartshoplab.onrender.com/ showing Cannot GET / is expected — it is an API only.

10Stack

The tools behind each layer, and the API that the apps and tests call.

Playwright Maestro K6 Pact Postman Newman TypeScript JavaScript Actions GitHub OpenRouter

App surfaces: React + Vite + Tailwind (web) · React Native + Expo SDK 52 + NativeWind (mobile) · Node/Express (API) · Node 20+ · npm workspaces.

Design system

Neon tokens #f714aa / #f97b3a / #f9d20c shared by web and mobile themes, dark/light header toggle, Inter 400/600/700, WCAG AA contrast targets.

API endpoints

MethodPathDescription
GET/healthHealth check
GET/api/products · /api/products/:idCatalog · product detail
GET/api/cartCart
POST/api/cart/itemsAdd / set / remove (mode)
PATCH · DELETE/api/cart/items/:productIdSet quantity · remove item
POST/api/cart/resetReset cart (web E2E)
POST/api/ai/chatLumina chat (mock or OpenRouter)
POST/api/ai/judgeLLM-as-judge
Open repository All demo projects Work with me