How yusay1498/dummy-web-site works
Project Type and Purpose
• This is a single-page web application (likely built with a framework like React) that serves a dummy website. The focus is on the client-side, bundled in the "front" directory.
• The README shows a simple build command for the front-end, and the file tree reveals all assets (source, public files, etc.) dedicated to front-end functionality.
Main Components
a. Source Repository:
• Repository that holds all code including the “front” directory and configuration files (.gitignore, Dockerfile, etc.).
• Existence of a GitHub directory with CI/CD components including workflows (e.g., terraform.yml) which hint at automation in the deployment process.
b. Development and Build Environment:
• The “front” directory contains the source code (src/) and public assets.
• Development environment where an npm build is executed (as indicated by “(cd front && npm build)” in the README).
c. Containerization:
• The presence of a Dockerfile in the “front” directory shows the application is containerized.
• Docker container that wraps the built front-end, ensuring consistency in deployment.
d. Web Server:
• Nginx.conf, which indicates that an Nginx server serves the static assets of the application.
e. CI/CD Pipeline:
• The .github/workflows directory, including terraform.yml, indicates that there is a deployment/automation process in place.
Relationships and Interactions
• Starting Point: Code is pushed to the repository.
• Build Process: GitHub Actions (or CI pipeline) picks up the changes to execute the “npm build” command in the "front" directory.
• Deployment: The built container with Nginx (configured via nginx.conf) is deployed – this can be shown as a separate component where the container runs, serving static assets to client browsers.
Architectural Patterns and Design Principles
• Separation of concerns: source code, build pipeline, containerization, and deployment are clearly distinct.
• Containerization brings consistency across environments.
• Usage of a lightweight web server (Nginx) to serve static files.
• CI/CD automation implies a modern DevOps approach.
Putting It All Together
• Docker container running the front-end service using Nginx.
• Finally, indicate the interaction between the deployed service and the user’s browser.