# achenchi7/aws-bootcamp-cruddur-2023 architecture

> Architecture diagram of the GitHub repository achenchi7/aws-bootcamp-cruddur-2023, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/achenchi7/aws-bootcamp-cruddur-2023
- Repository: https://github.com/achenchi7/aws-bootcamp-cruddur-2023

## Overview

##### Main Components Identification

The system should be represented with these key components:

a) Frontend Layer (React.js)
- Main React application container
- Feature modules:
- Authentication (SignIn/SignUp/Recover)
- Activity Feed System
- Messaging System
- User Profile Management
- Search Functionality

b) Backend Layer (Flask)
- API Services layer
- Activity Management
- Message Management
- User Management
- Authentication Services

**[Client Layer (Browser)]**
- ↕
**[Frontend React.js Layer]**
- ↕
**[Backend Flask API Layer]**
- ↕
**[Data Storage Layer]**

##### Specific Elements

a) Frontend Section:
- React Router paths (/pages directory)
- Component hierarchy
- State management flow
- API integration points

b) Backend Section:
- API endpoints from app.py
- Service layer organization (/services directory)
- Authentication middleware
- External service integrations

##### Interaction Flows

- User authentication flow
- Activity creation/reading flow
- Messaging flow
- Search operations

##### AWS Integration Points

- Hosting infrastructure
- Storage services
- Authentication services
- Budget notification system (from aws/budget-notification-with-subscribers.json)

##### Technical Details to Highlight

Annotations for:
- RESTful API endpoints
- WebSocket connections (if any)
- Authentication tokens flow
- Data persistence paths

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Web Browser"]
    end

    subgraph Frontend
        React["React Application"]:::frontend
        click React "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/frontend-react-js/src/App.js"
        
        subgraph Auth["Authentication Components"]
            SignIn["SignIn Page"]:::frontend
            SignUp["SignUp Page"]:::frontend
            Recover["Recovery Page"]:::frontend
            click SignIn "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/frontend-react-js/src/pages/SigninPage.js"
            click SignUp "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/frontend-react-js/src/pages/SignupPage.js"
            click Recover "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/frontend-react-js/src/pages/RecoverPage.js"
        end

        subgraph Activities["Activity Components"]
            ActFeed["Activity Feed"]:::frontend
            ActItem["Activity Item"]:::frontend
            click ActFeed "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/frontend-react-js/src/components/ActivityFeed.js"
            click ActItem "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/frontend-react-js/src/components/ActivityItem.js"
        end

        subgraph Messages["Message Components"]
            MsgFeed["Message Feed"]:::frontend
            MsgGroup["Message Groups"]:::frontend
            click MsgFeed "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/frontend-react-js/src/components/MessageFeed.js"
            click MsgGroup "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/frontend-react-js/src/components/MessageGroupFeed.js"
        end

        subgraph UserMgmt["User Management"]
            Profile["Profile Info"]:::frontend
            Search["Search"]:::frontend
            click Profile "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/frontend-react-js/src/components/ProfileInfo.js"
            click Search "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/frontend-react-js/src/components/Search.js"
        end
    end

    subgraph Backend
        Flask["Flask API"]:::backend
        click Flask "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/backend-flask/app.py"

        subgraph APIServices["API Services"]
            HomeAct["Home Activities"]:::backend
            CreateAct["Create Activity"]:::backend
            UserAct["User Activities"]:::backend
            SearchAct["Search Activities"]:::backend
            Messages["Messages"]:::backend
            MsgGroups["Message Groups"]:::backend
            CreateMsg["Create Message"]:::backend
            click HomeAct "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/backend-flask/services/home_activities.py"
            click CreateAct "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/backend-flask/services/create_activity.py"
            click UserAct "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/backend-flask/services/user_activities.py"
            click SearchAct "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/backend-flask/services/search_activities.py"
            click Messages "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/backend-flask/services/messages.py"
            click MsgGroups "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/backend-flask/services/message_groups.py"
            click CreateMsg "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/backend-flask/services/create_message.py"
        end

        OpenAPI["OpenAPI Spec"]:::backend
        click OpenAPI "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/backend-flask/openapi-3.0.yml"
    end

    subgraph AWS
        Budget["Budget Notifications"]:::aws
        click Budget "https://github.com/achenchi7/aws-bootcamp-cruddur-2023/blob/main/aws/budget-notification-with-subscribers.json"
        Storage["AWS Storage"]:::aws
        Auth["AWS Cognito"]:::aws
    end

    %% Connections
    Browser --> React
    React --> Flask
    Flask --> APIServices
    Flask --> AWS
    
    %% Styles
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef backend fill:#2ecc71,stroke:#27ae60,color:white
    classDef aws fill:#e67e22,stroke:#d35400,color:white

    %% Legend
    subgraph Legend
        Frontend_L["Frontend Component"]:::frontend
        Backend_L["Backend Component"]:::backend
        AWS_L["AWS Service"]:::aws
    end
```
