hub

module
v0.0.0-...-0f4e36f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2026 License: Apache-2.0

README

Formbricks Hub

Agentic-first Experience Management Datastore

Formbricks Hub is the open, structured data layer for Experience Management (XM): a standalone, open-source datastore to unify feedback records from across different sources in one place so humans, BI tools, and AI agents can act on them.

It is the foundation for agentic XM workflows and is also used by the Formbricks XM Suite.

Why Formbricks Hub

Experience Management is broken in most organizations.

Teams collect feedback, build dashboards, and generate reports, but action remains manual, slow, and fragmented. Data is scattered across tools, formats, and teams, which makes it hard to understand what is happening and even harder to respond in time.

Formbricks Hub is built to fix that by giving you a single, open experience data layer designed for continuous analysis and action.

Its data model is intentionally analytics-friendly: feedback is stored in a structured format that makes it easy to query with SQL, aggregate across sources, and use in reporting tools without heavy transformations.

What This Repository Is (and Is Not)

This repository is the right place for you if you want:

  • An open-source, self-hostable XM datastore for feedback records
  • A central system to unify experience signals from many sources
  • A backend service your own apps, pipelines, BI tools, and agents can build on
  • A foundation for AI analysis and semantic workflows (including embeddings-powered use cases)
  • A SQL-friendly feedback data model for reporting and analytics

This repository is not the full Formbricks survey/XM product UI.

If you are looking for the complete Formbricks application (surveys, UI, broader platform capabilities), use the main repository:

Built for the AI Age

Hub is the core datastore for agentic experience workflows.

Formbricks Hub enables the next generation of AI-powered analysis and semantic search workflows on top of experience data.

This makes Hub a strong fit if you want to build:

  • AI copilots for CX / PX / UX teams
  • Automated feedback triage and routing
  • Semantic search across feedback records
  • Root-cause investigation agents
  • Experience monitoring and alerting automations

Hub is also designed to work well with standard analytics workflows:

  • Structured records that are straightforward to query with SQL
  • A simple feedback-centric schema that reduces BI modeling friction
  • Direct PostgreSQL connectivity for dashboards and reporting
  • A strong foundation for both classical analytics and agentic AI workflows

Learn more:

Ecosystem

Formbricks Hub is an independent open-source project with a growing developer ecosystem:

Getting Started

If you want to evaluate Hub quickly, start with the docs:

Local development in this repository

This repository contains the standalone Hub API and worker. The local compose.yml starts dependency services only: PostgreSQL, a one-shot hub-migrate container, and River UI. The migration container uses the packaged Hub image for goose and river, and bind-mounts this checkout's migrations/ directory so the database schema matches the branch you are working on. The image tag defaults to the current Hub release and should stay pinned if you override HUB_IMAGE_TAG. Docker setup does not require migration tools on the host. It does not start hub-api or hub-worker; run those from this repository after the database is ready.

For a local Hub setup:

cp .env.example .env
make dev-setup
make run

make run applies River queue migrations and starts both hub-api and hub-worker for local webhook delivery and embedding jobs. Use make run-api or make run-worker only when you intentionally want to run one process on its own. make dev-setup also runs the local Hub schema migrations through make init-db, which is useful when you are changing migration files in this repository.

The public Docker quickstart at hub.formbricks.com/quickstart is maintained outside this repository. Its Compose example should use the same one-shot migration service pattern, but rely on the published Hub image's bundled /app/migrations because quickstart users may not have this repository checked out.

For the full Formbricks XM Suite UI, use the formbricks/formbricks repository and its setup instructions instead.

Tenant isolation

Feedback records are tenant-scoped. API operations that read or write feedback records require tenant_id where shown in the API reference so records remain isolated by tenant/organization. Do not omit tenant_id from list/search calls unless an endpoint explicitly documents an admin or global-list mode.

Who Hub Is For

Formbricks Hub is a good fit for:

  • Product and CX teams that want a unified feedback datastore
  • Engineering teams building internal XM tooling
  • Data teams that need structured, analytics-ready experience records
  • BI / analytics teams that want direct reporting on feedback data (e.g. Power BI, Superset)
  • AI/agent builders who need a reliable experience data backend
  • Organizations that prefer open-source and self-hostable infrastructure

Contributing

We welcome issues, ideas, and contributions as Hub evolves toward agentic XM infrastructure.

License

Apache 2.0. See LICENSE.

Directories

Path Synopsis
cmd
api command
Package main is the Formbricks Hub API server entrypoint.
Package main is the Formbricks Hub API server entrypoint.
backfill-embeddings command
backfill-embeddings enqueues River embedding jobs for feedback records that have non-empty value_text and null embedding.
backfill-embeddings enqueues River embedding jobs for feedback records that have non-empty value_text and null embedding.
backfill-translations command
backfill-translations enqueues River translation jobs for feedback records whose tenant has a target language configured and whose value_text is not yet translated to it (missing or stale).
backfill-translations enqueues River translation jobs for feedback records whose tenant has a target language configured and whose value_text is not yet translated to it (missing or stale).
worker command
Package main is the Formbricks Hub worker entrypoint (hub-worker).
Package main is the Formbricks Hub worker entrypoint (hub-worker).
internal
api/handlers
Package handlers provides HTTP handlers for feedback records and health.
Package handlers provides HTTP handlers for feedback records and health.
api/middleware
Package middleware provides HTTP middleware (auth, logging, CORS).
Package middleware provides HTTP middleware (auth, logging, CORS).
api/response
Package response provides HTTP response helpers and RFC 9457 problem details.
Package response provides HTTP response helpers and RFC 9457 problem details.
api/validation
Package validation provides request validation and custom validators.
Package validation provides request validation and custom validators.
config
Package config provides application configuration loaded from environment variables and optional .env file via cleanenv.
Package config provides application configuration loaded from environment variables and optional .env file via cleanenv.
datatypes
Package datatypes defines shared types for events (e.g.
Package datatypes defines shared types for events (e.g.
googleai
Package googleai provides a thin wrapper around the Google Gen AI SDK for embeddings and content generation (used for translation).
Package googleai provides a thin wrapper around the Google Gen AI SDK for embeddings and content generation (used for translation).
huberrors
Package huberrors provides sentinel and custom error types for the application.
Package huberrors provides sentinel and custom error types for the application.
models
Package models defines request/response and domain types for feedback records.
Package models defines request/response and domain types for feedback records.
observability
Package observability provides OpenTelemetry metrics and tracing for the hub API.
Package observability provides OpenTelemetry metrics and tracing for the hub API.
openai
Package openai provides a thin wrapper around the official OpenAI Go SDK for embeddings and chat completions (used for translation).
Package openai provides a thin wrapper around the official OpenAI Go SDK for embeddings and chat completions (used for translation).
repository
Package repository provides data access for feedback records.
Package repository provides data access for feedback records.
service
Package service implements business logic for feedback records.
Package service implements business logic for feedback records.
workers
Package workers provides River job workers (e.g.
Package workers provides River job workers (e.g.
pkg
cursor
Package cursor provides encode/decode for keyset pagination cursors used by list endpoints.
Package cursor provides encode/decode for keyset pagination cursors used by list endpoints.
database
Package database provides database connection utilities.
Package database provides database connection utilities.
embeddings
Package embeddings provides utilities for embedding vectors (e.g.
Package embeddings provides utilities for embedding vectors (e.g.
Package tests provides integration test helpers and utilities.
Package tests provides integration test helpers and utilities.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL