mirror of
https://github.com/Sea-Haven-Industries/workorder-ingest.git
synced 2026-05-18 20:20:12 +00:00
Add deprecation notice pointing to procurement-ingest (#13)
Some checks failed
Deploy / deploy (push) Has been cancelled
Some checks failed
Deploy / deploy (push) Has been cancelled
This commit is contained in:
parent
a1effe6878
commit
7bb4d502f2
1 changed files with 4 additions and 67 deletions
71
README.md
71
README.md
|
|
@ -1,70 +1,7 @@
|
|||
# Work Order Ingest
|
||||
# Work Order Ingest (Archived)
|
||||
|
||||
AWS serverless pipeline that ingests work order emails from Amazon's APM system (Hexagon EAM / HxGN SmartCloud), parses them with Claude AI, and stores structured data in DynamoDB.
|
||||
> **This repo has been merged into [procurement-ingest](https://github.com/Sea-Haven-Industries/procurement-ingest).** All future development happens there.
|
||||
|
||||
## Architecture
|
||||
The work order ingestion pipeline now lives under `lambdas/wo/` in the procurement-ingest repo, deployed as the `WorkorderIngestStack` CloudFormation stack alongside the PO pipeline.
|
||||
|
||||
```
|
||||
Email (amazon@seahavenind.com)
|
||||
→ Gmail filter (from: noreply@hxgnsmartcloud.com)
|
||||
→ Forwards to apm@int.seahaven.com (SES)
|
||||
→ S3 bucket (raw email storage)
|
||||
→ Lambda (email processor)
|
||||
→ Claude Haiku (structured extraction)
|
||||
→ DynamoDB (WorkOrders + WorkOrderComments)
|
||||
```
|
||||
|
||||
## Components
|
||||
|
||||
- **Email Processor Lambda** (`lambdas/email_processor/`) - Parses raw emails, sends to Claude for structured extraction, writes to DynamoDB
|
||||
- **Web UI Lambda** (`lambdas/web_ui/`) - Server-rendered HTML dashboard for viewing work orders and event history
|
||||
- **CDK Stack** (`cdk/`) - Infrastructure as code for all AWS resources
|
||||
- **Shared Models** (`shared/`) - Data models for work orders, comments, and parsed emails
|
||||
|
||||
## Extracted Fields
|
||||
|
||||
- Work Order ID, Description, Status
|
||||
- Site Code, Building, Address
|
||||
- Severity, Priority
|
||||
- Due Date, Date Reported, Scheduled Start
|
||||
- Assigned To, Commenter, Comment Text
|
||||
- Record Type (new_work_order, update, comment, cancellation)
|
||||
|
||||
## DynamoDB Tables
|
||||
|
||||
- **WorkOrders** - Latest state of each work order (PK: `work_order_id`)
|
||||
- **WorkOrderComments** - Event history per work order (PK: `work_order_id`, SK: `comment_id`)
|
||||
|
||||
## Local Testing
|
||||
|
||||
```bash
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install anthropic boto3
|
||||
export ANTHROPIC_API_KEY=sk-ant-...
|
||||
python test_local.py
|
||||
```
|
||||
|
||||
## Deployment
|
||||
|
||||
```bash
|
||||
cd cdk
|
||||
pip install aws-cdk-lib constructs
|
||||
npx cdk bootstrap # first time only
|
||||
npx cdk deploy
|
||||
```
|
||||
|
||||
After deploying, store your Anthropic API key in Secrets Manager:
|
||||
|
||||
```bash
|
||||
aws secretsmanager put-secret-value \
|
||||
--secret-id "workorder-ingest/anthropic-api-key" \
|
||||
--secret-string "sk-ant-..." \
|
||||
--region us-east-1
|
||||
```
|
||||
|
||||
## SES Configuration
|
||||
|
||||
- Domain: `int.seahaven.com` (MX record pointing to `inbound-smtp.us-east-1.amazonaws.com`)
|
||||
- Receipt Rule Set: `INBOUND_MAIL`
|
||||
- Recipient: `apm@int.seahaven.com`
|
||||
This repo is archived and read-only.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue