- Created TokenService for generic HMAC token generation and validation - Created UnsubscribeTokenService to wrap TokenService with email+timestamp logic and TTL - Updated UnsubscribeController to require valid signed tokens for GET /unsubscribe - Token is generated using email + ts + shared secret, validated against TTL (default 24h) - Confirm view now inaccessible unless accessed via system-generated link - Deprecated static helper in favor of service architecture |
||
|---|---|---|
| app | ||
| config | ||
| public | ||
| resources | ||
| scripts | ||
| tests | ||
| .gitignore | ||
| .phpunit.result.cache | ||
| DevelopmentPlan.v2.md | ||
| ProjectSummary.md | ||
| README.md | ||
| StylingStructure.md | ||
| TODOs.md | ||
| WizdomWebsite.md | ||
| composer.json | ||
| composer.lock | ||
| copy-email-utilities.sh | ||
| logsapp.log | ||
| phpunit.xml | ||
README.md
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.phpis responsible for rendering pages dynamically.
2. Modular UI Components
- Layouts and Partials: Separated
head.php,main.php,footer.php,navbar.php, andsidebar.php. - Hero and Slider Components: Dynamically loaded when defined in controllers.
- CSS Modularization:
hero.css,slider.css, andmain.cssonly load when needed.
3. Enhanced Logging & Debugging
- Logger Utility: Logs
INFO,WARNING,ERROR, andDEBUGlevels. - 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
git clone https://git.cloudiq.ca/essae/WizdomWeb.git
cd wizdom-networks
2. Install Dependencies
composer install
3. Configure Environment
- Copy the example environment file:
cp .env.example .env
- Modify
.envwith database and application settings.
4. Run Application
php -S localhost:8000 -t public/
5. Run Unit Tests
vendor/bin/phpunit tests/
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- 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 🚀