# mediyatri/mediyatri-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/mediyatri/mediyatri-frontend
- Repository: https://github.com/mediyatri/mediyatri-frontend

## Overview

##### Main Components
- Entry Point & Global Configurations:
- Node: “public/index.html” (the static HTML container)
- Node: “src/index.jsx” (the React entry point that bootstraps the application)
- Global Configuration Files: jsconfig.json, tailwind.config.js, postcss.config.js, and the Prettier configuration files.
- Application Core:
- Node: “src/App.jsx” – the top-level React application component.
- Node: “src/Routes.jsx” – manages client-side routing between pages.
- Pages:
- Nodes: The directories right under “src/pages” (e.g., DesignHomepage, DesignLogin, Design404ErrorPage, etc.) represent different routes and views. Each page encapsulates a distinct part of the UI.
- UI Components & Assets:
- Node: “src/components” – holds reusable UI components (buttons, checkboxes, headers, cards, list components, etc.). Also note the “src/components/new-design-button” subdirectory for a specialized component.
- Node: “src/assets” – contains fonts and images used in the application. Notice that some images are provided as React components (e.g., close.jsx, search.jsx) which might indicate SVGs or similar components.
- Utilities and Styling:
- Node: “src/utils” – contains helper functions or libraries.
- AWS Integration:
- Node: “src/aws-exports.js” – holds configuration details for AWS Amplify, enabling integration with external AWS services.
- Script: “myamplifypush.sh” – likely automates deployment or configuration sync with AWS Amplify.

##### Understanding Relationships and Data Flow
- “src/index.jsx” renders the main component “App.jsx”, which incorporates routing via “Routes.jsx”.
- “Routes.jsx” directs user navigation to the various page components (e.g., DesignHomepage, DesignLogin).
- Each page composes the UI using multiple reusable components from “src/components”.
- Styling is applied globally via the CSS files under “src/styles” and Tailwind configuration.
- AWS Amplify integration (highlighted by “aws-exports.js” and the Amplify push script) connects the application to backend services provided by AWS.

##### Architectural Patterns
- Component-Based Architecture: Each UI element is modular and reusable.
- MVC/MVVM-Like Separation: Views (pages and components) are cleanly separated from utility logic.
- Client-Side Routing: Managed in “src/Routes.jsx”, to enable single-page application (SPA) behavior.
- Integration with AWS Amplify: Indicating a hybrid cloud model where frontend interacts with AWS services.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Entry Point & Global Configurations
    subgraph "Entry Point & Global Configurations"
        idx("public/index.html"):::entry
        reactIdx("src/index.jsx"):::entry
        idx --> reactIdx
        subgraph "Global Config Files"
            jsconfig("jsconfig.json"):::config
            tailwind("tailwind.config.js"):::config
            postcss("postcss.config.js"):::config
            prettier(".prettierrc"):::config
        end
        %% Dashed connection indicating configuration dependency
        reactIdx -.-> jsconfig
    end

    %% Application Core
    subgraph "Application Core"
        app("src/App.jsx"):::core
        routes("src/Routes.jsx"):::core
    end
    reactIdx --> app
    app --> routes

    %% Pages
    subgraph "Pages"
        homepage("DesignHomepage (src/pages/DesignHomepage)"):::pages
        login("DesignLogin (src/pages/DesignLogin)"):::pages
        error404("Design404ErrorPage (src/pages/Design404ErrorPage)"):::pages
        getInTouch("DesignGetInTouch (src/pages/DesignGetInTouch)"):::pages
        pricing("DesignPricing (src/pages/DesignPricing)"):::pages
        services("DesignServices (src/pages/DesignServices)"):::pages
        signup("DesignSignUp (src/pages/DesignSignUp)"):::pages
        notFound("NotFound.jsx (src/pages/NotFound.jsx)"):::pages
    end
    routes --> homepage
    routes --> login
    routes --> error404
    routes --> getInTouch
    routes --> pricing
    routes --> services
    routes --> signup
    routes --> notFound

    %% UI Components & Assets
    subgraph "UI Components & Assets"
        components("Components: src/components"):::components
        newButton("New Design Button: src/components/new-design-button"):::components
        assets("Assets: src/assets"):::assets
    end
    homepage --> components
    login --> components
    error404 --> components
    getInTouch --> components
    pricing --> components
    services --> components
    signup --> components
    notFound --> components
    components --> newButton
    components --> assets

    %% Utilities and Styling
    subgraph "Utilities and Styling"
        styles("Styles: src/styles"):::styles
        utils("Utilities: src/utils"):::utils
    end
    components --> styles
    components --> utils

    %% AWS Integration
    subgraph "AWS Integration"
        awsConfig("AWS Amplify Config: src/aws-exports.js"):::aws
        awsDeploy("Deployment Script: myamplifypush.sh"):::aws
    end
    routes --> awsConfig
    awsConfig --> awsDeploy

    %% Click Events
    click idx "https://github.com/mediyatri/mediyatri-frontend/blob/main/public/index.html"
    click reactIdx "https://github.com/mediyatri/mediyatri-frontend/blob/main/src/index.jsx"
    click jsconfig "https://github.com/mediyatri/mediyatri-frontend/blob/main/jsconfig.json"
    click tailwind "https://github.com/mediyatri/mediyatri-frontend/blob/main/tailwind.config.js"
    click postcss "https://github.com/mediyatri/mediyatri-frontend/blob/main/postcss.config.js"
    click prettier "https://github.com/mediyatri/mediyatri-frontend/blob/main/.prettierrc"
    click app "https://github.com/mediyatri/mediyatri-frontend/blob/main/src/App.jsx"
    click routes "https://github.com/mediyatri/mediyatri-frontend/blob/main/src/Routes.jsx"
    click homepage "https://github.com/mediyatri/mediyatri-frontend/tree/main/src/pages/DesignHomepage"
    click login "https://github.com/mediyatri/mediyatri-frontend/tree/main/src/pages/DesignLogin"
    click error404 "https://github.com/mediyatri/mediyatri-frontend/tree/main/src/pages/Design404ErrorPage"
    click getInTouch "https://github.com/mediyatri/mediyatri-frontend/tree/main/src/pages/DesignGetInTouch"
    click pricing "https://github.com/mediyatri/mediyatri-frontend/tree/main/src/pages/DesignPricing"
    click services "https://github.com/mediyatri/mediyatri-frontend/tree/main/src/pages/DesignServices"
    click signup "https://github.com/mediyatri/mediyatri-frontend/tree/main/src/pages/DesignSignUp"
    click notFound "https://github.com/mediyatri/mediyatri-frontend/blob/main/src/pages/NotFound.jsx"
    click components "https://github.com/mediyatri/mediyatri-frontend/tree/main/src/components"
    click newButton "https://github.com/mediyatri/mediyatri-frontend/tree/main/src/components/new-design-button"
    click assets "https://github.com/mediyatri/mediyatri-frontend/tree/main/src/assets"
    click styles "https://github.com/mediyatri/mediyatri-frontend/tree/main/src/styles"
    click utils "https://github.com/mediyatri/mediyatri-frontend/tree/main/src/utils"
    click awsConfig "https://github.com/mediyatri/mediyatri-frontend/blob/main/src/aws-exports.js"
    click awsDeploy "https://github.com/mediyatri/mediyatri-frontend/blob/main/myamplifypush.sh"

    %% Styles
    classDef entry fill:#ffeb3b,stroke:#333,stroke-width:2px;
    classDef config fill:#e3f2fd,stroke:#333,stroke-width:2px;
    classDef core fill:#c8e6c9,stroke:#333,stroke-width:2px;
    classDef pages fill:#ffe0b2,stroke:#333,stroke-width:2px;
    classDef components fill:#bbdefb,stroke:#333,stroke-width:2px;
    classDef assets fill:#f0f4c3,stroke:#333,stroke-width:2px;
    classDef styles fill:#d1c4e9,stroke:#333,stroke-width:2px;
    classDef utils fill:#ffccbc,stroke:#333,stroke-width:2px;
    classDef aws fill:#ffcdd2,stroke:#333,stroke-width:2px;
```
