Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ npm run dev # Development server

# Build and quality
npm run build # Production build
npm run build:package # Package build
npm start # Serve the production build
npm run lint # ESLint
npm run format # Prettier formatting
npm run format:check # Check formatting
Expand Down
58 changes: 12 additions & 46 deletions ee/ui-component/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @morphik/ui
# Morphik UI Component

A modern React-based UI for Morphik, built with Next.js and Tailwind CSS. This component provides a user-friendly interface for:

Expand All @@ -7,62 +7,26 @@ A modern React-based UI for Morphik, built with Next.js and Tailwind CSS. This c
- Real-time document processing feedback
- Query testing and prototyping

## Installation
## Development Quick Start

```bash
npm install @morphik/ui
```
The UI component is a private Next.js app in this repository. It is not published as an `@morphik/ui` package.
Run these commands from `ee/ui-component`:

## Usage

```jsx
import { MorphikUI } from "@morphik/ui";

export default function YourApp() {
return (
<MorphikUI
connectionUri="your-connection-uri"
apiBaseUrl="http://your-api-base-url"
isReadOnlyUri={false}
onUriChange={uri => console.log("URI changed:", uri)}
/>
);
}
```bash
npm install
npm run dev
```

## Props
Open [http://localhost:3000](http://localhost:3000) and connect to a running local Morphik server with `localhost:8000`.

| Prop | Type | Default | Description |
| --------------- | ----------------------- | ------------------------- | -------------------------------------- |
| `connectionUri` | `string` | `undefined` | Connection URI for Morphik API |
| `apiBaseUrl` | `string` | `"http://localhost:8000"` | Base URL for API requests |
| `isReadOnlyUri` | `boolean` | `false` | Controls whether the URI can be edited |
| `onUriChange` | `(uri: string) => void` | `undefined` | Callback when URI is changed |
The routed app lives under `app/`; a reusable dashboard component also exists at `components/MorphikUI.tsx`. Check `components/types.ts` for the supported internal prop contract before embedding it elsewhere in this app.

## Prerequisites

- Node.js 18 or later
- npm or yarn package manager
- A running Morphik server

## Development Quick Start

1. Install dependencies:

```bash
npm install
```

2. Start the development server:

```bash
npm run dev
```

3. Open [http://localhost:3000](http://localhost:3000) in your browser

4. Connect to your Morphik server using a URI from the `/local/generate_uri` endpoint

## Features

- **Document Management**
Expand All @@ -82,7 +46,7 @@ npm run dev
- **Connection Management**
- Easy server connection
- Connection status indicator
- Automatic reconnection
- Cloud connection persistence and automatic local connection clearing on restart
- Error handling

## Development
Expand Down Expand Up @@ -111,6 +75,8 @@ npm run build
npm start
```

There is no `build:package` script in this package.

## Contributing

We welcome contributions! Please feel free to submit a Pull Request.