React component library for building data validation and review interfaces. This library provides the UI components used in Recce, a data validation tool for dbt projects.
npm install @datarecce/ui
# or
yarn add @datarecce/ui
# or
pnpm add @datarecce/uiThis library requires the following peer dependencies:
{
"@chakra-ui/react": "^3.0.0",
"@emotion/react": "^11.0.0",
"@tanstack/react-query": "^5.0.0",
"@xyflow/react": "^12.0.0",
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
}Wrap your application with the Recce UI Provider:
import { Provider } from "@datarecce/ui";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
const queryClient = new QueryClient();
function App() {
return (
<QueryClientProvider client={queryClient}>
<Provider>{/* Your app components */}</Provider>
</QueryClientProvider>
);
}Import and use individual components:
import {
LineageView,
QueryForm,
ProfileDiffForm,
SchemaView,
} from "@datarecce/ui";
function MyComponent() {
return (
<div>
<LineageView />
<QueryForm />
</div>
);
}The library provides multiple entry points for different features:
// Main components
import { LineageView, QueryForm } from "@datarecce/ui/components";
// API utilities
import { axiosClient, fetchChecks } from "@datarecce/ui/api";
// Custom hooks
import { useLineageViewContext, useCheckToast } from "@datarecce/ui/hooks";
// TypeScript types
import type { DataFrame, Check, Run } from "@datarecce/ui/types";LineageView- Interactive lineage graph visualizationLineagePage- Full lineage page with controlsGraphNode,GraphEdge- Graph building blocksNodeView- Detailed node information display
QueryForm- SQL query input formQueryPage- Complete query interfaceSqlEditor- Monaco-based SQL editorQueryResultView- Query results display
ProfileDiffForm- Data profiling comparison formProfileDiffResultView- Profile diff results display
HistogramChart- Histogram visualizationTopKSummaryList- Top-K value summaryHistogramDiffForm- Histogram comparison interface
SchemaView- Schema structure displaySchemaDiffView- Schema comparison viewColumnNameCell- Schema column renderer
CheckList- List of validation checksCheckDetail- Detailed check viewLineageDiffView- Lineage difference visualization
RunPage- Run execution interfaceRunList- List of execution runsRunView- Individual run details
The library includes API client utilities that need to be configured with your backend URL:
import { axiosClient } from "@datarecce/ui/api";
// Configure the API client
axiosClient.defaults.baseURL = "http://localhost:8000";
axiosClient.defaults.headers.common["Authorization"] = "Bearer token";This package uses a git submodule to reference the main Recce repository:
# Clone with submodules
git clone --recursive https://github.com/DataRecce/recce-ui.git
# Or if already cloned, initialize submodules
git submodule init
git submodule update
# Install dependencies
pnpm install
# The postinstall script will automatically apply TypeScript patches
# If you need to reapply patches manually:
npm run patch:apply
# Build the library
pnpm build
# Run in development mode
pnpm dev
# Type checking
pnpm type:check # Run with known issues handled
pnpm type:check:strict # Run strict type checkingThis package includes automatic patches to fix TypeScript strict mode issues in the source code. These patches are applied automatically during npm install and fix:
- Type assertion issues in CheckDetail.tsx
- Boolean type issues in CheckList.tsx
- Type conversion issues in LineageViewContextMenu.tsx
- Type inference issues in toaster.tsx
The patches are temporary fixes until the main Recce repository is updated.
To update the Recce source code:
pnpm run submodule:updateView component documentation and examples:
pnpm storybookThis library is written in TypeScript and provides full type definitions. All exports include proper TypeScript types for enhanced development experience.
Apache-2.0
Contributions are welcome! Please check the main Recce repository for contribution guidelines.