How f2had/online-charity-management-system works
Project Type and Purpose
• This is a monolithic full‐stack web application called “Online Charity Project Management System.”
• Purpose: Enables non-profits to manage charity projects, meeting reports and volunteer data.
High-Level Architecture Components
a. Presentation Layer (Client / Frontend)
• Static HTML pages: index.html, login.php (mix of HTML/PHP), *.html under root (e.g. Volunteer.html, create.html, meeting-report.html).
• CSS & skins: css/, bodybg/, skins/default.css
• JavaScript: js/ (custom.js, login_register.js, profile-handler.js, uisearch.js, plus 3rd-party libs)
• Fonts & images: fonts/, img/
b. Application Layer (Server / Backend)
• Entry points: *.php in root (login.php, logout.php, profile.php, add_report.php, assignVolunteer.php, etc.)
• Business logic & controllers: includes/*.php (signup.inc.php, login.inc.php, report.inc.php, insert_project.php, update_project.php, delete_project.php, edit-profile.inc.php, password-recovery, resetPassword)
• Mailing service: includes/phpmailer/ (PHPMailer library for email notifications)
• Templating / layout: includes/top.php, includes/footer.php, includes/loader.inc.php
c. Data Layer
• Relational database: MySQL schema defined in database/wif2003.sql
• Database access: includes/connect_database.php & includes/config.inc.php
d. External Services
• Email SMTP service (via PHPMailer)
• (Potentially) third-party JS libraries (prettify, classie.js)
Key Interactions and Data Flows
• Browser ↔ Web Server: HTTP requests for HTML/PHP pages → server executes .php, uses includes, returns HTML/CSS/JS.
• Server ↔ Database: PHP scripts invoke connect_database.php → SQL queries to wif2003 schema → CRUD operations for projects, volunteers, reports.
• Server ↔ SMTP: report submission or password recovery triggers PHPMailer to send emails.
Architectural Patterns & Design Principles
• Layered (Presentation / Business / Data)
• Reusable components via includes/ templates
• Procedural PHP with a light MVC flavor (controllers in includes/, views in HTML/PHP mix)
• Asset separation (css/, js/, fonts/, img/)
• Presentation Layer: static assets (css/, js/, fonts/, img/)
• Application Layer: includes/*.php controllers & page scripts