<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/supavec-open-source-rag-as-a-service-you-can-spin-up-in-minutes-6zyl5mmwe" -->

---
title: Supavec: Open-Source RAG-as-a-Service You Can Spin Up in...
description: Supavec is an open-source RAG-as-a-Service platform that wraps the full retrieval-augmented generation stack behind a simple REST API. Built on Next.js,...
canonical: https://daily.dev/posts/supavec-open-source-rag-as-a-service-you-can-spin-up-in-minutes-6zyl5mmwe
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Supavec: Open-Source RAG-as-a-Service You Can Spin Up in Minutes | daily.dev
og:description: Supavec is an open-source RAG-as-a-Service platform that wraps the full retrieval-augmented generation stack behind a simple REST API. Built on Next.js,...
og:url: https://daily.dev/posts/supavec-open-source-rag-as-a-service-you-can-spin-up-in-minutes-6zyl5mmwe
og:image: https://api.daily.dev/og/posts/6zYL5MMwe.png
og:image:alt: Supavec: Open-Source RAG-as-a-Service You Can Spin Up in Minutes
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Supavec: Open-Source RAG-as-a-Service You Can Spin Up in Minutes

**[selfhosted](https://daily.dev/sources/selfhosted)** · [@ramezhanna](https://daily.dev/ramezhanna) · 2 min read · 3 upvotes · 0 comments

## Summary

Supavec is an open-source RAG-as-a-Service platform that wraps the full retrieval-augmented generation stack behind a simple REST API. Built on Next.js, Supabase, Bun, and Upstash with TypeScript, it uses pgvector on Postgres for vector storage. Notable design choices include multi-tenancy via Supabase Row-Level Security, batch embeddings in 100-doc chunks (reportedly cutting OpenAI costs ~65%), hybrid retrieval combining file-level filtering with cosine similarity at ~210ms P95, and per-request streaming support via a single flag.

## Content

If you've ever built a RAG feature from scratch, you know the drill: chunking pipelines, embedding jobs, a vector store, retrieval tuning, rate limiting, and a chat endpoint on top. It's a lot of plumbing before you ship anything users actually see.

**Supavec** (github.com/supavec/supavec) takes a different approach, it's an open-source alternative to [Carbon.ai](http://Carbon.ai) that packages the whole RAG layer behind a simple REST API. Upload your data, get back vector search and a chat endpoint. The pitch is "vector search + chat API in under 5 minutes," and the repo largely delivers on it.

## What's under the hood

Stack: **Next.js + Supabase + Bun + Upstash**, with **TypeScript** making up ~89% of the codebase and **pgvector** doing the heavy lifting on the **Postgres** side.

A few design decisions worth noting for anyone building similar systems:

**Multi-tenancy via Row-Level Security.** Instead of application-level tenant filtering, team isolation is enforced at the database layer with Supabase RLS. If you're building B2B SaaS on Postgres, this is the pattern to study.

**Batch embeddings for cost control.** Documents are embedded in 100-doc batches, which the team reports cuts OpenAI embedding costs by ~65% while also reducing latency.

**Hybrid retrieval.** Queries combine file-level filtering with cosine similarity, hitting a P95 of ~210ms. Chunk size and overlap are configurable, which they claim adds ~12 points of recall over defaults.

**Streaming or standard responses per request.** A single `stream: true` flag on the chat endpoint.

🔗 [https://github.com/supavec/supavec](https://github.com/supavec/supavec)

## Similar posts on daily.dev

- [How to Build an AI-Powered RAG Search Application with Next.js, Supabase, and OpenAI](https://daily.dev/posts/how-to-build-an-ai-powered-rag-search-application-with-next-js-supabase-and-openai-twprkjxz1) · freeCodeCamp · 3 upvotes · 0 comments
- [Building a RAG Application with Spring Boot, Spring AI, MongoDB Atlas Vector Search, and OpenAI](https://daily.dev/posts/building-a-rag-application-with-spring-boot-spring-ai-mongodb-atlas-vector-search-and-openai-vhyy5w1do) · InfoQ · 2 upvotes · 0 comments
- [RAG with Spring AI](https://daily.dev/posts/rag-with-spring-ai-aalrsnemm) · Javarevisited · 6 upvotes · 0 comments
- [Open Source Retrieval Infrastructure Can Fix AI’s Production Gap](https://daily.dev/posts/open-source-retrieval-infrastructure-can-fix-ai-s-production-gap-ev2i9xzuo) · The New Stack · 1 upvotes · 0 comments

---

Tags: [#postgresql](https://daily.dev/tags/postgresql), [#rag](https://daily.dev/tags/rag), [#vector-search](https://daily.dev/tags/vector-search), [#supabase](https://daily.dev/tags/supabase), [#pgvector](https://daily.dev/tags/pgvector)

[View this post on daily.dev](https://daily.dev/posts/supavec-open-source-rag-as-a-service-you-can-spin-up-in-minutes-6zyl5mmwe)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/supavec-open-source-rag-as-a-service-you-can-spin-up-in-minutes-6zyl5mmwe","headline":"Supavec: Open-Source RAG-as-a-Service You Can Spin Up in Minutes","text":"Supavec is an open-source RAG-as-a-Service platform that wraps the full retrieval-augmented generation stack behind a simple REST API. Built on Next.js, Supabase, Bun, and Upstash with TypeScript, it uses pgvector on Postgres for vector storage. Notable design choices include multi-tenancy via Supabase Row-Level Security, batch embeddings in 100-doc chunks (reportedly cutting OpenAI costs ~65%), hybrid retrieval combining file-level filtering with cosine similarity at ~210ms P95, and per-request streaming support via a single flag.","url":"https://daily.dev/posts/supavec-open-source-rag-as-a-service-you-can-spin-up-in-minutes-6zyl5mmwe","datePublished":"2026-08-05T03:59:21.778Z","dateModified":"2026-09-13T20:52:46.668Z","author":{"@type":"Person","name":"Ramez Ezzat","url":"https://daily.dev/ramezhanna","image":"https://lh3.googleusercontent.com/a/AGNmyxY-70CMxAotAeASOu_ajfAkSJbSj1qk1EsJ1olxYQ=s96-c","description":"Engineering leader building fintech & consumer platforms across MENA · Go · Python · Flutter\n","worksFor":{"@type":"Organization","name":"Tarmeez","logo":"https://media.daily.dev/image/upload/s--xc1Bhumy--/f_auto/v1749211500/companies/tarmeez"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":70}},"image":"https://media.daily.dev/image/upload/s---Ie77_YO--/f_auto/v1783504837/posts/sXhT1V8Ie?_a=BAMAMicg0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/selfhosted","name":"selfhosted"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"selfhosted","item":"https://daily.dev/squads/selfhosted"},{"@type":"ListItem","position":3,"name":"Supavec: Open-Source RAG-as-a-Service You Can Spin Up in Minutes"}]}
```

