How clausbackner/parroquiasanagustin works
This repository is a single Laravel monolith for a parish management system. It is server-rendered with Blade views, backed by MySQL, and packaged for local development with Docker Compose.
1. Core domain areas
• The app is organized around parish operations: personas, actas, ceremonias, caja, itinerarios, usuarios/roles, consultas/reportes, and auditoría.
• Each area has its own controller set, views, model(s), and in some cases request validation, policies, and specialized documents.
2. Request handling flow
• HTTP requests enter through routes/web.php, then pass through middleware and authorization checks.
• Controllers in app/Http/Controllers orchestrate reads/writes, call models, and return Blade views.
• For forms, several modules use dedicated Form Request classes in app/Http/Requests to validate create/update operations before persistence.
3. Authentication and account security
• Authentication is built on Laravel Fortify, with custom actions under app/Actions/Fortify.
• Security features include two-factor authentication, password confirmation, password reset, and session invalidation on password change.
• Middleware such as RequiereDosFA, SecurityHeaders, and EnsureUserHasRole enforce login/session hardening and access control.
4. Authorization model
• The app uses explicit roles and permissions rather than only default Laravel gates.
• Role, User, and the pivot/mapping migrations support role assignment and permission linking.
• Policies exist for operational modules like Caja, Ceremonia, and Itinerario, indicating per-resource authorization boundaries.
5. Data persistence and domain models
• Eloquent models represent the main entities: Persona, Acta, ActaBautizo, ActaMatrimonio, Ceremonia, MovimientoCaja, ItinerarioEvento, ItinerarioIntencion, AuditLog, Role, and User.
• The database schema is evolved through migrations, including later additions for roles, audit logs, two-factor fields, PII expansion, and domain-specific tables.
• Factories and seeders provide initial data and test fixtures for users, roles, caja, ceremonias, and itinerarios.
6. Audit and traceability
• Auditing is a first-class subsystem.
• AuditObserver and the Auditable model concern suggest entity-change tracking is automatic, with data written to audit_logs.
• This creates a separate cross-cutting flow: user action -> model mutation -> observer -> audit record.
7. Operational modules
• CajaController and its views handle financial movements and receipt/boleta rendering.
• CeremoniaController manages ceremonial records, likely tied to scheduling and monetary or pastoral workflow.
• ItinerarioController manages event/intention planning across the parish calendar.
• PersonaController and Acta*Controller support parish registry/certificate management, with dedicated certificate templates for baptism and marriage.
8. Document and report generation
• Several modules render specialized Blade documents rather than only CRUD screens, such as certificates and receipts.
• Reportecontroller, ConsultaController, and views under consultas and facturas indicate read-oriented outputs and printable/report-style pages.
• The presence of dompdf config suggests PDFs are generated from server-side views.
9. UI structure
• Presentation is Blade-based, with shared layouts in resources/views/layouts, reusable components under resources/views/components, and module-specific screens in subfolders like actas, caja, itinerario, personas, roles, and usuarios.
• Static assets are split between resources for build-time assets and public for deployed CSS/JS/images.
• Vite is used for frontend asset bundling.
10. Background and maintenance tasks
• There is at least one Artisan command, EncriptarPersonasExistentes, which suggests a one-time or administrative data migration for existing personal records.
• Console routes and the artisan entrypoint imply standard Laravel CLI workflows for maintenance and automation.
11. Deployment/runtime boundary
• Docker is the primary runtime boundary: docker-compose.yml, the Dockerfile, and MySQL init scripts define the local stack.
• The app runs as PHP/Laravel inside a container, with a separate database container and persistent storage under storage.
• backup.sql indicates a seed/backup artifact for restoring or mirroring production-like data.
12. Testing and quality gates
• Feature tests cover authentication, dashboard access, profile/security settings, and other user flows.
• CI workflows in .github/workflows run linting and tests, so the repo is set up for automated verification on pull requests.
Overall, the architecture is a conventional Laravel monolith with clear domain separation, role-based access control, auditability, and server-rendered document-centric workflows rather than a thin API-first design.
Main entry points: web.php Web routes · User.php User · DatabaseSeeder.php Seed data · CajaController.php Caja
Components 30
HTTP layer
Routing, middleware, controllers, and request validation.
- Web routes · Entry point for browser requests and module dispatch.
routes/web.php - Personas · Parish person registry workflows.
app/Http/Controllers/PersonaController.php - Actas · Certificate and registry record workflows.
app/Http/Controllers/ActaController.php - Caja · Financial movements and receipt rendering.
app/Http/Controllers/CajaController.php - Ceremonias · Ceremonial records and related operations.
app/Http/Controllers/CeremoniaController.php - Itinerario · Calendar, events, and intentions management.
app/Http/Controllers/ItinerarioController.php - Usuarios · User administration and account management.
app/Http/Controllers/UsuarioController.php - Caja requests · Validates caja create/update submissions.
app/Http/Requests/StoreCajaRequest.php
Auth & security
Fortify actions, account security, roles, and access checks.
- Role guard · Enforces role-based access on protected screens.
app/Http/Middleware/EnsureUserHasRole.php - 2FA guard · Requires two-factor completion for sensitive access.
app/Http/Middleware/RequiereDosFA.php - Security headers · Adds session and browser hardening headers.
app/Http/Middleware/SecurityHeaders.php - Create user · Creates new accounts during registration or admin flows.
app/Actions/Fortify/CreateNewUser.php - Reset password · Updates passwords and related security state.
app/Actions/Fortify/ResetUserPassword.php
Domain model
Core parish entities and audit support.
- User · Application account and role-bearing identity.
app/Models/User.php - Persona · Parish person registry entity.
app/Models/Persona.php - Movimiento caja · Financial movement and receipt data.
app/Models/MovimientoCaja.php - Ceremonia · Ceremonial record entity.
app/Models/Ceremonia.php - Itinerario evento · Calendar event entity for parish itineraries.
app/Models/ItinerarioEvento.php - Auditable · Shared change-tracking behavior for audited entities.
app/Models/Concerns/Auditable.php - Audit observer · Captures model mutations and writes audit records.
app/Observers/AuditObserver.php - Audit log · Persistent trace of important entity changes.
app/Models/AuditLog.php
Presentation
Blade views and layout composition.
- App layout · Shared server-rendered shell for authenticated pages.
resources/views/layouts/app.blade.php - Personas view · Representative module screens for CRUD and listing.
resources/views/personas/index.blade.php - Actas docs · Printable baptism and marriage certificates.
resources/views/actas/certificado-bautizo.blade.php
Data & runtime
Migrations, database config, Docker, and seed data.
- Database config · MySQL connection and persistence settings.
config/database.php - Audit migration · Creates the audit log persistence layer.
database/migrations/2026_04_28_150000_create_audit_logs_table.php - Seed data · Bootstraps roles, admin, and domain fixtures.
database/seeders/DatabaseSeeder.php - Docker stack · Local PHP/MySQL development environment.
docker-compose.yml
Quality gates
Feature tests and CI workflows.
- Auth tests · Covers login, registration, password, and 2FA flows.
tests/Feature/Auth/AuthenticationTest.php - CI workflow · Runs linting and automated tests in CI.
.github/workflows/tests.yml
Connections 33
- Web routes → Role guard: protected by · Routes pass through role-based access checks.
- Web routes → 2FA guard: secured by · Sensitive areas require two-factor verification.
- Web routes → Security headers: hardened by · Browser/session protections are applied globally.
- Web routes → Personas: dispatches · Browser requests reach the parish registry controller.
- Web routes → Actas: dispatches · Routes map to registry/certificate workflows.
- Web routes → Caja: dispatches · Routes map to financial workflows.
- Web routes → Ceremonias: dispatches · Routes map to ceremonial workflows.
- Web routes → Itinerario: dispatches · Routes map to itinerary planning.
- Web routes → Usuarios: dispatches · Routes map to account administration.
- Caja → Caja requests: validates via · Caja write operations use form requests.
- Personas → Persona: reads/writes · Registry changes are persisted through Eloquent.
- Actas → Persona: uses · Acta workflows depend on parish person data.
- Caja → Movimiento caja: reads/writes · Financial movements are stored in Eloquent models.
- Ceremonias → Ceremonia: reads/writes · Ceremonial records flow through the domain model.
- Itinerario → Itinerario evento: reads/writes · Event scheduling uses itinerary models.
- Usuarios → User: manages · Account administration acts on users.
- Create user → User: creates · Fortify registration builds user records.
- Reset password → User: updates · Password resets mutate user credentials and security state.
- User → Auditable: may use · Auditing behavior is shared where enabled.
- Auditable → Audit observer: triggers · Auditable models are observed for changes.
- Audit observer → Audit log: writes · Model changes are persisted as audit records.
- Personas → Personas view: renders · Controller returns Blade screens for personas.
- Actas → Actas docs: renders · Controller returns printable acta documents.
- Caja → App layout: renders · Financial pages share the main application layout.
- Ceremonias → App layout: renders · Ceremony pages use the shared layout shell.
- Itinerario → App layout: renders · Itinerary pages use the shared layout shell.
- Database config → Docker stack: backed by · Database settings align with the local Docker stack.
- Seed data → User: seeds · Seeders bootstrap users and admin accounts.
- Seed data → Movimiento caja: seeds · Seeders populate financial fixtures.
- Seed data → Ceremonia: seeds · Seeders populate ceremony fixtures.
- Seed data → Itinerario evento: seeds · Seeders populate itinerary fixtures.
- Auth tests → Web routes: covers · Feature tests exercise browser-facing auth flows.
- CI workflow → Auth tests: runs · CI executes the test suite on changes.