# Lineage Explorer

A React-based visualization tool for exploring data lineage and computational integrity. Part of the EQTYlab ecosystem, it displays data provenance chains showing how data flows through computational systems, which actors are involved, and what verification statements are attached.

## Features

- **Interactive Graph Visualization**: Drag-to-explore canvas with zoom/pan controls using ReactFlow
- **Detailed Inspector**: Sidebar showing registration, governance, storage, and signature details for selected nodes
- **Dual Operating Modes**:
  - **Manifest Viewer**: Upload or select sample manifest JSON files to explore
  - **Integrity Service**: Auth0-integrated mode for querying a backend integrity service

## Prerequisites

This project uses [Nix](https://nixos.org/) for development environment management. Install Nix, then the devshell will provide all required dependencies.

Alternatively, ensure you have installed:
- Node.js
- pnpm

## Local Development

```bash
# Enter the Nix development shell (if using Nix)
nix develop

# Install dependencies
pnpm install

# Start development server
pnpm dev
```

## Available Commands

| Command | Description |
|---------|-------------|
| `pnpm dev` | Start development server |
| `pnpm build` | Build both app and library |
| `pnpm build:app` | Build standalone application |
| `pnpm build:lib` | Build npm package |
| `pnpm fmt` | Format code with Prettier |
| `pnpm format:check` | Check code formatting |
| `pnpm lint` | Run ESLint |
| `pnpm lint:fix` | Run ESLint with auto-fix |
| `pnpm typecheck` | Run TypeScript type checking |

## Build Outputs

The project produces two build artifacts:

1. **Standalone App** (`dist/app/`): Deployed to https://explorer.eqtylab.io
2. **NPM Package** (`dist/lib/`): Published to npm as `@eqtylab/explorer`

## Release

Releases are automated via GitHub Actions and triggered by creating a GitHub Release.

### How to Release

1. Go to the repository's **Releases** page on GitHub
2. Click **Draft a new release**
3. Create a new tag with the version number (e.g., `v1.2.3` or `1.2.3`)
4. Fill in the release title and notes
5. Click **Publish release**

The publish workflow will automatically:
- Set the package version from the release tag
- Build the project
- Publish to npm

### Version Management

The version in `package.json` is set automatically during CI from the release tag. You do not need to manually update the version in `package.json`.

## Configuration

See the [configuration documentation](https://eqty-lab.readme.io/update/docs/custom-config#/) for customization options.

## Adding Example Manifests

1. Add the manifest JSON file to `./public/manifests`
2. Update the `manifests` section in `./src/app/config.json`
   - The name must match the filename without the extension
