How andes-hosting/website works
Project Type and Purpose
• From the file tree and minimal README, this is a static single-page application (SPA) built with React (“website-andes-hosting” directory) that is containerized and served via Nginx.
• The repository includes Docker assets (dockerfile, docker-compose.yml), an Nginx configuration, and a GitHub Actions workflow for building and releasing a Docker image.
File Structure Analysis
• Top‐level:
– dockerfile & docker-compose.yml → container build and orchestration
– nginx.conf → reverse‐proxy / static file server config
– .github/workflows/publish-image-and-release.yml → CI/CD pipeline
– website-andes-hosting/ → React app (public, src/components, src/pages, utils, tests)
• Patterns:
– SPA frontend only, no backend code
– Componentized UI under src/components and pages
– Static assets in public/ served by Nginx
– Utility scripts (contactoPixel, iniciarPagoPixel) that integrate third-party analytics/payment services
README Insights
• No further architectural details beyond “# WebSite,” confirming the repo’s focus on delivering a static React SPA.
a. Main Components
1. Developer (local machine)
2. GitHub Repository
3. CI/CD Pipeline (GitHub Actions)
4. Docker Registry (Docker Hub or GitHub Container Registry)
5. Hosting Environment (VM or Kubernetes cluster)
6. Nginx Container (serving static files)
7. React Application Container (bundled static assets)
8. End User Browser
9. External Services (analytics/payment pixel endpoints)
b. Relationships & Data Flows
• Developer pushes code → triggers GitHub Actions
• Actions checkout code → install dependencies → run tests → build React static bundle → build Docker image → push to registry → (optionally) trigger deployment
• Hosting environment pulls new image → spins up Nginx+React container via docker-compose or orchestrator
• User’s browser → HTTP(S) request → Nginx reverse‐proxy serves static files → browser runs React app
• React app calls external analytics/payment services via pixel utilities
c. Architectural Patterns & Principles
• “Single‐page application + reverse-proxy” pattern
• CI/CD pipeline for automated builds and releases
• Containerization for environment parity and simplified deployment
• Clear separation of concerns: code repo, build pipeline, image registry, runtime environment
d. Key Technologies & Frameworks
• React (frontend SPA)
• Nginx (static file server / reverse proxy)
• Docker (containerization) & Docker Compose (local orchestration)
• GitHub Actions (CI/CD)
• Third-party analytics/payment pixels (via utils scripts)