App Specification

Hypersonic — Technical Reference

Hypersonic — App Specification

Overview

Hypersonic is an AI-powered mobile-first web app that transforms raw business ideas into full execution plans, pitch decks, market analyses, and marketing strategies. Users can capture ideas via text or voice, track progress through a step-by-step execution checklist, and unlock premium AI-generated assets via a Pro subscription.


Architecture

Routing

| Path | Component | Notes | |------|-----------|-------| | / | Landing | Public landing page | | /app/ | Home | Main capture screen (requires onboarding) | | /app/ideas | Dashboard | Idea list with tabs and progress | | /app/insights | Insights | Analytics dashboard | | /app/settings | Settings | Profile, plan, preferences | | /app/idea/:id | IdeaOutput | Full idea detail + execution plan | | /app/idea/:id/asset/:assetKey | GeneratedAsset | Rendered AI asset | | /app/templates | Templates | Prompt templates | | /app/compare | CompareIdeas | Side-by-side idea comparison | | /shared/:token | SharedView | Public share view (no auth) |

Onboarding Gate: First-time users see Onboarding before any /app/* routes. Completion stored in localStorage("onboarding_done").

Layout: All /app/* routes wrap in AppShell which renders the bottom navigation bar, applies page transition animations, and initialises useOfflineSync and useReminders.


Entities (Database)

Idea

Core entity. One record per idea captured by a user.

| Field | Type | Description | |-------|------|-------------| | content | string (required) | Raw idea text | | title | string | Short AI-generated title | | tags | string[] | Organising tags | | category | enum | uncategorized / business / personal / app / content / shopping / thought / task / inspiration / question / reminder | | source | enum | typed / voice / pasted / audio | | is_starred | boolean | Starred flag | | reminder_at | datetime | Optional review reminder | | audio_url | string | URL of recorded audio | | transcription_status | enum | none / pending / done | | priority_score | number | AI viability score (0–100) | | priority_impact | number | Impact sub-score | | priority_effort | number | Effort sub-score | | priority_reason | string | AI explanation of score | | status | enum | new / in_progress / completed | | ai_summary | string | AI-generated summary (also used as notes field) | | ai_execution_plan | {step, done}[] | Step-by-step plan | | ai_monetization | string | Monetization strategy | | ai_target_market | string | Target market description | | ai_competitors | string | Key competitors | | ai_pitch_deck | string | Generated pitch deck content | | ai_landing_page | string | Generated landing page copy | | ai_mvp_plan | string | MVP build plan | | ai_marketing_strategy | string | Marketing strategy | | next_best_action | string | AI-suggested next action | | versions | {version, content, title, summary, saved_at}[] | Version history snapshots |

Folder

Groups ideas into named, colored collections.

| Field | Type | Description | |-------|------|-------------| | name | string (required) | Folder name | | color | string | Hex color (default #f59e0b) | | idea_ids | string[] | List of idea IDs in this folder |

Share

Manages public/invited sharing for an idea or folder.

| Field | Type | Description | |-------|------|-------------| | target_type | enum | idea / folder | | target_id | string | ID of the shared entity | | public_token | string (required) | Unique token for the share URL | | public_link_enabled | boolean | Whether the public link is active | | invited_emails | string[] | Emails with access |


Backend Functions

generateIdeaPlan

Trigger: User submits idea text on Home screen. Input: { idea_text: string } Calls AI to generate title, summary, execution plan (5–8 steps), monetization, target market, competitors, priority score, and next best action. Creates a new Idea entity with status "new". Returns { idea }.

generateIdeaSection

Trigger: User taps a locked asset button in IdeaOutput (Pro only). Input: { idea_id, section } — section is one of: pitch_deck, landing_page, mvp_plan, marketing_strategy. Calls AI to generate the requested section content, updates the Idea entity, returns { idea }.

evaluateIdea

Trigger: After voice confirmation, before plan generation. Input: { idea_text: string } Returns a structured evaluation with scores, market signals, and a recommendation on whether to proceed.

parseVoiceIdea

Trigger: After voice recording stops. Input: { raw_text: string } Uses AI to clean up and structure the spoken idea. Returns { parsed: { refined_idea, target_audience, business_model }, raw_text }.

transcribeAudio

Trigger: Audio voice note uploaded. Input: { idea_id, audio_url } Transcribes audio using AI, updates Idea with transcription content, sets transcription_status: "done".

autoTagIdea

Trigger: Idea created or updated. Suggests category and tags based on content; updates the entity.

scoreIdeaPriority

Trigger: Idea created. Scores the idea on impact, effort, and viability. Updates priority_score, priority_impact, priority_effort, priority_reason.

dailyIdeaDigest

Trigger: Scheduled (daily). Sends a summary email to users with new/in-progress ideas to keep momentum.

createCheckout

Trigger: User clicks "Upgrade Now". Input: { success_url, cancel_url } Creates a Stripe Checkout session for the Pro plan ($15/month). Returns { url }. Always includes base44_app_id in Stripe metadata.

stripeWebhook

Trigger: Stripe webhook events (checkout.session.completed, customer.subscription.deleted). On successful checkout, marks the user as Pro. On subscription deletion, revokes Pro status.

getProStatus

Returns { isPro: boolean } for the authenticated user.

deleteUserProfile

Deletes all Idea and Folder records for the user, then removes the user record.


Frontend Logic

Plan / Subscription (lib/usePlan.js)

  • usePlan() hook — fetches Pro status via getProStatus. Returns { isPro, loading, refresh }.
  • FREE_IDEA_LIMIT = 3 ideas per month before paywall.
  • shouldShowUpgradeNudge(count) — soft nudge after 1st or 2nd idea.
  • isOverFreeLimit(count) — true when count >= FREE_IDEA_LIMIT.

Streak Tracking (lib/useStreak.js)

  • Stores daily activity in localStorage.
  • markTodayActive() — marks today as active, returns { streak }.
  • getStreak() — reads current streak count.

Offline Queue (lib/offlineQueue.js)

  • Stores pending idea captures in localStorage when offline.
  • getQueue() / addToQueue(data) / removeFromQueue(id).

Offline Sync (lib/useOfflineSync.js)

  • Listens for window "online" event.
  • On reconnection, sequentially uploads all queued items.
  • Calls onSynced callback after each successful sync.

Reminders (lib/useReminders.js)

  • Polls Idea records with reminder_at in the past.
  • Fires browser Notification for due reminders.

UI Pages

Home (Capture Screen)

  • Textarea for idea input with auto-resize.
  • Voice recording via Web Speech API — interim transcript shown live.
  • On submit: shows full-screen generating overlay → navigates to IdeaOutput.
  • Voice flow: record → stop → parseVoiceIdea → VoiceConfirmationModal → evaluateIdea → IdeaEvaluationModal → generateIdeaPlan.
  • Displays: streak banner, "Continue Where You Left Off", Trending Ideas, Quick Access links, active idea progress widget, Daily Insight, Daily Prompt.
  • Shows UpgradeModal if free limit reached or for soft nudge.

Dashboard (My Ideas)

  • Lists all ideas with tab filters: All / Draft / In Progress / Completed.
  • Shows DailyProgress component above list for in-progress ideas.
  • Floating + button navigates to Home.

IdeaOutput (Idea Detail)

  • Execution Checklist: each step is a toggle. Optimistically updates local state and cache. Auto-marks status "completed" when all steps are done.
  • Notes: auto-saves to ai_summary field with 800ms debounce.
  • Generated Assets: 4 Pro-gated buttons (Pitch Deck, Landing Page, MVP Plan, Marketing Strategy).
  • Next Best Action: button calls AI inline, updates entity.
  • Version Timeline: shows all saved snapshots.
  • Voice Refinement: record feedback, AI merges with existing idea.
  • Refine into New Version: saves snapshot then AI rewrites idea content.
  • Status Buttons: manually set in_progress or completed.

Ideas (Idea Library)

  • Tabs: Text Ideas / Voice Notes.
  • View modes: List (grouped Today / Yesterday / Older) or Kanban (by priority).
  • Search + filter chips (starred, priority, category).
  • Pull-to-refresh gesture. Offline ideas shown from local queue.
  • Folder list + folder detail sheet.
  • IdeaDetail drawer for editing content, category, tags, reminder, folder assignment.

Settings

  • Profile card, stats row, Pro upgrade card or "Pro Active" badge.
  • Notifications toggle, Dark Mode toggle, Export Data (JSON), Help.
  • Danger zone: Delete All Ideas, Delete Account, Log Out.
  • Handles ?upgraded=1 redirect from Stripe to refresh plan status.

Payments (Stripe)

  • Product: Hypersonic Pro — $15/month recurring subscription.
  • Flow: Frontend calls createCheckout → redirects to Stripe hosted checkout → webhook marks user as Pro.
  • Iframe guard: Checkout blocked if window.self !== window.top.
  • Test card: 4242 4242 4242 4242 (Stripe test mode).

Design System

  • Framework: React + Tailwind CSS + shadcn/ui
  • Fonts: Inter (sans), JetBrains Mono (mono)
  • Primary color: violet/purple (252 80% 54%)
  • Accent color: cyan (195 95% 46%)
  • Dark mode: class-based, toggled via Settings
  • Animations: framer-motion for page transitions, overlays, progress bars
  • Mobile-first: bottom nav bar with safe-area insets, pull-to-refresh, voice modals

Key Libraries

| Library | Usage | |---------|-------| | @tanstack/react-query | Server state, caching, optimistic updates | | framer-motion | Animations and transitions | | react-router-dom | Client-side routing | | @stripe/stripe-js | Stripe Checkout | | lucide-react | Icons | | date-fns | Date formatting | | react-markdown | Rendering AI-generated markdown content | | @hello-pangea/dnd | Drag-and-drop in Kanban board | | recharts | Charts in Insights dashboard | | jspdf | PDF export of ideas |