Skip to content
LIVE PRODUCT
nexusia.expostacker.com.br
Nexus IA — Plataforma de IA — arte do produto
live preview

Nexus IA — AI platform with 620+ endpoints, multimodal and autonomous agent

Tech stack: Next.js 16 TypeScript React AI Multi-provider BYOK
620+
REST endpoints
20+
AI models
6
Plans

Client

Nexus IA

Sector

Artificial intelligence and productivity

Timeline

Iteração contínua · 2026-08

Live product

Use now

Results

Client-reported results during rollout

620+ REST endpoints in production

Baseline: core API + /v1 gateway + backend-api

Fonte: Route handler count (Next.js)

20+ Public models in catalog

Baseline: chat, reasoning, research and voice

Fonte: Production /api/models API

6 Commercial plans in BRL

Baseline: Free, Go, Plus, Pro, Business, Enterprise

Fonte: lib/plans.ts

17 Vision analysis capabilities

Baseline: OCR, caption, classify, compare and others

Fonte: API /api/vision

20 Supported document formats

Baseline: PDF, DOCX, XLSX, PPTX and others

Fonte: API /api/documents

6 Web search engines

Baseline: with source-format citations

Fonte: API /api/search

2 Billing gateways

Baseline: Stripe (international) + Mercado Pago (BR)

Fonte: API /api/billing

100% Per-island database (dedicated Supabase)

Baseline: RLS on all tables

Fonte: ExpoStacker architecture

Client-reported data

The challenge

The challenge

Nexus IA is an AI SaaS that centralizes multiple models and capabilities in a commercial platform. It offers Nexus Auto with automatic routing to the best available model, a catalog with 20+ models (chat, reasoning, research and voice), an OpenAI-compatible gateway for external integrations, chat with persistent context memory, code assistant, multimodal (documents in 20 formats, audio, image and video), workspace with terminal and autonomous agent capable of creating files and editing projects, BYOK and 6 commercial plans in BRL.

Equipes e profissionais desperdiçam tempo alternando entre múltiplas ferramentas de IA, corrigindo respostas com acentuação quebrada e lidando com limites de uso de APIs individuais, o que reduz produtividade e aumenta custos operacionais.

The approach

The approach

The architecture migrated from a legacy Python backend to Next.js 16 with 620+ route handlers covering core API, OpenAI-compatible gateway (/v1) and backend-api — all deployed to Cloudflare Workers via OpenNext. Persistence on Supabase (Postgres + Auth + RLS), Nexus Auto picks the best available model per task, BYOK lets users connect their own key and billing runs on Stripe + Mercado Pago.

The solution

The solution

  • Nexus Auto — automatic routing to the best available model per task
  • Catalog with 20+ public models (chat, reasoning, research, voice and realtime)
  • OpenAI-compatible gateway (/v1): chat/completions, models, images, audio, realtime, assistants, threads, memories, embeddings, responses, containers, computer, videos, vision, canvas, skills and documents
  • 620+ REST route handlers: core API, /v1 gateway and compatible backend-api
  • Code assistant with generation, explanation, review and direct execution
  • Complete workspace with terminal, editor, file tree and autonomous agent
  • Autonomous agent capable of creating files, editing projects and running commands
  • Multimodal: documents in 20 formats, audio (TTS/STT/realtime), image and video
  • Web search with 6 configured engines (1 active without key) and source-format citations
  • Persistent memory with RAG, deduplication, tags and per-user history
  • Vision/OCR with 17 image analysis capabilities
  • BYOK (Bring Your Own Key) — user connects their own AI key
  • 6 commercial plans (Free, Go, Plus, Pro, Business, Enterprise) in BRL via Stripe + Mercado Pago
  • JWT authentication + Supabase Auth, httpOnly cookies and rate limiting
  • Per-island database: dedicated Supabase with RLS on all tables

Timeline

Como o projeto foi conduzido, do mapeamento ao deploy. How the project was conducted, from mapping to deploy.

Iteração 1

Fundação

  • Migration from Python backend (legacy) to Next.js App Router
  • Supabase (Postgres + Auth + RLS) as production database
  • Nexus Auto — automatic model routing
  • Deploy to Cloudflare Workers via OpenNext

Iteração 2

Produto

  • 620+ route handlers: core API, /v1 gateway and backend-api
  • Workspace with terminal, editor, file tree and autonomous agent
  • Multimodal: documents (20 formats), audio, image and video
  • Persistent memory with RAG and vision/OCR (17 modes)

Iteração 3

Comercial

  • 6 plans in BRL (Free to Enterprise) with Stripe + Mercado Pago
  • BYOK — user connects their own AI key
  • Per-plan real-time cost and usage control
  • Commercial landing with SEO and sitemap

Methodology

Como o projeto foi conduzido, do mapeamento ao deploy. How the project was conducted, from mapping to deploy.

1

Incremental migration from Python legacy to Next.js (API by API)

2

Routing and fallback tests across models/providers

3

SEO, accessibility and responsiveness audit

4

JWT auth + Supabase Auth + RLS validation

5

ExpoStacker component standards and design tokens

Architecture

Usuário
Navegador + Workspace
Next.js 16
620+ endpoints · Nexus IA
Providers
Multi-provider + BYOK
Supabase (Postgres + Auth)
Gateway /v1 OpenAI-compatible
Multimodal (docs/áudio/img/vídeo)
Stripe + Mercado Pago
  • → Next.js 16 App Router with 620+ route handlers (Edge + Node.js runtime)
  • → OpenAI-compatible gateway at /v1 for external integrations
  • → Nexus Auto picks the best available model per task
  • → Supabase (Postgres + Auth + RLS) as production database
  • → React workspace with terminal, editor, file tree and autonomous agent
  • → Multimodal: documents (20 formats), audio, image, video, vision/OCR
  • → Stripe + Mercado Pago billing with 6 plans in BRL
  • → Deploy on Cloudflare Workers via OpenNext (worker nexus-ai-bark)
  • → BYOK and per-plan real-time cost control

Conceptual diagram — does not reflect real implementation

Tech stack

Technical choices and what was left out.

ai

Next.js 16

Why: App Router with 620+ route handlers — front and API on the same edge runtime

Rejected alternative: Separate FastAPI (migration complete)

TypeScript

Why: End-to-end typing — model catalog, billing and API contracts

Rejected alternative: Plain JavaScript (less refactor safety)

Supabase

Why: Postgres + Auth + RLS — dedicated database per product

Rejected alternative: Local SQLite (MVP, doesn't scale)

Cloudflare Workers

Why: Global edge deploy via OpenNext with managed secrets

Rejected alternative: Dedicated VPS (higher cost and ops)

ai

React

Why: Interactive workspace and SSE-streamed chat

Rejected alternative: Vanilla HTML (no rich state)

Tailwind

Why: Tokens consistent with ExpoStacker

Rejected alternative: Plain CSS (slower to prototype)

Zustand

Why: Global chat/workspace state without boilerplate

Rejected alternative: Redux (more verbose)

ai

Multi-provider + BYOK

Why: Automatic routing + user's own key as alternative path

Rejected alternative: Single provider (single point of failure)

Stripe

Why: Subscriptions and checkout for international customers

Rejected alternative: Manual payment (doesn't scale)

Mercado Pago

Why: PIX, boleto and card for the Brazilian market

Rejected alternative: Stripe alone (no native PIX/boleto)

ai

Terminal + Editor

Why: Workspace with real terminal and code editor in the browser

Rejected alternative: No workspace (chat only)

RAG + Memory

Why: Persistent per-user context with deduplication and tags

Rejected alternative: No memory (session lost)

SSE Streaming

Why: Real-time token-by-token responses

Rejected alternative: Full request/response (slow UX)

Decision log

What I chose, what I rejected, and why.

Migration from FastAPI to Next.js

Why: Unifies front and back on the same edge runtime, removes the need to host two services and leverages Cloudflare Workers deploy with managed secrets.

Rejected alternatives: Keep separate FastAPI (more deploy complexity), serverless on another provider

Supabase instead of SQLite

Why: Supabase provides Postgres + Auth + RLS ready for production with row-level isolation — SQLite was fine for MVP but doesn't scale or offer native auth.

Rejected alternatives: Hosted Postgres (more ops), Firebase (greater lock-in)

OpenAI-compatible gateway at /v1

Why: Lets any tool that talks to the OpenAI API integrate with Nexus without customization — expanding product reach.

Rejected alternatives: Closed custom API (fewer integrations), GraphQL (unnecessary complexity)

Dual billing: Stripe + Mercado Pago

Why: Stripe covers international customers; Mercado Pago offers PIX and boleto — essential for the Brazilian market.

Rejected alternatives: Stripe only (no native PIX/boleto), Mercado Pago only (smaller international coverage)

AI Assistant

Intelligent routing pipeline

1

User sends the message and selects the model (or Nexus Auto)

2

System checks model availability and user plan

3

Router selects the provider with the best availability score

4

BYOK lets the user's own key be used when configured

5

Automatic fallback on failure, timeout or quota exceeded

6

Response is streamed via SSE, cost is calculated and recorded in Supabase

Engagement mechanics

Progressive plans

6 plans (Free to Enterprise) unlock more models, multimodal and higher limits — clear upgrade progression.

Active workspace

Projects, files, terminal and autonomous agent keep the user returning to the environment.

Nexus Auto

Automatic routing teaches the user to trust the platform to pick the best model per task.

Gamified multimodal

Documents, audio, image and video unlocked per tier — visual progression that drives upgrades.

BYOK

User connects their own AI key and expands limits without changing plans.

Security and access

Security and compliance

  • External API keys never exposed in the front-end — backend only

  • JWT authentication + Supabase Auth with httpOnly cookies

  • bcrypt password hashing, change via dedicated endpoint

  • RLS (Row-Level Security) on all Supabase tables

  • Rate limiting on routes per IP and per plan

  • CORS restricted to configured origins

  • Email verification, password recovery and usage reset

  • Plan validation in the backend from the JWT token

  • BYOK — user keys stored encrypted

Lessons learned

Not everything went as planned.

— Sharing global async HTTP clients between synchronous requests causes event loop errors — per-request clients solve timeouts and encoding. Migrating from FastAPI to Next.js centralized front and back on the same edge runtime, simplifying deploy. Per-island databases (dedicated Supabase per product) protect the rest of the ecosystem from local failures.

Want a product like this?

I can do the same for your business. Let's talk.