# breehaqasim/glowsense-skincare-beauty-consultancy-platform architecture

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

- Interactive diagram: https://gitdiagram.com/breehaqasim/glowsense-skincare-beauty-consultancy-platform
- Repository: https://github.com/breehaqasim/glowsense-skincare-beauty-consultancy-platform

## Overview

##### Project Type and Purpose
- This is a full-stack platform designed to connect users with skincare and beauty experts. It supports functionalities like personalized skincare recommendations, virtual video consultations (likely using WebRTC), product listings for makeup, and management dashboards.
- The README clearly indicates user, expert, and admin features, along with APIs for authentication, consultation scheduling, and product listings. The project integrates multiple technologies across the frontend and backend.

##### File Structure
- Top-Level Directories:
- Documentations: Contains various documents, including API definitions, high fidelity prototypes, and the Software Architecture Document. Use these to confirm detailed design decisions.
- backend: Contains main Python files (app.py, models.py) suggesting the primary server-side logic.
- frontend: HTML, JavaScript, and CSS files that build the client-side interface. A further "src" folder there indicates an attempt to organize styling or auxiliary script files.
- public: Likely used for static assets (images, text files, etc.) which may include sealed prototypes or assets for the UI.
- This file structure indicates a separation between frontend and backend, consistent with a full-stack application deployed likely on a VPS.

##### System Components
a. Frontend:
- Components like the landing page, login/sign-up pages, and user interface modules (e.g., pages for skincare analysis, expert matching, video consultation UI).
- Mention that this layer is built using HTML, CSS/Bootstrap, and JavaScript with responsiveness ensured by media queries.
b. Backend:
- Core server-side application (app.py) that processes business logic, handles API requests, and orchestrates interactions.
- Additional python modules (models.py) for data modelling and RESTful endpoints.
- That the backend supports APIs for login, submitting skincare concerns, matching experts, scheduling consultations, and fetching trending makeup products.
c. Database & Infrastructure:
- Hosting environment (DigitalOcean VPS) and note the usage of session-based authentication.
d. External Services & Modules:
- Payment processing gateways (Google Pay, Apple Pay, Credit Cards), and mention the integration with WebRTC for secure video consultations.
- Performance-critical modules potentially written in C++ integrated with the backend.

##### Defining Relationships and Data Flows
- Detail interactions where the backend queries or updates the database.
- External interactions such as:
- Payment gateway integrations.
- Video consultation service (WebRTC) connections between clients and experts.
- If applicable, include interactions related to session management (e.g., authentication and authorization flows).

##### Architectural Patterns and Design Principles
- Separation of concerns between the frontend and backend.
- Point out the RESTful API layer that decouples client interfaces from business logic.
- If details in the documentation suggest, you may also highlight patterns such as MVC in the backend or modular microservices if the system scales to different services.
- Security measures (SSL encryption, session-based authentication) and integration points for unit and integration testing.

## Diagram (Mermaid)

```mermaid
flowchart TD
    U["User"]:::user

    subgraph "Frontend Layer"
        F1["Landing Page (HTML)"]:::frontend
        F2["Login/Signup Page (JS)"]:::frontend
        F3["User Interface Modules (CSS & Assets)"]:::frontend
    end

    subgraph "Backend Layer"
        B1["Backend Server (app.py)"]:::backend
        B2["Data Models (models.py)"]:::backend
    end

    subgraph "Data Layer"
        DB["Database (MySQL/MongoDB)"]:::database
    end

    subgraph "External Services"
        ES1["Payment Gateway"]:::external
        ES2["Video Consultation (WebRTC)"]:::external
        ES3["Performance Modules (C++)"]:::external
    end

    subgraph "Infrastructure & Artifacts"
        INF["DigitalOcean VPS Hosting"]:::infrastructure
        DOC["Documentation & Design Artifacts"]:::documentation
        SA["Static Assets Hosting"]:::staticassets
    end

    U -->|"interacts"| F1
    U -->|"interacts"| F2
    U -->|"interacts"| F3
    F1 -->|"APICall"| B1
    F2 -->|"APICall"| B1
    F3 -->|"APICall"| B1
    B1 -->|"dataAccess"| DB
    B1 -->|"payment"| ES1
    B1 -->|"videoCall"| ES2
    B1 -->|"integrates"| ES3
    B1 -->|"hostedOn"| INF
    F3 -->|"servedFrom"| SA
    F1 -->|"usesDocs"| DOC

    click F1 "https://github.com/breehaqasim/glowsense-skincare-beauty-consultancy-platform/blob/main/frontend/index.html"
    click F2 "https://github.com/breehaqasim/glowsense-skincare-beauty-consultancy-platform/blob/main/frontend/script.js"
    click F3 "https://github.com/breehaqasim/glowsense-skincare-beauty-consultancy-platform/tree/main/frontend/src"
    click B1 "https://github.com/breehaqasim/glowsense-skincare-beauty-consultancy-platform/blob/main/backend/app.py"
    click B2 "https://github.com/breehaqasim/glowsense-skincare-beauty-consultancy-platform/blob/main/backend/models.py"
    click DOC "https://github.com/breehaqasim/glowsense-skincare-beauty-consultancy-platform/tree/main/Documentations"
    click SA "https://github.com/breehaqasim/glowsense-skincare-beauty-consultancy-platform/tree/main/public"

    classDef frontend fill:#f9e79f,stroke:#e67e22,stroke-width:2px;
    classDef backend fill:#aed6f1,stroke:#3498db,stroke-width:2px;
    classDef database fill:#abebc6,stroke:#28b463,stroke-width:2px;
    classDef external fill:#fad7a0,stroke:#d35400,stroke-width:2px;
    classDef infrastructure fill:#d5f5e3,stroke:#27ae60,stroke-width:2px;
    classDef documentation fill:#fcf3cf,stroke:#f1c40f,stroke-width:2px;
    classDef staticassets fill:#e8daef,stroke:#8e44ad,stroke-width:2px;
    classDef user fill:#f5cba7,stroke:#d35400,stroke-width:2px;
```
