Skip to content

Instantly share code, notes, and snippets.

@bluntbrain
Created May 11, 2026 20:09
Show Gist options
  • Select an option

  • Save bluntbrain/e9e420ac6bd278d8460bfad24aca13e8 to your computer and use it in GitHub Desktop.

Select an option

Save bluntbrain/e9e420ac6bd278d8460bfad24aca13e8 to your computer and use it in GitHub Desktop.
Talkamore: Upgrade Plans + Lifetime Access — Frontend & Backend Prompts

Backend Prompt — Lifetime Access Plan + Subscription Logic

Context

Talkamore backend (Node.js/TypeScript, PostgreSQL/Prisma, Railway). We need to add support for a Lifetime Access plan ("Founding 100") alongside existing Free, Monthly, and Yearly plans.

Plan Definitions

Plan Price Message Cap Duration Stripe Price ID
Free $0 100/month
Monthly $9.99/mo Unlimited Recurring (existing or create)
Yearly $79.99/yr Unlimited Recurring (existing or create)
Lifetime $99 one-time 5,000/month Permanent Create new one-time price

Database Changes

Add to Plan enum or subscription model:

LIFETIME — one-time payment, never expires, 5000 msg/month cap

Schema updates needed:

  • subscriptions table: support type: 'lifetime' with no expires_at / no renewal
  • users table or profile: optional founding_member: boolean flag
  • Track Founding 100 count: either a counter or SELECT COUNT(*) FROM subscriptions WHERE type = 'lifetime'

API Endpoints

GET /api/plans

Return all available plans with pricing, features, and availability:

{
  "plans": [
    { "id": "free", "price": 0, "messageLimit": 100, "features": ["basic_journaling", "maya_persona"] },
    { "id": "monthly", "price": 999, "interval": "month", "messageLimit": null, "features": ["unlimited_messages", "all_personas", "voice", "memory", "priority"] },
    { "id": "yearly", "price": 7999, "interval": "year", "messageLimit": null, "features": ["unlimited_messages", "all_personas", "voice", "memory", "priority"] },
    { "id": "lifetime", "price": 9900, "interval": null, "messageLimit": 5000, "features": ["unlimited_messages", "all_personas", "voice", "memory", "priority", "founding_badge", "early_access"], "remaining": 23, "totalSlots": 100 }
  ]
}

POST /api/subscriptions/checkout

  • Accept planId: 'lifetime'
  • Before creating Stripe session: check if Founding 100 slots remain
  • If sold out, return { error: 'lifetime_sold_out' } with 409
  • Create Stripe Checkout Session with mode: 'payment' (not subscription) for lifetime
  • Use mode: 'subscription' for monthly/yearly as usual

Stripe Webhook Handler

  • On checkout.session.completed for lifetime:
    • Create subscription record with type: 'lifetime', expires_at: null
    • Set founding_member: true on user
    • Increment lifetime sold counter (or just count from DB)
  • No renewal logic needed for lifetime

GET /api/subscriptions/current

Return user's active plan, including lifetime status:

{
  "plan": "lifetime",
  "founding_member": true,
  "message_limit": 5000,
  "messages_used": 342,
  "expires_at": null
}

Message Limit Logic

Update the message counting middleware:

if plan == 'free': limit = 100/month
if plan == 'lifetime': limit = 5000/month
if plan == 'monthly' || 'yearly': unlimited

Reset counts on 1st of each month for all plans.

Edge Cases

  • Race condition on Founding 100: use DB transaction or SELECT FOR UPDATE when checking remaining slots
  • If user already has monthly/yearly and buys lifetime: cancel existing subscription, switch to lifetime
  • Lifetime users should NOT see renewal prompts
  • If Founding 100 sells out mid-checkout: handle gracefully in webhook (refund if needed, or honor it since they started before sellout)

Founding 100 Counter

  • Expose GET /api/plans/lifetime/remaining for frontend to show live count
  • Cache this (Redis or in-memory) — doesn't need to be real-time, 1-5 min TTL is fine

Environment Variables

  • STRIPE_LIFETIME_PRICE_ID — the one-time Stripe price for $99
  • FOUNDING_100_LIMIT=100 — configurable cap

Frontend Prompt — Upgrade Plans + Lifetime Access Card

Context

Talkamore is an AI journaling app. We need to build/update the pricing/upgrade UI to include Free, Monthly, Yearly, and a Lifetime Access card. Design should feel premium but not pushy — Claude-style upgrade dashboard for desktop web.

Copy & Card Structure

Free Plan (Always Available)

  • 100 messages/month
  • Basic journaling with Maya
  • CTA: "Get Started" (already active for logged-in users)

Monthly — $9.99/mo

  • Unlimited conversations
  • Memory that never resets — Maya remembers everything, connects patterns across months
  • All 4 personas (Maya, Sage, Theo, Luna)
  • Voice messages (web + Telegram)
  • Priority access — faster responses, no queues
  • Cancel anytime
  • CTA: "Upgrade Monthly"

Yearly — $79.99/yr (save ~33%)

  • Everything in Monthly
  • Best value for committed journalers
  • CTA: "Upgrade Yearly"

🏆 Lifetime Access — Founding 100 — $99 one-time

  • Limited to 100 users — show remaining count if available (e.g., "23 of 100 remaining")
  • Everything in paid plans, forever
  • 5,000 messages/month cap
  • Unlimited memory & all personas
  • Voice messages
  • Priority access
  • Early access to new features
  • "Founding member" badge on profile
  • No recurring charges, ever
  • CTA: "Claim Lifetime Access"
  • Visual treatment: highlighted/bordered card, badge or ribbon saying "Founding 100" or "Limited"

Upgrade Modal (shown when free limit hit)

You've used your free messages for this month.

Upgrade to keep going — and unlock everything:
• Unlimited messages
• Memory across months (not just this session)
• All 4 personas
• Voice messages
• Cancel anytime

Or grab Lifetime Access for $99 — one payment, forever.
Only [X] spots left.

The longer you use Talkamore, the more it understands you.
Don't reset the relationship.

Design Notes

  • Cards should be side-by-side on desktop, stacked on mobile
  • Lifetime card should visually stand out (accent border, badge, or glow)
  • If Founding 100 is sold out, hide or grey out the card with "Sold Out" label
  • Use existing design system / Tailwind classes
  • Animate the remaining count if possible (subtle pulse or countdown feel)
  • Pricing toggle between Monthly/Yearly is fine, but Lifetime should always be visible separately
  • Reference Claude's upgrade dashboard for layout inspiration (clean, minimal, card-based)

Pages to Update

  • /pricing or /upgrade page
  • In-app upgrade modal (triggered when free limit reached)
  • Settings > Subscription section (show current plan + upgrade options)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment