# ali-ragab214/skill-hub-learning-platform architecture

> Architecture diagram of the GitHub repository ali-ragab214/skill-hub-learning-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ali-ragab214/skill-hub-learning-platform
- Repository: https://github.com/ali-ragab214/skill-hub-learning-platform

## Overview

SkillHub is a REST backend for students, instructors, and admins. The main workflow is authenticated or public API requests handled by context-specific services for course discovery and authoring, enrollment, lesson progress, and reviews, with user administration as a separate capability. The README documents a layered architecture, JWT role-based access, Redis caching, and PostgreSQL persistence. No source excerpts were provided, so edges below rely on README-level evidence rather than sampled call sites.

Main entry points: [`src/main/java/com/example/Skill_Hub_Learning_Platform/api/controller`](https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/api/controller) (REST controllers), [`src/main/java/com/example/Skill_Hub_Learning_Platform/infrastructure/repository`](https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/infrastructure/repository) (JPA repositories), [`src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/course`](https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/course) (Courses), [`src/main/java/com/example/Skill_Hub_Learning_Platform/domain/models`](https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/domain/models) (Domain entities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API"]
  node_rest["REST controllers"]
end

subgraph group_learning["Learning contexts"]
  node_auth["Authentication"]
  node_courses["Courses"]
  node_content["Sections and lessons"]
  node_enrollment["Enrollments"]
  node_progress["Lesson progress"]
  node_reviews["Reviews"]
  node_admin["User administration"]
end

subgraph group_platform["Platform services"]
  node_security["JWT and RBAC"]
  node_cache["Redis caching<br/>[RedisConfig.java]"]
  node_domain["Domain entities"]
end

subgraph group_storage["Persistence"]
  node_repositories["JPA repositories"]
  node_postgres[("PostgreSQL")]
  node_redis[("Redis")]
end

node_users(("Students, instructors, admins"))

node_users -->|"submit requests"| node_rest
node_rest -->|"routes to"| node_auth
node_rest -->|"routes to"| node_courses
node_rest -->|"routes to"| node_content
node_rest -->|"routes to"| node_enrollment
node_rest -->|"routes to"| node_progress
node_rest -->|"routes to"| node_reviews
node_rest -->|"routes to"| node_admin
node_rest -->|"enforces RBAC"| node_security
node_courses -->|"uses domain layer"| node_domain
node_enrollment -->|"uses domain layer"| node_domain
node_progress -->|"uses domain layer"| node_domain
node_reviews -->|"uses domain layer"| node_domain
node_courses -->|"persists through"| node_repositories
node_enrollment -->|"persists through"| node_repositories
node_progress -->|"persists through"| node_repositories
node_reviews -->|"persists through"| node_repositories
node_repositories -->|"stores data"| node_postgres
node_courses -->|"uses declarative cache"| node_cache
node_cache -->|"stores cache"| node_redis
node_auth -->|"issues JWTs"| node_security

click node_rest "https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/api/controller"
click node_auth "https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/auth"
click node_courses "https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/course"
click node_content "https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/section"
click node_enrollment "https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/enrollment"
click node_progress "https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/progress"
click node_reviews "https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/review"
click node_admin "https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/user"
click node_security "https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/infrastructure/security"
click node_cache "https://github.com/ali-ragab214/skill-hub-learning-platform/blob/main/src/main/java/com/example/Skill_Hub_Learning_Platform/infrastructure/config/RedisConfig.java"
click node_domain "https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/domain/models"
click node_repositories "https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/infrastructure/repository"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_rest toneBlue
class node_auth,node_courses,node_content,node_enrollment,node_progress,node_reviews,node_admin toneAmber
class node_security,node_cache,node_domain toneMint
class node_repositories,node_postgres,node_redis toneRose
class node_users toneIndigo
```

## Components

### API

- [REST controllers](https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/api/controller): `src/main/java/com/example/Skill_Hub_Learning_Platform/api/controller`

### Learning contexts

- [Authentication](https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/auth): `src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/auth`
- [Courses](https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/course): `src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/course`
- [Sections and lessons](https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/section): `src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/section`
- [Enrollments](https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/enrollment): `src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/enrollment`
- [Lesson progress](https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/progress): `src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/progress`
- [Reviews](https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/review): `src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/review`
- [User administration](https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/user): `src/main/java/com/example/Skill_Hub_Learning_Platform/application/services/user`

### Platform services

- [JWT and RBAC](https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/infrastructure/security): `src/main/java/com/example/Skill_Hub_Learning_Platform/infrastructure/security`
- [Redis caching](https://github.com/ali-ragab214/skill-hub-learning-platform/blob/main/src/main/java/com/example/Skill_Hub_Learning_Platform/infrastructure/config/RedisConfig.java): `src/main/java/com/example/Skill_Hub_Learning_Platform/infrastructure/config/RedisConfig.java`
- [Domain entities](https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/domain/models): `src/main/java/com/example/Skill_Hub_Learning_Platform/domain/models`

### Persistence

- [JPA repositories](https://github.com/ali-ragab214/skill-hub-learning-platform/tree/main/src/main/java/com/example/Skill_Hub_Learning_Platform/infrastructure/repository): `src/main/java/com/example/Skill_Hub_Learning_Platform/infrastructure/repository`
- **PostgreSQL**
- **Redis**

### Other components

- **Students, instructors, admins**

## Connections

- Students, instructors, admins → REST controllers: submit requests (evidence: `README.md`)
- REST controllers → Authentication: routes to (evidence: `README.md`)
- REST controllers → Courses: routes to (evidence: `README.md`)
- REST controllers → Sections and lessons: routes to (evidence: `README.md`)
- REST controllers → Enrollments: routes to (evidence: `README.md`)
- REST controllers → Lesson progress: routes to (evidence: `README.md`)
- REST controllers → Reviews: routes to (evidence: `README.md`)
- REST controllers → User administration: routes to (evidence: `README.md`)
- REST controllers → JWT and RBAC: enforces RBAC (evidence: `README.md`)
- Courses → Domain entities: uses domain layer (evidence: `README.md`)
- Enrollments → Domain entities: uses domain layer (evidence: `README.md`)
- Lesson progress → Domain entities: uses domain layer (evidence: `README.md`)
- Reviews → Domain entities: uses domain layer (evidence: `README.md`)
- Courses → JPA repositories: persists through (evidence: `README.md`)
- Enrollments → JPA repositories: persists through (evidence: `README.md`)
- Lesson progress → JPA repositories: persists through (evidence: `README.md`)
- Reviews → JPA repositories: persists through (evidence: `README.md`)
- JPA repositories → PostgreSQL: stores data (evidence: `README.md`)
- Courses → Redis caching: uses declarative cache (evidence: `README.md`)
- Redis caching → Redis: stores cache (evidence: `README.md`)
- Authentication → JWT and RBAC: issues JWTs (evidence: `README.md`)
