Add deprecation notice pointing to procurement-ingest (#13)
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
Adam Moussa 2026-05-12 15:27:25 -04:00 • committed by GitHub
parent a1effe6878
commit 7bb4d502f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.