How equalifyeverything/equalify-api works
Main Components
a) Client Layer
• External clients (Web applications, API consumers)
• Postman collection integration point
b) AWS Lambda Environment
• Fastify Server Instance
• Main application container
c) Core Service Groups
• Authentication Services (Cognito integration)
• Route Handlers
• Internal Processors
• Scheduled Tasks
• Utility Services
d) External Services Integration
• OpenAI Integration (noted from utils/openai.ts)
• GraphQL Services (noted from utils/graphql.ts)
• Database Layer (from utils/db.ts)
Component Relationships and Structure
[Client Layer]
• ↓
[API Gateway/Lambda]
• ↓
[Fastify Server]
• ↓
[Core Services]
Detailed Component Breakdown
a) Route Handlers (src/routes/):
• Property Management
• Report Management
• Scan Management
• Results Management
• User Management
• Analytics (Charts)
b) Cognito Integration (src/cognito/):
• Authentication flows
• Custom message handling
• Token generation
• User confirmation processes
c) Internal Processors (src/internal/):
• Message and tag migration
• Scan processing
d) Scheduled Tasks (src/scheduled/):
• Minute-based tasks
• Fifteen-minute interval tasks
Flow Patterns to Highlight
• Authentication flows
• API request/response paths
• Scheduled task triggers
• Internal processing workflows
Additional Elements
• Environment indicators (Production/Staging/Local)
• Security boundaries
• Scaling points
• Monitoring/logging points