# gcu-project-space/server architecture

> Architecture diagram of the GitHub repository gcu-project-space/server, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gcu-project-space/server
- Repository: https://github.com/gcu-project-space/server

## Overview

##### Project type and purpose
- This is a backend-only, microservices-based server project (the “Server” component of a larger system).
- It provides five distinct services—user, order, payment, store, recruitment—each packaged as its own Docker container and deployed via individual CI/CD pipelines.

##### File structure
- Top-level:
- .github/workflows: CI/CD definitions for each service (ci-cd-*.yml)
- README.md: high-level project description
- order-service, payment-service, recruitment-service, store-service, user-service
– Each service folder contains a Dockerfile and its own README
- No shared “common” or “library” folder—each service is self-contained.
- CI/CD is implemented with GitHub Actions; each microservice has a dedicated workflow file.

##### Additional README insights
- Minimal (identifies course and team) – no extra architecture details
- We infer system scope: user authentication/management, catalog/store management, order processing, payment processing, recruitment features.

##### Detailed checklist
[ ] Client / UI
[ ] API Gateway / Ingress
[ ] user-service → user DB
[ ] store-service → store DB
[ ] order-service → order DB
[ ] payment-service → payment DB
[ ] recruitment-service → recruitment DB
[ ] Optional: Message Broker between services
[ ] External Payment Gateway
[ ] GitHub Actions workflows (ci-cd-*.yml) depicted as pipelines
[ ] Docker runtime or Orchestrator layer

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    Clients["Clients (Web/Mobile/Postman)"]:::external
    API["API Gateway / Nginx"]:::gateway

    %% Runtime / Orchestration
    subgraph "Container Orchestration"
        Orchestrator["Docker Compose / Kubernetes"]:::orchestrator
    end

    %% Messaging
    Broker["Message Broker (Kafka/RabbitMQ)"]:::messaging

    %% External Services
    ExternalPayment["External Payment Gateway"]:::external

    %% Microservices Layer
    subgraph "Microservices"
        direction TB
        userService["user-service"]:::service
        storeService["store-service"]:::service
        orderService["order-service"]:::service
        paymentService["payment-service"]:::service
        recruitmentService["recruitment-service"]:::service
    end

    %% Datastores
    userDB["user DB"]:::db
    storeDB["store DB"]:::db
    orderDB["order DB"]:::db
    paymentDB["payment DB"]:::db
    recruitmentDB["recruitment DB"]:::db

    %% CI/CD Pipelines
    subgraph "CI/CD (GitHub Actions)"   
        direction TB
        ciUser["ci-cd-user-service.yml"]:::cicd
        ciStore["ci-cd-store-service.yml"]:::cicd
        ciOrder["ci-cd-order-service.yml"]:::cicd
        ciPayment["ci-cd-payment-service.yml"]:::cicd
        ciRecruit["ci-cd-recruitment-service.yml"]:::cicd
        rootReadme["README.md"]:::cicd
    end

    %% Connections
    Clients -->|"HTTP/REST"| API
    API -->|"HTTP/REST"| userService
    API -->|"HTTP/REST"| storeService
    API -->|"HTTP/REST"| orderService
    API -->|"HTTP/REST"| paymentService
    API -->|"HTTP/REST"| recruitmentService

    userService -->|"JDBC/ORM"| userDB
    storeService -->|"JDBC/ORM"| storeDB
    orderService -->|"JDBC/ORM"| orderDB
    paymentService -->|"JDBC/ORM"| paymentDB
    recruitmentService -->|"JDBC/ORM"| recruitmentDB

    orderService -->|"sync HTTP/REST"| paymentService
    orderService -->|"order_created event"| Broker
    recruitmentService -->|"user lookup HTTP/REST"| userService
    recruitmentService -->|"notification event"| Broker
    paymentService -->|"payment processing"| ExternalPayment

    Orchestrator --> userService
    Orchestrator --> storeService
    Orchestrator --> orderService
    Orchestrator --> paymentService
    Orchestrator --> recruitmentService
    Orchestrator --> Broker

    %% CI/CD connections
    userService --- ciUser
    storeService --- ciStore
    orderService --- ciOrder
    paymentService --- ciPayment
    recruitmentService --- ciRecruit
    rootReadme --- Clients

    %% Click Events
    click userService "https://github.com/gcu-project-space/server/tree/main/user-service/"
    click storeService "https://github.com/gcu-project-space/server/tree/main/store-service/"
    click orderService "https://github.com/gcu-project-space/server/tree/main/order-service/"
    click paymentService "https://github.com/gcu-project-space/server/tree/main/payment-service/"
    click recruitmentService "https://github.com/gcu-project-space/server/tree/main/recruitment-service/"
    click ciUser "https://github.com/gcu-project-space/server/blob/main/.github/workflows/ci-cd-user-service.yml"
    click ciStore "https://github.com/gcu-project-space/server/blob/main/.github/workflows/ci-cd-store-service.yml"
    click ciOrder "https://github.com/gcu-project-space/server/blob/main/.github/workflows/ci-cd-order-service.yml"
    click ciPayment "https://github.com/gcu-project-space/server/blob/main/.github/workflows/ci-cd-payment-service.yml"
    click ciRecruit "https://github.com/gcu-project-space/server/blob/main/.github/workflows/ci-cd-recruitment-service.yml"
    click rootReadme "https://github.com/gcu-project-space/server/blob/main/README.md"

    %% Styles
    classDef service fill:#cce5ff,stroke:#004085,color:#004085
    classDef db fill:#d4edda,stroke:#155724,color:#155724
    classDef messaging fill:#fff3cd,stroke:#856404,color:#856404
    classDef external fill:#f8d7da,stroke:#721c24,color:#721c24
    classDef gateway fill:#d1ecf1,stroke:#0c5460,color:#0c5460
    classDef orchestrator fill:#e2e3e5,stroke:#6c757d,color:#6c757d
    classDef cicd fill:#f0f0f0,stroke:#888888,color:#333333
```
