Lightweight React front-end with CI/CD tooling examples, Docker packaging, and code-quality scanning. This repository demonstrates how to wire a React-based movie browsing UI (using a central Axios TMDB client) into container builds and GitHub Actions workflows with SonarQube scans
Below is a screenshot from the UI included in the screenshot/ folder:
src/— React app sources (components,tmdbAxiosInstance.js,Bot.jsx, etc.)Dockerfile— image build for containerizing the applicationmanaged.yml— (likely) GitHub Actions workflow filesonar-project.properties— SonarQube project configuration
Requirements: Node >= 14, npm or yarn, Docker (optional)
- Install dependencies
npm install- Start dev server
npm start- Build production bundle
npm run build- Build Docker image (optional)
docker build -t hotstar-web:local .This repo contains workflow(s) to build, test, and scan the code. Typical steps to include in CI:
- Install dependencies and run tests
- Lint and static checks
- Build Docker image and push to registry (optional)
- Run SonarQube scan
See managed.yml and GitHub Actions settings in the repository for the exact configuration used.
The diagram above (docs/architecture.svg) describes the main components and data flow:
- React Client (front-end) — renders UI and calls the central Axios instance
tmdbAxiosInstance.js— single place to manage TMDB API calls and keys- Bot — auxiliary components/scripts (for automation or requests)
- Docker — containerization used in CI for reproducible builds
- GitHub Actions — CI/CD orchestration
- SonarQube — code quality and security scanning
If you use a TMDB API key, set it as an environment variable (or in a .env file used by your React app) and ensure it is not committed to source control.
Example .env:
REACT_APP_TMDB_API_KEY=your_api_key_here- Update
managed.ymlwith your secrets and Docker registry information to enable CI releases. - If you want a hosted SonarQube, update connection settings in the
managed.ymlor the CI environment. - Consider adding a minimal
CONTRIBUTING.mdandLICENSEif you plan to open-source this project.
If you'd like, I can also:
- Add a PNG export of the architecture diagram for better compatibility
- Generate a
CONTRIBUTING.mdandLICENSEfile - Update
managed.ymlto include example Sonar and Docker publish steps
Let me know which of the above you'd like next.
| Service | Port |
|---|---|
| HTTP | 80 |
| SSH | 22 |
| SonarQube | 9000 |
sudo apt update
sudo apt upgrade -y
# Common tools
sudo apt install -y bash-completion wget git zip unzip curl jq net-tools build-essential ca-certificates apt-transport-https gnupg fontconfigReload bash completion if needed:
source /etc/bash_completionInstall latest Git:
sudo add-apt-repository ppa:git-core/ppa
sudo apt update
sudo apt install git -yOfficial docs: https://docs.docker.com/engine/install/ubuntu/
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Add user to docker group (log out / in or newgrp to apply)
sudo usermod -aG docker $USER
newgrp docker
docker psCheck Docker status:
sudo systemctl status dockerdocker run -d --name sonarqube \
-p 9000:9000 \
-v sonarqube_data:/opt/sonarqube/data \
-v sonarqube_logs:/opt/sonarqube/logs \
-v sonarqube_extensions:/opt/sonarqube/extensions \
sonarqube:lts-community| Purpose | ID | Type | Notes |
|---|---|---|---|
| EMAIL_USER | emailaddress@gmail.com | ||
| Email-app-Pass | EMAIL_PASS | Secret text | From app password |
| Docker-username | DOCKER_USERNAME | your-docker-id | From your Docker Hub profile |
| Docker-username | DOCKER_PASSWORD | token | From your Docker Hub token |
| sonar-qube | follow the same step | manully entries |

