NEURON // LLM Platform

Full-stack multi-model AI platform with auth, conversation history, agent pipelines, model comparison, and Stripe-powered subscriptions. Built with Next.js 16, Supabase, and Pollinations.ai.

#nextjs#react#supabase#stripe#tailwindcss#ai#llm#pollinations#netlify

The Model Fragmentation Challenge in AI Workflows

Relying on a single proprietary foundation model creates significant operational risks for engineering teams:

  1. Vendor Lock-In & Unpredictable Pricing: APIs change pricing models and deprecate model checkpoints without extended notice.
  2. Domain Strengths Disparity: Certain models excel at algorithmic code synthesis (Claude 3.5 Sonnet), while others dominate low-latency conversational reasoning or open-source local execution (Llama 3, Mistral).
  3. No Direct Ground-Truth Comparison: Prompt engineers frequently test identical prompts across separate browser tabs, losing side-by-side token streaming, latency benchmarks, and comparative evaluation.

NEURON is an open-access multi-model AI platform built on Next.js 16 (App Router) and Supabase that executes simultaneous comparative inference across multiple LLMs, provides autonomous multi-agent editing pipelines, and persists conversation histories with strict tenant isolation.

NEURON Multi-Model AI Chat & Workflow Interface


System Architecture & Data Flow

┌────────────────────────────────────────────────────────────────────────┐
│                        NEURON Architecture Flow                        │
├────────────────────────────────────────────────────────────────────────┤
│ Client Browser ───> Next.js 16 Edge API Route                          │
│                           │                                            │
│                           ├──> Parallel Dispatch (Model Gateway)       │
│                           │    ├── Model A (e.g. Claude 3.5) ──┐       │
│                           │    ├── Model B (e.g. GPT-4o)     ──┼─> SSE │
│                           │    └── Model C (e.g. Llama 3)    ──┘ Stream│
│                           │                                            │
│                           ├──> Supabase Auth & PostgreSQL (RLS Guard)   │
│                           │                                            │
│                           └──> Stripe Webhook Handler (Subscription)   │
└────────────────────────────────────────────────────────────────────────┘

1. Parallel Multi-Model Comparative Inference

  • Employs asynchronous streaming handlers that dispatch a single user prompt across multiple model providers simultaneously.
  • Server-Sent Events (SSE) stream tokens into independent comparative columns, enabling real-time side-by-side analysis of reasoning depth, hallucination rates, and generation speed.

2. Autonomous Multi-Agent Content Pipeline

  • Implements a staged agent workflow for technical documentation and drafting:
    • Stage 1 (Writer Agent): Generates structured drafts from technical briefs.
    • Stage 2 (Reviewer Agent): Runs an automated inspection pass that highlights generic AI writing tropes, repetitive cadence, and passive voice, providing line-by-line editorial suggestions.

3. Tenant Data Isolation via Supabase RLS

  • All conversation threads, user messages, and custom system prompts are stored in PostgreSQL with strict Row-Level Security (RLS) policies.
  • Guarantees that users can only read and mutate their own conversation state, even when public sharing links (/share/[id]) generate immutable public snapshots.

4. Idempotent Stripe Subscription Lifecycle

  • Integrated Stripe Checkout supporting NEURON Pro (9/mo) and NEURON Team (29/mo) tiers.
  • Webhook ingestion verifies cryptographic signatures and uses idempotent database upserts to guarantee subscription entitlement updates without duplicate billing events.

Tech Stack & Infrastructure

  • Frontend: Next.js 16 (App Router), React 19, Tailwind CSS (Custom Cyberpunk Token Palette)
  • Backend: Next.js Server Actions & Edge API Routes
  • Authentication & Database: Supabase (PostgreSQL with Row-Level Security, Cookie Sessions)
  • Model Gateway: Unified multi-model proxy (Pollinations.ai integration)
  • Payments: Stripe Checkout & Webhook Pipeline
  • Hosting: Netlify / Vercel Edge