How dumitrusf/zoo-arcadia works
Main Components
• Web Server & PHP Runtime: Represent Apache configured to serve the project. Emphasize that it uses PHP (with its configuration files in php.ini) to run server-side scripts.
• Frontend/Public Interface: Show the “public” directory as the entry point for the browser. This includes pages like index.php, about.php, contact.php, and specialized dashboards (dash-admin.php, dash-employee.php, dash-vet.php).
• Backend/Business Logic: Represent the “includes” directory which contains the configuration (e.g., database.php) and shared functions (functions.php, pageTitle.php) along with template components (nav.php, footer.php). This is where most of the logic and view partials reside.
• Assets & Styling: Include the “src/assets” (fonts, images) and “src/scss” directories. These are built via Gulp (gulpfile.js, package.json, package-lock.json) into the production CSS under public/build/css.
• Database Layer: Mark both the relational database (MariaDB) – with SQL scripts available under the “database” folder for initializing tables, constraints, indexes, etc. – and the non-relational database (MongoDB) as backend data stores.
• Dependency Management: Note the use of Composer for PHP dependency management (composer.json, composer.lock) and Node.js (package.json, package-lock.json) for frontend packages.
Relationships and Interactions
• A client (browser) interacts with Apache serving files from the “public” folder.
• Public PHP files act as controllers which include and call functions from the “includes” (and possibly additional libraries in “vendor”) for business logic.
• The backend code actively queries or manipulates data stored in MariaDB (and potentially MongoDB) as guided by scripts in the “database” folder.
• The Gulp automation process takes SCSS files from “src/scss” and compiles them into production CSS, placed under “public/build/css”, making sure that the presentation layer is current.
• There’s clear separation between presentation (public and’s front-end assets) and business logic (PHP code from the includes).
Architectural Patterns/Design Principles
• Although not a strict MVC setup, there is an implicit separation of concerns – server-side logic (PHP scripts within includes) is separated from the presentation layer (PHP pages in public) and styling (SCSS).
• The project leverages modular configuration and templating, which can be illustrated by emphasizing the use of files like config/database.php and separate template partials for navigation and footer.
• Automated frontend build processes (using Node.js and Gulp) emphasize a modern development workflow.
• The overall design focuses on responsiveness (mobile-first approach) and maintainability through clear separation of frontend assets and backend logic.
Technologies and Frameworks
• PHP with Apache as the web server.
• MariaDB (relational) and MongoDB (non-relational) for data storage.
• Composer for PHP dependencies.
• Node.js, Gulp, SCSS, and Bootstrap for frontend build and styling.