# shunxiangg/fed_eva_website architecture

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

- Interactive diagram: https://gitdiagram.com/shunxiangg/fed_eva_website
- Repository: https://github.com/shunxiangg/fed_eva_website

## Overview

##### Project type and purpose
- This is a client-heavy, static single-page/multi-page web application (“MokeSell”) that implements an interactive e-commerce experience.
- It relies on front-end technologies (HTML/CSS/JavaScript) and communicates with a cloud-hosted NoSQL database (RestDB) via REST APIs.
- Purpose: allow users to browse, search, buy, sell, and manage accounts and rewards through a gamified interface.

##### File structure
- Top-level HTML pages: index.html, browse.html, home.html, productInformation.html, login.html, signup.html, etc.
- Static assets:
- css_folder/ – all style sheets per page or component (e.g., cart.css, deals.css, payment.css…)
- img_folder/ – product and UI images in AVIF format
- js_folder/ – core front-end logic (view rendering, event handlers, DOM manipulation)
- js_api_folder/ – encapsulated API calls for login, signup, data fetching, and authentication
- No server-side code: the only “backend” is RestDB’s REST API endpoints (accounts, listings, purchases, etc.).
- Third-party integrations: payment gateway APIs, Lottie animation library, Jotform/chatbot.

##### README for additional insights
- Database Usage: all user, product, listing, transaction data stored in RestDB.
- Features: user account management, listing management, search/filter, cart, checkout, rewards.
- Technology stack: HTML5, CSS3, vanilla JavaScript, third-party APIs, Lottie.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% UI Views
    subgraph "UI Views"
        style UIViews fill:#ADD8E6,stroke:#000,stroke-width:1px
        UIViewsIndex["index.html"]:::frontend
        UIViewsBrowse["browse.html"]:::frontend
        UIViewsHome["home.html"]:::frontend
        UIViewsProductInfo["productInformation.html"]:::frontend
        UIViewsLogin["login.html"]:::frontend
        UIViewsSignup["signup.html"]:::frontend
        UIViewsCart["cart.html"]:::frontend
        UIViewsDeals["deals.html"]:::frontend
        UIViewsEvents["events.html"]:::frontend
        UIViewsAds["ads.html"]:::frontend
        UIViewsPayment["payment.html"]:::frontend
        UIViewsProfile["profile.html"]:::frontend
        UIViewsRewards["rewards.html"]:::frontend
        UIViewsSell["sell.html"]:::frontend
        UIViewsShipping["shipping.html"]:::frontend
    end

    %% Presentation Styles
    subgraph "CSS Styles" 
        style CSSStyles fill:#ADD8E6,stroke:#000,stroke-width:1px
        CSSFolder["css_folder/"]:::asset
    end

    %% Static Assets
    subgraph "Static Assets"
        style StaticAssets fill:#FFE4B5,stroke:#000,stroke-width:1px
        ImgFolder["img_folder/"]:::asset
        LottieCSS["lottie.css"]:::asset
        LottieHTML["lottie.html"]:::asset
    end

    %% Front-end Application Logic
    subgraph "UI Logic (js_folder)" 
        style UILogic fill:#ADD8E6,stroke:#000,stroke-width:1px
        JSApp["app.js"]:::frontend
        JSIndex["index.js"]:::frontend
        JSHOME["home.js"]:::frontend
        subgraph "Browse Views"
            ADS["ads.js"]:::frontend
            DEALS["deals.js"]:::frontend
            EVENTS["events.js"]:::frontend
        end
        subgraph "Product & Listing"
            PRODUCTS["products.js"]:::frontend
            PRODUCTINFO["productinformation.js"]:::frontend
            FILTERS["filters.js"]:::frontend
            SLIDESHOW["slideshow.js"]:::frontend
        end
        subgraph "Cart & Checkout"
            CARTLOGIC["cart.js"]:::frontend
        end
        subgraph "User Modules"
            PROFILE["profile.js"]:::frontend
            MYLISTINGS["mylistings.js"]:::frontend
            SELLLOGIC["sell.js"]:::frontend
            PURCHASEHISTORY["purchasehistory.js"]:::frontend
            WELCOME["welcome_msg.js"]:::frontend
        end
        SHARED["data.js"]:::frontend
    end

    %% API Abstraction Layer
    subgraph "API Layer (js_api_folder)"
        style APILayer fill:#90EE90,stroke:#000,stroke-width:1px
        APIJS["api.js"]:::api
        APILogin["login.js"]:::api
        APILogAuth["loginAuthencation.js"]:::api
        APISignup["signup.js"]:::api
        APILottie["lottie.js"]:::api
    end

    %% External Services
    subgraph "External Services"
        style External fill:#FFA500,stroke:#000,stroke-width:1px
        RestDB["RestDB NoSQL Service"]:::external
        PaymentGW["Payment Gateway API"]:::external
        LottieCDN["Lottie CDN"]:::external
        LocalStorage["Local Storage"]:::storage
    end

    %% Connections
    %% UI Views to UI Logic
    UIViewsIndex -->|renders| JSIndex
    UIViewsHome -->|renders| JSHOME
    UIViewsBrowse -->|renders| ADS
    UIViewsBrowse -->|renders| DEALS
    UIViewsBrowse -->|renders| EVENTS
    UIViewsProductInfo -->|renders| PRODUCTINFO
    UIViewsCart -->|renders| CARTLOGIC
    UIViewsDeals -->|renders| DEALS
    UIViewsEvents -->|renders| EVENTS
    UIViewsAds -->|renders| ADS
    UIViewsPayment -->|renders| CARTLOGIC
    UIViewsProfile -->|renders| PROFILE
    UIViewsRewards -->|renders| WELCOME
    UIViewsSell -->|renders| SELLLOGIC
    UIViewsShipping -->|renders| CARTLOGIC
    UIViewsLogin -->|renders| APILogin
    UIViewsSignup -->|renders| APISignup

    %% UI Logic to API Layer
    JSApp -->|"uses API"| APIJS
    JSIndex -->|"uses API"| APIJS
    JSHOME -->|"uses API"| APIJS
    ADS -->|"fetch listings"| APIJS
    DEALS -->|"fetch deals"| APIJS
    EVENTS -->|"fetch events"| APIJS
    PRODUCTS -->|"fetch products"| APIJS
    PRODUCTINFO -->|"fetch product details"| APIJS
    CARTLOGIC -->|"CRUD cart"| APIJS
    PROFILE -->|"fetch profile"| APIJS
    MYLISTINGS -->|"fetch listings"| APIJS
    SELLLOGIC -->|"post listing"| APIJS
    PURCHASEHISTORY -->|"fetch purchases"| APIJS
    WELCOME -->|"fetch user data"| APIJS
    SHARED -->|"shared calls"| APIJS

    %% API Layer to RestDB
    APIJS -->|"GET/POST/PUT/DELETE"| RestDB
    APILogin -->|"authenticate user"| RestDB
    APISignup -->|"create user"| RestDB
    APILogAuth -->|"validate token"| RestDB

    %% UI Logic to External
    CARTLOGIC -->|"process payment"| PaymentGW
    JSApp -->|"store session"| LocalStorage
    JSApp -->|"retrieve session"| LocalStorage
    JSApp -->|"load animations"| LottieCDN

    %% Static Assets usage
    UIViewsIndex -->|"loads CSS"| CSSFolder
    UIViewsBrowse -->|"loads CSS"| CSSFolder
    UIViewsHome -->|"loads CSS"| CSSFolder
    allAssets((" ")) --> ImgFolder
    JSApp -->|"loads images"| ImgFolder
    JSApp -->|"loads Lottie assets"| LottieCSS
    JSApp -->|"loads Lottie HTML"| LottieHTML

    %% Click Events
    click UIViewsIndex "https://github.com/shunxiangg/fed_eva_website/blob/main/index.html"
    click UIViewsBrowse "https://github.com/shunxiangg/fed_eva_website/blob/main/browse.html"
    click UIViewsHome "https://github.com/shunxiangg/fed_eva_website/blob/main/home.html"
    click UIViewsProductInfo "https://github.com/shunxiangg/fed_eva_website/blob/main/productInformation.html"
    click UIViewsLogin "https://github.com/shunxiangg/fed_eva_website/blob/main/login.html"
    click UIViewsSignup "https://github.com/shunxiangg/fed_eva_website/blob/main/signup.html"
    click UIViewsCart "https://github.com/shunxiangg/fed_eva_website/blob/main/cart.html"
    click UIViewsDeals "https://github.com/shunxiangg/fed_eva_website/blob/main/deals.html"
    click UIViewsEvents "https://github.com/shunxiangg/fed_eva_website/blob/main/events.html"
    click UIViewsAds "https://github.com/shunxiangg/fed_eva_website/blob/main/ads.html"
    click UIViewsPayment "https://github.com/shunxiangg/fed_eva_website/blob/main/payment.html"
    click UIViewsProfile "https://github.com/shunxiangg/fed_eva_website/blob/main/profile.html"
    click UIViewsRewards "https://github.com/shunxiangg/fed_eva_website/blob/main/rewards.html"
    click UIViewsSell "https://github.com/shunxiangg/fed_eva_website/blob/main/sell.html"
    click UIViewsShipping "https://github.com/shunxiangg/fed_eva_website/blob/main/shipping.html"
    click CSSFolder "https://github.com/shunxiangg/fed_eva_website/tree/main/css_folder/"
    click ImgFolder "https://github.com/shunxiangg/fed_eva_website/tree/main/img_folder/"
    click LottieCSS "https://github.com/shunxiangg/fed_eva_website/blob/main/lottie.css"
    click LottieHTML "https://github.com/shunxiangg/fed_eva_website/blob/main/lottie.html"
    click JSApp "https://github.com/shunxiangg/fed_eva_website/blob/main/js_folder/app.js"
    click JSIndex "https://github.com/shunxiangg/fed_eva_website/blob/main/js_folder/index.js"
    click JSHOME "https://github.com/shunxiangg/fed_eva_website/blob/main/js_folder/home.js"
    click ADS "https://github.com/shunxiangg/fed_eva_website/blob/main/js_folder/browse/views/ads.js"
    click DEALS "https://github.com/shunxiangg/fed_eva_website/blob/main/js_folder/browse/views/deals.js"
    click EVENTS "https://github.com/shunxiangg/fed_eva_website/blob/main/js_folder/browse/views/events.js"
    click PRODUCTS "https://github.com/shunxiangg/fed_eva_website/blob/main/js_folder/products.js"
    click PRODUCTINFO "https://github.com/shunxiangg/fed_eva_website/blob/main/js_folder/productinformation.js"
    click FILTERS "https://github.com/shunxiangg/fed_eva_website/blob/main/js_folder/filters.js"
    click SLIDESHOW "https://github.com/shunxiangg/fed_eva_website/blob/main/js_folder/slideshow.js"
    click CARTLOGIC "https://github.com/shunxiangg/fed_eva_website/blob/main/js_folder/cart.js"
    click PROFILE "https://github.com/shunxiangg/fed_eva_website/blob/main/js_folder/profile.js"
    click MYLISTINGS "https://github.com/shunxiangg/fed_eva_website/blob/main/js_folder/mylistings.js"
    click SELLLOGIC "https://github.com/shunxiangg/fed_eva_website/blob/main/js_folder/sell.js"
    click PURCHASEHISTORY "https://github.com/shunxiangg/fed_eva_website/blob/main/js_folder/purchasehistory.js"
    click WELCOME "https://github.com/shunxiangg/fed_eva_website/blob/main/js_folder/welcome_msg.js"
    click SHARED "https://github.com/shunxiangg/fed_eva_website/blob/main/js_folder/data.js"
    click APIJS "https://github.com/shunxiangg/fed_eva_website/blob/main/js_api_folder/api.js"
    click APILogin "https://github.com/shunxiangg/fed_eva_website/blob/main/js_api_folder/login.js"
    click APILogAuth "https://github.com/shunxiangg/fed_eva_website/blob/main/js_api_folder/loginAuthencation.js"
    click APISignup "https://github.com/shunxiangg/fed_eva_website/blob/main/js_api_folder/signup.js"
    click APILottie "https://github.com/shunxiangg/fed_eva_website/blob/main/js_api_folder/lottie.js"

    %% Styles
    classDef frontend fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef api fill:#90EE90,stroke:#000,stroke-width:1px
    classDef external fill:#FFA500,stroke:#000,stroke-width:1px
    classDef storage fill:#DDA0DD,stroke:#000,stroke-width:1px
    classDef asset fill:#FFE4B5,stroke:#000,stroke-width:1px
```
