Should arizuko adopt PocketBase? Technical Analysis
Verdict: No — arizuko already implements everything PocketBase offers, optimized for its specific architecture
Key insight: PocketBase = SQLite + auth + real-time + admin UI. Arizuko has custom versions of all four, tightly integrated with routing/channels/agents
Where PocketBase could help: New standalone services (like a metrics dashboard or group management UI) that need quick CRUD + auth
PocketBase is a single-binary Go backend (15MB) that bundles:
Philosophy: Ship as a single executable, extend via Go library (embed PocketBase as a package, add custom routes/hooks)
Let's map arizuko's architecture to PocketBase's features:
| Feature | PocketBase | Arizuko | Overlap? |
|---|---|---|---|
| Database | SQLite (WAL mode, embedded) | SQLite (WAL mode, store/ package, 5s busy timeout) |
✅ Identical |
| Auth | Built-in users table, OAuth (Google/GitHub/Discord), JWT sessions | auth/ package: OAuth (Google/GitHub/Discord/Telegram), JWT, auth_users/auth_sessions tables, argon2 hashing |
✅ Identical feature set |
| Real-time | SSE subscriptions on collections (create/update/delete events) | SSE via proxyd web channel (web: JIDs), poll-based message delivery |
⚠️ Different model (arizuko: message-centric, not CRUD-centric) |
| Admin UI | Built-in HTMX dashboard for CRUD | dashd/: read-only HTMX portal (status, tasks, activity, groups, memory) |
⚠️ Different purpose (arizuko: observability, not CRUD) |
| File storage | Local FS or S3, tied to collection fields | Media enricher: attachments → groups/<folder>/media/, Whisper transcription |
⚠️ Different model (arizuko: message-attached, not collection-attached) |
| REST API | Auto-generated from schema | api/ package: /v1/messages, /v1/channels/register (custom, not auto-generated) |
❌ No overlap |
| Routing | N/A | router/ + routes table: match expressions, three-layer pipeline (sticky → command → prefix → routing) |
❌ Arizuko-specific |
| Channels | N/A | chanreg/: HTTP channel protocol, health checks, adapter registry (Telegram/WhatsApp/Discord/etc.) |
❌ Arizuko-specific |
| Agents | N/A | gateway/ + container/: Docker orchestration, IPC (MCP over unix sockets), grants engine |
❌ Arizuko-specific |
Why not:
store/ package is already optimized for the message-routing-agent flowmessages table semantics (e.g., agent_cursor, routed_to, topic, audit metadata)router/) needs direct SQL access to routes table with seq-ordered match expressions — PocketBase's auto-generated API wouldn't helpstore.NewMessages() every 2s with custom filtering (is_from_me=0, cursor tracking) — PocketBase's real-time SSE is push-based, not poll-basedVerdict: No value. Arizuko's store/ is leaner and purpose-built.
Why not:
auth/ package already does OAuth (4 providers), JWT, argon2 hashing, refresh tokensproxyd, dashd, IPC authorization)user_groups table restricts web users to specific group folders — PocketBase doesn't have this conceptauth/web.go — PocketBase would require hooks to replicateVerdict: No value. Arizuko's auth is already feature-complete and integrated.
Current state: dashd is read-only HTMX, shows system observability (channels, groups, queue, tasks, routing table)
PocketBase could offer: If dashd ever needs CRUD operations (e.g., edit routes, manage groups, update task schedules), PocketBase's admin UI could accelerate development
But:
arizuko CLI or MCP tools for mutations)Verdict: Marginal value. Custom HTMX forms are probably simpler than PocketBase integration.
Where PocketBase shines:
If arizuko needs a **new service** with standard CRUD + auth requirements (not tightly coupled to routing/channels/agents), PocketBase could be a fast MVP path:
Example: Metrics Service
// metrics/main.go
package main
import (
"github.com/pocketbase/pocketbase"
"github.com/pocketbase/pocketbase/apis"
)
func main() {
app := pocketbase.New()
// Custom route: POST /api/metrics (called by gateway after agent run)
app.OnBeforeServe().Add(func(e *core.ServeEvent) error {
e.Router.POST("/api/metrics", func(c echo.Context) error {
// Store agent metrics: folder, session_id, tokens, latency, cost
// Auto-generates REST API for querying
})
return nil
})
app.Start()
}
Benefits:
Verdict: Yes — PocketBase is ideal for ancillary services that don't touch core routing/agent logic.
PocketBase: CRUD-centric (create/read/update/delete on collections)
Arizuko: Message-flow-centric (inbound → routing → agent → outbound)
PocketBase's real-time model assumes you're building a typical web app (to-do lists, user profiles, comments). Arizuko's message table has specialized semantics:
agent_cursor — per-chat read pointer for incremental message deliveryrouted_to — audit trail of which group processed the messagetopic — web channel topic routing (multi-topic sessions per JID)is_from_me, is_bot_message — filters for poll loopsource — canonical adapter-of-record for outbound routingPocketBase's collection API wouldn't expose these semantics cleanly. Arizuko's store.NewMessages(), store.MessagesSince(), store.PutMessage() are purpose-built.
Arizuko's routing is a three-layer pipeline with match expressions:
@name/#topic tokens/new, /ping, /stop@name/#topic inline, navigates to child group or topic sessionroutes table (seq order, match expressions like platform=telegram verb=mention)PocketBase has no concept of "routing" — it's a CRUD backend. You'd have to reimplement the entire routing logic on top of PocketBase, losing all benefits.
Arizuko's channel adapters (Telegram, WhatsApp, Discord) register via HTTP, health-check every 30s, and receive outbound messages via POST /send. This bidirectional HTTP protocol is custom to arizuko's architecture.
PocketBase has no concept of "channels" — you'd have to build chanreg/ logic on top, again losing benefits.
Arizuko's grants engine controls which MCP tools/actions a group can use, with rule merging for delegation (NarrowRules). This is tightly coupled to IPC authorization checks.
PocketBase's auth is collection-level (read/write permissions on collections), not action-level. You'd need to bolt on custom middleware, duplicating effort.
PocketBase's selling point: Single 15MB binary for rapid prototyping
Arizuko's reality: Already ships as a single Docker image (arizuko:latest) with all daemons (gated, timed, dashd, teled, etc.) compiled into one image. The compose file spawns multiple containers, but they share the same binary.
PocketBase doesn't simplify deployment here — arizuko's compose-based deployment is already streamlined.
| Aspect | PocketBase | Arizuko | Winner |
|---|---|---|---|
| SQLite setup | Auto-configured (WAL mode, busy timeout) | Manual (store/ package, 5s timeout, migration via PRAGMA user_version) | PocketBase (less boilerplate) |
| Schema migrations | Built-in migration system with Go API | Custom dbmig/ library (keyed by service name, SQL files in migrations/) |
PocketBase (more polished) |
| Real-time | SSE (unidirectional, collection events) | SSE via proxyd (message events, web channel JIDs) | Tie (both use SSE, different semantics) |
| Auth | OAuth + JWT + refresh tokens (tied to collections) | OAuth + JWT + refresh tokens (decoupled, custom user_groups) |
Arizuko (more flexible for multi-tenancy) |
| Admin UI | Auto-generated CRUD forms | Custom HTMX dashboards (read-only, observability) | PocketBase (for generic CRUD), Arizuko (for custom domain) |
| Extensibility | Hooks (~30+ events), embed as Go library | No hooks system (direct function calls across packages) | PocketBase (cleaner for plugins) |
| Performance | Single-instance SQLite (WAL mode, limited concurrency) | Single-instance SQLite (same limits, shared across daemons via WAL) | Tie |
| Deployment | Single binary (15MB) | Docker image (multi-daemon, shared binary) | PocketBase (simpler for solo services) |
Appwrite is an open-source Backend-as-a-Service (BaaS) written in PHP with Go components (Traefik reverse proxy). Unlike PocketBase's single binary, Appwrite runs as 18 Docker containers orchestrated via Docker Compose.
Features:
| Aspect | Appwrite | PocketBase | Arizuko |
|---|---|---|---|
| Deployment model | 18 Docker containers (microservices) | Single 15MB binary | Single Docker image, multi-daemon (gated, timed, dashd, adapters) |
| Database | MariaDB (separate container) | SQLite (embedded) | SQLite (shared via WAL mode) |
| Language | PHP (backend) + Go (Traefik) | Go | Go (backend) + TypeScript (agent + whapd) |
| Real-time | WebSocket (bidirectional) | SSE (unidirectional) | SSE via proxyd (unidirectional) |
| Serverless functions | ✅ Built-in (Docker-based, multi-runtime) | ❌ None (extend with Go hooks) | ✅ Agent containers (Claude Code, custom logic) |
| Resource footprint | Heavy (~1GB RAM minimum for 18 containers) | Light (~50MB RAM) | Medium (~300MB RAM for gated + adapters) |
| Scalability | Horizontal (MariaDB replication, load balancing via Traefik) | Vertical only (single SQLite file) | Vertical only (single SQLite file) |
| Admin UI | Full-featured web console (teams, permissions, functions, logs) | Auto-generated CRUD forms | Custom HTMX dashboards (read-only observability) |
| Auth complexity | Full RBAC (teams, roles, permissions per collection) | Simple (users + OAuth) | Custom (JWT + user_groups table, grants engine for actions) |
| File storage | Advanced (image transformations, compression, S3 backends) | Basic (local FS or S3, tied to collections) | Custom (media enricher, Whisper transcription, local FS) |
Choose Appwrite if:
Choose PocketBase if:
Similarities:
Key Differences:
| Aspect | Appwrite | Arizuko |
|---|---|---|
| Primary use case | Generic BaaS (CRUD apps, web/mobile backends) | Agent orchestration (routing, channels, LLM containers) |
| Database model | Collections (document-oriented, MariaDB-backed) | Messages + routes + groups (SQLite, custom schema) |
| Serverless model | Generic functions (Node, Python, PHP, etc.) | Agent containers (Claude Code SDK, TypeScript, MCP tools) |
| Routing | HTTP reverse proxy (Traefik) | Message routing (match expressions, three-layer pipeline) |
| Channel protocol | N/A | Custom HTTP bidirectional protocol (adapters for Telegram/WhatsApp/Discord) |
| Auth grants | Collection-level permissions (read/write/update/delete per team/role) | Action-level grants (MCP tool/action permissions, rule merging for delegation) |
| Deployment size | 18 containers (~1GB RAM) | 5-8 containers (~300MB RAM) |
Theoretical fit:
auth/ packageWhy it doesn't work:
messages table has specialized semantics (agent_cursor, routed_to, topic, source) that don't map to Appwrite's document model.POST /send for outbound) is custom. Appwrite has no concept of "channels."Verdict: ❌ Appwrite is a terrible fit for arizuko core. It's a generic BaaS, not an agent orchestration platform. Using Appwrite would be like using a bulldozer to plant a garden — technically possible, but wildly inappropriate.
| Platform | Best For | Arizuko Fit? |
|---|---|---|
| PocketBase | Solo devs, MVPs, CRUD-heavy side projects (< 100k users) | ✅ Good for new standalone services (metrics, group mgmt UI) |
| Appwrite | Teams building collaborative web/mobile apps (100k-1M users, need RBAC + functions) | ❌ Terrible fit (wrong data model, 18 containers, no routing/channels) |
| Arizuko (custom) | Agent orchestration, multi-channel routing, LLM workflows | ✅ Already optimal for its domain |
You mentioned PocketBase should be "like Supabase but better" — here's the comparison:
| Feature | Supabase | PocketBase | Why PocketBase Wins |
|---|---|---|---|
| Deployment | Cloud-hosted OR self-host (complex: Postgres + PostgREST + GoTrue + Realtime + Storage, ~12 containers) | Single 15MB binary | Radically simpler |
| Database | PostgreSQL (requires separate server) | SQLite (embedded, no separate server) | Zero ops (for small scale) |
| Real-time | WebSocket (bidirectional, Postgres LISTEN/NOTIFY) | SSE (unidirectional, simpler) | Less complexity (if you only need server→client) |
| Auth | GoTrue (separate service, Postgres-backed) | Built-in (SQLite-backed) | Unified (one binary, one DB) |
| Cost | Free tier (2 projects, 500MB DB, 1GB file storage) → $25/mo (8GB DB, 100GB storage) | Free (self-hosted, unlimited) | $0 forever |
| Scalability | Horizontal (Postgres replication, read replicas) | Vertical only (single SQLite file, WAL mode = ~10k writes/sec max) | Supabase wins (if you need horizontal scale) |
| Ecosystem | Mature (PostgREST, pgvector for embeddings, extensions) | Young (limited extensions, SQLite-FTS only) | Supabase wins (richer features) |
PocketBase is "better" when:
Supabase is better when:
Arizuko's store/, auth/, router/, and gateway/ packages are already optimized for the message-routing-agent architecture. PocketBase would be a step backward:
store/ is < 2MB of focused codeIf you build new standalone services (not part of the routing/agent core), PocketBase could save time:
Implementation pattern:
// metrics-service/main.go
package main
import (
"github.com/pocketbase/pocketbase"
"github.com/pocketbase/pocketbase/core"
)
func main() {
app := pocketbase.New()
// Define "agent_runs" collection: folder, session_id, tokens, latency, cost
// Auto-generates: GET/POST /api/collections/agent_runs/records
// Custom webhook: gateway calls POST /api/metrics after each agent run
app.OnBeforeServe().Add(func(e *core.ServeEvent) error {
e.Router.POST("/api/metrics", metricsHandler)
return nil
})
app.Start() // Single binary, admin UI at http://localhost:8090/_/
}
Benefits:
If you're building new TypeScript services for arizuko's ecosystem (not Go), consider Encore.ts instead of PocketBase:
Use case: Build a TypeScript webhook service that listens to agent events (via Pub/Sub) and updates external systems (Discord, Slack, analytics)
| Use Case | Recommendation | Why |
|---|---|---|
| Core arizuko (gated, store, router, auth) | ❌ Don't use PocketBase | Already optimized, PocketBase doesn't fit message-flow model |
| Dashboard (dashd) | ❌ Don't use PocketBase | Custom HTMX is simpler for read-only observability |
| New standalone services (metrics, group mgmt, knowledge base) | ✅ Consider PocketBase | Fast MVP, zero boilerplate, admin UI included |
| TypeScript services in arizuko ecosystem | ✅ Consider Encore.ts | Infrastructure from Code, distributed systems native |
Bottom line: PocketBase is great for new CRUD-heavy services, but arizuko's core is already better without it.
Your context: "My weakness is communication.. leaning heavily to shipping and gaming-shipping not really selling my work."
If your strength is shipping (not marketing), here's how to think about these tools:
Gaming-shipping mindset: Treat documentation like game design — users should "discover" features naturally, not read manuals. PocketBase wins here: its admin UI is self-documenting (click around, see what happens). Appwrite loses: 18 containers require upfront study.
For arizuko: Build "discovery tools" instead of docs:
arizuko wizard that walks through setup (like npm init)arizuko clone telegram-bot)Ship tools that show instead of docs that tell.