How mrmedalisan/instituly works
1. Overall shape
Instituly is a school-management system with a PHP backend and multiple static front-end entry points for different roles. The repository is organized around a shared API layer plus role-specific UIs for students/home, teachers, admins, and an owner/setup area.
2. Client surfaces
The top-level index.html, home/, login/, teacher/, admin/, owner_test/, merged/, and landing/ folders are separate web surfaces rather than one monolithic app. Each has its own HTML/CSS/JS bundle, suggesting role-based navigation and distinct user experiences.
3. Backend API boundary
The apis/ directory is the main service boundary. It contains many PHP endpoints that expose business capabilities such as login, attendance, announcements, grading, timetable, documents, media, finance, and uploads. This is the core integration layer consumed by the front-end pages.
4. Domain segmentation by role
Several API subfolders are role-focused:
- apis/teachers/ for teacher workflows like classes, homework, absences, announcements, uploads, and teacher administration.
- apis/staff/ for staff-related operations.
- apis/students/ for student-specific features like homework.
- apis/owner_test/ for provisioning and database creation tasks.
This indicates the backend is organized around user roles and school administration functions.
5. Shared server-side domain logic
apis/classes/ holds reusable PHP classes and helpers such as student absences, class retrieval, and student creation. This is the shared business-logic layer underneath the role-specific endpoints, likely used to keep API handlers thin.
6. Identity and access flow
Login and account management are handled by dedicated endpoints like login.php, users.php, passchange.php, hash.php, and admin.php. This suggests authentication/authorization is centralized in the API layer, with role checks gating access to teacher/admin/staff/student functions.
7. Core school data flows
The main data model revolves around academic operations: classes, students, attendance, timetable, grading, homework, announcements, documents, and galleries. These APIs imply the system is designed to move data between school staff and family/student-facing clients rather than just serve static content.
8. Finance and receipts
There is a separate finance/payment path in student_finance.php, process_payment.php, student_receipt.php, and generate_summary_receipt.php. This is a distinct subsystem from academic data, likely handling tuition or fees, payment processing, and receipt generation.
9. Notifications and external integration
apis/FCM/ contains Firebase Cloud Messaging assets, including a service account JSON and a send_notification.php script. That makes push notifications a first-class integration, probably used for announcements, attendance updates, or payment-related alerts. hook.php and proxy_attendance.php suggest additional webhook/proxy-style integrations.
10. Storage and deployment clues
The repository includes db.php plus SQL creators under owner_test/, pointing to a database-backed application, most likely MySQL/MariaDB. Files like app/app.apk, admin/index.zip, and landing/imprint.zip suggest packaged delivery artifacts alongside the source, not just source code. The error_log files under apis/ and apis/teachers/ indicate server-side logging in production-style PHP hosting.
11. Public/legal content
landing/ contains marketing and legal pages such as privacy, terms, imprint, and data-deletion. These are separate from the authenticated product flows and likely form the public-facing website for the platform.
12. Architecture summary for a diagram
A good diagram would show: role-specific web clients and landing pages on one side; a central PHP API layer in the middle; a shared database and file/media storage on the backend; and external services for Firebase push notifications and payment/receipt-related operations. The important boundary is between static client UIs and the centralized PHP application logic in apis/.
Main entry points: apis API layer · classes Shared logic · home/index.html Home UI · login/index.html Login UI
Components 21
Client surfaces
Role-specific static web entry points and public pages.
- Main entry · Top-level landing entry point for the site.
index.html - Home UI · Student-facing web surface for the home experience.
home/index.html - Login UI · Dedicated login surface for account access.
login/index.html - Teacher UI · Teacher-facing web surface for class and workflow management.
teacher/index.html - Admin UI · Administrative web surface for school operations.
admin/index.html - Owner setup · Owner/provisioning surface for database and school setup tasks.
owner_test/index.html - Merged UI · Alternate bundled web surface for consolidated access.
merged/index.html - Landing site · Marketing and legal pages for privacy, terms, imprint, and deletion.
landing/index.html
PHP API
Central backend endpoints and shared server-side logic.
- API layer · Main backend boundary exposing school-management capabilities.
apis - Identity · Login, password change, user lookup, and role gating endpoints.
apis/login.php - Academics · Attendance, grading, timetable, announcements, documents, media, and logs.
apis/adtendence.php - Teacher APIs · Teacher workflows for classes, homework, absences, announcements, and uploads.
apis/teachers - Student APIs · Student-facing endpoints such as homework.
apis/students - Staff APIs · Staff-related backend operations.
apis/staff - Shared logic · Reusable class helpers for absences, class lookup, and student creation.
apis/classes - Finance · Tuition, payment processing, and receipt generation.
apis/student_finance.php - Provisioning · School and database creation utilities for owner setup.
apis/owner_test
Infrastructure
Database, storage, and external integrations.
- Notifications · Firebase Cloud Messaging send path and service account assets.
apis/FCM - Database · Database-backed application state and schema.
apis/db.php - Artifacts · Packaged app, archived bundles, and uploaded media/documents.
app/app.apk
Other components
- Instituly · School-management system with role-based web surfaces and a PHP service layer.
Connections 29
- Instituly → Main entry: exposes · Main site entry routes to the public page.
- Instituly → Home UI: serves · Provides the student home surface.
- Instituly → Login UI: serves · Provides the authentication surface.
- Instituly → Teacher UI: serves · Provides the teacher role surface.
- Instituly → Admin UI: serves · Provides the admin role surface.
- Instituly → Owner setup: serves · Provides provisioning and owner setup surface.
- Instituly → Merged UI: serves · Provides an alternate bundled surface.
- Instituly → Landing site: serves · Provides the public marketing/legal site.
- Home UI → API layer: calls · Student UI consumes backend endpoints.
- Teacher UI → API layer: calls · Teacher UI consumes backend endpoints.
- Admin UI → API layer: calls · Admin UI consumes backend endpoints.
- Owner setup → API layer: calls · Provisioning surface uses backend setup endpoints.
- Merged UI → API layer: calls · Bundled UI consumes backend endpoints.
- Login UI → Identity: authenticates · Login page connects to identity endpoints.
- API layer → Identity: contains · Central API includes identity and account management.
- API layer → Academics: contains · Central API exposes school operations.
- API layer → Teacher APIs: contains · Central API includes teacher-specific endpoints.
- API layer → Student APIs: contains · Central API includes student-specific endpoints.
- API layer → Staff APIs: contains · Central API includes staff endpoints.
- API layer → Shared logic: uses · API handlers rely on shared domain helpers.
- API layer → Finance: contains · Central API includes billing and receipt flows.
- API layer → Provisioning: contains · Central API includes setup and database creation tools.
- API layer → Notifications: integrates · Backend can send push notifications via FCM.
- API layer → Database: persists · API reads and writes school data in the database.
- API layer → Artifacts: stores · API handles uploaded files and generated artifacts.
- Academics → Shared logic: reuses · Academic endpoints reuse common helpers.
- Teacher APIs → Shared logic: reuses · Teacher endpoints reuse common helpers.
- Finance → Database: reads/writes · Finance flows persist payment and receipt data.
- Notifications → Artifacts: reads · Notification integration uses service-account and related assets.