New: six AI app starters, tested with real usage-based billingSee AI starters

AI appsOne-timeFeatured

Ragbag

Next.js RAG starter: upload documents, chat with citations, bill by usage

About this starter

Ragbag is a starting point for chat-with-your-documents products. Users upload PDFs, Word files and web pages, which are chunked, embedded and stored in Postgres with pgvector. Chat answers stream through the Vercel AI SDK with inline citations that link back to the source page. It includes teams with shared libraries, Stripe metered billing on tokens, and an admin view of costs per account.

It is opinionated about Postgres for everything, vectors included, so there is one database to back up. Model providers are swappable through a single config file. The limitation: ingestion runs in the request cycle with a background fallback, and documents over a few hundred pages time out on serverless hosts unless you move parsing to a worker.

Highlights

  • 01Answers cite the exact page they came from
  • 02Per-account model cost tracking in admin
  • 03Switch model providers in one config file

Tags

Related starters

More in AI apps
  • Wrenfield

    AI apps

    Subscription

    Django pipeline starter for AI document extraction, priced per page

    $29/mo4.3
    • extraction
    • ocr
  • Tokenfold

    AI apps

    One-time

    Credits, metered billing and rate limits for AI products, on Next.js

    $249 once4.5
    • credits
    • stripe meters
  • Gimbal

    AI apps

    One-time

    Image-generation SaaS starter with credits, galleries and R2 storage

    $149 once4.1
    • image generation
    • credits
Live demo · First Commit Club— View template →