Early Bird · 15% off

Marginalia - Chat With Your Documents - Next.js AI SaaS Template

Marginalia - Chat With Your Documents - AI SaaS template preview

About this template

Marginalia is the first genuinely functional AI product in the catalog - retrieval and generation actually run against real documents, not a marketing page about AI. Upload PDFs and documents, ask questions in natural language, and get streamed, cited answers where every claim links to the exact source passage and page. It ships the whole product spine: a marketing landing that demos the citation-linked chat, pricing, full auth (login, signup), a 3-step onboarding wizard, a gated app shell with sidebar and workspace switcher, a dashboard launcher that turns a question into a live cited answer, a document library with an animated ingestion state machine, a source viewer that citations deep-link into, the two-pane citation chat (the signature 'citation-as-source-preview' interaction), settings, and billing. Single-database architecture: app data and vectors both live in Neon Postgres via pgvector - one connection string, no separate vector service. Model-agnostic by construction: every AI call routes through the Vercel AI Gateway using 'provider/model' strings, so you swap models without touching code. Runs zero-config in demo mode (a seeded, pre-embedded corpus) and flips to the real R2 + embedding + pgvector pipeline behind documented seams. The 'Reading Room' design system - warm porcelain neutrals, an espresso-and-sienna palette, and Fraunces editorial serif - reskins from a few CSS variables. Flash-free light and dark mode, fully responsive, strict TypeScript, deterministic SSR (no hydration mismatches), zero backend required to run.

What's included

Functional RAG: retrieval + generation run against real documents
Citation-as-source-preview: hover a citation to reveal the exact passage
Streamed answers with inline citations that deep-link to the source page
Document library with an animated ingestion state machine (queued -> ready)
Single database - app data and vectors in Neon Postgres via pgvector
Model-agnostic via the Vercel AI Gateway ('provider/model' strings)
Zero-config demo mode (seeded corpus) with documented live-mode seams
Full auth, 3-step onboarding, gated app shell with workspace switcher
Dashboard launcher that turns a question into a live cited answer
Billing UI: plans, usage meters, invoices - wire Dodo where marked
'Reading Room' design - porcelain + espresso/sienna, Fraunces serif
Flash-free light and dark mode, fully responsive, strict TypeScript

Pages Included

LandingPricingLoginSignupOnboardingWorkspace overviewDocumentsSource viewerChatSettingsBilling

Solo license

$79.00

Solo license · one-time payment

View Pricing PlansLive Preview

One-time purchase · Instant delivery via email

Need custom changes?

Brand colors, new pages, integrations - we build it for you.

Request Customization

We'll get back to you within 24 hours

Tech Stack

Next.js16
React19
TailwindCSS v4
TypeScriptLatest

Every Plan Includes

Full source code
Commercial license
Documentation
Dark & light mode
Responsive design
Updates (plan-based)

Pricing

Choose your plan

One-time purchase. No subscriptions, no renewals.

Solo

1 developer

$79$150

per template, one-time payment

  • Full source code
  • 1 developer license
  • 1 end product
  • Own products only
  • 6 months of updates
  • Email support (48h)
Most Popular

Team

Up to 5 developers

$149$299

per template, one-time payment

  • Full source code
  • Up to 5 developers
  • Up to 5 end products
  • Client work permitted
  • 1 year of updates
  • Priority email support (24h)

Agency

Unlimited developers

$299$499

per template, one-time payment

  • Full source code
  • Unlimited developers
  • Unlimited end products
  • Client work permitted
  • Lifetime updates
  • Priority support
  • Dedicated onboarding call