Skip to content

yangzi33/loomis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loomis Demo

Loomis is an AI-powered asset management system. This demo provides a secure, event-driven architecture that allows users to upload files directly to AWS S3 and trigger automated AI processing.

Architecture Overview

The project follows a Mono-repo structure and leverages a Core-Out strategy:

  • Frontend: React (Vite + JavaScript)
  • Backend (Signer): Node.js + Express
  • Infrastructure: AWS CDK (TypeScript)
  • AI Worker: Python Lambda + Amazon Textract
  • Security: IAM Roles & S3 Pre-signed URLs (No static access keys)

Project Structure

loomis-platform/
├── infra/                # AWS CDK Infrastructure as Code
│   ├── lib/              # Stack definitions (S3, Lambda, IAM)
│   └── bin/              # App entry point
├── services/
│   ├── api/              # Node.js Signer API (Generates upload permissions)
│   └── worker/           # Python AI Processor (Textract integration)
└── web/                  # React Frontend (User Interface)

Getting Started (WSL Development)

1. Prerequisites

  • Node.js LTS & npm
  • Python 3.11+
  • AWS CLI v2 (Configured via aws sso login or aws configure)
  • AWS CDK CLI (npm install -g aws-cdk)

2. Infrastructure Setup

Deploy the cloud resources using the CDK:

cd infra
npm install
npx cdk bootstrap
npx cdk deploy

Note: Ensure the S3 CORS policy allows http://localhost:5173.

3. Signer API Setup

Start the backend server to handle Pre-signed URL requests:

cd services/api
npm install
# Ensure .env contains BUCKET_NAME and AWS_REGION
node index.js

4. Frontend Setup

Launch the React development server:

cd web
npm install
npm run dev

Features Implemented

  • Secure Uploads: Uses S3 Pre-signed URLs so the server never touches file binaries.
  • Event-Driven AI: S3 ObjectCreated events automatically trigger the Python worker.
  • OCR Integration: Python Lambda extracts text from images/PDFs using Amazon Textract.
  • Cross-Platform Compatibility: Fully functional within WSL2 with optimized networking (0.0.0.0 binding).
  • Zero Static Credentials: Architecture supports IAM Role assumption via AWS SSO.

Verification Flow

  1. Open the web UI at http://localhost:5173.
  2. Upload an image containing text.
  3. Observe the "Success" status in the UI.
  4. Check AWS CloudWatch Logs for the AIWorkerFunction to see the extracted text.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

An AI-powered asset management platform that enables secure file uploads to AWS S3 and triggers automated OCR text extraction via Amazon Textract.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors