Build docs

Open the formatted HTML version

PhoneBazaar: Braindoc

Stage 1 of the AiNa pipeline · 2026-11-30 · status: approved by operator (intake answers below)

Summary

PhoneBazaar is a small, fast online store that sells Android phones only: every brand, from budget to flagship, in one catalog that shoppers can filter by the specs they actually care about (brand, price, RAM, storage). V1 is a working demo shop at phonebazaar.tehchand.com with browse, compare, cart and a demo checkout that records orders, plus an admin panel to manage stock and see orders. It exists now to prove the catalog-plus-compare shopping experience before investing in payments and logistics.

The problem

People buying an Android phone face hundreds of models across Samsung, Google, OnePlus, Xiaomi, Motorola, Nothing and others. General marketplaces bury phones among cases and chargers, list the same model ten times under different sellers, and make spec comparison painful; shoppers end up with five browser tabs and a spreadsheet. A small independent seller has the opposite problem: they can't afford a heavyweight platform (Shopify fees and themes, Magento hosting) just to list 20-50 phones cleanly. Both sides want a focused, spec-first phone shop that loads fast on a phone.

Users

  • Shopper (primary): an adult buying their next Android phone, usually on mobile. JTBD: "Help me narrow 200 phones down to the 2-3 that fit my budget and needs, compare them, and order one." Context: short sessions, price-sensitive, compares RAM/storage/battery/camera.
  • Store admin (secondary): the shop owner or one staff member. JTBD: "Add a new phone with its specs and price in under two minutes, and see today's orders." Context: desktop, a few times a day.

Anti-personas

  • Bulk/wholesale B2B buyers (need quotes, invoices, tiered pricing).
  • Accessory shoppers (cases, chargers are out of scope for V1).
  • iPhone shoppers (the store is deliberately Android-only).
  • Multi-vendor marketplace sellers (V1 is a single-seller shop).

V1 scope

In

  • Catalog of Android phones across major brands, seeded with ~24 real-world models and their headline specs.
  • Browse and filter by brand, price range, RAM and storage; sort by price or newest; free-text search.
  • Phone detail page with a full spec sheet, plus side-by-side compare of up to 3 phones.
  • Cart (add, change quantity, remove) kept in the browser session.
  • Demo checkout: name, email, address form → order saved with an order number and confirmation page. No money moves.
  • Admin panel behind a password: add/edit/hide phones, set price and stock, list orders and mark them shipped.
  • Public /docs page exposing this document set, and /roadmap.

Out

  • Real payments: demo first; Stripe is a Phase 2 add once the flow is validated.
  • Customer accounts and login: guest checkout is enough to test demand.
  • Shipping-rate calculation and tax: flat "free delivery" copy in V1.
  • Reviews and ratings: need moderation; not needed to prove the core flow.
  • Multi-currency: GBP (£) only.

Economics

  • Build: ~1 engineer-week for V1 (one FastAPI app, server-rendered, no SPA) · fits budget: YES
  • Monthly infra: £0-£20 (Vercel hobby/pro, serverless Python; no paid DB in V1)
  • Value: a seller can launch a clean, spec-first phone shop for near-zero hosting cost; the compare feature is the differentiator that shortens the buyer's decision.

Risks & dependencies

  • Serverless storage is ephemeral: on Vercel, SQLite in /tmp can reset between cold starts, so demo orders may disappear. Mitigation: clearly labelled demo; Phase 2 moves orders to managed Postgres via DATABASE_URL loaded at runtime.
  • Product data accuracy: specs and prices go stale fast. Mitigation: admin edit screen; prices shown as "demo prices"; seed data marked illustrative.
  • Brand imagery and trademarks: no manufacturer photos or logos are used; phones render as neutral generated device illustrations with the brand name as text.
  • Admin security: a single shared password is weak. Mitigation: env-var password, constant-time compare, signed session cookie, rate-friendly; Phase 2 adds real auth.
  • Fake-checkout confusion: shoppers may think they bought something. Mitigation: a visible "Demo store, no payment is taken" banner on cart, checkout and confirmation.

DevOps & Deployment

  • Hosting target: Vercel (Python serverless runtime), served at https://phonebazaar.tehchand.com. The AiNa classifier suggested a VPS; we override to Vercel to follow the tehchand.com subdomain convention.
  • Runtime + framework: Python 3.12, FastAPI + Jinja2 + HTMX (the AiNa golden starter), no client build step.
  • Database & persistence: catalog seeded from code into SQLite at startup; orders and admin edits in SQLite under /tmp (ephemeral). Backups: none needed for demo data; Phase 2 managed Postgres with provider backups.
  • Secrets & config (names only): ADMIN_PASSWORD, SESSION_SECRET, APP_NAME, later DATABASE_URL, STRIPE_SECRET_KEY.
  • Observability: Vercel function logs and /healthz; console logs only, plan to add Sentry in Phase 2.
  • CI/CD: private GitHub repo shafialtn/phonebazaar; Vercel production deploys from the CLI (vercel --prod) after each pipeline stage; preview deploys on PRs once git is connected.
  • Rollback story: Vercel instant rollback to the previous deployment (vercel rollback), or git revert + redeploy.
  • Scaling envelope: comfortable to ~10k requests/day on serverless with an in-memory/SQLite catalog; beyond that, or with real orders, move to Postgres and add CDN caching for catalog pages.

Delivery

Phase When Milestone
0. Docs + shell Day 1 Braindoc, SOW, PRD published at /docs; site live on subdomain
1. Storefront Days 1-2 Catalog, filters, detail, compare live
2. Cart + checkout Day 2 Cart, demo checkout, order confirmation
3. Admin Day 3 Password-protected phone CRUD and order list
4. Launch pack Day 3 Marketing page, ops runbook, final deploy

Definition of done

  • https://phonebazaar.tehchand.com serves the storefront and /healthz returns ok.
  • A shopper can filter, compare 3 phones, add to cart and place a demo order with an order number.
  • Admin can log in, add a phone, and see that order.
  • All pipeline docs readable at /docs.
  • Code in the private GitHub repo.

Open questions

  • Should Phase 2 payments use Stripe, or cash on delivery for a local market?
  • Which country/currency is the real launch market (V1 assumes UK, GBP)?
  • Will real product photos be licensed, or stay with generated illustrations?

Assumptions made

  • Single seller, UK market, prices in GBP including VAT.
  • ~24 seed models across ~8 Android brands is enough to demonstrate filtering and compare.
  • Demo checkout (no payment) is acceptable for V1, as chosen by the operator.
  • Ephemeral order storage is acceptable for a demo on Vercel.
  • One admin account is enough for V1.