Skip to main content
FastAPI + Next.js 15

Ship your AI SaaS in days.

FastAPI + Next.js with token billing built in.

Native Python (LangChain/DSPy), pgvector RAG with RLS, SSE streaming, and Stripe metered billing.

100% free to join ($0 today) • Early-bird price offered to the first 100 waitlist members at launch.
FastAPI 3.12
Pydantic v2 & Async I/O
Next.js 15
App Router & Server Actions
pgvector + RLS
HNSW Cosine Vector Search
Stripe Metering
Per-token billing API sync
Interactive Production Console

The Production Dashboard

Experience the live dual-stack interface: test real-time token streaming, semantic pgvector search, and automated Stripe metered billing.

agentlaunch.pysaas.dev/dashboard
Model:
SSE Bridge Ready

FastAPI + pgvector SSE Bridge Ready

Type a prompt or choose a quick suggestion below to test real-time token streaming.

JWT Bridge Active•Press ↵ to send
Suggestions:
Session TelemetryLive
Time to First Token:0 ms
Input Tokens:0 tokens
Output Tokens:0 tokens
Total Billed:0 tokens
STRIPE METER EVENT200 OK
meter_event:recorded
Customer: cus_live_948a
Endpoint: POST /v1/billing/meter_events
Status: SSE Bridge Ready
Architecture design: tokens streamed through FastAPI are accumulated in-memory and reported to Stripe upon stream completion.
Preview

Code preview

Clean, modular, and strictly typed code. See how data flows from Next.js 15, is authorized in FastAPI, and streamed back with Stripe metering.

agentlaunch/ (private repo)
EXPLORER
📁 backend/
📁 frontend/
📁 supabase/
backend/api/core/auth.py
Zero-Trust Supabase JWT validation with PyJWT, explicit algorithm allowlist, and generic 401
import logging
from fastapi import Depends, HTTPException, status
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
import jwt
from jwt import PyJWKClient, PyJWTError
from api.core.config import settings

logger = logging.getLogger(__name__)
security = HTTPBearer()

# Supabase asymmetric keys (ES256 / RS256) are validated via the JWKS endpoint;
# symmetric keys (shared secret) are strictly restricted to HS256.
jwks_client = PyJWKClient(f"{settings.SUPABASE_URL}/auth/v1/.well-known/jwks.json")

async def get_current_user(
    credentials: HTTPAuthorizationCredentials = Depends(security)
) -> dict:
    """
    Zero-Trust JWT verification dependency using PyJWT.
    Validates cryptographic Supabase signature with strict algorithm allowlists.
    Never trusts client-supplied identity; logs errors server-side and returns generic 401.
    """
    token = credentials.credentials
    try:
        unverified_header = jwt.get_unverified_header(token)
        algorithm = unverified_header.get("alg")

        if algorithm == "HS256":
            # Shared secret symmetric verification strictly restricted to HS256
            payload = jwt.decode(
                token,
                settings.SUPABASE_JWT_SECRET,
                algorithms=["HS256"],
                audience="authenticated"
            )
        elif algorithm in ["ES256", "RS256"]:
            # Asymmetric key verification strictly restricted to ES256 / RS256 via JWKS
            signing_key = jwks_client.get_signing_key_from_jwt(token)
            payload = jwt.decode(
                token,
                signing_key.key,
                algorithms=["ES256", "RS256"],
                audience="authenticated"
            )
        else:
            logger.warning(f"Rejected unsupported JWT algorithm: {algorithm}")
            raise HTTPException(
                status_code=status.HTTP_401_UNAUTHORIZED,
                detail="Invalid or expired token"
            )

        user_id: str = payload.get("sub")
        if not user_id:
            logger.warning("JWT payload missing 'sub' claim")
            raise HTTPException(
                status_code=status.HTTP_401_UNAUTHORIZED,
                detail="Invalid or expired token"
            )

        return {
            "id": user_id,
            "email": payload.get("email"),
            "role": payload.get("role", "authenticated")
        }
    except PyJWTError as e:
        logger.warning(f"JWT verification failed: {e}")
        raise HTTPException(
            status_code=status.HTTP_401_UNAUTHORIZED,
            detail="Invalid or expired token"
        )
Build in Public Roadmap

Current Build Progress

I'm building this in public. Follow along on X and LinkedIn.

Phase 1

Foundation + auth

Done

FastAPI architecture, Supabase Auth JWT verification bridge, and environment setup

Phase 2

Streaming chat + history

Done

Server-Sent Events (SSE) token generator and chat session persistence

Phase 3

RAG + document ingestion

In Progress

pgvector HNSW cosine index migrations with native tenant RLS policies

Phase 4

Billing, usage limits, rate limiting

Planned

Stripe metered usage billing sync, rate limits, and token counters

Phase 5

Docs, Docker + uv setup, launch checks

Planned

Complete developer documentation, multi-stage Dockerfiles, and pre-launch checks

Why AgentLaunch Wins

Why Other Approaches Fall Short for ML Engineers

Node.js boilerplates force you into weak JavaScript AI libraries. Streamlit apps don't look like real B2B software. AgentLaunch gives you the best of both worlds.

AI / ML Library Ecosystem

AgentLaunchRecommended
Full native Python 3.12 (LangChain, DSPy, PyTorch, Hugging Face)
Others
Node.js: JavaScript AI libraries (LangChain.js, Vercel AI SDK); external Python services required for native PyTorch or DSPy
Streamlit / Reflex: Native Python ecosystem, designed primarily for dashboards and interactive prototypes

Frontend UI & User Experience

AgentLaunchRecommended
Linear-style Next.js 15 App Router + Tailwind & Framer Motion
Others
Node.js: Modern Next.js/React frontend with Node.js backend routes
Streamlit / Reflex: Standard component library with limited CSS flexibility

Billing Model for AI Tokens

AgentLaunchRecommended
Automated Stripe Metered / Usage-Based Billing per token
Others
Node.js: Typically configured for fixed subscription plans; token-metered events require custom sync logic
Streamlit / Reflex: Requires third-party integrations or custom payment middleware

Streaming Protocol

AgentLaunchRecommended
Low-latency Server-Sent Events (SSE) with token live-counter
Others
Node.js: Server-Sent Events or WebSockets handled through Node.js/Edge runtimes
Streamlit / Reflex: WebSocket connection with script re-execution on user interaction

Multi-Tenant Vector Isolation

AgentLaunchRecommended
Postgres pgvector with native Row-Level Security (RLS)
Others
Node.js: Multi-tenant isolation managed at application layer or external vector database
Streamlit / Reflex: Local embedded vector stores (Chroma, FAISS) commonly run single-process

Zero-Trust Auth Bridge

AgentLaunchRecommended
Supabase JWT validated cryptographically in FastAPI Depends
Others
Node.js: Authentication handled in Node.js runtime (Auth.js / NextAuth)
Streamlit / Reflex: Community auth components or reverse proxy access control

Comparison as of October 2026

System Blueprint

Engineered for Separation of Concerns

No messy monolithic compromises. Keep your frontend fast and SEO-ready on Vercel while running your heavy AI workloads on high-throughput Python backends.

Layer 1

Next.js 15 Frontend

App Router & React Server Components. Manages sessions, handles SSR, renders the UI, and opens an SSE stream listener.

Next.js 15TypeScriptTailwind CSSFramer Motion
Secure Bridge

SSE & JWT Protocol

Zero-Trust authorization. Supabase JWT passed via Bearer header. Server-Sent Events stream tokens smoothly with low-latency TTFT.

text/event-streamBearer JWTCORS Middleware
Layer 2

FastAPI Python Runtime

Native Python 3.12 ecosystem. Executes LangChain, LlamaIndex, DSPy, or custom PyTorch models with Pydantic v2 validation.

Python 3.12FastAPIPydantic v2LangChain
Storage & RAG

Supabase + pgvector

PostgreSQL 16 with HNSW cosine distance indexing for ultra-fast vector similarity search, enforced by native Postgres RLS policies.

pgvectorPostgreSQL 16Supabase AuthRow Level Security
Automated Stripe Metered Billing (Token Usage)
Set per-user token quotas and meter usage per 1k tokens.
Stripe Usage-Based Metering Architecture
Production Scope

Planned for v1

Every core capability engineered for machine learning engineers to ship production AI SaaS products.

Planned

SSE Streaming Chat

Native FastAPI Server-Sent Events yielding token chunks dynamically without blocking the main event loop.

Planned

Supabase JWT Bridge

Zero-Trust cryptographic token verification in FastAPI Depends. Never trusts client user parameters.

Planned

pgvector RAG with RLS

PostgreSQL 16 vector storage with HNSW cosine distance search, isolated per-tenant via Row-Level Security.

Planned

Document Ingestion

Clean pipelines for parsing, chunking, and embedding PDF, Markdown, and text files into pgvector tables.

Planned

Auth UI

Pre-built Next.js 15 authentication screens for email/password, magic links, and OAuth powered by Supabase.

Planned

Chat History

Persistent conversation threads and message logs with tenant isolation and fast retrieval.

Planned

Usage Limits

Configurable per-user and per-workspace token quotas preventing accidental API overages.

Planned

Rate Limiting

High-performance token bucket and IP rate limiters on AI generation and vector search endpoints.

Planned

Stripe Metered Billing

Automated token calculation and Stripe Meter Event logging before SSE stream closure.

Planned

Docker + uv Setup

Fast, deterministic Python dependency management via uv and multi-stage production Dockerfiles.

Planned

Complete Documentation

Step-by-step setup guides, architecture blueprints, environment reference, and deployment checklists.

Future Roadmap:
Teams and organizationsObservability (Langfuse / LangSmith)Admin cost dashboardMore LLM providers (Anthropic, DeepSeek, Ollama)Transactional email templates
Built by Yogesh

Yogesh

Solo builder • 3+ years production React, Next.js and real-time streaming, now building AI and MLOps tooling.

Why I Built AgentLaunch

I built AgentLaunch because existing AI boilerplates ignore the reality of how machine learning works. Almost every popular SaaS template on the market is 100% JavaScript. But ML engineers, data scientists, and AI researchers build their models in Python—using LangChain, DSPy, PyTorch, Hugging Face, and FastAPI.

When Python developers want to monetize their work, they are forced to either rewrite everything in fragile JS wrappers or spend 80+ hours figuring out cross-origin cookies, Supabase JWT verification, Server-Sent Events (SSE) buffering, and Stripe usage meters.

AgentLaunch gives you the best of both worlds: uncompromised Python compute power behind a consumer-grade, Linear-style Next.js 15 interface. Full source access, no runtime lock-in.

100% TypeScript & Typed Python
Private GitHub Repo Access at Launch
No Obfuscated Dependencies
Pre-Launch • Early-bird price offered to the first 100 waitlist members at launch

Early-Bird Pricing for Waitlist Members.

Joining the waitlist is 100% free ($0 due today). Early-bird price offered to the first 100 waitlist members at launch ($99 Solo / $199 Team) before prices increase to $149 / $299.

Solo Builder License

1 Developer
$99early-bird
$149at public launch
$0 Due Today • Free ReservationSave $50

Full production boilerplate for solo developers and ML engineers shipping commercial AI SaaS.

Next.js 15 & FastAPI Codebase: App Router, Pydantic v2, SSE stream generator (Planned)
Stripe Metered Billing: Automated token calculation & Stripe Meter logging (Planned)
Supabase pgvector RAG: HNSW cosine index migrations with native tenant RLS (Planned)
Commercial Rights: Build unlimited personal SaaS projects or commercial tools
Client Work Allowed: Deploy projects for your paying freelance clients
Reserve free spot ($99)

Free reservation • No card required today

Team License

Up to 5 Devs
$199early-bird
$299at public launch
$0 Due Today • Free ReservationSave $100

For development shops, startups, and engineering teams building commercial client platforms.

Everything in Solo License, plus:
Team Seats (up to 5 developers): Invite your engineering team to the private repository (Planned)
Unlimited Commercial Client Apps: Ship unlimited client deliverables with zero royalties
Production Docker & uv Setup: Production deployment recipes (Planned)
Reserve free spot ($199)

Free reservation • No card required today

How the Free Reservation Works
Joining the waitlist costs $0 today. When AgentLaunch launches, you will receive an invite to claim your $99 Solo or $199 Team early-bird rate before public pricing goes into effect.
Zero Payment Today
Launch checkout handled securely via Dodo Payments (MoR).
Frequently Asked Questions

Everything You Need to Know

Honest answers about architecture, licensing, build timeline, and requirements.

No. Joining the waitlist requires zero payment today ($0 due now). Early-bird price offered to the first 100 waitlist members at launch ($99 Solo / $199 Team instead of $149 / $299 regular). When AgentLaunch launches, eligible members will receive an exclusive invite to claim their license at the early-bird rate.
AgentLaunch is planned to launch soon. Waitlist members receive private early-bird access and discounted pricing as soon as pre-launch testing concludes.
During the waitlist phase, no payment is processed. At launch, purchases will be processed securely through Stripe as our authorized payment gateway (supporting global credit/debit cards, UPI, EU VAT, and country-level taxes). A 14-day refund policy applies if the codebase does not work as documented.
An interactive demonstration and walkthrough will be released once core pre-launch testing concludes. In the meantime, you can inspect the complete architecture in the Code Preview section and follow live milestones in the Build Progress section above.
During waitlist mode, joining ensures you are first in line for early-bird access. At launch, license holders receive a direct invitation to the private GitHub repository with the complete source code, deployment manifests, and documentation.
I believe in radical transparency: AgentLaunch provides the complete production code, database migrations, authentication bridges, and deployment recipes. It does not include third-party API credits (you bring your own OpenAI/Anthropic/DeepSeek API keys), hosted GPU compute instances, or custom domain names. You run the code on your own infrastructure or cloud accounts (Vercel, Railway, Supabase, Fly.io) with 100% ownership.
Backend: Python 3.12+ (strictly typed with Pydantic V2 and managed via uv). Frontend: Node.js 20+ with Next.js 15 App Router, React 19, and pnpm. All dependencies are locked with deterministic lockfiles (pnpm-lock.yaml and uv.lock).
Yes! Both the Solo Builder ($99 early-bird / $149 regular) and Team ($199 early-bird / $299 regular) licenses grant you full commercial permission to build and deploy applications for paying clients or freelance projects. You can charge clients whatever you want with zero royalty fees. The only restriction is that you cannot resell or redistribute the boilerplate source code itself as a competing template.
When you purchase a license at launch, you receive access to the private GitHub repository. As Next.js, FastAPI, LangChain, or Supabase release updates, patches and architectural improvements are pushed directly to the main branch.
Because the machine learning and AI ecosystem lives in Python (LangChain, DSPy, PyTorch, Hugging Face, NumPy, LlamaIndex). JavaScript AI packages lag months behind Python and cannot run tensor operations or local model weights efficiently. Decoupling gives you the best of both worlds: uncompromised Python AI compute with a fast and polished React web frontend.
When a user logs in via Supabase Auth in Next.js, their access token (JWT) is passed in the Authorization: Bearer <token> header with every request or SSE stream. FastAPI does not trust client parameters; it verifies the JWT cryptographic signature against Supabase's secret or JWKS using a custom Depends(get_current_user) dependency before initiating any AI workload.
AgentLaunch tracks exact input and output tokens during the SSE streaming generator. A try...finally block ensures that even if a user closes their browser mid-stream, the accumulated token count up to that point is automatically logged to the Stripe Meter Events API before the socket terminates.
The repository includes production Dockerfiles and deployment recipes: deploy the Next.js frontend to Vercel with zero-configuration SSR, and deploy the FastAPI backend container to Railway, Fly.io, Render, Modal, or AWS ECS. Simply configure your CORS origins and environment variables, and your dual-stack SaaS is ready.
Priority Waitlist

Get Early Access Before Public Launch

Joining requires zero payment today ($0 due now). Early-bird price offered to the first 100 waitlist members at launch ($99 Solo / $199 Team) with private repo invites.

Zero payment ($0 today)•Early-bird from $99 / $199•No spam. Unsubscribe anytime.