How xespa/evims-enrollment-system works
Purpose and runtime
EVIMS is a Laravel-based school enrollment and payment-management system. It serves public enrollment/site pages, authenticated user settings, and an administrator workspace. Laravel is the HTTP/API, ORM, auth, migration, queue, cache, and session runtime; the frontend is a Vite-built React/TypeScript SPA delivered through Inertia. Entrypoints are public/index.php, bootstrap/app.php, routes/web.php, and resources/js/app.tsx.
HTTP, identity, and access boundaries
Web routes dispatch to Laravel controllers, with Inertia converting controller responses into React pages. Fortify provides registration, login, password reset, and account-security flows; settings are separately routed. Admin-only functionality is protected by role middleware, creating a clear public/user/admin authorization boundary.
• routes/web.php
• app/Http/Middleware/EnsureUserIsAdmin.php
• app/Providers/FortifyServiceProvider.php
Enrollment intake workflow
The principal domain workflow is a multi-step enrollment submission: student details, address, parent information, academic history, vital information, grade/subjects, billing, and review. The backend validates the submission and persists a normalized enrollment aggregate and its associated records, including a many-to-many enrollment/subject link.
• resources/js/pages/Enrollment/Create.tsx
• app/Http/Controllers/EnrollmentController.php
• app/Http/Requests/StoreEnrollmentRequest.php
Academic and enrollment domain
Eloquent models and migrations define the core school data model: students enroll at grade levels, select subjects, and retain personal, address, parent, academic, and verification data. Enrollment is the operational hub connecting intake records to billing and administrative review.
• app/Models/Enrollment.php
• app/Models/Student.php
• database/migrations/2026_07_20_101807_create_enrollments_table.php
Billing and PayMongo payments
Enrollment produces or references billing contracts with installments and payment records. PayMongoService isolates the external payment-gateway integration; payment routes/controllers support checkout, processing, and payment status UI. A console command simulates PayMongo webhooks, indicating asynchronous gateway callback handling is an important integration boundary.
• app/Services/PayMongoService.php
• app/Http/Controllers/PaymentController.php
• app/Console/Commands/SimulatePaymongoWebhook.php
Administration and operational content
Administrators manage dashboards, enrollment review, grade-level tuition values, and school events. The admin React area is separated by an administrative layout and controller namespace, while event data is also surfaced on the public site.
• app/Http/Controllers/Admin/EnrollmentManagementController.php
• app/Http/Controllers/Admin/GradeLevelController.php
• resources/js/layouts/EvimsAdminLayout.tsx
Persistence, infrastructure, and configuration
The system relies on a configured relational database through Laravel’s Eloquent/migrations, with first-party cache, session, filesystem, mail, and queue abstractions available. Queue and cache database migrations suggest these can run on database-backed infrastructure. External service credentials, including PayMongo, are expected through Laravel service configuration and environment values.
• config/database.php
• config/services.php
• database/migrations/0001_01_01_000002_create_jobs_table.php
Main entry points: web.php Web Routes · Enrollment.php Enrollment Aggregate · PayMongoService.php PayMongo Gateway · EnsureUserIsAdmin.php Admin Role Guard
Components 21
React/Inertia UI
- Inertia SPA Entry
resources/js/app.tsx - Enrollment Intake · Multi-step student enrollment submission.
resources/js/pages/Enrollment/Create.tsx - Admin Workspace
resources/js/layouts/EvimsAdminLayout.tsx
Laravel HTTP & Access
- Web Entrypoint
public/index.php - Application Bootstrap
bootstrap/app.php - Web Routes · Separates public, authenticated, and admin flows.
routes/web.php - Admin Role Guard
app/Http/Middleware/EnsureUserIsAdmin.php - Fortify Identity Flows · Registration, login, recovery, and account security.
app/Providers/FortifyServiceProvider.php
Enrollment Domain
- Enrollment Controller
app/Http/Controllers/EnrollmentController.php - Enrollment Validation
app/Http/Requests/StoreEnrollmentRequest.php - Enrollment Aggregate · Operational hub for intake, billing, and review.
app/Models/Enrollment.php - Student Record
app/Models/Student.php - Relational Database · Eloquent, migrations, and database-backed infrastructure.
config/database.php - Enrollment Schema · Defines persisted enrollment records.
database/migrations/2026_07_20_101807_create_enrollments_table.php
Billing & Operations
- Enrollment Review
app/Http/Controllers/Admin/EnrollmentManagementController.php - Tuition Management
app/Http/Controllers/Admin/GradeLevelController.php - Payment Flow · Checkout, processing, and payment status.
app/Http/Controllers/PaymentController.php - PayMongo Gateway · Isolates external gateway integration.
app/Services/PayMongoService.php - Webhook Simulator · Exercises asynchronous PayMongo callbacks.
app/Console/Commands/SimulatePaymongoWebhook.php - Database Queue
database/migrations/0001_01_01_000002_create_jobs_table.php - External Service Config · Supplies environment-backed PayMongo credentials.
config/services.php
Connections 23
- Web Entrypoint → Application Bootstrap: boots
- Application Bootstrap → Web Routes: serves
- Web Routes → Fortify Identity Flows: auth flows
- Web Routes → Admin Role Guard: admin routes
- Web Routes → Enrollment Controller: enrollment requests
- Web Routes → Payment Flow: payment requests
- Admin Role Guard → Enrollment Review: authorizes
- Admin Role Guard → Tuition Management: authorizes
- Inertia SPA Entry → Enrollment Intake: renders
- Inertia SPA Entry → Admin Workspace: renders
- Enrollment Intake → Enrollment Controller: submits
- Enrollment Controller → Enrollment Validation: validates with
- Enrollment Validation → Enrollment Aggregate: creates
- Enrollment Aggregate → Student Record: links student
- Enrollment Aggregate → Relational Database: persists
- Enrollment Schema → Relational Database: creates schema
- Enrollment Review → Enrollment Aggregate: reviews
- Tuition Management → Relational Database: manages tuition
- Payment Flow → PayMongo Gateway: uses
- Payment Flow → Enrollment Aggregate: updates billing
- PayMongo Gateway → External Service Config: reads credentials
- Webhook Simulator → PayMongo Gateway: simulates callback
- PayMongo Gateway → Database Queue: async processing