An open API service indexing awesome lists of open source software.

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.

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.
endpoints

Example of login request and response
login

---

## ๐Ÿ‘ฉโ€๐Ÿ’ป Author

Tasnim Alshair โ€“ [GitHub Profile](https://github.com/tasnimalshair) [Linkedin Profile](https://www.linkedin.com/in/tasnim-alshair-aa11a4266/)