How yatharth0045/solar-system works
Project type and purpose
• This is a small full-stack web application (“Solar System NodeJS Application”) that serves static HTML/CSS/JS to display solar system data and uses a MongoDB database to store/retrieve planet and related information. It is packaged in Docker and deployable to Kubernetes, with GitHub Actions handling CI/CD (unit tests, container build & push).
File structure
• Top-level files:
• app.js (main Express/NodeJS server entry point)
• app-controller.js (HTTP request handlers)
• index.html + images/ (static assets/frontend)
• app-test.js (unit tests)
• package.json / package-lock.json (dependency manifest)
• Dockerfile / .dockerignore (containerization)
• .github/workflows/workflow-1.yml (CI jobs: test & container push)
• Directories:
• kubernetes/ (dev & prod manifests: Deployment, Service, Ingress)
• solar-dump/ (sample MongoDB dump used to seed or restore the database)
Extract additional insights from README
• Backend stack: NodeJS + Express (assumed) + MongoDB
• Database: external MongoDB Atlas or local Docker container seeded from solar-dump
• CI/CD: GitHub Actions workflows run tests, build & push container to GHCR
• Deployment targets: Docker run locally, Kubernetes via minikube & ngrok, production Kubernetes
1) Client / Browser – the user interface serving index.html & assets
2) NodeJS Application – Express server (app.js + controllers + routes)
3) MongoDB Database – either local Docker container or cloud-hosted Atlas cluster
4) CI/CD Pipeline – GitHub Actions (test job, build & push container to GHCR)
5) Container Registry – GitHub Container Registry (GHCR)
6) Container Runtime – Docker Engine on host or Kubernetes Cluster
7) Kubernetes Cluster – dev & prod namespaces running Deployment, Service, Ingress
8) External Tools – ngrok for exposing minikube, kubectl for orchestration
• Client → HTTP GET/POST → NodeJS App
• NodeJS App → MongoDB Driver → MongoDB Database
• GitHub Actions → build/push → GHCR
• Kubernetes (Ingress) → routes external traffic → Service → Deployment Pods (NodeJS App)
• Docker Engine → runs container in local dev / CI test
• ngrok → tunnels internet traffic → Kubernetes Ingress → NodeJS App
c. Architectural patterns & principles:
• MVC-style separation (controllers in app-controller.js)
• 12-factor app principles (config via environment variables: MONGO_URI, MONGO_USERNAME, MONGO_PASSWORD)
• Immutable containers & declarative infrastructure (Dockerfile + k8s manifests)
• CI/CD automation (GitHub Actions)
d. Key technologies & libraries:
• Node.js & Express.js
• MongoDB + mongosh / mongodump CLI tools
• Docker & Dockerfile
• Kubernetes (Deployment, Service, Ingress manifests)
• GitHub Actions & GHCR
• ngrok (tunneling)