# raouffilali/ai-cv-generator architecture

> Architecture diagram of the GitHub repository raouffilali/ai-cv-generator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/raouffilali/ai-cv-generator
- Repository: https://github.com/raouffilali/ai-cv-generator

## Overview

##### Main Components Structure

a) Client Layer (Frontend)
- Authentication Module (Clerk integration)
- Resume Builder Interface
- AI Integration Service
- Preview System
- Dashboard
- Form Components

b) API Layer
- Clerk Authentication Service
- API Routes
- AI Service Integration

c) Backend Layer (Strapi)
- Content Types
- API Controllers
- Media Management
- Database Integration

##### Component Relationships

**Frontend ←→ Clerk Auth**
**Frontend ←→ Strapi API**
**Frontend ←→ AI Service**
**Strapi ←→ Database**

##### Detailed Component Breakdown

Frontend Section:
- Authentication (SignIn.jsx, SignUp.jsx)
- Dashboard
- Resume Management
- User Profile
- Resume Editor
- Form Sections
- Personal Details
- Experience
- Education
- Skills
- Summary
- Preview Components
- AI Integration Service

Backend Section (Strapi):
- API Routes
- user-resume
- Controllers
- Services
- Content Types
- Education
- Experience
- Skills

##### Integration Points

Key integration points:
- Clerk Authentication
- AI Service API
- Strapi Content Management
- Export Services

##### Technical Stack Callouts

- React/Vite (Frontend)
- Clerk (Authentication)
- Strapi (CMS)
- AI Services
- Database

For this specific project, emphasize the separation between the frontend React application and the Strapi backend, showing how they communicate through the API layer and how the authentication flow works with Clerk integration.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        Auth["Authentication Module"]
        RBI["Resume Builder Interface"]
        PrevSys["Preview System"]
        Dash["Dashboard"]
        AI["AI Integration"]
        Forms["Form Components"]
        
        subgraph FormComponents
            PD["Personal Details"]:::form
            EXP["Experience"]:::form
            EDU["Education"]:::form
            SK["Skills"]:::form
            SUM["Summary"]:::form
        end
        
        subgraph AuthComponents
            SignIn["Sign In"]:::auth
            SignUp["Sign Up"]:::auth
            Auth --> SignIn
            Auth --> SignUp
        end
        
        RBI --> Forms
        Forms --> FormComponents
    end
    
    subgraph APILayer
        ClerkAuth["Clerk Authentication"]:::auth
        APIRoutes["API Routes"]:::api
        AISvc["AI Service Integration"]:::ai
    end
    
    subgraph Backend
        Strapi["Strapi CMS"]
        
        subgraph ContentTypes
            CT_EDU["Education Schema"]:::schema
            CT_EXP["Experience Schema"]:::schema
            CT_SK["Skills Schema"]:::schema
        end
        
        subgraph StrapiComponents
            Controllers["Controllers"]
            Routes["Routes"]
            Services["Services"]
        end
        
        Strapi --> ContentTypes
        Strapi --> StrapiComponents
    end
    
    DB[(Database)]:::db
    
    %% Relationships
    Auth <--> ClerkAuth
    Frontend <--> APIRoutes
    Frontend <--> AISvc
    APIRoutes <--> Strapi
    Strapi <--> DB
    
    %% Click Events
    click Auth "https://github.com/raouffilali/Ai-CV-Generator/tree/master/frontend/src/auth/"
    click SignIn "https://github.com/raouffilali/Ai-CV-Generator/blob/master/frontend/src/auth/SignIn.jsx"
    click SignUp "https://github.com/raouffilali/Ai-CV-Generator/blob/master/frontend/src/auth/SignUp.jsx"
    click PD "https://github.com/raouffilali/Ai-CV-Generator/blob/master/frontend/src/dashboard/resume/components/forms/PersonalDetail.jsx"
    click EXP "https://github.com/raouffilali/Ai-CV-Generator/blob/master/frontend/src/dashboard/resume/components/forms/Experience.jsx"
    click EDU "https://github.com/raouffilali/Ai-CV-Generator/blob/master/frontend/src/dashboard/resume/components/forms/Education.jsx"
    click SK "https://github.com/raouffilali/Ai-CV-Generator/blob/master/frontend/src/dashboard/resume/components/forms/Skills.jsx"
    click SUM "https://github.com/raouffilali/Ai-CV-Generator/blob/master/frontend/src/dashboard/resume/components/forms/Summery.jsx"
    click PrevSys "https://github.com/raouffilali/Ai-CV-Generator/blob/master/frontend/src/dashboard/resume/components/ResumePreview.jsx"
    click Dash "https://github.com/raouffilali/Ai-CV-Generator/blob/master/frontend/src/dashboard/Dashboard.jsx"
    click AI "https://github.com/raouffilali/Ai-CV-Generator/blob/master/frontend/service/AiModel.js"
    click Controllers "https://github.com/raouffilali/Ai-CV-Generator/tree/master/strapi/nextgen-cv-admin/src/api/user-resume/controllers/"
    click Routes "https://github.com/raouffilali/Ai-CV-Generator/tree/master/strapi/nextgen-cv-admin/src/api/user-resume/routes/"
    click Services "https://github.com/raouffilali/Ai-CV-Generator/tree/master/strapi/nextgen-cv-admin/src/api/user-resume/services/"
    click CT_EDU "https://github.com/raouffilali/Ai-CV-Generator/blob/master/strapi/nextgen-cv-admin/src/components/education/education.json"
    click CT_EXP "https://github.com/raouffilali/Ai-CV-Generator/blob/master/strapi/nextgen-cv-admin/src/components/experience/experience.json"
    click CT_SK "https://github.com/raouffilali/Ai-CV-Generator/blob/master/strapi/nextgen-cv-admin/src/components/skills/skills.json"
    
    %% Styling
    classDef frontend fill:#2196F3,color:white
    classDef auth fill:#4CAF50,color:white
    classDef api fill:#FFC107,color:black
    classDef db fill:#9C27B0,color:white
    classDef ai fill:#FF5722,color:white
    classDef form fill:#03A9F4,color:white
    classDef schema fill:#673AB7,color:white
    
    %% Legend
    subgraph Legend
        F[Frontend]:::frontend
        A[Authentication]:::auth
        AP["API"]:::api
        D[(Database)]:::db
        AI_L[AI Services]:::ai
        S[Schema]:::schema
    end
```
