How sabarishdevaraju/react-app-cicd-docker-pipeline works
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: index.js React bootstrap · App.js Root app · Jenkinsfile Jenkins pipeline · index.html HTML mount shell
Components 19
Browser Application
- React bootstrap
src/index.js - Root app · Primary UI composition point.
src/App.js - User detail · Only domain-specific UI boundary.
src/user-data/UserDetail.js - Global styles
src/index.css - App styles
src/App.css
Static & Offline
- HTML mount shell
public/index.html - Service worker · Provides optional client caching and offline support.
src/serviceWorker.js - Web manifest
public/manifest.json - Robots rules
public/robots.txt
Build & Deployment
- Static production bundle · Optimized files deployed without an application server.
- Development container
Dockerfile.dev - Production image
Dockerfile.prod - Development compose
docker-compose.dev.yaml - Production compose
docker-compose.prod.yaml - Jenkins pipeline
Jenkinsfile - Build wrapper
script/build.sh - Deploy wrapper
script/deploy.sh
Test Automation
- Root app test
src/App.test.js - Test setup
src/setupTests.js
Connections 16
- 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