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:
{
"@emotion/react": "^11.0.0",
"@mui/material": "^7.0.0",
"@tanstack/react-query": "^5.0.0",
"@xyflow/react": "^12.0.0",
"axios": "^1.0.0",
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
}Note: This library uses Material-UI (MUI) for its UI components. The
@emotion/reactdependency is required by MUI for styling.
Wrap your application with the required providers:
import { MuiProvider, ToasterProvider } from "@datarecce/ui";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
const queryClient = new QueryClient();
function App() {
return (
<QueryClientProvider client={queryClient}>
<MuiProvider>
<ToasterProvider>
{/* Your app components */}
</ToasterProvider>
</MuiProvider>
</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- CodeMirror-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";- Node.js >= 20
- pnpm (package manager)
# Clone with submodules
git clone --recursive https://github.com/DataRecce/recce-ui.git
cd recce-ui
# Install dependencies
pnpm install
# Build the library
make build
# Run type checking
make type-checkmake help # Show all available commands
make sync # Sync submodule to latest main and update dependencies
make sync-branch BRANCH=feature/xyz # Sync to specific branch
make install # Install dependencies
make build # Build the package
make type-check # Run TypeScript type checking
make clean # Clean build artifacts
make verify # Run sync + build + type-checkThis package uses a git submodule (recce-source) that references the main Recce repository. To update to the latest version:
# Sync to latest main branch
make sync
# Or sync to a specific branch
make sync-branch BRANCH=feature/new-featureThe sync command will:
- Update the submodule to the latest commit
- Sync dependencies from the Recce OSS package.json
- Install updated dependencies
If you prefer not to use Make:
# Initialize submodules (if not cloned with --recursive)
git submodule init
git submodule update
# Update submodule to latest
pnpm run submodule:update
# Sync dependencies from OSS
pnpm run sync:deps
# Build
pnpm build
# Type checking
pnpm type:check # Filters OSS-side errors
pnpm type:check:all # Shows all errors including OSSrecce-ui/
├── src/ # Wrapper/re-export source files
│ ├── components/ # Component exports
│ ├── api/ # API client exports
│ ├── hooks/ # Hook exports
│ └── types/ # Type exports
├── recce-source/ # Git submodule (Recce OSS)
│ └── js/src/ # Actual component source code
├── scripts/
│ ├── sync-submodule.sh # Submodule sync script
│ └── sync-deps.js # Dependency sync script
├── dist/ # Built output
├── Makefile # Build automation
└── package.json
This library is written in TypeScript and provides full type definitions. All exports include proper TypeScript types for enhanced development experience.
The library extends MUI with custom theme colors. If you're using TypeScript and need to use these colors, import the type augmentations:
// This is automatically included when importing from @datarecce/ui
// Custom colors available: brand, iochmara, cyan, amber, green, red, rose, fuchsia, neutral
// Custom sizes available: xsmallApache-2.0
Contributions are welcome! Please check the main Recce repository for contribution guidelines.