diff --git a/README.md b/README.md index 8333db0..0c594d4 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,25 @@ reward is in, when it was last checked, and what to do if it's stuck** — using four-status model (`Tracking → In Progress → Rewarded → Needs Attention`) on top of the same `deals.getActivityOfferPlacements` tRPC contract Super serves in production. +## How closely this mirrors Super.com + +This demo is deliberately built to match Super's real production stack — not just the UI, but the API contract, naming conventions, and architecture. Here's what's the same: + +| What | Super | This demo | +|---|---|---| +| **UI library** | Material UI (MUI) v6 + Emotion | MUI v6 + Emotion — same component primitives, same `sx` prop styling | +| **Font** | Poppins (observed in HAR) | Poppins via `next/font/google` — same weights, same scale | +| **API style** | tRPC — observed at `/snapcommerce/api/trpc/{router}.{procedure}` | tRPC v11, same path prefix, same `snapcommerce` namespace | +| **Wire format** | `snake_case` field names — `user_offer_activity`, `last_completed_at`, `icon_url`, etc. | Identical — Zod schemas and fixtures use the exact HAR field names | +| **Response envelope** | `{ result: { data: { data: } } }` doubly-nested superjson shape | Identical — `{ data: ... }` envelope preserved throughout | +| **Procedure naming** | Verb-prefixed: `getActivityOfferPlacements`, `updateActivityOfferPlacement` | Same convention for every procedure | +| **Status model** | `RETRY`, `IN_PROGRESS` observed; larger enum in production | `deriveActivityStatus()` maps the same values → four user-facing statuses; unknown enum values pass through | +| **Analytics** | Amplitude | Console-logged stub with Amplitude-shaped event names and properties | +| **Auth stack** | Custom JWT; Ada chatbot | JWT payload stub in the Ada dialog; chat UI matched to observed layout | +| **Runtime** | Node.js on AWS | Node.js via Vercel Fluid Compute — same runtime, different host | + +The main deviations are the framework (Next.js App Router vs. Super's webpack React SPA — the trade-off is collapsed frontend/backend/deploy at the cost of SSR semantics) and the host (Vercel vs. AWS — functionally identical for this surface). Everything user-observable — component library, font, API contract, field names — is matched field-for-field to what HAR captures show. + --- ## Live demo