How turki-alsumari/swe455-devops-project works
Project Type and Purpose
• This is a microservice-based full-stack web application (“Stock Tracker”) whose goal is to let users search and view real-time stock data.
• Key features: ReactJS frontend, Node.js/Express microservices, an API Gateway, no internal database (data comes directly from the TwelveData external API), fully containerized, and automated CI/CD with security scanning.
File Structure
• Top-level directories:
• backend/api-gateway – the Express.js gateway that routes client calls to services
• backend/stock-service – the microservice that calls TwelveData API
• frontend – ReactJS single-page app
• Config and orchestration:
• docker-compose.yml – local container orchestration
• .github/workflows/… – GitHub Actions CI/CD pipelines (lint, test, scan, deploy)
• Testing frameworks: Jest for unit/integration, Cypress for end-to-end, Trivy for vulnerability scanning.
README for Additional Insights
• It confirms the architecture: frontend ↔ API Gateway ↔ stock service ↔ external TwelveData API.
• Deployment target: Render.com.
• DevOps emphasis: lint → test → security scan → build → deploy to production on merge to main.
Main Components and Their Relationships
a. Components
1. User’s Browser (UI)
2. React Frontend Container
3. API Gateway Container (Express.js)
4. Stock Service Container (Express.js)
5. External TwelveData API
6. CI/CD Pipeline (GitHub Actions)
7. Container Orchestration (Docker Compose locally, Render.com in prod)
b. Interactions
• User → HTTP(S) → React Frontend
• Frontend → HTTP → API Gateway
• API Gateway → HTTP → Stock Service
• Stock Service → HTTP → TwelveData API
• CI/CD (on GitHub) → builds Docker images → pushes to registry → deploys services to Render.com
c. Architectural Patterns
• Microservices with an API Gateway (to allow independent scaling, testing, and routing)
• Containerization (Docker + Docker Compose for dev; Docker images for prod)
• DevOps pipeline: GitHub Actions for CI/CD, including automated linting, unit tests, integration tests, security scans (Trivy), and deployment.
d. Technologies & Frameworks
• Frontend: ReactJS, Tailwind CSS (via tailwind.config.js)
• Backend: Node.js, Express.js
• Containerization: Docker, Docker Compose
• CI/CD: GitHub Actions (lint, test, scan, deploy)
• Testing: Jest, Cypress
• Security: Trivy
• Deployment: Render.com