How pablo389/oci-react-samples works
Project Type & Purpose
– This is a full‐stack, Cloud-Native to-do application:
• Frontend: React (SPA) under backend/src/main/frontend
• Backend: Spring Boot (Java) under backend/src/main/java/...
• Infrastructure as Code: Terraform (OCI) under terraform/
• CI/CD: GitHub Actions (.github/workflows/ci.yml) and OCI DevOps YAML
– Purpose: allow users to register/login, manage tasks, sprints, KPIs. Deployable to OCI container service.
Main Architectural Components
a. Developer & CI/CD
– Local developer machines running mvnw, Node/npm, Terraform, OCI-CLI, Python scripts (in utils/python-scripts/).
– GitHub repo triggers CI (ci.yml) on push → runs tests (frontend/src/test, backend unit tests) → builds artifacts.
– CI pushes Docker image to OCI Container Registry (OCIR).
b. Infrastructure Layer (Terraform)
– Modules in terraform/:
• provider.tf configures OCI provider
• database.tf provisions Autonomous DB or Oracle DB
• containerengine.tf creates OKE (Kubernetes) cluster
• apigateway.tf sets up OCI API Gateway
• object_storage.tf for blob storage (optional static assets)
• Outputs for Load Balancer, cluster kubeconfig, DB connection.
c. Runtime Environment (OCI)
– OCI API Gateway
• Exposes public HTTP(S) endpoint
• Routes /api/* to backend service on cluster
– OKE (Kubernetes)
• Kubernetes Deployment + Service running Spring Boot container (serving static React build + REST APIs)
• Horizontal scaling via replicas
– Oracle Database
• Persistent data store for Users, ToDoItems, KPIs, Sprints
– Object Storage (if used for assets back-up or logs)
d. Application Components
– Frontend (React SPA)
• Built by Vite (vite.config.ts)
• Components for Layout, Sidebar, TaskForm, TaskList, Theme Toggle
• Calls backend via src/utils/api.ts
– Backend (Spring Boot Monolith)
• Controllers: Auth, ToDoItem, Sprint, KPI, Bot
• Services & Repositories (JPA)
• Security: JWT filter, WebSecurityConfiguration
• Configuration classes: CORS, DB settings, Oracle config
• Utility classes: Bot commands & helpers
Relationships & Data Flows (
– Developer → GitHub Actions: push code → CI pipeline
– CI → OCIR & Terraform: build Docker image → push registry → apply Terraform
– Terraform → OCI Resources: provision OKE, API Gateway, DB, Object Storage
– API Gateway → Kubernetes Service: route HTTP requests
– Kubernetes Pod (Spring Boot):
• Serves index.html + static assets
• Exposes REST endpoints consumed by SPA
• Interacts with Oracle DB over secure connection
– Database: persistent store
– User → API Gateway: user’s browser fetches SPA, then issues AJAX calls to backend
Architectural Patterns & Principles
– Infrastructure as Code: all OCI resources defined in Terraform modules
– Containerization & Orchestration: Docker + Kubernetes (OKE)
– Monolithic Service: single container serving both UI and API
– CI/CD: automated build/test/deploy via GitHub Actions and shell scripts (build.sh, deploy.sh, dev.sh)
– Security: JWT auth, CORS configuration
Essential Elements to Capture
– Source control & CI/CD flow (GitHub → build → registry)
– Terraform provisioning of OCI services
– OCI API Gateway as entry point
– Kubernetes cluster & pod deployment
– Monolithic container serving both SPA & API
– Oracle DB persistence layer
– User interaction flows (SPA load, API calls)