How omerteomim/essay-inspector works
Project Type and Purpose
• This is a serverless, full‐stack web application (“Essay Inspector”) that analyzes and scores essays.
• The front end is a single static HTML file (index.html) and the back end is an AWS Lambda function (lambda_function.py).
• Infrastructure is provisioned via Terraform (main.tf, variables.tf) and deployed automatically with a GitHub Actions workflow (.github/workflows/deploy.yaml).
File Structure
• Top level:
• index.html – static UI (web form, results display)
• lambda_function.py – serverless compute, houses NLP/ML scoring logic
• main.tf & variables.tf – Terraform modules for AWS resources (Lambda, IAM, API Gateway, S3, CloudFront, etc.)
• .github/workflows/deploy.yaml – CI/CD pipeline deploying Terraform and application
• No separate “frontend” or “backend” directories—everything lives at root, indicating a minimal, serverless architecture.
Extract Additional Insights from README
• Core features: automated scoring, grammar/style analysis, structure evaluation, vocabulary assessment, detailed feedback, batch processing.
• Under the hood: natural language processing and machine learning algorithms all executed in the Lambda function.
Main Components
a. Frontend (browser)
b. CDN & Static Hosting (Amazon CloudFront + S3)
c. API Layer (Amazon API Gateway)
d. Compute (AWS Lambda with NLP/ML libraries)
e. Infrastructure as Code (Terraform)
f. CI/CD Pipeline (GitHub Actions)
Relationships and Data Flows
1. User opens the browser → requests index.html from CloudFront → CloudFront fetches from S3
2. index.html (JavaScript) sends HTTP(S) POST to API Gateway endpoint
3. API Gateway invokes the Lambda function
4. Lambda executes NLP/ML scoring logic, returns JSON report
5. API Gateway returns the response to the browser, which renders the feedback report
6. (Batch mode: same flow, but JavaScript payload contains multiple essays)
7. CI/CD: GitHub Actions triggers on push → runs Terraform apply → updates S3, API Gateway, Lambda, etc.
Architectural Patterns and Design Principles
• Serverless microservices: each unit of functionality is a discrete Lambda function
• Infrastructure as Code: Terraform modules define and version your entire stack
• Separation of concerns: static UI vs. compute layer vs. CI/CD
• Event-driven: HTTP events trigger compute
• High scalability and pay-per-use: Lambda and CDN scale automatically
Technologies and Frameworks to Highlight
• AWS Lambda (compute)
• Amazon API Gateway (REST API)
• Amazon S3 & CloudFront (static hosting + CDN)
• Terraform (IaC)
• GitHub Actions (CI/CD)
• Python, plus NLP/ML libraries in lambda_function.py