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.