# gusortepz/shaken-oci architecture

> Architecture diagram of the GitHub repository gusortepz/shaken-oci, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gusortepz/shaken-oci
- Repository: https://github.com/gusortepz/shaken-oci

## Overview

##### Project type and purpose
- This is a cloud-native full-stack sample application (“MyToDo React JS”) showing how to build and deploy a React frontend with a Spring Boot (Java) backend on Oracle Cloud Infrastructure using Terraform, Docker, Kubernetes, and OCI DevOps.
- The README confirms it’s intended as a workshop/lab repo, demonstrating end-to-end CI/CD, infrastructure provisioning, containerization, and secure connectivity to an Oracle database.

##### File structure
- Top‐level directories and files:
- .github/workflows/ci.yml – GitHub Actions pipeline
- MtdrSpring/backend – Java Spring Boot service, Docker/Maven build, application code, configs, tests
- MtdrSpring/backend/src/main/frontend – React + Vite + TypeScript app
- MtdrSpring/terraform – Terraform modules to provision OCI resources (APIGateway, Container Engine for Kubernetes, Database, Object Storage, Networking, IAM)
- MtdrSpring/*.sh – Shell scripts to bootstrap, deploy or destroy infra and application
- deployment.yaml, build_spec.yaml, oci_devops.yml – Kubernetes/DevOps deployment descriptors
- utils/ – Helper scripts (DB setup, token cache, etc.) and Python tooling for OCI
- Patterns & technologies:
- Full-stack: React SPA served by Spring Boot or static server in container
- Microservice style: backend exposes REST controllers (AuthController, ToDoItemController, KPIController, BotController)
- Infra as Code: Terraform modules provisioning OCI resources
- CI/CD: GitHub Actions + OCI DevOps (build_spec.yml, oci_devops.yml)
- Containerization: Dockerfiles, Kubernetes manifests

##### README for additional insights
- Confirms core stack: ReactJS frontend, Java Helidon or Spring Boot backend, OCI services
- Mentions prerequisites: OCI-CLI, Terraform, kubectl, Maven, Python

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User Layer
    subgraph "User Layer"
        Browser["User Browser"]:::frontend
        ReactSPA["React SPA"]:::frontend
    end
    Browser -->|"HTTPS"| ReactSPA

    %% API Layer
    subgraph "API Layer"
        APIGateway["OCI API Gateway"]:::infra
    end
    ReactSPA -->|"HTTPS"| APIGateway

    %% Kubernetes Cluster
    subgraph "Kubernetes Cluster (OKE)"
        direction TB
        subgraph "Spring Boot Service"
            Controllers["REST Controllers"]:::compute
            Services["Business Services"]:::compute
            Repositories["Data Repositories"]:::compute
            SecurityConfig["Security Configuration"]:::compute
            AppConfig["Application Configuration"]:::compute
        end
    end
    APIGateway -->|"REST API"| Controllers
    Controllers -->|"invoke"| Services
    Services -->|"access"| Repositories
    Repositories -->|"JDBC"| OracleDB["Oracle Autonomous DB"]:::infra
    Services -->|"OCI SDK/API"| ObjStorage["OCI Object Storage"]:::infra

    %% Infrastructure as Code
    subgraph "Infrastructure as Code"
        TerraformModules["Terraform Modules"]:::infra
    end
    TerraformModules --> APIGateway
    TerraformModules --> OracleDB
    TerraformModules --> ObjStorage
    TerraformModules --> Repositories

    %% CI/CD Pipeline
    subgraph "CI/CD Pipeline"
        direction TB
        GitHubActions["GitHub Actions"]:::devops
        OCIDevOps["OCI DevOps"]:::devops
        ContainerRegistry["Container Registry"]:::infra
        K8sDeploy["Kubernetes Deployment"]:::devops
    end
    GitHubActions --> OCIDevOps
    OCIDevOps --> ContainerRegistry
    ContainerRegistry --> K8sDeploy
    K8sDeploy --> Controllers

    %% Click Events
    click ReactSPA "https://github.com/gusortepz/shaken-oci/tree/main/MtdrSpring/backend/src/main/frontend"
    click Controllers "https://github.com/gusortepz/shaken-oci/tree/main/MtdrSpring/backend/src/main/java/com/springboot/MyTodoList/controller"
    click Services "https://github.com/gusortepz/shaken-oci/tree/main/MtdrSpring/backend/src/main/java/com/springboot/MyTodoList/service"
    click Repositories "https://github.com/gusortepz/shaken-oci/tree/main/MtdrSpring/backend/src/main/java/com/springboot/MyTodoList/repository"
    click SecurityConfig "https://github.com/gusortepz/shaken-oci/tree/main/MtdrSpring/backend/src/main/java/com/springboot/MyTodoList/security"
    click AppConfig "https://github.com/gusortepz/shaken-oci/tree/main/MtdrSpring/backend/src/main/java/com/springboot/MyTodoList/config"
    click TerraformModules "https://github.com/gusortepz/shaken-oci/tree/main/MtdrSpring/terraform"
    click APIGateway "https://github.com/gusortepz/shaken-oci/blob/main/MtdrSpring/terraform/apigateway.tf"
    click OracleDB "https://github.com/gusortepz/shaken-oci/blob/main/MtdrSpring/terraform/database.tf"
    click ObjStorage "https://github.com/gusortepz/shaken-oci/blob/main/MtdrSpring/terraform/object_storage.tf"

    %% Styles
    classDef frontend fill:#CFE2F3,stroke:#023E8A,color:#023E8A;
    classDef compute fill:#D8E2DC,stroke:#2F5233,color:#2F5233;
    classDef infra fill:#FFE5B4,stroke:#D67E00,color:#D67E00;
    classDef devops fill:#E0BBE4,stroke:#9D4EDD,color:#9D4EDD;
```
