How jayachandragoteti/hostel-out-pass-system works
Project type and purpose
• This is a full-stack, monolithic PHP web application (“Hostel Out Pass System”) whose goal is to let students apply for an out-pass, allow admins to accept/reject based on parental consent, and maintain history/statistics of passes.
File structure
• Top-level PHP scripts (outform.php, accepts.php, rejects.php, history.php, homestatustics.php, etc.) act as controllers/views.
• .php centralizes database connectivity.
• css/ and js/ folders serve static assets (Bootstrap, custom CSS/JS).
• image/ and related scripts handle image-based workflows (e.g. upload, processing).
• sources/ holds the CoreUI admin-template source—used for the admin dashboard UI.
• No separate microservices; purely PHP + MySQL.
Extract additional insights from README
• Students log in, submit out-pass requests.
• Admin console (using CoreUI template) displays pending requests, allows accept/reject.
• History and statistics (monthly counts, one-hour stats) are computed and displayed.
Main components and their interactions
a. Components
• Browser (Student UI, Admin UI)
• Web Server + PHP runtime (Apache/Nginx + PHP-FPM)
• MySQL Database
• External Notification Service (optional email/SMS to parents)
b. Relationships & data flow
1. Student logs in → HTTP(S) → PHP Authentication module (loginconnect.php, security.php) → DB (users table) → session cookie
2. Student submits request (outform.php → outformdata.php) → PHP validates → INSERT into passes table
3. Admin polls pending requests (requests.php) → PHP SELECT pending → displayed via CoreUI templates
4. Admin action “Accept” (accepts.php/acceptdata.php) or “Reject” (rejects.php/rejecteddata.php) → UPDATE passes table → optionally trigger notification
5. History/statistics modules (history.php, homestatustics.php, onehourstatustics.php) → PHP aggregate queries → charts/tables
6. Image workflows (image/*.php) → handle file upload, display, process images linked to passes
c. Architectural patterns
• 3-Tier architecture: Presentation (HTML/JS/CSS), Application (PHP controllers), Data (MySQL)
• MVC-lite: each PHP script acts as Controller+View; connect.php is shared Model connector
d. Technologies
• PHP 7/8
• MySQL (or MariaDB)
• Bootstrap 4 + CoreUI Admin Template
• Vanilla JS + custom search.js
Detailed breakdown
• Authentication flow: login.html → loginconnect.php → DB
• Submission flow: outform.html → outformdata.php → DB
• Admin decision flow: requests.php → accepts.php/rejects.php → DB → (Notification)
• History/statistics: history.php, homestatustics.php, onehourstatustics.php → DB
• Static assets: css/, js/ served directly
• CoreUI template integration under sources/ for Admin UI