How pavanserigara/bca-project works
1. This repository is a PHP monolith for a campus/school management system (cms). The application is organized primarily by user role rather than by technical layers, with separate page sets for admin, teacher, student, and parent experiences.
2. The main entry/authentication flow is centralized at the root: index.php, login.php, forgot-password.php, logout.php, and reset_admin.php. These pages are the public boundary into the system and likely route users into the correct role area after authentication.
3. Role-specific subsystems are split into top-level directories:
- admin/ for institution operations and master data
- teacher/ for academic operations
- student/ for learner self-service
- parent/ for guardian visibility
Each role has its own dashboard.php and feature pages, which implies a server-rendered UI with role-scoped navigation and permissions.
4. The admin area is the broadest control plane. It includes management screens for students, faculty, departments, subjects, courses, exams, fees, notices, events, placements, logistics, library, complaints, leave approvals, ID cards, document verification, and settings. This suggests admin owns institutional configuration, records, approvals, and reporting.
5. The teacher area is the academic operations layer. Its pages focus on attendance taking and reporting, marks entry, subject/material management, assignments/submissions review, notices, messaging, timetable, leave requests, and profile maintenance. Teachers appear to be the primary producers of academic data consumed elsewhere in the system.
6. The student area is the self-service consumption and submission layer. It exposes dashboards for attendance, results, fees, timetable, notices, events, assignments, documents, messaging, placements, library, logistics, complaints, materials, ID card, and profile. Students likely upload files and view academic and administrative status rather than manage core records.
7. The parent area is a read-heavy visibility layer. It includes dashboard, attendance, fees, results, notices, messaging, and profile pages, indicating that parents can monitor student progress and institutional communication but do not directly create operational records.
8. Shared application logic lives under includes/ and role-local includes/ folders. includes/db.php is the shared database connection boundary, while includes/functions.php provides cross-cutting helpers. Shared headers/footers in each role folder indicate a common page shell with role-specific navigation and layout.
9. File/document handling is a distinct subsystem. Upload handlers exist in includes/handlers/, student/includes/handlers/, and admin/includes/handlers/, including document_upload.php, profile_upload.php, and get_student_docs.php. The presence of uploads/profiles/ shows that user documents and avatars are stored on disk, with the database likely tracking metadata and verification status.
10. The data backbone is MySQL-based, with schema stored in database/cms.sql and at least one migration in database/migrations/phase_1_identity.php. Utility scripts like test_db.php, update_db.php, and test_paths.php suggest local setup, schema validation, and path/debug support around the database and file system.
11. Static assets are centralized under assets/ for CSS, JavaScript, and images. This supports a traditional server-rendered UI rather than a separate front-end application.
12. Operationally, the architecture is a single deployable PHP application with shared state in the database and uploaded files on disk. The main interaction flow is: user logs in at the root, lands in a role-specific dashboard, performs module actions through PHP pages, which read/write the shared database and, when needed, persist documents or profile images to the uploads area.
13. The planning artifacts under .planning/ indicate the project has been organized into phased implementation and verification, but they are not part of the runtime architecture. They are useful for understanding intended scope, not request flow.
Main entry points: db.php Shared logic · cms.sql Database · index.php Entry · dashboard.php Admin dashboard
Components 19
Public access
Entry and authentication boundary
Admin portal
Institution control and master data
- Admin dashboard · Top-level administrative control plane
admin/dashboard.php - Master data · Students, faculty, departments, subjects, courses, staff
admin/students-list.php - Operations · Fees, exams, timetable, notices, events, placements, logistics, library, complaints, leave, ID cards, settings
admin/fees.php - People views · Faculty, students, parents, profile and document verification
admin/faculty-list.php
Teacher portal
Academic operations and submissions
- Teacher dashboard · Academic workbench for staff
teacher/dashboard.php - Academic work · Attendance, marks, subjects, materials, timetable, leave, profile
teacher/attendance-take.php - Teacher comms · Assignments, submissions review, notices, messaging
teacher/assignments.php
Student portal
Learner self-service and uploads
- Student dashboard · Learner self-service home
student/dashboard.php - Student academic · Attendance, results, fees, timetable, materials, assignments, documents, ID card
student/attendance.php - Student services · Messaging, notices, events, placements, library, logistics, complaints, profile
student/messaging.php
Parent portal
Guardian visibility and monitoring
- Parent dashboard · Guardian visibility home
parent/dashboard.php - Parent view · Attendance, fees, results, notices, messaging, profile
parent/attendance.php
Shared platform
Common includes, data, assets, and storage
- Database · Shared CMS schema and migrations
database/cms.sql - Shared logic · Database connection, helpers, headers/footers, and handlers
includes/db.php - Uploads · Profiles and document files on disk
uploads/profiles - Assets · CSS, JavaScript, and images for server-rendered UI
assets/css/style.css
Connections 31
- Login → Entry: authenticates · Login is the main sign-in boundary
- Entry → Admin dashboard: routes admin · Authenticated users enter the admin area when authorized
- Entry → Teacher dashboard: routes teacher · Authenticated users enter the teacher area when authorized
- Entry → Student dashboard: routes student · Authenticated users enter the student area when authorized
- Entry → Parent dashboard: routes parent · Authenticated users enter the parent area when authorized
- Recovery → Login: resets access · Password recovery returns users to sign-in
- Admin dashboard → Master data: manages · Administrative control over core records
- Admin dashboard → Operations: operates · Administrative operational modules
- Admin dashboard → People views: reviews · Admin views for people, profiles, and verification
- Teacher dashboard → Academic work: runs · Academic execution features
- Teacher dashboard → Teacher comms: coordinates · Communication and assignment workflow
- Student dashboard → Student academic: consumes · Student-facing academic status and submissions
- Student dashboard → Student services: accesses · Student-facing service and communication pages
- Parent dashboard → Parent view: monitors · Parent-facing read-heavy pages
- Master data → Database: reads/writes · Core records persist in the shared schema
- Operations → Database: reads/writes · Operational state is stored centrally
- Academic work → Database: reads/writes · Attendance, marks, and subject data update shared state
- Student academic → Database: reads/writes · Student submissions and profile data interact with the database
- Parent view → Database: reads · Parent pages mainly consume shared data
- Shared logic → Database: connects · Shared DB connection and helpers
- People views → Shared logic: uses · Admin pages depend on shared includes and handlers
- Teacher comms → Shared logic: uses · Teacher pages depend on shared shell and helpers
- Student services → Shared logic: uses · Student pages depend on shared shell and helpers
- Parent view → Shared logic: uses · Parent pages depend on shared shell and helpers
- Student academic → Uploads: stores files · Documents and profile images are persisted on disk
- People views → Uploads: verifies files · Admin document verification works against uploaded files
- Shared logic → Uploads: handles uploads · Shared and role-local handlers manage file persistence
- Admin dashboard → Assets: renders with · Admin UI uses shared static assets
- Teacher dashboard → Assets: renders with · Teacher UI uses shared static assets
- Student dashboard → Assets: renders with · Student UI uses shared static assets
- Parent dashboard → Assets: renders with · Parent UI uses shared static assets