97 lines
3.2 KiB
Markdown
97 lines
3.2 KiB
Markdown
# Wizdom Networks - UI and Backend Architecture
|
|
|
|
## **Project Overview**
|
|
Wizdom Networks is a comprehensive IT consulting platform focused on providing scalable and structured solutions. The project utilizes **controller-based rendering**, **modular UI components**, and **enhanced debugging/logging mechanisms** to ensure maintainability and ease of expansion.
|
|
|
|
## **Technology Stack**
|
|
- **Backend:** PHP (PSR-4 Autoloading)
|
|
- **Frontend:** HTML, CSS (Bootstrap 5), JavaScript
|
|
- **Database:** MariaDB
|
|
- **Server:** Nginx
|
|
- **Logging & Error Handling:** Custom Logger & ErrorHandler
|
|
- **Testing:** PHPUnit
|
|
|
|
## **Project Structure**
|
|
```
|
|
app/
|
|
├── Controllers/ # Application controllers handling page logic
|
|
├── Core/ # Core utilities such as routing, views, and request handling
|
|
├── Models/ # Business logic and database interaction (to be implemented)
|
|
├── Utils/ # Logger, ErrorHandler, Validation, and general utilities
|
|
config/
|
|
├── config.php # Configuration settings
|
|
public/
|
|
├── assets/ # CSS, JavaScript, and images
|
|
├── index.php # Main entry point
|
|
resources/
|
|
├── views/ # Blade-style PHP templates for UI rendering
|
|
├── emails/ # Email templates
|
|
scripts/ # Deployment and helper scripts
|
|
storage/
|
|
├── logs/ # Logging directory
|
|
├── cache/ # Application caching (future use)
|
|
tests/ # PHPUnit test cases
|
|
vendor/ # Composer dependencies
|
|
```
|
|
|
|
## **Key Features**
|
|
### **1. Fully Controller-Based Rendering**
|
|
- Views are no longer directly accessed, controllers **handle all logic**.
|
|
- `View.php` is responsible for rendering pages dynamically.
|
|
|
|
### **2. Modular UI Components**
|
|
- **Layouts and Partials**: Separated `head.php`, `main.php`, `footer.php`, `navbar.php`, and `sidebar.php`.
|
|
- **Hero and Slider Components**: Dynamically loaded when defined in controllers.
|
|
- **CSS Modularization**: `hero.css`, `slider.css`, and `main.css` only load when needed.
|
|
|
|
### **3. Enhanced Logging & Debugging**
|
|
- **Logger Utility**: Logs `INFO`, `WARNING`, `ERROR`, and `DEBUG` levels.
|
|
- **ErrorHandler**: Captures and logs uncaught exceptions.
|
|
- **APP_DEBUG Mode**: Debugging can be toggled via environment variables.
|
|
|
|
### **4. Unit Testing Framework**
|
|
- PHPUnit test cases validate:
|
|
- **Controller logic**
|
|
- **View rendering consistency**
|
|
- **Error handling**
|
|
|
|
## **Installation & Setup**
|
|
### **1. Clone the Repository**
|
|
```sh
|
|
git clone https://git.cloudiq.ca/essae/WizdomWeb.git
|
|
cd wizdom-networks
|
|
```
|
|
### **2. Install Dependencies**
|
|
```sh
|
|
composer install
|
|
```
|
|
### **3. Configure Environment**
|
|
- Copy the example environment file:
|
|
```sh
|
|
cp .env.example .env
|
|
```
|
|
- Modify `.env` with database and application settings.
|
|
|
|
### **4. Run Application**
|
|
```sh
|
|
php -S localhost:8000 -t public/
|
|
```
|
|
### **5. Run Unit Tests**
|
|
```sh
|
|
vendor/bin/phpunit tests/
|
|
```
|
|
|
|
## **Contributing**
|
|
1. **Fork the repository**
|
|
2. **Create a feature branch**
|
|
3. **Commit your changes**
|
|
4. **Submit a pull request**
|
|
|
|
## **License**
|
|
This project is licensed under the MIT License - see the `LICENSE` file for details.
|
|
|
|
---
|
|
|
|
**Maintained by Wizdom Networks Development Team** 🚀
|
|
|