How department-of-veterans-affairs/leaf works
Main Components
• Frontend/Client Layers:
– The web interfaces for both the Nexus (organizational chart, admin screens) and the Request Portal (form submissions, workflow tracking).
– The Vue-based frontend (docker/vue-app) that parts of the system, such as the form editor and site designer, may use.
• Application Layers:
– LEAF_Nexus: Contains both PHP files (index.php, admin modules, ajax endpoints, API controllers) and authentication modules (auth_cert, auth_cookie, auth_token, auth_domain) to manage organizational data and user accounts.
– LEAF_Request_Portal: Contains similar PHP modules for electronic forms, workflow logic, and API endpoints.
– Servlets (digital-signing): A Java-based digital signing module offering digital signature and signing functions.
– Scheduled and batch scripts (in the scripts and pipeline directories) that perform tasks such as database updates, employee refreshes, and maintenance.
• Shared and Library Components:
– The “libs” and “app” directories hold third-party libraries and shared utilities (e.g., spreadsheets, logging, configuration, and XSS helpers).
• Infrastructure/Deployment:
– Docker files and Docker Compose/Swarm configurations showing containers for PHP (monolithic LEAF deployment or swarm mode deployments), MySQL databases, NGINX web server, and the Vue.js application.
– Docker volumes and environment configurations that manage secrets, caching, and application settings.
Out the Relationships and Interactions
• RESTful API endpoints in both LEAF_Nexus/api and LEAF_Request_Portal/api that serve data (for organizational chart updates, form submissions, etc.).
• How the PHP-based backend communicates with the MySQL database (as configured in the docker/mysql directory).
• Integration between scheduled tasks (present under the “scripts” directory) and backend systems – for example, tasks that run through cron or Docker scheduled jobs to update databases and refresh org chart data.
• Digital signing module of the servlets component as a specialized service that may be called by other components when digital signatures are required.
• Dependencies on shared libraries (libs, app, and php-commons) which are used by both LEAF_Nexus and LEAF_Request_Portal.
Architectural Patterns and Principles
• Separation of concerns: one module handles workflow and forms (Request Portal), while the other deals with organizational data and administration (Nexus).
• That there is a layered architecture: presentation (UI), application logic (PHP backends, Java signing service), and data (MySQL).
• Details on API-based communication between components.
• How containerization (Docker) is used to decouple the environments and ease deployment/maintenance.
• Mention that the system incorporates security elements (authentication modules in each area, use of certificates, tokens, etc.) as well as scheduled tasks and logging utilities.