AI / Full Stack · 2026

Mentis AI

Mentis AI is a full stack AI workspace built with Next.js 16, Vercel AI SDK, Better Auth, and PostgreSQL. Users can interact with OpenAI, Anthropic, and Gemini models using encrypted keys, streaming responses, server tools (Web Search, URL Reader, Calculator, Search), conversation branching, and PDF or Markdown exporting.

Mentis AI screenshot 1
Mentis AI screenshot 2
Mentis AI screenshot 3
Mentis AI screenshot 4
Mentis AI screenshot 5
Mentis AI screenshot 6
Mentis AI screenshot 7
Problem

Users are often locked into single AI provider platforms or forced to pay subscription fees across multiple services without being able to bring their own API keys, run custom tools (like web search or webpage reading), search past message history, or branch conversation turns cleanly.

Approach

Built Mentis AI as a unified multi-provider AI assistant environment utilizing Next.js 16 App Router, React 19, and Drizzle ORM. Integrated Vercel AI SDK with custom provider adapters, client/server AES-256 key encryption, PostgreSQL full-text search, Better Auth, and a domain-driven tool suite (Tavily Web Search, URL Fetcher, Safe Math Calculator, Date/Time Manager, and Full-Text Message Search).

Key Features
Multi-Provider BYOK: Connect OpenAI, Anthropic, or Google Gemini API keys with AES-256 encryption.
Integrated AI Tools Suite: Live web search (Tavily API), URL content fetcher with SSRF protection, safe math calculator, date/time manager, and conversation/message search.
Full-Text Message Search: Native PostgreSQL full-text search (to_tsvector / websearch_to_tsquery) across all past user messages.
Real-Time Response Streaming: Ultra-low latency streaming powered by Vercel AI SDK and custom UI message streams.
Conversation Branching & Versioning: Retry assistant responses to generate alternative versions without losing prior history.
Custom System Instructions: Define per-chat custom system prompts to tailor AI behavior and outputs.
Exporting & Sharing: Export chats to PDF, Markdown, or JSON cleanly, and share via public links.
Token & Cost Tracking: Dynamic latency measurements, input/output token analysis, and model cost calculations per turn.
Modern Dark-First UI: WCAG 2.2 AA compliant UI built with Tailwind CSS v4, Geist typography, shadcn/ui, and micro-animations.
Outcome

Delivered a high-performance, privacy-respecting AI workbench where users control their API keys, chat trajectories, and model preferences with zero platform lock-in. Features rich conversation branching, custom system prompts per chat, request latency and token cost tracking, and export options to PDF, Markdown, and JSON.

Designed with a decoupled provider architecture, server tool execution engine, and dynamic key injection with AES 256 encryption.
Tech Stack
Next.jsNext.js
TypeScriptTypeScript
Tailwind CSSTailwind CSS
ShadcnShadcn
PostgreSQLPostgreSQL
DrizzleDrizzle
BetterAuthBetterAuth
OpenAI SDKOpenAI SDK
Gemini APIGemini API
VercelVercel
Year

2026

Category

AI / Full Stack