# phamquangvinhfpt/dr-dentist-vuestic architecture

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

- Interactive diagram: https://gitdiagram.com/phamquangvinhfpt/dr-dentist-vuestic
- Repository: https://github.com/phamquangvinhfpt/dr-dentist-vuestic

## Overview

##### Main System Components

The system should be represented with these key components:

a) Frontend Layer:
- Vue.js Web Application
- Mobile Application (Android)
- Component structure (layouts, pages, components)

b) Backend Services Layer (implied by the services directory):
- Authentication Service
- Appointment Management
- Medical Records Management
- Payment Processing
- Notification System
- Audit Logging
- File Management

c) Real-time Communication:
- SignalR implementation for real-time features

d) Data Storage Layer (implied by services):
- Database (likely SQL-based given the structured nature of medical data)
- File Storage for medical images and documents

##### Key Relationships to Highlight

- User Role Flow:
- Different user paths (Admin, Staff, Doctor, Patient)
- Access control and permissions
- Authentication flow

- Core Features Flow:
- Appointment scheduling
- Medical record management
- Payment processing
- Notification system

##### Specific Implementation Details

- Blue rectangles: Frontend components
- Green rectangles: Backend services
- Yellow diamonds: Authentication/Security components
- Purple circles: Data stores
- Red hexagons: Real-time components

##### Technical Elements

- Vuex Store modules
- SignalR real-time connections
- API service layer
- File handling services
- Mobile app integration
- i18n internationalization

##### Architectural Patterns to Emphasize

- Module-based architecture (shown in stores/modules)
- Service-oriented architecture (services directory)
- Component-based frontend (Vue.js structure)
- Real-time communication pattern
- Mobile-web hybrid approach

##### Connection Flows

- Data flow between components
- Authentication flows
- API calls
- Real-time communication paths
- File upload/download paths

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and Classes
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef backend fill:#2ecc71,stroke:#27ae60,color:white
    classDef auth fill:#f1c40f,stroke:#f39c12,color:black
    classDef database fill:#9b59b6,stroke:#8e44ad,color:white
    classDef realtime fill:#e74c3c,stroke:#c0392b,color:white
    
    %% Client Layer
    subgraph ClientLayer
        WebUI["Web Browser Interface"]:::frontend
        MobileUI["Mobile App Interface"]:::frontend
    end

    %% Frontend Components
    subgraph FrontendComponents
        Pages["Pages"]:::frontend
        Components["Components"]:::frontend
        Layouts["Layouts"]:::frontend
    end

    %% Store Modules
    subgraph StoreModules
        AuthStore["Auth Store"]:::auth
        AppointmentStore["Appointment Store"]:::frontend
        MedicalRecordStore["Medical Record Store"]:::frontend
        PaymentStore["Payment Store"]:::frontend
        NotificationStore["Notification Store"]:::frontend
        AuditStore["Audit Store"]:::frontend
        FileStore["File Store"]:::frontend
        OnlineUsersStore["Online Users Store"]:::realtime
    end

    %% Backend Services
    subgraph BackendServices
        APIService["API Service"]:::backend
        AuthService["Auth Service"]:::auth
        JWTService["JWT Service"]:::auth
        AppointmentService["Appointment Service"]:::backend
        MedicalRecordService["Medical Record Service"]:::backend
        PaymentService["Payment Service"]:::backend
        NotificationService["Notification Service"]:::backend
        AuditService["Audit Service"]:::backend
        FileService["File Service"]:::backend
    end

    %% Real-time Communication
    SignalR["SignalR Hub"]:::realtime

    %% Data Layer
    Database[(Database)]:::database
    FileStorage[(File Storage)]:::database

    %% Relationships
    ClientLayer --> FrontendComponents
    FrontendComponents --> StoreModules
    StoreModules --> BackendServices
    BackendServices --> Database
    FileService --> FileStorage
    SignalR --> OnlineUsersStore
    BackendServices --> SignalR

    %% Click Events
    click Pages "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/tree/main/src/pages"
    click Components "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/tree/main/src/components"
    click Layouts "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/tree/main/src/layouts"
    click MobileUI "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/tree/main/android"
    click APIService "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/services/api.service.ts"
    click AuthService "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/services/auth.service.ts"
    click JWTService "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/services/jwt.service.ts"
    click AppointmentService "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/services/appointment.service.ts"
    click MedicalRecordService "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/services/medicalrecord.service.ts"
    click PaymentService "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/services/payment.service.ts"
    click NotificationService "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/services/notification.service.ts"
    click AuditService "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/services/auditLogs.service.ts"
    click FileService "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/services/file.service.ts"
    click AuthStore "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/stores/modules/auth.module.ts"
    click AppointmentStore "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/stores/modules/appointment.module.ts"
    click MedicalRecordStore "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/stores/modules/medicalrecord.module.ts"
    click PaymentStore "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/stores/modules/payment.module.ts"
    click NotificationStore "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/stores/modules/notification.module.ts"
    click AuditStore "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/stores/modules/auditLogs.module.ts"
    click FileStore "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/stores/modules/file.module.ts"
    click OnlineUsersStore "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/stores/online-users-store.ts"
    click SignalR "https://github.com/phamquangvinhfpt/dr-dentist-vuestic/blob/main/src/signalR/index.ts"

    %% Legend
    subgraph Legend
        Frontend["Frontend Component"]:::frontend
        Backend["Backend Service"]:::backend
        Auth["Auth Component"]:::auth
        DB["Database"]:::database
        RT["Real-time Component"]:::realtime
    end
```
