MCP ConfigsApr 2, 2026·3 min read

PocketBase — Backend in One File for AI Apps

Open-source backend with database, auth, file storage, and admin UI in a single executable. Perfect for AI app backends. 57K+ stars.

TO
TokRepo精选 · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

Download the binary for your platform from [GitHub Releases](https://github.com/pocketbase/pocketbase/releases): ```bash # macOS / Linux wget https://github.com/pocketbase/pocketbase/releases/latest/download/pocketbase_0.25_linux_amd64.zip unzip pocketbase_*.zip ./pocketbase serve ``` Open `http://localhost:8090/_/` — admin dashboard is ready. Create a collection, add fields, and you have a full REST API: ```bash # Create a record curl -X POST http://localhost:8090/api/collections/posts/records \ -H 'Content-Type: application/json' \ -d '{"title": "Hello AI", "content": "First post from my AI app"}' # List records curl http://localhost:8090/api/collections/posts/records # Real-time subscriptions (SSE) curl http://localhost:8090/api/realtime ``` ---
Intro
PocketBase is an open-source backend with 57,300+ GitHub stars that packages a real-time database, authentication, file storage, and admin dashboard into a single executable file — zero external dependencies. Written in Go with an embedded SQLite database, it's the fastest way to build a backend for AI applications, chatbots, agent dashboards, or any project that needs a quick, reliable API. Create collections in the admin UI, and PocketBase auto-generates REST and real-time APIs. Used as the backend for countless AI projects, RAG apps, and LLM-powered tools. Works with: Any frontend (React, Vue, Svelte, Next.js), any AI framework, Go (as a library). Best for developers who need a production backend in minutes, not weeks. Setup time: under 1 minute. ---
## PocketBase Architecture ### Single File = Complete Backend ``` pocketbase (single binary, ~40MB) ├── SQLite Database (embedded) ├── REST API (auto-generated) ├── Real-time Subscriptions (SSE) ├── Authentication (email, OAuth2) ├── File Storage (local or S3) └── Admin Dashboard (built-in web UI) ``` ### Auto-Generated REST API Create a collection in the admin UI → API endpoints are instantly available: | Method | Endpoint | Description | |--------|----------|-------------| | GET | `/api/collections/{name}/records` | List records | | POST | `/api/collections/{name}/records` | Create record | | GET | `/api/collections/{name}/records/{id}` | Get record | | PATCH | `/api/collections/{name}/records/{id}` | Update record | | DELETE | `/api/collections/{name}/records/{id}` | Delete record | ### Authentication Built-in auth with zero configuration: ```bash # Register a user curl -X POST http://localhost:8090/api/collections/users/records \ -d '{"email": "user@example.com", "password": "12345678", "passwordConfirm": "12345678"}' # Login curl -X POST http://localhost:8090/api/collections/users/auth-with-password \ -d '{"identity": "user@example.com", "password": "12345678"}' # Returns JWT token ``` OAuth2 providers: Google, GitHub, Facebook, Apple, Discord, Microsoft, and more. ### Real-Time Subscriptions ```javascript import PocketBase from 'pocketbase'; const pb = new PocketBase('http://localhost:8090'); // Subscribe to changes pb.collection('messages').subscribe('*', (e) => { console.log('New message:', e.record); }); ``` ### Use Cases for AI Apps | Use Case | How PocketBase Helps | |----------|---------------------| | **AI Chat App** | Store conversations, user accounts, file attachments | | **RAG Dashboard** | Store documents, embeddings metadata, query logs | | **Agent Platform** | Store agent configs, execution logs, user sessions | | **LLM Playground** | Store prompts, responses, model configs | | **API Backend** | REST API for any AI frontend in seconds | ### Extend with Go ```go package main import ( "github.com/pocketbase/pocketbase" "github.com/pocketbase/pocketbase/core" ) func main() { app := pocketbase.New() app.OnServe().BindFunc(func(se *core.ServeEvent) error { se.Router.GET("/api/custom/ai-status", func(e *core.RequestEvent) error { return e.JSON(200, map[string]string{"status": "running"}) }) return se.Next() }) app.Start() } ``` --- ## FAQ **Q: What is PocketBase?** A: PocketBase is an open-source backend with 57,300+ GitHub stars that packages database, auth, file storage, and admin UI into a single executable. Zero dependencies, instant REST APIs. **Q: Why use PocketBase for AI projects?** A: AI apps need user auth, data storage, file handling, and real-time updates. PocketBase provides all of these in a single binary you can deploy anywhere — no Docker, no database setup, no infrastructure. **Q: Is PocketBase free?** A: Yes, fully open-source under MIT license. ---
🙏

Source & Thanks

> Created by [Gani Georgiev](https://github.com/pocketbase). Licensed under MIT. > > [pocketbase](https://github.com/pocketbase/pocketbase) — ⭐ 57,300+ Thanks to Gani Georgiev for building the simplest path from zero to production backend.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets