# anuradhaiyer/aws-cloud-project architecture

> Architecture diagram of the GitHub repository anuradhaiyer/aws-cloud-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anuradhaiyer/aws-cloud-project
- Repository: https://github.com/anuradhaiyer/aws-cloud-project

## Overview

##### Project type and purpose
- This is a full-stack web application called “Save To The Cloud” that lets users sign up, log in, and perform CRUD operations on files stored in Amazon S3.
- Backend: Node.js + Express + AWS-SDK. Frontend: AngularJS + Materialize CSS. Persistence: Amazon RDS (MySQL). Deployment: AWS Elastic Beanstalk, CloudFront, EC2, Auto Scaling, ELB, CloudWatch, SNS, Lambda.

##### File structure
Top-level
- server.js – Express server entry point with REST endpoints for sign-up, login, file upload/download/delete/update.
- package.json + config.json – Dependencies and configuration (DB credentials, AWS bucket info).
- models/userdataanu.js – Mongoose/ORM model describing user table schema in RDS.
- index.html – Static landing page, likely bootstrapping AngularJS.
Directories
- static/ – All static assets
– json/records.json – sample data.
- templates/ – HTML partials for header/nav and footer, used by Angular views.
- views/ – Likely server-side view or fallback index.html for deep linking.

##### README for additional insights
- Monitoring: CloudWatch alarms trigger Lambda + SNS notifications.
- Development stack: AngularJS MVC on client, RESTful JSON services on server, AWS SDK for S3 operations (putObject, getObject, listObjects).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client Tier
    subgraph "Client Tier"
        Browser["User's Browser"]:::frontend
    end

    %% CDN Tier
    CloudFront["Amazon CloudFront CDN"]:::cdn

    %% Static Assets (served via CloudFront)
    subgraph "Static Assets"
        AppJS["app.js"]:::frontend
        ControllerJS["controller.js"]:::frontend
        ServiceJS["service.js"]:::frontend
        DirectiveJS["directive.js"]:::frontend
        FilterJS["filter.js"]:::frontend
        LibFolder["lib/"]:::frontend
        LoginHTML["login.html"]:::frontend
        SignupHTML["signup.html"]:::frontend
        RetrieveHTML["retrieve.html"]:::frontend
        UpdateHTML["update.html"]:::frontend
        AboutHTML["Aboutme.html"]:::frontend
        ContactHTML["contact.html"]:::frontend
        ResourceHTML["resource.html"]:::frontend
        ResumeHTML["resume.html"]:::frontend
        NavTemplate["templates/assets/nav.html"]:::frontend
        FooterTemplate["templates/assets/footer.html"]:::frontend
        MainTemplate["templates/main.html"]:::frontend
        MaterializeCSS["materialize.css"]:::frontend
        StyleCSS["style.css"]:::frontend
        FontFolder["font/"]:::frontend
        RobotoFolder["fonts/roboto/"]:::frontend
        RecordsJSON["records.json"]:::frontend
    end

    %% Compute/API Tier
    subgraph "Compute/API Tier"
        ELB["Elastic Load Balancer"]:::compute
        subgraph "Auto Scaling Group"
            EC2["EC2 Instance\n(Node.js/Express)"]:::compute
        end
        Config["package.json + config.json"]:::compute
        Server["Express Server & REST API"]:::compute
    end

    %% Data Tier
    subgraph "Data Tier"
        RDS["Amazon RDS MySQL"]:::data
        UserModel["userdataanu.js\n(User Data Model)"]:::data
    end

    %% Storage Tier
    subgraph "Storage Tier"
        S3["Amazon S3 Bucket"]:::storage
    end

    %% Monitoring & Alerts
    subgraph "Monitoring & Alerts"
        CloudWatch["Amazon CloudWatch"]:::monitoring
        Lambda["AWS Lambda"]:::monitoring
        SNS["Amazon SNS"]:::monitoring
        Admin["Admin/DevOps"]:::monitoring
    end

    %% Connections
    Browser -->|"GET Static Assets"| CloudFront
    CloudFront -->|"Serves Static Content"| AppJS
    Browser -->|"REST API calls (HTTP)"| ELB
    ELB -->|"Forwards requests"| EC2
    EC2 -->|"MySQL queries"| RDS
    EC2 -->|"AWS-SDK: putObject()/getObject()"| S3
    EC2 -->|"Loads Config & Server" | Server
    EC2 -->|"Dependencies & Config"| Config
    Server -->|"Uses User Model"| UserModel
    CloudWatch -->|"Alarm triggers"| Lambda
    Lambda -->|"Invokes notifications"| SNS
    SNS -->|"Alerts sent to"| Admin

    %% Click Events
    click Server "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/server.js"
    click Config "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/package.json"
    click Config "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/config.json"
    click UserModel "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/models/userdataanu.js"
    click AppJS "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/static/js/app.js"
    click ControllerJS "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/static/js/controller.js"
    click ServiceJS "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/static/js/service.js"
    click DirectiveJS "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/static/js/directive.js"
    click FilterJS "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/static/js/filter.js"
    click LibFolder "https://github.com/anuradhaiyer/aws-cloud-project/tree/master/static/js/lib/"
    click LoginHTML "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/static/html/login.html"
    click SignupHTML "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/static/html/signup.html"
    click RetrieveHTML "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/static/html/retrieve.html"
    click UpdateHTML "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/static/html/update.html"
    click AboutHTML "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/static/html/Aboutme.html"
    click ContactHTML "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/static/html/contact.html"
    click ResourceHTML "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/static/html/resource.html"
    click ResumeHTML "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/static/html/resume.html"
    click NavTemplate "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/templates/assets/nav.html"
    click FooterTemplate "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/templates/assets/footer.html"
    click MainTemplate "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/templates/main.html"
    click MaterializeCSS "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/static/css/materialize.css"
    click StyleCSS "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/static/css/style.css"
    click FontFolder "https://github.com/anuradhaiyer/aws-cloud-project/tree/master/static/font/"
    click RobotoFolder "https://github.com/anuradhaiyer/aws-cloud-project/tree/master/static/fonts/roboto/"
    click RecordsJSON "https://github.com/anuradhaiyer/aws-cloud-project/blob/master/static/json/records.json"

    %% Styles
    classDef frontend fill:#B3CDE0,stroke:#333,stroke-width:1px
    classDef cdn fill:#6497B1,stroke:#333,stroke-width:1px
    classDef compute fill:#C7E9B4,stroke:#333,stroke-width:1px
    classDef data fill:#FDE0C5,stroke:#333,stroke-width:1px
    classDef storage fill:#FFE699,stroke:#333,stroke-width:1px
    classDef monitoring fill:#F8BBD0,stroke:#333,stroke-width:1px
```
