How onnus/web-eng-2022a works
Project Overview
• This project is a full-stack web development environment designed to streamline local and cloud-based web development. It integrates Visual Studio Code (with Codespaces support), Docker containers, and a custom web engine (OWE) that supports modular, plugin-driven web applications.
• The README highlights two main parts: the WDE, which provides the development environment, and the OWE, which is the core engine for building sites and web applications.
Main Components
a. Dev Environment & Orchestration:
• .devcontainer: Contains configuration (e.g., devcontainer.json and README) used to set up VS Code/Codespaces environments.
• .docker: Contains Dockerfiles, docker-compose files (with separate configurations for debug and default modes on both Linux and Windows) that standardize the environment.
• .script: Houses various shell and batch scripts to build, start, stop, reset, and manage Docker containers as well as linter integrations. This is key for orchestrating the environment.
• .github: Holds CI/CD workflows and deployment scripts (e.g., deploy-to-aws-s3.yml, deploy-to-azure.yml) which show the integration with cloud environments and how the project is maintained/released.
b. Core Engine – ONNUS WEB Engine (OWE):
• onn-web-eng: This is the source for the web engine. It includes configuration files (.htaccess, index.php, index.json) as well as an ONNUS workspace file that configures the IDE.
• Inside “onn-web-eng/onnus”, you have distinct folders for:
• __applications__: Contains various modules (e.g., onnus-app-debug, onnus-cms, onnus-crm, onnus-exchange, onnus-ide, onnus-lms, onnus-messenger, onnus-pms) where each module has subdirectories for its class definitions and module data file (module.json). These indicate a modular and possibly plugin-influenced architecture.
• __plugins__: Contains additional extensions like “onnus-plugin-debug”, with their module metadata indicating plug-and-play capabilities.
• __resources__: Offers shared assets (CSS, JavaScript, PHP API definitions) that support functionality across applications.
• content/_data_ and content/pages: These directories suggest dynamic content management (pages and user/account data), further emphasizing a separation of concerns.
• “framework” directory inside “onn-web-eng/onnus” which is broken out into versioned subdirectories (2206c, 2207c, and 2208c). Each of these contains:
• __applications__/onnus-browser: Likely serving as the primary web interface with a layered API (accounts, browser operations, components, dashboards, and systems).
• __plugins__: Additional functional extensions that support interface enhancements (like onnus-interface, onnus-user, onnus-menu).
• __resources__: Static and dynamic assets (CSS, JS, PHP scripts) used widely across the engine.
• This modular structure suggests that the OWE is built on a plugin-based pattern where core functionality is split into loosely coupled modules.
Relationships and Interactions
• The Dev Environment (using Docker, Codespaces, and VS Code) is responsible for providing a consistent and replicable platform. It connects directly to the OWE by running the engine inside Docker containers.
• The orchestration scripts (.script) manage container lifecycle events (build, start, stop) and integrate with GitHub Actions for CI/CD.
• The Docker configuration components (.docker) and the container orchestration flows are what bind the development environment to the web engine.
• In the OWE itself, the relationships are modular:
• The __applications__ modules form the core features of the engine.
• The __plugins__ extend core functionality, interacting with the API endpoints provided by the framework.
• The __resources__ folder provides shared assets and utility functions that are used by both applications and plugins.
• The “framework” subdirectories (versioned) indicate that there is a versioned evolution or an experimental approach for the web engine with consistent API endpoints for modules, plugins, and resources.
Architectural Patterns and Design Principles
• Modular/Plugin Architecture: Components (both applications and plugins) are organized as self-contained modules with their own data (module.json) and class files.
• Separation of Concerns: There is a clear divide between the development environment configuration and the production runtime (OWE), as well as within the engine itself between different functional areas.
• Containerization: Docker is used to ensure uniform development and production environments.
• DevOps Integration: GitHub Actions and scripts support CI/CD and deployment across different cloud providers (AWS, Azure, GCP).