Overview
Build custom data apps with governed Semaphor analytics.
Data Apps let you build custom analytics experiences on top of Semaphor's governed semantic layer. You can build dashboards, workflow tools, operational tables, and embedded analytics screens while Semaphor handles authentication, server-side query execution, semantic relationships, and result metadata.
Use Data Apps when you want more control than a standard dashboard card but still want the safety of governed analytics.
What You Build
A Data App is an application built with a Semaphor client SDK. The examples in these docs use the current React SDK, but the concepts are framework-agnostic. Your app defines:
- sources: the semantic datasets you want to query, such as
fact_ordersordim_campaign. - fields: measures, dimensions, dates, and ids from those sources.
- queries: KPI, records, matrix, analysis, input-options, or SQL fallback specs.
- inputs: filters and controls that users can change.
- views: UI components that render the query results.
Semaphor executes the query server-side and returns typed results to your app.
import {
SemaphorDataAppProvider,
semaphor,
useSemaphorQuery,
} from 'react-semaphor/data-app-sdk';
const orders = semaphor.source.semantic({
domainId: 'commerce',
datasetName: 'fact_orders',
});
const revenue = semaphor.field.measure('revenue', {
source: orders,
aggregate: 'SUM',
});
function RevenueKpi() {
const result = useSemaphorQuery(
semaphor.metric({
id: 'revenue_kpi',
label: 'Revenue',
source: orders,
measures: [revenue],
primaryMeasure: revenue,
}),
);
if (result.isLoading) return <div>Loading revenue...</div>;
if (result.error) return <div>{result.error.message}</div>;
return <strong>{result.value}</strong>;
}
export function App({ token }: { token: string }) {
return (
<SemaphorDataAppProvider token={token}>
<RevenueKpi />
</SemaphorDataAppProvider>
);
}Why This Is Different From Client-Side Analytics
Data Apps are not a "fetch every row and filter in the browser" pattern. Your app declares intent, and Semaphor executes that intent through governed server-side analytics.
This matters because production dashboards often need:
- relationship-aware filters, such as a Campaign dropdown filtering an Orders fact table;
- joined labels, such as revenue by campaign name instead of campaign id;
- cascading filters, such as Region narrowing State;
- server-side pagination and sorting for large tables;
- diagnostics when a relationship is missing, ambiguous, or unsafe.
Start Here
Quickstart
Scaffold the starter, connect your coding agent, and build from a semantic domain.
SDK Concepts
Learn how sources, fields, queries, inputs, rows, and columns fit together.
Components
Preview the starter-included Semaphor Data App UI components.
Relationship-Aware Filters And Joins
Learn how Semaphor resolves human-readable dimensions through modeled relationships.
Agent Builder Guide
Guidance for AI agents and developers generating Data App code.
Core Mental Model
Imagine a commerce company with this semantic model:
fact_orders
order_id
order_date
campaign_id
store_id
revenue
dim_campaign
campaign_id
campaign_name
channel
dim_store
store_id
store_name
state_id
dim_geo
region_id
region_name
state_id
state_namefact_orders stores revenue and ids. dim_campaign, dim_store, and dim_geo store human-readable labels. Semaphor's semantic model defines relationships such as:
fact_orders.campaign_id -> dim_campaign.campaign_id
fact_orders.store_id -> dim_store.store_id
dim_store.state_id -> dim_geo.state_idWith those relationships, a Data App can:
- show revenue from
fact_orders; - display campaign names from
dim_campaign; - filter revenue by campaign name;
- cascade Region and State options from
dim_geo; - apply Region and State filters to
fact_ordersthroughdim_store.
Your app authors the source and field refs. Semaphor proves and executes the relationships.