# danielnguyen0705/ie303 architecture

> Architecture diagram of the GitHub repository danielnguyen0705/ie303, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/danielnguyen0705/ie303
- Repository: https://github.com/danielnguyen0705/ie303
- Video tour (about a minute): https://gitdiagram.com/danielnguyen0705/ie303/video

## Overview

UIFIVE is a microservices online-learning platform. Learners enter through the React frontend and API gateway, authenticate, browse structured lessons and practice, then receive progress and learning insights; AI-assisted writing/speaking evaluation and personalized practice are additional learning paths. Gamification and payments support motivation and premium access. The README documents several services whose source paths are absent from the supplied tree; those are shown with null paths. Service-to-service links reflect documented responsibilities, while detailed runtime wiring is only asserted where documented or evident in sampled code.

Main entry points: [`AIService/src/main/java/com/ie303/uifive`](https://github.com/danielnguyen0705/ie303/tree/main/AIService/src/main/java/com/ie303/uifive) (AI learning), [`ContentService/src/main/java/com/ie303/uifive`](https://github.com/danielnguyen0705/ie303/tree/main/ContentService/src/main/java/com/ie303/uifive) (Learning content), [`GamificationService/src/main/java/com/ie303/uifive`](https://github.com/danielnguyen0705/ie303/tree/main/GamificationService/src/main/java/com/ie303/uifive) (Quests and shop), [`Frontend/src`](https://github.com/danielnguyen0705/ie303/tree/main/Frontend/src) (Web frontend)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Learner client"]
  node_frontend["Web frontend"]
end

subgraph group_learning["Learning services"]
  node_content["Learning content"]
  node_progress["Learning progress"]
end

subgraph group_identity["Identity and platform"]
  node_gateway{{"API gateway"}}
  node_identity_service["Identity service"]
  node_eureka["Service registry"]
end

subgraph group_engagement["Engagement and commerce"]
  node_gamification["Quests and shop"]
  node_payment["Payments"]
  node_notifications["Notifications"]
end

subgraph group_insights["AI and insights"]
  node_ai["AI learning"]
  node_ml["ML predictions<br/>[app.py]"]
end

node_learner(("Learner / admin"))
node_nvidia{{"NVIDIA LLM API"}}
node_cloudinary{{"Cloudinary storage"}}
node_payment_provider{{"VNPAY / VietQR"}}
node_rabbitmq["RabbitMQ"]
node_postgres[("Service databases")]
node_redis[("Redis cache")]
node_google{{"Google OAuth2"}}

node_learner -->|"uses"| node_frontend
node_frontend -->|"API requests"| node_gateway
node_gateway -->|"routes auth"| node_identity_service
node_gateway -->|"routes content"| node_content
node_gateway -->|"routes progress"| node_progress
node_gateway -->|"routes AI"| node_ai
node_gateway -->|"routes rewards"| node_gamification
node_gateway -->|"routes checkout"| node_payment
node_identity_service -.->|"OAuth2 login"| node_google
node_identity_service -->|"reads / writes"| node_postgres
node_content -->|"reads / writes"| node_postgres
node_content -->|"caches content"| node_redis
node_progress -->|"stores progress"| node_postgres
node_ai -->|"fetches content"| node_content
node_ai -->|"fetches learner data"| node_progress
node_ai -->|"generates / evaluates"| node_nvidia
node_ai -.->|"stores media"| node_cloudinary
node_progress -->|"requests prediction"| node_ml
node_gamification -->|"stores rewards"| node_postgres
node_gamification -->|"uses messaging"| node_rabbitmq
node_payment -->|"checkout / webhook"| node_payment_provider
node_payment -->|"publishes completion"| node_rabbitmq
node_notifications -.->|"consumes events"| node_rabbitmq
node_notifications -->|"sends reminders"| node_learner
node_gateway -.->|"discovers services"| node_eureka

click node_frontend "https://github.com/danielnguyen0705/ie303/tree/main/Frontend/src"
click node_eureka "https://github.com/danielnguyen0705/ie303/blob/main/EurekaService/src/main/java/com/ie303/eurekaserver/EurekaServiceApplication.java"
click node_content "https://github.com/danielnguyen0705/ie303/tree/main/ContentService/src/main/java/com/ie303/uifive"
click node_ai "https://github.com/danielnguyen0705/ie303/tree/main/AIService/src/main/java/com/ie303/uifive"
click node_ml "https://github.com/danielnguyen0705/ie303/blob/main/MLService/app.py"
click node_gamification "https://github.com/danielnguyen0705/ie303/tree/main/GamificationService/src/main/java/com/ie303/uifive"

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_frontend toneBlue
class node_content,node_progress,node_cloudinary,node_postgres,node_redis toneAmber
class node_gateway,node_identity_service,node_eureka,node_nvidia toneMint
class node_gamification,node_payment,node_notifications toneRose
class node_ai,node_ml,node_learner,node_payment_provider,node_rabbitmq,node_google toneIndigo
```

## Components

### Learner client

- [Web frontend](https://github.com/danielnguyen0705/ie303/tree/main/Frontend/src): `Frontend/src`

### Learning services

- [Learning content](https://github.com/danielnguyen0705/ie303/tree/main/ContentService/src/main/java/com/ie303/uifive): `ContentService/src/main/java/com/ie303/uifive`
- **Learning progress**

### Identity and platform

- **API gateway**
- **Identity service**
- [Service registry](https://github.com/danielnguyen0705/ie303/blob/main/EurekaService/src/main/java/com/ie303/eurekaserver/EurekaServiceApplication.java): `EurekaService/src/main/java/com/ie303/eurekaserver/EurekaServiceApplication.java`

### Engagement and commerce

- [Quests and shop](https://github.com/danielnguyen0705/ie303/tree/main/GamificationService/src/main/java/com/ie303/uifive): `GamificationService/src/main/java/com/ie303/uifive`
- **Payments**
- **Notifications**

### AI and insights

- [AI learning](https://github.com/danielnguyen0705/ie303/tree/main/AIService/src/main/java/com/ie303/uifive): `AIService/src/main/java/com/ie303/uifive`
- [ML predictions](https://github.com/danielnguyen0705/ie303/blob/main/MLService/app.py): `MLService/app.py`

### Other components

- **Learner / admin**
- **NVIDIA LLM API**
- **Cloudinary storage**
- **VNPAY / VietQR**
- **RabbitMQ**
- **Service databases**
- **Redis cache**
- **Google OAuth2**

## Connections

- Learner / admin → Web frontend: uses
- Web frontend → API gateway: API requests
- API gateway → Identity service: routes auth
- API gateway → Learning content: routes content
- API gateway → Learning progress: routes progress
- API gateway → AI learning: routes AI
- API gateway → Quests and shop: routes rewards
- API gateway → Payments: routes checkout
- Identity service → Google OAuth2: OAuth2 login
- Identity service → Service databases: reads / writes
- Learning content → Service databases: reads / writes
- Learning content → Redis cache: caches content
- Learning progress → Service databases: stores progress
- AI learning → Learning content: fetches content
- AI learning → Learning progress: fetches learner data
- AI learning → NVIDIA LLM API: generates / evaluates
- AI learning → Cloudinary storage: stores media
- Learning progress → ML predictions: requests prediction
- Quests and shop → Service databases: stores rewards
- Quests and shop → RabbitMQ: uses messaging
- Payments → VNPAY / VietQR: checkout / webhook
- Payments → RabbitMQ: publishes completion
- Notifications → RabbitMQ: consumes events
- Notifications → Learner / admin: sends reminders
- API gateway → Service registry: discovers services
