# moowantfree/new_nwu_icu_frontend architecture

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

- Interactive diagram: https://gitdiagram.com/moowantfree/new_nwu_icu_frontend
- Repository: https://github.com/moowantfree/new_nwu_icu_frontend

## Overview

##### Main Components Identification

The system appears to be a single-page application (SPA) with the following key components:

a. Frontend Architecture (Primary Focus):
- Vue.js Components Layer
- Routing Layer
- Authentication Layer
- Asset Management
- API Integration Layer

##### Component Organization

a. Presentation Layer (Top Level):
- Home
- Login
- Course Review System
- User Profile
- About
- Download

b. Component Layer (Middle Level):
- NavBar
- LoginForm
- Markdown
- DropMenu
- Review Components (ReviewItems, MyReviewItems, MyReplyItems)

c. Core Services Layer (Bottom Level):
- Authentication Service (from lib/logins.ts)
- Avatar Service (from lib/avatar.ts)
- Helper Utilities (from lib/h.ts)

##### Data Flow and Interactions

- Router navigation flows between views
- Component composition relationships
- Data flow between components and services
- Authentication flow for protected routes

##### Specific Implementation Details

Technology badges or labels for:
- Vue.js
- Tailwind CSS
- Vite
- TypeScript (for type definitions)

**┌─────────────────────────────────────────┐**
- Vue Application            │
- ┤
- Views Layer                             │
- ┌─────┐ ┌──────┐ ┌────────────┐        │
- Home │ │Login │ │CourseReview│  ...   │
- ┘ └──────┘ └────────────┘        │
- ┤
- Components Layer                        │
- ┌────────┐ ┌─────────┐ ┌──────────┐    │
- NavBar  │ │DropMenu │ │ReviewItems│    │
- ┘ └─────────┘ └──────────┘    │
- ┤
- Services Layer                          │
- ┌─────────┐ ┌──────┐ ┌─────────┐       │
- Auth     │ │Avatar│ │Helpers  │       │
- ┘ └──────┘ └─────────┘       │
- ┘

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Application
        App["App Component"]
        Router["Router"]
        
        subgraph "Views Layer"
            Home["Home View"]
            Login["Login View"]
            About["About View"]
            Download["Download View"]
            Profile["User Profile"]
            ReviewTimeline["Course Review Timeline"]
            MyReview["My Review"]
            MyReply["My Reply"]
        end
        
        subgraph "Components Layer"
            NavBar["Navigation Bar"]
            LoginForm["Login Form"]
            Markdown["Markdown"]
            DropMenu["Drop Menu"]
            
            subgraph "Review Components"
                ReviewItems["Review Items"]
                MyReviewItems["My Review Items"]
                MyReplyItems["My Reply Items"]
                ReviewSkeleton["Review Item Skeleton"]
            end
        end
        
        subgraph "Core Services"
            AuthService["Authentication Service"]
            AvatarService["Avatar Service"]
            HelperUtils["Helper Utilities"]
        end
        
        subgraph "Types"
            CourseReviewTypes["Course Review Types"]
            MyReplyTypes["My Reply Types"]
            MyReviewTypes["My Review Types"]
            UserProfileTypes["User Profile Types"]
        end
        
        subgraph "Assets"
            BaseStyles["Base Styles"]
            MainStyles["Main Styles"]
            TailwindStyles["Tailwind Styles"]
        end
    end
    
    App --> Router
    Router --> Home & Login & About & Download & Profile & ReviewTimeline & MyReview & MyReply
    
    ReviewTimeline --> ReviewItems
    MyReview --> MyReviewItems
    MyReply --> MyReplyItems
    ReviewItems --> ReviewSkeleton
    
    Login --> LoginForm
    LoginForm --> AuthService
    
    ReviewItems & MyReviewItems & MyReplyItems --> Markdown
    
    App --> NavBar
    NavBar --> DropMenu
    
    ReviewItems -.-> CourseReviewTypes
    MyReplyItems -.-> MyReplyTypes
    MyReviewItems -.-> MyReviewTypes
    Profile -.-> UserProfileTypes
    
    classDef view fill:#4A90E2,color:white
    classDef component fill:#2ECC71,color:white
    classDef service fill:#F1C40F,color:black
    classDef type fill:#9B59B6,color:white
    classDef asset fill:#E74C3C,color:white
    
    class Home,Login,About,Download,Profile,ReviewTimeline,MyReview,MyReply view
    class NavBar,LoginForm,Markdown,DropMenu,ReviewItems,MyReviewItems,MyReplyItems,ReviewSkeleton component
    class AuthService,AvatarService,HelperUtils service
    class CourseReviewTypes,MyReplyTypes,MyReviewTypes,UserProfileTypes type
    class BaseStyles,MainStyles,TailwindStyles asset

    click App "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/App.vue"
    click Router "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/router/Router.js"
    click Home "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/views/Home.vue"
    click Login "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/views/Login.vue"
    click About "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/views/About.vue"
    click Download "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/views/Download.vue"
    click Profile "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/views/user/Profile.vue"
    click ReviewTimeline "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/views/courseReview/ReviewTimeline.vue"
    click MyReview "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/views/courseReview/MyReview.vue"
    click MyReply "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/views/courseReview/MyReply.vue"
    click NavBar "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/components/NavBar.vue"
    click LoginForm "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/components/LoginForm.vue"
    click Markdown "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/components/Markdown.vue"
    click DropMenu "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/components/DropMenu.vue"
    click ReviewItems "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/components/courseReview/ReviewItems.vue"
    click MyReviewItems "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/components/courseReview/MyReviewItems.vue"
    click MyReplyItems "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/components/courseReview/MyReplyItems.vue"
    click ReviewSkeleton "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/components/courseReview/ReviewItemSkeleton.vue"
    click AuthService "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/lib/logins.ts"
    click AvatarService "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/lib/avatar.ts"
    click HelperUtils "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/lib/h.ts"
    click CourseReviewTypes "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/types/courseReview.ts"
    click MyReplyTypes "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/types/myReply.ts"
    click MyReviewTypes "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/types/myReview.ts"
    click UserProfileTypes "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/types/userProfile.ts"
    click BaseStyles "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/assets/base.css"
    click MainStyles "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/assets/main.css"
    click TailwindStyles "https://github.com/MooWantFree/new_nwu_icu_frontend/blob/master/src/css/tailwindcss.css"
```
