# wdjennane/final-project architecture

> Architecture diagram of the GitHub repository wdjennane/final-project, 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/wdjennane/final-project
- Repository: https://github.com/wdjennane/final-project

## Overview

##### Main Components

Frontend Layer:
- Nuxt.js/Vue.js Client Application
- Components (show as a module with key components like Video.vue, Timeline.vue)
- Pages (structured content sections)
- Assets (media files: videos, audios, images)
- Layouts
- Store (Vuex state management)

Backend Layer:
- Node.js/Express Server
- API Routes
- Authentication Middleware
- MongoDB Models
- Database Controllers

Database Layer:
- MongoDB Database
- Collections (show main collections like users, events, content)

**[Client Layer (Top)]**
- ↕
**[Server Layer (Middle)]**
- ↕
**[Database Layer (Bottom)]**

##### Detailed Component Breakdown

Client Layer (Blue):
**[Nuxt.js Application]**
- Pages
- Home
- Menu
- Content Sections
- Components
- Video Player
- Timeline
- Navigation
- Assets Manager

Server Layer (Green):
**[Express Server]**
- API Routes
- Content Routes
- User Routes
- Media Routes
- Middleware
- Authentication
- Models
- Content Schemas

Database Layer (Yellow):
**[MongoDB]**
- Collections
- Users
- Content
- Events

##### Implementation Details

- Use rectangles for main components
- Use rounded rectangles for services
- Annotations for key technologies:
- SCSS for styling
- Vue.js components
- Express middleware
- Mongoose schemas

##### Data Flow Indicators

- API request/response flows
- Media content delivery paths
- Authentication flows
- State management patterns

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        NuxtApp["Nuxt.js Application"]
        
        subgraph Components
            VideoPlayer["Video Player"]:::component
            Timeline["Timeline"]:::component
            Navigation["Navigation"]:::component
            ContentComps["Content Components"]:::component
        end
        
        subgraph Pages
            HomePage["Home Page"]:::page
            MenuPage["Menu Page"]:::page
            ContentSections["Content Sections"]:::page
        end
        
        subgraph Assets
            Videos["Videos"]:::asset
            Audio["Audio Files"]:::asset
            Styles["SCSS Styles"]:::asset
        end
        
        Store["Vuex Store"]:::store
        Layout["Default Layout"]:::layout
    end
    
    subgraph Server
        Express["Express Server"]:::server
        
        subgraph API
            ContentRoutes["Content Routes"]:::api
            UserRoutes["User Routes"]:::api
            MediaRoutes["Media Routes"]:::api
        end
        
        AuthMiddleware["Authentication"]:::middleware
        Models["Data Models"]:::model
    end
    
    subgraph Database
        MongoDB["MongoDB"]:::db
        Users["Users Collection"]:::collection
        Content["Content Collection"]:::collection
        Events["Events Collection"]:::collection
    end
    
    %% Relationships
    NuxtApp --> Components
    NuxtApp --> Pages
    NuxtApp --> Assets
    NuxtApp --> Store
    NuxtApp --> Layout
    
    Express --> API
    Express --> AuthMiddleware
    Express --> Models
    
    API --> MongoDB
    MongoDB --> Users
    MongoDB --> Content
    MongoDB --> Events
    
    Components --> Express
    Pages --> Express
    
    %% Styling
    classDef component fill:#a8d1f0
    classDef page fill:#90caf9
    classDef asset fill:#ce93d8
    classDef store fill:#80cbc4
    classDef layout fill:#ffcc80
    classDef server fill:#81c784
    classDef api fill:#aed581
    classDef middleware fill:#fff176
    classDef model fill:#ffb74d
    classDef db fill:#ff8a65
    classDef collection fill:#f48fb1
    
    %% Click Events
    click VideoPlayer "https://github.com/wdjennane/Final-Project/blob/master/components/Video.vue"
    click Timeline "https://github.com/wdjennane/Final-Project/blob/master/components/Timeline.vue"
    click Navigation "https://github.com/wdjennane/Final-Project/blob/master/components/Choice.vue"
    click ContentComps "https://github.com/wdjennane/Final-Project/blob/master/components/Content.vue"
    click HomePage "https://github.com/wdjennane/Final-Project/blob/master/pages/home.vue"
    click MenuPage "https://github.com/wdjennane/Final-Project/blob/master/pages/Menu.vue"
    click ContentSections "https://github.com/wdjennane/Final-Project/tree/master/pages"
    click Videos "https://github.com/wdjennane/Final-Project/tree/master/assets/videos"
    click Audio "https://github.com/wdjennane/Final-Project/tree/master/assets/audios"
    click Styles "https://github.com/wdjennane/Final-Project/tree/master/assets/scss"
    click Express "https://github.com/wdjennane/Final-Project/blob/master/server/index.js"
    click AuthMiddleware "https://github.com/wdjennane/Final-Project/blob/master/server/middleware/authentification.js"
    click API "https://github.com/wdjennane/Final-Project/tree/master/server/routers"
    click Models "https://github.com/wdjennane/Final-Project/tree/master/server/models"
    click MongoDB "https://github.com/wdjennane/Final-Project/tree/master/server/db/final-project-database"
    click Users "https://github.com/wdjennane/Final-Project/blob/master/server/db/final-project-database/users.bson"
    click Layout "https://github.com/wdjennane/Final-Project/blob/master/layouts/default.vue"
    click Store "https://github.com/wdjennane/Final-Project/tree/master/store"
```
