Skip to content

Releases: paritoshtripathi935/MiniPerplexity

PaidPilot 2.0 — pivot to AI co-pilot for performance marketers

08 May 15:30
aebd0d4

Choose a tag to compare

A complete pivot of this project from the Perplexity-style search demo it
started as ("Mini Perplexity") into a focused AI co-pilot for in-house
performance marketers
. Same RAG plumbing underneath; everything around it
is new — persistence, auth, marketing-tuned prompts, a curated playbook
library, a real design system, and a redesigned chat surface.

Rationale: docs/product/V1_PLAN.md
Running status: docs/product/STATUS.md

Highlights

New product layer

  • 10 curated Plays — creative briefs, channel plans, A/B specs, weekly
    reviews, audience research, hook ideation, landing-page critique,
    competitor teardown, saturation diagnosis, iOS/privacy briefs. Each with
    structured inputs and a defined output schema.
  • Per-user brand profile — 4-step onboarding wizard captures company /
    ICP / channels / CAC + ROAS targets, injects them into every chat as
    system-prompt context.
  • 4 calculators — CAC payback, ROAS-to-margin, A/B sample size (proper
    Acklam inverse-normal), blended channel efficiency. All client-side.
  • Source authority re-ranking — search results are scored by domain
    (Meta/Google docs > eMarketer/Adweek > random Medium posts) before the
    LLM sees them.

Persistence (Neon Postgres)

  • 9-table schema: users, brand_profiles, sessions, queries,
    messages, search_results, citations, rate_limits,
    api_usage_logs, content_cache.
  • Async SQLAlchemy + asyncpg through Neon's PgBouncer pooler.
  • 4 numbered migrations (Clerk auth · FTS via tsvector + GIN ·
    brand profiles · keep-authenticated-sessions).
  • Postgres full-text search across the user's chat history with
    ts_headline snippet rendering in the sidebar.

Clerk auth

  • JWKS-based JWT verification with TTL cache + key-rotation retry.
  • JIT user provisioning via INSERT … ON CONFLICT (clerk_user_id) DO UPDATE.
  • Optional auth on /search and /answer (guests still work);
    required on /me, /sessions, /brand-profile, history-search.

Chat redesign

  • Document-style turns — no chat bubbles, no avatars; user message
    is a small label, assistant is full-width prose.
  • Inline [N] citation pills that scroll-anchor to numbered source
    pills with a 1.2s ring-flash on click.
  • Regenerate assistant turns in place — re-calls /answer without
    re-running the search step.
  • Slash menu (/ ) in the composer with fuzzy filter, keyboard nav,
    and in-session execution.
  • Auto-growing composer with ⌘↵ to send and brand-aware static
    placeholder.
  • Brand-aware empty state — 4 starter prompts tuned to the user's
    primary channel + ICP.

Multi-page UI

  • React Router routes: /, /chat/:sessionId, /plays, /calc,
    /settings. Sticky top nav replaces the cramped left-tab pattern.
  • Sessions sidebar with FTS search, rename, archive, delete, markdown
    export.

Design system

  • Inter Variable + Inter Display (Linear's typeface stack) with OpenType
    features for the cleaner glyphs.
  • Single brand accent (desaturated indigo) via CSS variables.
  • Class-based dark mode ( .dark on <html>).
  • Constrained shadow / radius / motion scales.
  • <Button> and <Card> primitives — variants, sizes, focus-rings.

Tooling

  • scripts/push.sh — token-auth git push that never embeds creds in
    URLs and scrubs both stdout and stderr.
  • backend/scripts/init_db.py — apply schema.sql to a fresh Neon DB.
  • backend/scripts/apply_migration.py — incremental SQL migration runner.
  • backend/scripts/clerk_prune_users.py — bulk-delete inactive Clerk
    users via the Backend API (works around the dev-instance 100-user cap).
  • Branch protection live on main: PR required, linear history, no
    force-push, no deletion, admin bypass enabled for solo merge.

Production fixes shipped

  • MissingGreenlet on Render → drop pool_pre_ping, use
    pool_recycle=180 (sqlalchemy#9509 race).
  • MissingGreenlet on /brand-profile → force expire_on_commit=False.
  • "Chats vanish after 10 minutes" → migration 004:
    signed-in sessions never auto-expire; cleanup query adds
    user_id IS NULL.

Brand

  • New PaidPilot favicon, iOS touch icon, and marketing logo SVGs in
    frontend/public/.
  • Backend OpenAPI title and frontend <title> updated.
  • Full README rewrite framing the pivot.

Breaking changes

  • Anything that referenced "Mini Perplexity" in old code/docs now refers
    to PaidPilot.
  • Sessions table schema, ORM, and frontend API client all changed shape.
    No automated migration from pre-2.0 — start fresh.

What's next

See docs/product/STATUS.md for the running
roadmap. Highest-leverage next steps:

  1. Streaming answers (fake client-side reveal first, real SSE later).
  2. "Authoritative source" badge in the chat UI (backend already tags
    _authoritative: true; frontend just needs to render the mark).
  3. Meta Ad Library + Google Ads Transparency integration as the V2
    wedge.

Stack

  • Backend — FastAPI · async SQLAlchemy + asyncpg · Cloudflare Workers
    AI (LLaMA 3.1 70B) · PyJWT for Clerk · Neon Postgres.
  • Frontend — React 18 · React Router · Tailwind CSS + Typography ·
    Clerk React · Vite · Inter Variable.

Contributors

v1.0.0

02 Nov 16:23

Choose a tag to compare

Mini Perplexity v1.0.0 Release Notes

Release Date: November 2, 2024

🌐 Deployment

🎯 Major Features

AI & Search

  • Cloudflare AI integration with LLAMA_3_1_70B_INSTRUCT model
  • Real-time web search via Google and Bing APIs
  • Context-aware responses with source attribution

Security & Performance

  • Clerk authentication integration
  • Token bucket rate limiting
  • Parallel search processing
  • Session-based context management

User Interface

  • Responsive design with dark mode support
  • Interactive message interface
  • Markdown rendering
  • Dynamic loading states

🔧 Requirements

Frontend: Node.js 18+
Backend: Python 3.9+
APIs: Cloudflare AI, Google Search, Bing Search, Clerk

🐛 Known Issues

  • Search API timeout under heavy load
  • Dark mode initial load flicker
  • Session-limited message history

🚀 Quick Start

  1. Clone repo & install dependencies
  2. Configure environment variables
  3. Start development servers
    # Backend
    uvicorn app.main:app --reload
    
    # Frontend
    npm run dev

📝 Documentation

Full documentation available at:

🔄 Status

  • Live: Netlify Status

For support: GitHub Issues

Paritosh Tripathi