# quang-sanbay/project-5-group-3 architecture

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

- Interactive diagram: https://gitdiagram.com/quang-sanbay/project-5-group-3
- Repository: https://github.com/quang-sanbay/project-5-group-3

## Overview

##### Main System Components
The system is a Django-based web application with multiple modules serving different user roles. Here's how to represent the key components:

A. Core Components:
- A SQL Server Database component (as mentioned in README)
- WSGI/ASGI server layer

##### Component Relationships

- All modules connect to the central Django application
- Database connections from each module
- User role access paths:
- Customers → Customer Portal
- Sales Staff → Sales Management
- Design Staff → Design Management
- Production Staff → Production Management
- Administrators → System Management

##### Architectural Patterns to Highlight

- MVT (Model-View-Template) pattern for each module:
- Models (Rectangle): Show database models
- Views (Hexagon): Business logic
- Templates (Oval): User interface
- Static Assets (Triangle): CSS/JS/Images

##### Detailed Component Breakdown

For each module, show:
- Templates directory structure
- Static files organization
- URL patterns
- Model relationships

##### Technical Stack Elements

- Django 5.1.3
- SQL Server
- ODBC Driver 18
- TCP/IP Protocol (Port 1433)

##### Additional Elements

Show:
- Authentication flow
- Static/Media file handling
- Template inheritance relationships
- Cross-module interactions

## Diagram (Mermaid)

```mermaid
classDiagram
    class Client {
        +WebBrowser
    }

    class Frontend {
        +CustomerPortal
        +SalesStaffPortal
        +DesignStaffPortal
        +ProductionStaffPortal
        +ManagementPortal
        +AccountPortal
    }

    class Assets {
        +StaticFiles
        +MediaFiles
    }

    class Backend {
        +URLRouter
        +Views
        +Templates
    }

    class Views {
        +CustomerViews
        +SalesViews
        +DesignViews
        +ProductionViews
        +ManagementViews
        +AccountViews
    }

    class Templates {
        +CustomerTemplates
        +SalesTemplates
        +DesignTemplates
        +ProductionTemplates
        +ManagementTemplates
        +AccountTemplates
    }

    class Database {
        +MSSQLServer
    }

    Client --> Frontend
    Client --> Assets
    Frontend --> Views
    Views --> Templates
    Views --> Database
    Backend --> Views
    Backend --> Templates

    %% Click events preserved
    link Frontend "https://github.com/QUANG-SanBay/Project-5-Group-3/tree/main/GiaCongTrangSuc/"
    link Views "https://github.com/QUANG-SanBay/Project-5-Group-3/blob/main/GiaCongTrangSuc/views.py"
    link Templates "https://github.com/QUANG-SanBay/Project-5-Group-3/tree/main/GiaCongTrangSuc/Templates/"
    link Backend "https://github.com/QUANG-SanBay/Project-5-Group-3/blob/main/GiaCongTrangSuc/urls.py"
    link Assets "https://github.com/QUANG-SanBay/Project-5-Group-3/tree/main/GiaCongTrangSuc/media/"
```
