# yashasvi14/cloudmart architecture

> Architecture diagram of the GitHub repository yashasvi14/cloudmart, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yashasvi14/cloudmart
- Repository: https://github.com/yashasvi14/cloudmart

## Overview

##### Project Type and Purpose
- Although the file tree shows a typical modern frontend project (using React, Vite, Tailwind, and a componentized directory structure), the README reveals that CloudMart is part of a much larger multi-cloud, event-driven microservices ecosystem. Essentially, the project is a multi-cloud, DevOps, and AI challenge that integrates solutions across AWS, Google Cloud, and Microsoft Azure.
- The frontend repository (i.e., “cloudmart-frontend”) is one part of that larger ecosystem, with the README mentioning complementary services like the backend service, AWS Lambda functions, DynamoDB, Kubernetes-managed containers, and AI components (using Microsoft Azure AI Language and OpenAI).

##### File Structure
- The file tree has clear top-level directories such as “public” and “src” with further separation into numerous React components (e.g., AIAssistant, AdminPage, CartPage, etc.). This means that on the frontend side, the application follows a component-based design, common in React applications.
- Configuration files like Vite config, Tailwind CSS, .env, and Dockerfile indicate that the app is containerized and built with modern front-end tooling, which is part of a continuous integration and deployment chain in a DevOps setup.

##### README for Additional Insights
- The README provides a broad picture: It emphasizes a multi-cloud architecture with components such as an Amazon EKS cluster managing both frontend (“cloudmart-frontend”) and backend (“cloudmart-backend”) services.
- The infrastructure is provisioned via Terraform, with separate mentions for AWS resources (VPC, DynamoDB, CodePipeline, CodeBuild), as well as integrations with Google BigQuery and Azure AI language services.
- The architecture includes both event-driven paradigms (using DynamoDB streams to trigger Lambda functions) and container orchestration (using Kubernetes with load balancers).

a. Main components:
- Frontend Service: Represented by the “cloudmart-frontend” repository (the React application seen in the file tree).
- Backend Service: Implied in the README (though in a separate repository).
- Infrastructure as Code (IaC): Terraform scripts provisioning AWS resources (VPC, EKS, CodePipeline, etc.).
- Container Orchestration: Amazon EKS running both frontend and backend pods with a Kubernetes Load Balancer.
- Event-Driven Components: AWS DynamoDB streams, Lambda functions triggered by events, sending processed data to analytical services.
- Analytics & AI: Integration with Google BigQuery for analytics and Azure AI Language & OpenAI services for intelligent automation.
- DevOps Pipeline: Incorporating AWS CodePipeline, CodeBuild, and container image registries (Amazon ECR), indicating automated deployment practices.

b. Relationships and interactions:
- CI/CD pipeline integration showing CodePipeline and CodeBuild automating deployments to the EKS cluster.
- External integrations, clearly indicating the multi-cloud scenario—AWS hosting the main infrastructure, Google Cloud providing analytics, and Microsoft Azure supplying AI services.

c. Architectural Patterns and Design Principles:
- Microservices and containerization pattern: Both frontend and backend services are separate and scalable.
- Infrastructure’s cloud-native design using Terraform and Kubernetes that underpin the application’s scalability and resilience.
- DevOps best practices by showing CI/CD pipelines and automated deployments.

d. Relevant technologies:
- Frontend: React, Vite, Tailwind CSS
- DevOps/Infrastructure: Docker, Terraform, Kubernetes (Amazon EKS), AWS CodePipeline, CodeBuild
- Databases & Event Sources: AWS DynamoDB with streaming
- Serverless: AWS Lambda
- Analytics: Google BigQuery
- AI: Microsoft Azure AI Language, OpenAI (and possibly Amazon Bedrock)
- Cloud Providers: AWS, Google Cloud, Microsoft Azure

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Infrastructure Layer
    subgraph "Infrastructure"
        IaC["Terraform Provisioning (AWS Infrastructure)"]:::infrastructure
        EKS["Amazon EKS Cluster (Kubernetes)"]:::orchestration
        LB["Kubernetes Load Balancer"]:::orchestration
        IaC --> EKS
        EKS --> LB
    end

    %% Services Layer
    subgraph "Services"
        FE["Frontend Service (cloudmart-frontend)"]:::service
        BE["Backend Service (cloudmart-backend)"]:::service
        LB --> FE
        LB --> BE
    end

    %% CI/CD Pipeline Layer
    subgraph "CI/CD Pipeline"
        CodePipe["AWS CodePipeline"]:::devops
        CodeBuild["AWS CodeBuild"]:::devops
        CodePipe --> CodeBuild
        CodeBuild --> EKS
    end

    %% Event-Driven Processing
    subgraph "Event-Driven Processing"
        DDB["AWS DynamoDB (with Streams)"]:::db
        Lambda["AWS Lambda Functions"]:::serverless
        Analytics["Google BigQuery (Analytics)"]:::analytics
        AI["AI Services (Azure AI Language, OpenAI/Bedrock)"]:::ai
        DDB -->|"triggers"| Lambda
        Lambda -->|"processes"| Analytics
        Lambda -->|"processes"| AI
    end

    %% Frontend Application Details
    subgraph "Frontend Application Details"
        React["React Application"]:::frontend
        Comp["UI Components (AIAssistant,AdminPage,CartPage,...)"]:::frontend
        Config["Configuration Files (Vite, Tailwind, .env,/src/config)"]:::frontend
        Assets["Static Assets"]:::frontend
        Utils["Utility Functions (/src/utils)"]:::frontend
        React --> Comp
        React --> Config
        React --> Assets
        React --> Utils
    end

    %% Linking Frontend Service with Frontend Application
    FE --> React

    %% Containerization Aspect
    Docker["Docker Containerization"]:::devops
    CodeBuild --> Docker
    Docker --> EKS

    %% External Cloud Providers
    ExAWS["AWS"]:::external
    ExGoogle["Google Cloud"]:::external
    ExAzure["Microsoft Azure"]:::external
    EKS -.-> ExAWS
    Analytics -.-> ExGoogle
    AI -.-> ExAzure

    %% Click Events for Component Mapping
    click FE "https://github.com/yashasvi14/cloudmart/tree/main//src"
    click FE "https://github.com/yashasvi14/cloudmart/tree/main//public"
    click Comp "https://github.com/yashasvi14/cloudmart/tree/main//src/components"
    click Config "https://github.com/yashasvi14/cloudmart/blob/main//vite.config.js"
    click Config "https://github.com/yashasvi14/cloudmart/blob/main//tailwind.config.js"
    click Config "https://github.com/yashasvi14/cloudmart/blob/main/.env"
    click Config "https://github.com/yashasvi14/cloudmart/tree/main//src/config"
    click Docker "https://github.com/yashasvi14/cloudmart/tree/main/Dockerfile"
    click Assets "https://github.com/yashasvi14/cloudmart/tree/main//src/assets"
    click Utils "https://github.com/yashasvi14/cloudmart/tree/main//src/utils"

%% Styles
classDef infrastructure fill:#f0e68c,stroke:#333,stroke-width:2px;
classDef orchestration fill:#ffdead,stroke:#333,stroke-width:2px;
classDef service fill:#add8e6,stroke:#333,stroke-width:2px;
classDef db fill:#ffa07a,stroke:#333,stroke-width:2px;
classDef serverless fill:#ff7f50,stroke:#333,stroke-width:2px;
classDef analytics fill:#98fb98,stroke:#333,stroke-width:2px;
classDef ai fill:#dda0dd,stroke:#333,stroke-width:2px;
classDef devops fill:#87ceeb,stroke:#333,stroke-width:2px;
classDef frontend fill:#ffb6c1,stroke:#333,stroke-width:2px;
classDef external fill:#e6e6fa,stroke:#333,stroke-width:2px;
```
