A simple Laravel-based task manager to demonstrate the Hexagonal Architecture (also known as Ports & Adapters).
Users can:
- β Add tasks
- βοΈ Rename tasks
- β Delete tasks
- π Change task status:
- Open β‘οΈ
- In Progress π
- Done β
This project is intentionally small and focused on clean architecture principles.
To run the app:
- Run
make listto see all available commands. - Start the container with:
make up
To initialize the Laravel project with Sail, run:
make init
This will:
Create the Laravel project
Start the containers
Install dependencies
This project follows the Hexagonal Architecture pattern, separating:
- Domain β pure business logic (Entities, Value Objects, Interfaces)
- Application β use cases (CreateTask, UpdateTask, etc.)
- Infrastructure β frameworks like Laravel, databases, HTTP, etc.
π Why Redirect Instead of Direct Response?
This project uses the Post/Redirect/Get (PRG) pattern for all form submissions.
Benefits:
- β Prevents duplicate submissions when users refresh the page after submitting a form
- π Always shows the updated task list after an action
- π¬ Flash messages can be shown after redirect (e.g. success/error)
- π§© Cleaner UX and easier debugging
Example:
return redirect()->route('tasks.index')->with('success', 'Task created!');
This project is open-sourced under the MIT License.