diff --git a/CLAUDE.md b/CLAUDE.md index 3af693b9..42b4a08b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -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 diff --git a/ee/ui-component/README.md b/ee/ui-component/README.md index f86c2f4e..1566fe47 100644 --- a/ee/ui-component/README.md +++ b/ee/ui-component/README.md @@ -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: @@ -7,37 +7,19 @@ 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 ( - 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 @@ -45,24 +27,6 @@ export default function YourApp() { - 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** @@ -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 @@ -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.