A Laravel-based course management system organized around top-level business domains.
This application was created as part of the Coursera Master Full-Stack Web Development with Laravel & PHP course.
Laravel remains the application framework and runtime shell. Business code is organized domain-first.
app/
Domain/
CourseCatalog/
Curriculum/
Enrollment/
IdentityAccess/
Tenancy/
Foundation/
tests/
Domain/
CourseCatalog/
Curriculum/
Enrollment/
IdentityAccess/
Tenancy/
Foundation/
resources/
domains/
course-catalog/
curriculum/
identity-access/
foundation/
database/
factories/<Domain>/
seeders/<Domain>/
migrations/<Domain>/
IdentityAccess: authentication, registration, email verification, password flows, profile management, and user administration.CourseCatalog: course browsing, dashboarding, and admin course management.Enrollment: enroll and unenroll workflows.Curriculum: sections, curriculum items, and quiz questions.Tenancy: tenant context, tenant administration, org hierarchy management, and tenant isolation rules.Foundation: Laravel composition only. Providers, route registration, view namespace registration, and framework-level assets or vendor view overrides live here. No business logic belongs here.
- Domain routes live in
app/Domain/<Domain>/Routes/web.php. routes/web.phpis composition-only and delegates to the domain route registrar.- Route names are domain-qualified, for example:
course-catalog.dashboardcourse-catalog.admin.courses.indexcurriculum.admin.sections.indexidentity-access.auth.loginidentity-access.admin.users.indextenancy.admin.org-nodes.index
- Domain views live in
resources/domains/<domain>/views. - Domain anonymous components live in
resources/domains/<domain>/components. - View names are namespaced:
course-catalog::dashboardcourse-catalog::admin.courses.indexidentity-access::auth.logincurriculum::admin.sections.index
- Blade anonymous components are namespaced:
<x-course-catalog::app-layout><x-course-catalog::graduation-cap-logo><x-identity-access::guest-layout><x-identity-access::input-label>
- There is no
Shareddomain. - Do not create generic business folders outside
app/Domain/*. - Do not create generic UI component folders outside domain folders.
- If presentation primitives are needed in more than one domain, duplicate them into each owning domain.
- PHP 8.2 or higher
- Composer
- Node.js and npm
- Docker and Docker Compose (for MariaDB)
- MariaDB
composer setupThis will:
- Install PHP dependencies
- Copy
.env.exampleto.env - Generate application key
- Run database migrations
- Install npm packages
- Build frontend assets
docker-compose up -dcomposer devThis runs Laravel's development server, queue worker, logs viewer (Pail), and Vite concurrently.
Run the full test suite with linting:
composer testThis command:
- Runs PHP_CodeSniffer for code style validation
- Runs PHPStan for static analysis
- Clears configuration cache
- Executes PHPUnit tests
All PHP files must include:
<?php
declare(strict_types=1);The project uses PSR-12, PHPStan level 9, and PHPUnit feature tests.