How vboudreau55/haze works
Main Components
a. Frontend:
• The React + Vite application, managed primarily within the “src” directory (e.g., src/App.tsx, src/pages, src/components, src/services).
• This layer includes all the UI pages (Landing, Home, About, Settings) and reusable components (charts, globe visualization, Navbar, country sensor table).
b. AWS Amplify Integration:
• The “amplify” directory holds configuration files and resources for authentication (amplify/auth/resource.ts) and data (amplify/data/resource.ts).
• Integration with AWS services (Cognito for Authentication, AppSync for API, DynamoDB for Database).
• The “amplify.yml” file indicates build and deployment configurations for connecting the frontend with these AWS services.
c. Backend / Lambda Functions:
• The “lambda” directory contains Python lambda functions (e.g., lambda/api_processing.py, lambda/lambda_funciton.py) which likely execute business logic or heavy processing.
d. External Elements:
• API endpoints exposed via Amplify and Lambda.
• Build and configuration tools (Vite, eslint, TypeScript configuration files) are also part of the development ecosystem but are not core to the architectural flow.
Relationships and Interactions
a. The Frontend communicates with AWS services via AWS Amplify, calling APIs (GraphQL via AppSync) and interacting with Cognito for user authentication.
b. The API requests may sometimes trigger AWS Lambda functions, as indicated by the presence of the lambda directory. This shows a separation where some business logic resides in Lambda functions rather than directly within Amplify.
c. The database layer (DynamoDB) is tied into the Amplify configuration and works behind the scenes to support real-time data requirements.
Architectural Patterns and Design Principles
a. Separation of Concerns: Clear partitioning between UI (React components/pages), business logic (services and lambda functions), and backend configuration (AWS Amplify).
b. Microservices Elements: Use of separate Lambda functions for API processing allows modular and scalable functions.
c. Client-Server Model: The frontend acts primarily as the client interface, while AWS Amplify and Lambda provide server-side processing and data management.
Relevant Technologies and Frameworks
• Frontend: React, Vite, TypeScript.
• AWS Services: Amplify, AWS Cognito, AWS AppSync, AWS DynamoDB.
• Backend: AWS Lambda (Python-based functions).
• Development Tools: ESLint, TypeScript, configuration files (tsconfig.json, vite.config.ts).
Elements
• Use clear, easily understandable labels for each component (e.g., “React Frontend”, “AWS Cognito”, “AWS AppSync”, “AWS DynamoDB”, “Lambda Functions”).
• User → React Frontend → AWS Amplify API → AWS AppSync and/or Lambda Functions.
• Lambda Functions → Data Storage (DynamoDB).
• Relationships where appropriate – noting that authentication flows will go through Cognito, API calls through AppSync, and so on.
• Frontend to the AWS Amplify service layer, indicating pathways for authentication (linking to AWS Cognito), API requests (linking to AWS AppSync), and data transactions (linking to DynamoDB).
• Supportive configuration elements (like “amplify.yml”, “package.json”) in an annotations area to indicate deployment and build management, if necessary.