How estur-dev/estur-web-development works
1. Overall shape
- ESTUR is a split application monorepo with two main runtimes:
- a Laravel 10 backend in backend/
- a React Router 7 frontend in frontend/
- The backend is not just an API; it also contains the admin interface and serves built assets. The frontend is the public/user-facing experience.
2. Backend as the system of record
- The Laravel app owns the core domain and persistence layer: users, jobs, scholarships, payments, CMS pages/sections, media assets, contacts, and page visits.
- It is organized in the usual Laravel layers: Controllers, Requests, Resources, Models, Services, Middleware, Mail, Console Commands, and Migrations/Seeders.
3. Domain boundaries in the backend
- The major backend domains are:
- content/CMS: home, about, services, scholarship pages, contact pages, banners, page sections
- jobs and employers: jobs, offers, companies, applications, favorites, banners
- scholarships: scholarship content and scholarship applications
- payments/subscriptions: plans, price plans, payments, recurring flows
- auth/onboarding: login, registration, email verification, profile/onboarding
- media/assets: uploaded files and storage-backed URLs
- This looks like a content-heavy portal with transactional workflows layered on top.
4. Public frontend
- The frontend/ app is a React-based SPA/MPA-style client built with React Router 7 and Vite.
- Its route set covers the public site and user flows: home, about, jobs, job detail, apply, login/register, onboarding, scholarships, payment/checkout, profile, and policy pages.
- The frontend is structured by feature areas (site/common, site/sections, site/layout, routes, hooks, context, util), which makes it the presentation layer and flow orchestrator.
5. Backend-admin UI boundary
- The backend contains a second React/Inertia-style frontend under backend/resources/js and backend/resources/views.
- That UI powers the admin console for managing content, jobs, scholarships, payments, users, settings, and media.
- This means the backend hosts both the API and the internal admin experience, while the separate frontend/ app serves the external audience.
6. Data flow between frontend and backend
- The public frontend consumes backend APIs through frontend/app/config/apiConfig.ts and fetchWithAuth.ts.
- Backend endpoints are versioned under backend/app/Http/Controllers/Api/V1, with Laravel API Resources shaping responses.
- Request flow is: frontend route/component → fetch hook → API controller → service layer → model/database → resource serialization back to the client.
7. Business logic and validation
- Domain logic is concentrated in backend/app/Services, such as auth, contact handling, onboarding, Moodle integration, registration, and scholarship application processing.
- Input validation is handled with dedicated FormRequest classes and custom rules, including multilingual validation.
- This keeps controllers relatively thin and makes the service layer the main orchestration boundary.
8. Authentication and security model
- The repo supports both API auth and admin/session auth.
- Middleware covers JWT, roles, localization, HTTPS forcing, security headers, CSRF, auth sharing, and Inertia request handling.
- The frontend also has route-level protection utilities such as PrivateRoute, so access control is enforced on both client and server sides.
9. External integrations
- The system integrates with:
- email delivery via Laravel mailables and Blade templates
- Moodle via MoodleService and related controllers
- payments/subscriptions via payment-related services, mail notifications, and recurring payment commands
- These integrations are important because they create async or third-party boundaries outside the core database-backed workflows.
10. Persistence and content management
- Data is stored in MySQL 8 through Laravel migrations and seeders.
- Seeders populate the CMS and catalog-like content so the site can render immediately after setup.
- There is also a strong file/media boundary: uploaded assets are referenced through storage-aware URL rebuilding, implying object/storage-backed media rather than inline DB content.
11. Background jobs and scheduled operations
- The backend includes console commands for operational workflows such as checking recurring links/subscriptions, deactivating expired jobs, prewarming image cache, and sending payment URLs.
- These commands imply scheduled maintenance and lifecycle automation beyond request/response handling.
- In an architecture diagram, these should sit alongside the backend as scheduled workers/cron-driven tasks.
12. Build, deploy, and quality loop
- CI/CD is split by surface area, with GitHub Actions for backend deploy, frontend deploy, backend rollback, and PSI/performance checks.
- The repo also stores PSI result snapshots and scripts for capture/summarization, indicating a performance regression loop.
- Deployment-wise, the frontend and backend can be released independently, but they are coupled by shared API contracts and content models.
13. What is shared conceptually
- Both apps depend on the same domain vocabulary: pages, sections, jobs, scholarships, users, payments, and media.
- The backend is the authoritative source for that data; the frontend is a consumer and flow coordinator.
- For diagramming, the cleanest boundary is: browser/client apps on one side, Laravel backend + database + external services on the other.
Main entry points: V1 API V1 · Services Services · js Admin UI · routes Routes
Components 23
Backend
Laravel system of record, admin UI, APIs, jobs, and persistence.
- Laravel App · Backend host for API, admin UI, and asset serving.
backend/public/index.php - Admin UI · Internal React/Inertia-style console for operations and content management.
backend/resources/js - Blade Views · Backend-rendered layouts and email templates.
backend/resources/views - API V1 · Versioned public API endpoints consumed by the frontend.
backend/app/Http/Controllers/Api/V1 - Admin Controllers · Console workflows for content, users, jobs, scholarships, and payments.
backend/app/Http/Controllers/Admin - Services · Orchestration for auth, onboarding, contact, Moodle, and scholarship flows.
backend/app/Services - Middleware · Auth, roles, localization, CSRF, HTTPS, and Inertia sharing.
backend/app/Http/Middleware - Domain Models · Core content, user, job, scholarship, payment, and media entities.
backend/app/Models - API Resources · Transforms backend models into API payloads.
backend/app/Http/Resources/Api/V1 - Form Requests · Typed input validation for auth, onboarding, contact, and scholarships.
backend/app/Http/Requests/Api - Mail Notifications · Transactional email delivery for verification, contact, jobs, and payments.
backend/app/Mail - Migrations · MySQL schema and content structure over time.
backend/database/migrations - Seeders · Initial CMS, catalog, and demo content population.
backend/database/seeders - MySQL · Primary relational store for the backend system of record.
backend/config/database.php
Frontend
Public React Router app and presentation layer.
- Routes · Public site and user-flow route definitions.
frontend/app/routes - Site UI · Feature components and layouts for the public experience.
frontend/app/site - API Client · Authenticated API access and endpoint configuration.
frontend/app/config - State & Hooks · Contexts and hooks coordinating user/session and remote data.
frontend/app/context - Frontend Utils · Client-side guards, SEO helpers, and shared utilities.
frontend/app/util
Ops
CI/CD, performance checks, and scheduled maintenance.
Other components
- Browser · Public and authenticated user entry point.
- External Services · Email delivery, Moodle, payment providers, and storage-backed media.
Connections 21
- Browser → Routes: loads · Users enter the public application through routed pages.
- Routes → Site UI: renders · Routes assemble feature components and layouts.
- Site UI → State & Hooks: uses · UI relies on session/context and data-fetching hooks.
- State & Hooks → API Client: calls · Hooks and contexts use the API client for backend access.
- API Client → API V1: requests · Public frontend consumes versioned Laravel API endpoints.
- API V1 → Services: orchestrates · Controllers delegate business workflows to services.
- Services → Domain Models: reads/writes · Domain services coordinate persistence through Eloquent models.
- Domain Models → MySQL: persists · Models map to the MySQL-backed system of record.
- API V1 → API Resources: serializes · Responses are shaped through API resources.
- API V1 → Form Requests: validates · Incoming payloads are validated with form requests.
- API V1 → Mail Notifications: notifies · API flows trigger transactional email notifications.
- API V1 → External Services: integrates · API flows connect to Moodle, payment, and storage services.
- Admin UI → Admin Controllers: uses · Admin screens are backed by Laravel admin controllers.
- Admin Controllers → Services: delegates · Admin actions reuse the same domain services.
- Blade Views → Admin UI: hosts · Blade layouts and email templates support internal and transactional presentation.
- Middleware → API V1: guards · Request pipeline enforces auth, roles, locale, CSRF, and headers.
- Middleware → Admin UI: protects · Backend middleware also secures the admin experience.
- Commands → Services: runs · Console commands execute recurring business maintenance.
- Seeders → MySQL: primes · Seed data populates CMS and catalog content.
- CI/CD → Laravel App: deploys · CI/CD releases the backend surface.
- CI/CD → Routes: deploys · CI/CD releases the frontend surface.