# sabarishdevaraju/react-app-cicd-docker-pipeline architecture

> Architecture diagram of the GitHub repository sabarishdevaraju/react-app-cicd-docker-pipeline, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sabarishdevaraju/react-app-cicd-docker-pipeline
- Repository: https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline

## Overview

#### Purpose and Runtime
This is a Create React App single-page frontend. It runs in the browser, with Node/npm supplying development, test, and production-build workflows. The repository contains no backend, API client, database, or external service integration evident from the provided tree.

#### Application Entry and Browser Shell
The static browser document and React bootstrap form the runtime boundary:
- `public/index.html` provides the HTML mount shell.
- `src/index.js` initializes React and mounts the application.
- `src/App.js` is the root application component.

Browser-visible defaults and baseline styling are separated into `src/index.css` and `src/App.css`.

#### Root UI Composition
`src/App.js` is the primary composition point for application UI. The only identified domain-oriented feature area is user data:
- `src/user-data/UserDetail.js`
- `src/App.js`

This indicates a small component hierarchy in which the root app likely renders or coordinates user-detail presentation. No routing, global state layer, or feature-service boundary is visible.

#### Client Data Boundary
`src/user-data/` is the repository’s only domain-specific module area, with `src/user-data/UserDetail.js` representing the user-detail view/component boundary. There is no visible persistence, remote data adapter, schema layer, or state-management package structure; any data supplied to this component is expected to originate within the client component tree.

#### Offline and Static Assets
Progressive-web-app support is present but isolated:
- `src/serviceWorker.js`
- `public/manifest.json`
- `public/robots.txt`

`src/serviceWorker.js` is the client caching/offline lifecycle boundary if registered by `src/index.js`. Static files under `public/` are served directly rather than bundled as React modules.

#### Build, Containers, and Deployment
CRA produces an optimized static production bundle, intended for deployment as files rather than a server-rendered application. Container and orchestration variants exist for local and production use:
- `Dockerfile.dev`
- `Dockerfile.prod`
- `docker-compose.dev.yaml`
- `docker-compose.prod.yaml`

Automation is split between CI and shell wrappers:
- `Jenkinsfile`
- `script/build.sh`
- `script/deploy.sh`

The production deployment boundary is therefore the generated frontend artifact and its container/image workflow; no runtime application infrastructure is represented in source.

#### Validation
The test harness follows CRA/Jest conventions and is centered on the root application:
- `src/App.test.js`
- `src/setupTests.js`
- `src/App.js`

Tests execute in a JavaScript test runtime rather than against deployed infrastructure.

Main entry points: [`src/index.js`](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/index.js) (React bootstrap), [`src/App.js`](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/App.js) (Root app), [`Jenkinsfile`](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/Jenkinsfile) (Jenkins pipeline), [`public/index.html`](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/public/index.html) (HTML mount shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Browser Application"]
  node_react_entry["React bootstrap<br/>browser entry<br/>[index.js]"]
  node_app["Root app<br/>React component<br/>[App.js]"]
  node_user_detail["User detail<br/>feature component<br/>[UserDetail.js]"]
  node_global_styles["Global styles<br/>stylesheet<br/>[index.css]"]
  node_app_styles["App styles<br/>stylesheet<br/>[App.css]"]
end

subgraph group_static["Static &amp; Offline"]
  node_html_shell["HTML mount shell<br/>static document<br/>[index.html]"]
  node_service_worker["Service worker<br/>offline lifecycle<br/>[serviceWorker.js]"]
  node_manifest["Web manifest<br/>PWA metadata<br/>[manifest.json]"]
  node_robots["Robots rules<br/>static metadata<br/>[robots.txt]"]
end

subgraph group_delivery["Build &amp; Deployment"]
  node_production_bundle["Static production bundle<br/>build artifact"]
  node_dev_container["Development container<br/>Docker build<br/>[Dockerfile.dev]"]
  node_prod_container["Production image<br/>Docker build<br/>[Dockerfile.prod]"]
  node_dev_compose["Development compose<br/>container orchestration"]
  node_prod_compose["Production compose<br/>container orchestration"]
  node_ci["Jenkins pipeline<br/>CI automation"]
  node_build_script["Build wrapper<br/>shell automation<br/>[build.sh]"]
  node_deploy_script["Deploy wrapper<br/>shell automation<br/>[deploy.sh]"]
end

subgraph group_quality["Test Automation"]
  node_app_test["Root app test<br/>Jest test<br/>[App.test.js]"]
  node_test_setup["Test setup<br/>Jest setup<br/>[setupTests.js]"]
end

node_html_shell -->|"hosts mount point"| node_react_entry
node_react_entry -->|"mounts"| node_app
node_react_entry -->|"loads"| node_global_styles
node_react_entry -.->|"registers"| node_service_worker
node_app -->|"composes"| node_user_detail
node_app -->|"uses"| node_app_styles
node_manifest -.->|"PWA metadata for"| node_html_shell
node_production_bundle -->|"packaged into"| node_prod_container
node_dev_compose -->|"runs"| node_dev_container
node_prod_compose -->|"runs"| node_prod_container
node_ci -->|"invokes"| node_build_script
node_ci -->|"invokes"| node_deploy_script
node_build_script -->|"produces"| node_production_bundle
node_deploy_script -->|"deploys with"| node_prod_compose
node_app_test -->|"tests"| node_app
node_test_setup -->|"configures"| node_app_test

click node_html_shell "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/public/index.html"
click node_react_entry "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/index.js"
click node_app "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/App.js"
click node_user_detail "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/user-data/UserDetail.js"
click node_global_styles "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/index.css"
click node_app_styles "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/App.css"
click node_service_worker "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/serviceWorker.js"
click node_manifest "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/public/manifest.json"
click node_robots "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/public/robots.txt"
click node_dev_container "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/Dockerfile.dev"
click node_prod_container "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/Dockerfile.prod"
click node_dev_compose "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/docker-compose.dev.yaml"
click node_prod_compose "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/docker-compose.prod.yaml"
click node_ci "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/Jenkinsfile"
click node_build_script "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/script/build.sh"
click node_deploy_script "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/script/deploy.sh"
click node_app_test "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/App.test.js"
click node_test_setup "https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/setupTests.js"

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_react_entry,node_app,node_user_detail,node_global_styles,node_app_styles toneBlue
class node_html_shell,node_service_worker,node_manifest,node_robots toneAmber
class node_production_bundle,node_dev_container,node_prod_container,node_dev_compose,node_prod_compose,node_ci,node_build_script,node_deploy_script toneMint
class node_app_test,node_test_setup toneRose
```

## Components

### Browser Application

- [React bootstrap](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/index.js): browser entry · `src/index.js`
- [Root app](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/App.js): React component · Primary UI composition point. · `src/App.js`
- [User detail](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/user-data/UserDetail.js): feature component · Only domain-specific UI boundary. · `src/user-data/UserDetail.js`
- [Global styles](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/index.css): stylesheet · `src/index.css`
- [App styles](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/App.css): stylesheet · `src/App.css`

### Static & Offline

- [HTML mount shell](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/public/index.html): static document · `public/index.html`
- [Service worker](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/serviceWorker.js): offline lifecycle · Provides optional client caching and offline support. · `src/serviceWorker.js`
- [Web manifest](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/public/manifest.json): PWA metadata · `public/manifest.json`
- [Robots rules](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/public/robots.txt): static metadata · `public/robots.txt`

### Build & Deployment

- **Static production bundle**: build artifact · Optimized files deployed without an application server.
- [Development container](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/Dockerfile.dev): Docker build · `Dockerfile.dev`
- [Production image](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/Dockerfile.prod): Docker build · `Dockerfile.prod`
- [Development compose](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/docker-compose.dev.yaml): container orchestration · `docker-compose.dev.yaml`
- [Production compose](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/docker-compose.prod.yaml): container orchestration · `docker-compose.prod.yaml`
- [Jenkins pipeline](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/Jenkinsfile): CI automation · `Jenkinsfile`
- [Build wrapper](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/script/build.sh): shell automation · `script/build.sh`
- [Deploy wrapper](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/script/deploy.sh): shell automation · `script/deploy.sh`

### Test Automation

- [Root app test](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/App.test.js): Jest test · `src/App.test.js`
- [Test setup](https://github.com/sabarishdevaraju/react-app-cicd-docker-pipeline/blob/master/src/setupTests.js): Jest setup · `src/setupTests.js`

## Connections

- HTML mount shell → React bootstrap: hosts mount point
- React bootstrap → Root app: mounts
- React bootstrap → Global styles: loads
- React bootstrap → Service worker: registers · Only when offline support is enabled.
- Root app → User detail: composes
- Root app → App styles: uses
- Web manifest → HTML mount shell: PWA metadata for
- Static production bundle → Production image: packaged into
- Development compose → Development container: runs
- Production compose → Production image: runs
- Jenkins pipeline → Build wrapper: invokes
- Jenkins pipeline → Deploy wrapper: invokes
- Build wrapper → Static production bundle: produces
- Deploy wrapper → Production compose: deploys with
- Root app test → Root app: tests
- Test setup → Root app test: configures
