Update README.md to provide a comprehensive overview of The Order monorepo, including repository structure, quickstart guide, development workflow, and contribution guidelines.
This commit is contained in:
21
packages/workflows/README.md
Normal file
21
packages/workflows/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# @the-order/workflows
|
||||
|
||||
Temporal/Step Functions workflow definitions for The Order.
|
||||
|
||||
## Usage
|
||||
|
||||
```typescript
|
||||
import { intakeWorkflow, reviewWorkflow } from '@the-order/workflows';
|
||||
|
||||
const result = await intakeWorkflow({
|
||||
documentId: 'doc-123',
|
||||
fileUrl: 'https://...',
|
||||
userId: 'user-123',
|
||||
});
|
||||
```
|
||||
|
||||
## Workflows
|
||||
|
||||
- `intakeWorkflow` - Document intake and processing
|
||||
- `reviewWorkflow` - Document review and approval
|
||||
|
||||
22
packages/workflows/package.json
Normal file
22
packages/workflows/package.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "@the-order/workflows",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"description": "Temporal/Step Functions workflow definitions",
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"dev": "tsc --watch",
|
||||
"lint": "eslint src --ext .ts",
|
||||
"type-check": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@temporalio/workflow": "^1.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.10.6",
|
||||
"typescript": "^5.3.3"
|
||||
}
|
||||
}
|
||||
|
||||
7
packages/workflows/src/index.ts
Normal file
7
packages/workflows/src/index.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* The Order Workflows Package
|
||||
*/
|
||||
|
||||
export * from './intake';
|
||||
export * from './review';
|
||||
|
||||
28
packages/workflows/src/intake.ts
Normal file
28
packages/workflows/src/intake.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Intake workflow definitions
|
||||
*/
|
||||
|
||||
export interface IntakeWorkflowInput {
|
||||
documentId: string;
|
||||
fileUrl: string;
|
||||
userId: string;
|
||||
}
|
||||
|
||||
export interface IntakeWorkflowOutput {
|
||||
documentId: string;
|
||||
processed: boolean;
|
||||
classification: string;
|
||||
extractedData?: unknown;
|
||||
}
|
||||
|
||||
/**
|
||||
* Intake workflow: ingestion → OCR → classify → route
|
||||
*/
|
||||
export async function intakeWorkflow(
|
||||
input: IntakeWorkflowInput
|
||||
): Promise<IntakeWorkflowOutput> {
|
||||
// Implementation using Temporal or Step Functions
|
||||
// This is a placeholder structure
|
||||
throw new Error('Not implemented');
|
||||
}
|
||||
|
||||
28
packages/workflows/src/review.ts
Normal file
28
packages/workflows/src/review.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Review workflow definitions
|
||||
*/
|
||||
|
||||
export interface ReviewWorkflowInput {
|
||||
documentId: string;
|
||||
reviewerId: string;
|
||||
workflowType: 'legal' | 'finance' | 'compliance';
|
||||
}
|
||||
|
||||
export interface ReviewWorkflowOutput {
|
||||
documentId: string;
|
||||
approved: boolean;
|
||||
comments?: string;
|
||||
nextStep?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Review workflow: document review → approval → publish
|
||||
*/
|
||||
export async function reviewWorkflow(
|
||||
input: ReviewWorkflowInput
|
||||
): Promise<ReviewWorkflowOutput> {
|
||||
// Implementation using Temporal or Step Functions
|
||||
// This is a placeholder structure
|
||||
throw new Error('Not implemented');
|
||||
}
|
||||
|
||||
10
packages/workflows/tsconfig.json
Normal file
10
packages/workflows/tsconfig.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user