This repository contains a Laravel-based task management system with advanced features like role management, real-time notifications, background jobs, and task filtering. Follow the steps below to set up the project.
- Install Docker Desktop.
- Set up WSL (Windows Subsystem for Linux) with Ubuntu.
- Clone the repository.
- Place the project folder inside your Ubuntu folder under your user account.
- Open a terminal and run:
alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail'
- Start the services by running:
sail up -d
- Run the migrations:
sail artisan migrate
-
Create an admin user for Filament:
sail artisan make:filament-user
-
Use the following credentials:
- Name: Omar
- Email:
omar@test.com - Password:
123
Please use this email because it's set in the seeder for role and permission assignments.
- Seed the database with initial data:
sail artisan db:seed
- Get the Pusher and database attributes from .env.example file
- Built with Filament to provide CRUD operations for Users and Tasks.
- Task management includes:
- Filtering tasks by status.
- Restricting edit and delete permissions to task owners.
- Role management is implemented using spatie/laravel-permission:
- Admin role is restricted to access the dashboard.
- Admin middleware is added in the
AdminPanelProvider.
- Policies are used to ensure only task owners can delete or update their tasks.
- Filament Dashboard includes real-time notifications triggered when a task's status is updated.
- Implemented using TaskStatusUpdated event.
- To test this:
- Run the following in separate terminals:
sail artisan queue:work
- Change the status of a task.
- Run the following in separate terminals:
-
SendTaskSummaryJob sends daily task summary emails to task owners.
-
Email sending is configured using the SMTP mailer.
-
The job is scheduled in
routes/console.php: -
To test:
- Run the scheduler:
sail artisan schedule:run
- In another terminal, run the queue worker:
sail artisan queue:work
- Run the scheduler:
-
Note: The job is scheduled daily. To test, you can modify it to run every minute.
- Pagination is implemented for tasks.
- Tasks can be filtered by title and status using the
tucker-eric/eloquentfilterpackage.
Access the Postman collection for API endpoints and testing: Postman Documentation