An adaptive subscription management UI that feels like texting a friend, not navigating a webshop.
- Frontend: Next.js 16 (App Router), React 19, TypeScript 5
- Styling: Tailwind CSS v4, DaisyUI 5
- Database: Supabase (PostgreSQL)
- AI/ML: Gemini 2.5 Flash (image generation), Vertex AI (A2UI generation)
- Hosting: Vercel
# Clone the repo
git clone https://github.com/your-team/sub-flow.git
cd sub-flow
# Install dependencies
pnpm install
# Set up environment variables
cp .env.example .env
# Add your Supabase and Google AI API keys to .env
# Run the development server
pnpm devOpen http://localhost:3000 to see the app.
Subscription management for physical products (veggie boxes, diapers, coffee) is broken. Every service builds an e-commerce shop first, then bolts subscriptions on top. The result: interfaces designed for browsing, not managing.
An adaptive subscription interface that:
- Knows your context — Urgent deadline? Minimal UI. Plenty of time? Let's explore.
- Learns your preferences — "You always swap fennel. Want me to just do that?"
- Delights with visuals — AI-generated images of your box and recipes
- Feels like a conversation — Not a shop, not a dashboard, something warmer
- Time-adaptive UI: Same app looks completely different based on urgency (< 12h: urgent mode, > 72h: browse mode)
- Smart suggestions: Pattern detection learns from swap history and proactively recommends
- AI box images: Beautiful food photography generated on confirmation via Gemini
- Persona simulation: Dev panel for instant switching between demo users and time contexts
The prototype simulates weekly vegetable box subscriptions with three personas:
| Persona | Name | Story | Default Box | Swap History & Patterns |
|---|---|---|---|---|
| New | Sarah | Just signed up, exploring the service for the first time | Carrot, Broccoli, Apple, Pear, Banana | None — clean slate, no learned patterns |
| Regular | Mark | 3 weeks in, has clear preferences | Fennel, Broccoli, Apple, Orange, Strawberry | Swapped Fennel → Zucchini 3 times; system detects dislike of Fennel (95%) and preference for Zucchini (85%) |
| Power | Lisa | Engaged power user, curious and exploratory | Carrot, Fennel, Beetroot, Pear, Strawberry | Swapped to Strawberry 2x, Orange 2x, Broccoli away 2x; prefers Strawberry (70%), prefers Orange (70%), dislikes Broccoli (80%) |
Scenario 1: Watch a box go through its lifecycle
- Select Sarah with Plenty of time — explore the relaxed browse mode
- Switch to Locking soon — see the UI shift to urgency mode
- Switch to Locked — the box is finalized, no more changes
Scenario 2: Compare "locking soon" across personas
- Switch to Lisa with Plenty of time and reset boxes — see how a power user's experience differs with learned preferences
- Select Mark with Locking soon — notice his Fennel → Zucchini suggestion (strong pattern)
- Switch to Lisa with Locking soon — compare her different preference suggestions (fruit-focused)
Scenario 3: Conversation interactions Try these via the chat interface:
- Add a vacation (pause deliveries)
- Skip this week
- Add or remove items from the box
- Confirm a box, keep editing a box
See docs/project-plan.md for the full product vision and docs/phases/ for implementation details across 8 phases.
