# nhungnehehe/242mi5702_webdevelopment architecture

> Architecture diagram of the GitHub repository nhungnehehe/242mi5702_webdevelopment, 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/nhungnehehe/242mi5702_webdevelopment
- Repository: https://github.com/nhungnehehe/242mi5702_webdevelopment

## Overview

##### Project Type & Purpose
- The project is a full-stack web application built as a final project for a Web Business Development course. It focuses on a furniture sales website called EvoCasa.
- It uses a typical MEAN-like stack: Angular for the client-side (both customer and admin interfaces), Node.js with Express for the backend API, and MongoDB for data persistence.

##### File Structure
- There are three top-level application components:
- “my-client”: Contains an Angular application with numerous UI components (pages like homepage, blog, cart, product-detail, etc.) for the customer-facing website.
- “my-admin”: Holds another Angular application with components that manage the administrative side (category, product, customer, order management, etc.).
- “my-server”: Contains a Node.js application (likely using Express) that acts as the API backend for both frontends.
- A “data” folder at the root holds JSON files (such as EvoCasa.Account.json, EvoCasa.Product.json, etc.) which appear to be used for seeding or initial database data.
- Configuration files (like angular.json, package.json, tsconfig files) and IDE configuration (like .vscode, .editorconfig) indicate standard Angular and Node.js project conventions.

##### Instructing the Principal Software Engineer to Include the Following
- Areas where potential authentication/authorization or other middleware might be applied.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Frontend Layer
    subgraph "Frontend Applications"
        subgraph "Client Application (Customer)"
            Client["Client (my-client)"]:::frontend
        end
        subgraph "Admin Application"
            Admin["Admin (my-admin)"]:::frontend
            AuthGuard["Authentication Guards"]:::auth
        end
    end

    %% Backend Layer
    subgraph "Backend API"
        Server["Server (my-server)"]:::backend
    end

    %% Data Layer
    subgraph "Data Persistence Layer"
        Database["Database (MongoDB)"]:::database
        DataSeeding["Data Seeding (data)"]:::data
    end

    %% Data Flow Arrows
    Client -->|"HTTP/API"| Server
    Admin -->|"HTTP/API"| Server
    Server -->|"REST calls"| Database
    DataSeeding -->|"seedData"| Database
    AuthGuard ==>|"accessControl"| Admin

    %% Click Events
    click Client "https://github.com/nhungnehehe/242mi5702_webdevelopment/tree/main/my-client/src/app/"
    click Admin "https://github.com/nhungnehehe/242mi5702_webdevelopment/tree/main/my-admin/src/app/"
    click Server "https://github.com/nhungnehehe/242mi5702_webdevelopment/blob/main/my-server/index.js"
    click DataSeeding "https://github.com/nhungnehehe/242mi5702_webdevelopment/tree/main/data"
    click AuthGuard "https://github.com/nhungnehehe/242mi5702_webdevelopment/tree/main/my-admin/src/app/guards"

    %% Styles
    classDef frontend fill:#f9f,stroke:#333,stroke-width:2px;
    classDef backend fill:#bbf,stroke:#333,stroke-width:2px;
    classDef database fill:#ccf,stroke:#333,stroke-width:2px;
    classDef data fill:#fcf,stroke:#333,stroke-width:2px;
    classDef auth fill:#cfc,stroke:#333,stroke-width:2px;
```
