How ons-innovation/keh-digital-landscape works
Project Type & Purpose
• This is a full-stack web application that aggregates and displays data about technologies and projects within ONS. It supports interactive tools like the Tech Radar for tracking technology adoption and a Statistics panel for analyzing language and repository metrics.
• It is containerized (using Docker) and has dedicated deployment pipelines for both frontend and backend, with infrastructure managed via Terraform. It even includes tooling for continuous integration (GitHub Actions) and testing (Python tests via PyTest).
Analyzing the File Structure
• The project is clearly divided into multiple key directories:
• Frontend: Contains a React-based UI with an organized component structure (e.g., Header, InfoBox, Projects, Statistics) along with public assets, styles, and utility functions.
• Backend: Houses Node.js (Express likely) code that sets up the API and server logic. The structure inside “backend/src” suggests configuration files (like logger.js) and utilities (e.g., transforming project data) are used to support the production logic.
• Terraform: This directory has subdirectories (authentication, service, storage) indicating the use of Infrastructure as Code (IaC) to deploy cloud resources on AWS. It manages authentication, load balancing, DNS, IAM, and storage resources.
• Testing: A dedicated folder containing Python tests, a Makefile, and specific linting configurations.
• Configuration files such as Dockerfiles, docker-compose.yml, and Makefile link the development and deployment processes.
a. Main Components:
• Frontend Application: Represented by the "frontend" directory, using React. This component handles the UI rendering for pages (Tech Radar, Statistics, Projects, Review, Homepage) and interacts with the backend.
• Backend Application: Located in the "backend" directory. It exposes REST APIs (or similar endpoints) to support the frontend and handle data processing, logging, and utility functions.
• Infrastructure & Deployment: Containerization through Docker (Dockerfiles for frontend and backend, docker-compose for local orchestration). Deployment pipelines targeting AWS ECR for container storage and Terraform-managed resources for cloud infrastructure (authentication services, load balancers, and storage).
• Testing Environment: Although separate, the testing module can be denoted as a pipeline component verifying backend functionality via Python tests.
b. Relationships & Interactions:
• Containerization & Deployment: Show that both the frontend and backend are containerized (Docker) and may be deployed by running “docker-build” and “docker-up” commands, culminating in containers running on ports 3000 (frontend) and 5001 (backend).
• Infrastructure as Code (Terraform): Illustrate connections between the application components and the AWS resources (authentication, service, and storage aspects) managed through separate Terraform modules.
• CI/CD and Testing: Optionally, include pipelines (via GitHub Actions and Makefile-based commands) that trigger linting, testing, and automated deployments.
c. Architectural Patterns & Design Principles:
• Separation of Concerns: Clear demarcation between frontend (presentation layer) and backend (business logic and data processing).
• Containerization: Use of Docker for consistent development, testing, and production environments.
• Infrastructure as Code: Terraform folders manifest the principle of managing infrastructure declaratively.
• Microservice-friendly: Although not fully microservices, the independent container deployment of frontend and backend implies that they can be scaled or updated with minimal dependency.
d. Relevant Technologies, Frameworks, or Libraries:
• Frontend: React, ESLint for linting, and CSS for styling.
• Backend: Node.js (and likely Express), ESLint for code quality, with logger and utility modules.
• Deployment: Docker, docker-compose, and Terraform for managing AWS resources (ECR, IAM, ALB, etc.).
• Continuous Integration/Delivery (CI/CD): GitHub Actions for CI pipelines, Makefile commands for various tasks.
• Testing: PyTest (for backend testing modules in the “testing” folder).
• User-facing components (e.g., frontend UI).
• Server-side components (e.g., Node.js backend).
• Infrastructure elements (e.g., Terraform-managed AWS resources, Docker containers).
• Supporting utilities (CI/CD pipelines and tests).