https://github.com/tasnimalshair/smarttask-api
SmartTask is a Laravel 12 RESTful API for managing tasks. It features authentication (Sanctum), CRUD operations, weekly stats, notifications, scheduling, and full Postman documentation.
https://github.com/tasnimalshair/smarttask-api
backend laravel mysql notifications php postman queue rest-api sanctum scheduler statistics task-manager todoapp
Last synced: 6 months ago
JSON representation
SmartTask is a Laravel 12 RESTful API for managing tasks. It features authentication (Sanctum), CRUD operations, weekly stats, notifications, scheduling, and full Postman documentation.
- Host: GitHub
- URL: https://github.com/tasnimalshair/smarttask-api
- Owner: tasnimalshair
- Created: 2025-07-04T06:32:23.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-07-13T05:35:01.000Z (8 months ago)
- Last Synced: 2025-07-13T07:26:41.765Z (8 months ago)
- Topics: backend, laravel, mysql, notifications, php, postman, queue, rest-api, sanctum, scheduler, statistics, task-manager, todoapp
- Language: Blade
- Homepage:
- Size: 346 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ SmartTask โ Laravel API for Task Management
SmartTask is a powerful task management back-end API built with Laravel 12.
It includes:
1) Secure user authentication using sanctum
2) Full CRUD for tasks
3) Email and database weekly notifications
4) Weekly statistics
6) Scheduled reports
---
## ๐ Features
- ๐ User authentication with Laravel Sanctum
- ๐ Full CRUD operations for todos (linked to each user)
- ๐ Full CRUD for categories (linked to each user)
- ๐ฌ Notifications when tasks are completed (Email + stored in DB)
- ๐ Weekly statistics endpoint
- ๐ Scheduled weekly report via email and database
- ๐ฑ Seeders for test data population
- ๐ฆ Form Requests for validation handling
- ๐งฉ API Resources for clean and consistent JSON responses
- ๐งช API documentation with Postman collection
- ๐ธ Screenshots included for quick reference
---
## ๐ ๏ธ Technologies Used
This project was built using the following technologies and tools:
- **Laravel 12** โ PHP framework for web applications
- **PHP 8.x** โ Core programming language
- **MySQL** โ Relational database for storing tasks and users
- **Laravel Sanctum** โ For API token authentication
- **Form Requests** โ For input validation and clean controller logic
- **API Resources** โ For formatting consistent JSON responses
- **Mail & Notifications** โ For sending email and database notifications
- **Queue System** โ For background email delivery (async notifications)
- **Task Scheduling** โ For sending weekly reports via email
- **Postman** โ For API testing and documentation
- **Seeder & Faker** โ For generating test data during development
- **Git & GitHub** โ For version control and project sharing
---
## โ๏ธ Installation
```bash
git clone [https://github.com/USERNAME/smarttask-api.git](https://github.com/tasnimalshair/Todolist-App.git)
cd Todolist-App
composer install
cp .env.example .env
php artisan key:generate
php artisan db:seed
php artisan migrate
php artisan serve
````
> To enable scheduled reports and notifications:
```bash
php artisan queue:work
php artisan schedule:work
```
---
## ๐ Authentication โ API Endpoints
### ๐ Auth
| Method | Endpoint | Description |
| ------ | ------------- | -------------------- |
| POST | /api/register | Register a new user |
| POST | /api/login | Log in and get token |
### ๐ Todos
| Method | Endpoint | Description |
| ------ | --------------- | ---------------------- |
| GET | /api/todos | Get all user tasks |
| GET | /api/todos/{id} | Get a specific task |
| POST | /api/todos | Create a new task |
| PUT | /api/todos/{id} | Update a specific task |
| DELETE | /api/todos/{id} | Delete a task |
| PUT | /api/todos/{id}/ops |Toggle a task status|
### ๐ Categories
| Method | Endpoint | Description |
|--------|----------------------|----------------------------|
| GET | /api/categories | Get all categories |
| GET | /api/categories/{id} | Get a specific category |
| POST | /api/categories | Create a new category |
| PUT | /api/categories/{id} | Update a specific category |
| DELETE | /api/categories/{id} | Delete a category |
### ๐ Statistics
| Method | Endpoint | Description |
| ------ | ---------- | ------------------------- |
| GET | /api/stats | Weekly stats for the user |
---
## ๐งช Token Usage (in Postman)
After logging in, copy the `token` from the response and use it in Postman:
> Authorization โ Bearer Token โ `your_token_here`
---
## ๐ API Documentation
๐งฉ A Postman collection is included in the `docs` folder:
`Todolist.postman_collection.json`
You can import it directly into Postman and test all endpoints.
---
## ๐ธ Screenshots
Available in the `docs/screenshots/` directory:
The following screenshot shows the full list of available API endpoints in Postman.

Example of login request and response

---
## ๐ฉโ๐ป Author
Tasnim Alshair โ [GitHub Profile](https://github.com/tasnimalshair) [Linkedin Profile](https://www.linkedin.com/in/tasnim-alshair-aa11a4266/)