freshcrate
Home > MCP Servers > vobase

vobase

The app framework built for AI coding agents. Own every line. Your AI already knows how to build on it.

Description

The app framework built for AI coding agents. Own every line. Your AI already knows how to build on it.

README

English / δΈ­ζ–‡

vobase
The app framework built for AI coding agents.
Own every line. Your AI already knows how to build on it.

npm @vobase/core npm downloads GitHub stars Last commit License MIT Discord

BunTypeScriptHonoDrizzlePostgreSQLBetter AuthReactViteTanStackTailwind CSSshadcn/ui what you get Β· get started Β· code Β· skills Β· compare Β· docs


A full-stack TypeScript framework that gives you auth, database, storage, and jobs in a single process. Docker Compose Postgres for local dev, managed Postgres in production. Like a self-hosted Supabase β€” but you own every line of code. Like Pocketbase β€” but it's TypeScript you can read and modify.

AI coding agents (Claude Code, Cursor, Codex) understand vobase out of the box. Strict conventions and agent skills mean generated code works on the first try β€” not the third.

You own the code. You own the data. You own the infrastructure.


what you get

One bun create vobase and you have a working full-stack app:

Primitive What it does
Runtime Bun β€” native TypeScript, ~50ms startup, built-in test runner. One process, one container.
Database PostgreSQL via Drizzle. Docker Compose Postgres (pgvector/pg17) for local dev, managed Postgres in production. Full SQL, ACID transactions, pgvector for embeddings.
Auth better-auth. Sessions, passwords, CSRF. RBAC with role guards, API keys, and optional organization/team support. Org/SSO/2FA as plugins.
API Hono β€” ~14KB, typed routing, Bun-first. Every AI coding tool already knows Hono.
Audit Built-in audit log, record change tracking, and auth event hooks. Every mutation is traceable.
Sequences Gap-free business number generation (INV-0001, PO-0042). Transaction-safe, never skips.
Storage File storage with virtual buckets. Local or S3 backends. Metadata tracked in Postgres.
Channels Multi-channel messaging with pluggable adapters. WhatsApp (Cloud API), email (Resend, SMTP). Inbound webhooks, outbound sends, delivery tracking. All messages logged.
Integrations Encrypted credential vault for external services (OAuth providers, APIs). AES-256-GCM at rest. Platform-aware: opt-in multi-tenant OAuth handoff via HMAC-signed JWT.
Jobs Background tasks with retries, cron, and job chains. pg-boss backed β€” Postgres only, no Redis.
Knowledge Base Upload PDF, DOCX, XLSX, PPTX, images, HTML. Auto-extract to Markdown, chunk, embed, and search. Hybrid search with RRF + HyDE. Gemini OCR for scanned docs.
AI Agents Declarative agents via Mastra inside the agents module. Multi-provider (OpenAI, Anthropic, Google). Tools, workflows, memory processors, eval scorers, guardrails. Embedded Mastra Studio at /studio for dev. Frontend stays on AI SDK useChat.
Frontend React + TanStack Router + shadcn/ui + Tailwind v4. Type-safe routing with codegen, code-splitting. You own the component source β€” no tailwind.config.js needed.
Skills Domain knowledge packs that teach AI agents your app's patterns and conventions.
MCP Module-aware tools with API key auth via @modelcontextprotocol/sdk. AI tools can read your schema, list modules, and view logs before generating code. Same process, shared port.
Deploy Dockerfile + railway.toml included. One railway up or docker build and you're live.

Locally, docker compose up -d starts a pgvector/pg17 Postgres instance. bun run dev and you're building. In production, point DATABASE_URL at any managed Postgres instance.


quick start

bun create vobase my-app
cd my-app
bun run dev

Start Postgres with docker compose up -d, then backend on :3000, frontend on :5173. Ships with a dashboard and audit log viewer out of the box.


what you can build

Every module is a self-contained directory: schema, handlers, jobs, pages. No plugins, no marketplace. Just TypeScript you own.

Use Case What Ships
SaaS Starter User accounts, billing integration, subscription management, admin dashboard. Auth + jobs + webhooks handle the plumbing.
Internal Tools Admin panels, operations dashboards, approval workflows. Status machines enforce business logic. Audit trails track every change.
CRM & Contacts Companies, contacts, interaction timelines, deal tracking. Cross-module references keep things decoupled.
Project Tracker Tasks, assignments, status workflows, notifications. Background jobs handle reminders and escalations.
Billing & Invoicing Invoices, line items, payments, aging reports. Integer money ensures exact arithmetic. Gap-free numbering via transactions.
Your Vertical Property management, fleet tracking, field services β€” whatever the business needs. Describe it to your AI tool. It generates the module.

AI coding agents generate modules from your conventions. Like npx shadcn add button β€” files get copied, you own the code.


how it works

Vobase makes itself legible to every AI coding tool on the market.

The framework ships with strict conventions and agent skills β€” domain knowledge packs that teach AI tools how your app works. When you need a new capability:

  1. Open your AI tool and describe the requirement
  2. The AI reads your existing schema, module conventions, and the relevant skills
  3. It generates a complete module β€” schema, handlers, jobs, pages, tests, seed data
  4. You review the diff, run bun run dev, and it works

Skills cover the parts where apps get tricky: money stored as integer cents (never floats), status transitions as explicit state machines (not arbitrary string updates), gap-free business numbers generated inside database transactions (not auto-increment IDs that leave holes).

These conventions are what make AI-generated modules work on the first try.

The thesis: your specs and domain knowledge are the asset. AI tools are the compiler. The compiler improves every quarter. Your skills compound forever.


what a module looks like

Every module declares itself through defineModule(). This convention is what AI tools rely on to generate correct code.

// modules/projects/index.ts
import { defineModule } from '@vobase/core'
import * as schema from './schema'
import { routes } from './handlers'
import { jobs } from './jobs'
import * as pages from './pages'
import seed from './seed'

export default defineModule({
  name: 'projects',
  schema,
  routes,
  jobs,
  pages,
  seed,
  init: (ctx) => {
    // Optional: run setup logic at boot with access to db, scheduler, http, storage, channels
  },
})
modules/projects/
  schema.ts           ← Drizzle table definitions
  handlers.ts         ← Hono routes (HTTP API)
  handlers.test.ts    ← colocated tests (bun test)
  jobs.ts             ← background tasks (pg-boss, no Redis)
  pages/              ← React pages (list, detail, create)
  seed.ts             ← sample data for dev
  index.ts            ← defineModule()
schema example β€” Drizzle + PostgreSQL with typed columns, timestamps, status enums
// modules/projects/schema.ts
import { pgTable, text, integer, timestamp } from 'drizzle-orm/pg-core'
import { nanoidPrimaryKey } from '@vobase/core'

export const projects = pgTable('projects', {
  id: nanoidPrimaryKey(),
  name: text('name').notNull(),
  description: text('description'),
  status: text('status').notNull().default('active'),    // active -> archived -> deleted
  owner_id: text('owner_id').notNull(),
  created_at: timestamp('created_at', { withTimezone: true }).notNull().defaultNow(),
})

export const tasks = pgTable('tasks', {
  id: nanoidPrimaryKey(),
  project_id: text('project_id').references(() => projects.id),
  title: text('title').notNull(),
  status: text('status').notNull().default('todo'),       // todo -> in_progress -> done
  assignee_id: text('assignee_id'),
  priority: integer('priority').notNull().default(0),
})
handler example β€” Hono routes with typed context and authorization
// modules/projects/handlers.ts
import { Hono } from 'hono'
import { getCtx } from '@vobase/core'
import { projects } from './schema'

export const routes = new Hono()

routes.get('/projects', async (c) => {
  const ctx = getCtx(c)
  return c.json(await ctx.db.select().from(projects))
})

routes.post('/projects', async (c) => {
  const ctx = getCtx(c)
  const body = await c.req.json()

  const project = await ctx.db.insert(projects).values({
    ...body,
    owner_id: ctx.user.id,
  })

  return c.json(project)
})

The frontend gets fully typed API calls via codegen:

import { hc } from 'hono/client'
import type { AppType } from './api-types.generated'

const client = hc<AppType>('/')
const res = await client.api.projects.$get()
const projects = await res.json()  // fully typed β€” autocomplete on every route and response

AppType is code-generated from your server's route tree, giving you end-to-end type safety from handler return values to frontend consumption.

job example β€” background tasks via pg-boss, no Redis
// modules/projects/jobs.ts
import { defineJob } from '@vobase/core'
import { tasks } from './schema'
import { eq } from 'drizzle-orm'

export const sendReminder = defineJob('projects:sendReminder',
  async (data: { taskId: string }) => {
    const task = await db.select().from(tasks)
      .where(eq(tasks.id, data.taskId))
    // send notification, update status, log the action
  }
)

Schedule from handlers: ctx.scheduler.add('projects:sendReminder', { taskId }, { delay: '1d' })

Retries, cron scheduling, and priority queues β€” all Postgres-backed via pg-boss.


the ctx object

Every HTTP handler gets a context object with runtime capabilities. Current surface:

Property What it does
ctx.db Drizzle instance. Full PostgreSQL β€” reads, writes, transactions.
ctx.user { id, email, name, role, activeOrganizationId? }. From better-auth session. Used for authorization checks. RBAC middlewares: requireRole(), requirePermission(), requireOrg().
ctx.scheduler Job queue. add(jobName, data, options) to schedule background work.
ctx.storage StorageService β€” virtual buckets with local/S3 backends. ctx.storage.bucket('avatars').upload(key, data).
ctx.channels ChannelsService β€” email and WhatsApp sends. ctx.channels.email.send(msg). All messages logged.
ctx.integrations IntegrationsService β€” encrypted credential vault. ctx.integrations.getActive(provider) returns decrypted config or null. Platform-managed providers connected via HMAC-signed forwarding.
ctx.http Typed HTTP client with retries, timeouts, and circuit breakers.
ctx.realtime RealtimeService β€” event-driven server-push via PostgreSQL LISTEN/NOTIFY + SSE. ctx.realtime.notify({ table, id?, action? }, tx?) after mutations.

For jobs, pass dependencies through closures/factories (or import what you need) when calling defineJob(...).

module init context

Modules can declare an init hook that receives a ModuleInitContext at boot β€” same services as request context (db, scheduler, http, storage, channels, realtime). Unconfigured services use throw-proxies that give descriptive errors if accessed.

ctx extensions for external integrations

Beyond local capabilities (database, user, scheduler, storage), ctx provides outbound connectivity and inbound event handling:

Property What it does
ctx.http Typed fetch wrapper with retries, timeouts, circuit breakers, and structured error responses. Configurable per-app via http in vobase.config.ts.
webhooks (app-level) Inbound webhook receiver with HMAC signature verification, deduplication, and automatic enqueue-to-job. Configured in vobase.config.ts, mounted as /webhooks/* routes β€” not a ctx property.
// vobase.config.ts
export default defineConfig({
  database: process.env.DATABASE_URL,
  integrations: { enabled: true },      // opt-in: encrypted credential store, provider configs
  storage: {                            // opt-in: file storage
    provider: { type: 'local', basePath: './data/files' },
    buckets: { avatars: { maxSize: 5_000_000 }, documents: {} },
  },
  channels: {                           // opt-in: email + WhatsApp
    email: { provider: 'resend', from: 'noreply@example.com', resend: { apiKey: '...' } },
  },
  http: {
    timeout: 10_000,
    retries: 3,
    retryDelay: 500,
    circuitBreaker: { threshold: 5, resetTimeout: 30_000 },
  },
  webhooks: {
    'stripe-events': {
      path: '/webhooks/stripe',
      secret: process.env.STRIPE_WEBHOOK_SECRET,
      handler: 'system:processWebhook',
      signatureHeader: 'stripe-signature',
      dedup: true,
    },
  },
})

Credentials stay in .env. Config declares the shape.


vs the alternatives

Vobase Supabase Pocketbase Rails / Laravel
What you get Full-stack scaffold (backend + frontend + skills) Backend-as-a-service (db + auth + storage + functions) Backend binary (db + auth + storage + API) Full-stack framework
Language TypeScript end-to-end TypeScript (client) + PostgreSQL Go (closed binary) Ruby / PHP
Database PostgreSQL (Docker Compose local, managed prod) PostgreSQL (managed) SQLite (embedded) PostgreSQL / MySQL
Self-hosted One process, one container 10+ Docker containers One binary Multi-process
You own the code Yes β€” all source in your project No β€” managed service No β€” compiled binary Yes β€” but no AI conventions
AI integration Agent skills + MCP + strict conventions None None None
How you customize Edit the code. AI reads it. Dashboard + RLS policies Admin UI + hooks Edit the code
Hosting cost As low as $15/mo $25/mo+ (or complex self-host) Free (self-host) Varies
Data isolation Physical (one db per app) Logical (RLS) Physical Varies
License MIT Apache 2.0 MIT MIT

vs Supabase: Self-hosted Supabase is 10+ Docker containers. RLS policies are hard to reason about. You don't own the backend code. Vobase is one process, you own every line β€” AI agents can read and modify everything.

vs Pocketbase: Pocketbase is a Go binary. You can see the admin UI, but you can't read or modify the internals. When you need custom business logic, you're writing Go plugins or calling external services. Vobase is TypeScript you own β€” AI agents understand and extend it natively.

vs Rails / Laravel: Great frameworks, but they weren't designed for AI coding agents. Vobase's strict conventions and agent skills mean AI-generated code follows your patterns consistently. Plus: simpler stack (no Redis, single process, TypeScript end-to-end).


runtime architecture

One Bun process. One Docker container. One app.

Docker container (--restart=always)
  └── Bun process (PID 1)
        β”œβ”€β”€ Hono server
        β”‚     β”œβ”€β”€ /auth/*       β†’ better-auth (sessions, passwords, CSRF)
        β”‚     β”œβ”€β”€ /api/*        β†’ module handlers (session-validated)
        β”‚     β”œβ”€β”€ /api/agents/*  β†’ Mastra agent/tool/workflow API
        β”‚     β”œβ”€β”€ /studio       β†’ Mastra Studio SPA (dev-only)
        β”‚     β”œβ”€β”€ /mcp          β†’ MCP server (same process, shared port)
        β”‚     β”œβ”€β”€ /webhooks/*   β†’ inbound event receiver (signature verified, dedup)
        β”‚     └── /*            β†’ frontend (static, from dist/)
        β”œβ”€β”€ Drizzle (bun:sql β†’ PostgreSQL)
        β”œβ”€β”€ Built-in modules
        β”‚     β”œβ”€β”€ _auth         β†’ better-auth behind AuthAdapter contract
        β”‚     β”œβ”€β”€ _audit        β†’ audit log, record tracking, auth hooks
        β”‚     β”œβ”€β”€ _sequences    β†’ gap-free business number counters
        β”‚     β”œβ”€β”€ _integrations β†’ encrypted credential vault, platform OAuth handoff (opt-in)
        β”‚     β”œβ”€β”€ _storage      β†’ virtual buckets, local/S3 (opt-in)
        β”‚     └── _channels     β†’ unified messaging, adapter pattern (opt-in)
        β”œβ”€β”€ pg-boss (Postgres-backed job queue)
        β”œβ”€β”€ Outbound HTTP (typed fetch, retries, circuit breakers)
        └── Audit middleware (all mutations β†’ _audit_log)

mcp server

Runs in the same Bun process on the same port. Authenticated via API keys (better-auth apiKey plugin). When you connect Claude Code, Codex, Cursor, or any MCP-compatible tool, it sees your app:

Tool What it does
list_modules List all registered modules (built-in + user)
read_module Read table names from a specific module schema
get_schema List all table names across every module
view_logs Return recent audit log entries

The AI sees your exact data model, your existing modules, and the conventions before it writes a single line of code.


deployment

Ship a Docker image. Railway, Fly.io, or any Docker host. Set DATABASE_URL for a managed Postgres connection.

Railway (quickest):

railway up

The template ships with Dockerfile and railway.toml pre-configured. Add a Postgres plugin and Railway sets DATABASE_URL automatically.

Docker Compose:

# docker-compose.yml
services:
  vobase:
    image: your-registry/my-vobase:latest
    restart: always
    environment:
      DATABASE_URL: postgres://user:pass@db:5432/vobase
    ports:
      - "3000:3000"
  db:
    image: postgres:17
    volumes:
      - pgdata:/var/lib/postgresql/data
    environment:
      POSTGRES_DB: vobase
      POSTGRES_USER: user
      POSTGRES_PASSWORD: pass
volumes:
  pgdata:

project commands

After scaffolding, your project uses standard tools directly β€” no wrapper CLI:

Command What it does
bun run dev Start Bun backend with --watch and Vite frontend. Auto-restarts on changes.
docker compose up -d Start local Postgres (pgvector/pg17, port 5432).
bun run db:push Apply fixtures then push schema to database (dev).
bun run db:generate Generate migration files for production.
bun run db:migrate Run migrations against the database.
bun run db:seed Seed default admin user and sample data.
bun run db:reset Drop and recreate database, push schema, and seed.
bun run db:studio Open Drizzle Studio for visual database browsing.

project structure

my-app/
  .env
  .env.example
  package.json            ← depends on @vobase/core
  docker-compose.yml      ← local Postgres (pgvector/pg17)
  drizzle.config.ts
  vobase.config.ts        ← database URL, auth, connections, webhooks
  vite.config.ts          ← Vite + TanStack Router + path aliases
  index.html
  server.ts               ← createApp() entry
  AGENTS.md               ← project context and guardrails (CLAUDE.md symlinks here)
  .agents/
    skills/
      integer-money/
        SKILL.md          ← core: all money as integer cents
  modules/
    messaging/            ← conversations, contacts, channels, labels, state machine
      index.ts            ← defineModule()
      schema.ts           ← conversations, messages, contacts, channels, labels, etc.
      handlers/           ← conversations, contacts, channels, labels, activity
      jobs.ts             ← outbox delivery, channel sessions
      lib/                ← state machine, channel reply, delivery, inbound
      pages/              ← inbox, conversations, contacts, channels, labels
      seed.ts             ← demo data
    agents/               ← AI agents, evals, guardrails, memory, MCP
      index.ts            ← defineModule()
      schema.ts           ← moderation_logs (scorers use Mastra native storage)
      handlers/           ← chat, agents, evals, guardrails, memory, metrics, MCP
      jobs.ts             ← agent wake
      mastra/             ← Mastra primitives
        index.ts          ← Mastra singleton: initMastra(), getMastra(), getMemory()
        studio.ts         ← dev-only Studio SPA middleware
        agents/           ← agent definitions (Mastra Agent instances)
        tools/            ← RAG tools, booking, conversation tools
        processors/       ← input/output processors, moderation guardrail
        evals/            ← code scorers, custom scorer factory
        mcp/              ← AI module MCP server
        storage/          ← VobaseMemoryStorage (hybrid Mastra + Vobase)
        lib/              ← DI, model aliases, observability
      pages/              ← evals dashboard, guardrails, memory
    automation/           ← browser task automation
      index.ts
      pages/
    system/               ← ops dashboard
      index.ts            ← defineModule()
      handlers.ts         ← health, audit log, sequences, record audits
      pages/
    knowledge-base/       ← document ingestion + hybrid search
      index.ts
      schema.ts
      handlers.ts
      jobs.ts             ← async document processing via queue
      lib/                ← extract, chunk, embed, search pipeline
      pages/
    integrations/         ← external service credential management
      index.ts
      handlers.ts
      jobs.ts
    index.ts              ← module registry
    your-module/          ← modules you add
      index.ts            ← defineModule()
      schema.ts
      handlers.ts
      jobs.ts
      pages/
  src/
    main.tsx
    home.tsx
    root.tsx
    routeTree.gen.ts      ← generated TanStack route tree
    lib/
    components/
      ui/                 ← shadcn/ui (owned by you)
      ai-elements/        ← AI chat UI components (owned by you)
      chat/               ← chat-specific components
      data-table/         ← DiceUI data-table components
    shell/
      app-layout.tsx      ← main app shell with sidebar
      shell-header.tsx
      command-palette.tsx
      auth/               ← login, signup
      settings/           ← user, org, API keys, integrations settings
    hooks/
    styles/
    stores/
    types/
  data/
    files/                ← optional, created on first upload

Star History

Star History Chart

Star if the repo has helped you


license

MIT. Own everything.

Release History

VersionChangesUrgencyDate
create-vobase@0.6.2### Patch Changes - [`91e5b70`](https://github.com/vobase/vobase/commit/91e5b701e1580f32d0172e9b9bcceb917f95f437) Thanks [@mdluo](https://github.com/mdluo)! - Migrate scaffolder from `.agents/skills` to `.claude/skills` The repo moved agent skills from `.agents/skills/` to `.claude/skills/` and replaced `AGENTS.md` with `CLAUDE.md`. This updates the scaffolder to match: - **Remove CLAUDE.md β†’ AGENTS.md symlink** β€” scaffolded projects now have `CLAUDE.md` as the primary file, no syHigh4/17/2026
@vobase/core@0.32.1### Patch Changes - [`ad4bf1e`](https://github.com/vobase/vobase/commit/ad4bf1ed0851ed5cd17d48f8d32fd2cf8e034c4d) Thanks [@mdluo](https://github.com/mdluo)! - # Shorten default nanoid IDs from 12 to 8 characters Reduced the default nanoid primary key length from 12 to 8 characters across all tables. Each Vobase project is single-tenant with relatively small data volumes, so 12 characters of entropy was unnecessarily long. 8 characters with a 36-char alphabet provides ~41 bits of entropy High4/14/2026
@vobase/core@0.30.3### Patch Changes - Gate auto-create org on VITE_PLATFORM_TENANT_NAME env var Only auto-create the default organization when `VITE_PLATFORM_TENANT_NAME` is set, preventing the platform service and test environments from creating unwanted orgs. High4/7/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

spaceship-mcpπŸš€ Manage domains, DNS, contacts, and listings with spaceship-mcp, a community-built MCP server for the Spaceship API.main@2026-04-21
website-design-systems-mcp🎨 Extract complete design systems from websites and generate AI-ready skill.md files to replicate exact design elements efficiently.main@2026-04-21
dingtalk-moltbot-connectorπŸ€– Connect DingTalk with OpenClaw Gateway for AI-driven chat responses and session management using a bot or DEAP Agent integration.main@2026-04-21
claude-code-proxyMonitor and visualize your Claude Code API interactions with Claude Code Proxy. Easily set up a transparent proxy and live dashboard. πŸ› οΈπŸš€main@2026-04-21
better-notion-mcpMarkdown-first MCP server for Notion API - composite tools optimized for AI agentsv2.28.4