Skip to content

A simple API-based application for managing to-do lists built with Laravel 11.

License

Notifications You must be signed in to change notification settings

Ckabuo/ToDo-App

Repository files navigation

Laravel Logo

Build Status Total Downloads Latest Stable Version License

TODO Application

A simple API-based application for managing to-do lists built with Laravel 11, and utilizing Laravel Sanctum for secure authentication.

Features

  • User Registration and Authentication via Laravel Sanctum
  • CRUD operations for User
  • CRUD operation for ToDos
  • User specific ToDo lists
  • ToDo Completion (Marking a ToDo item as Completed)

Installation

  1. Clone the repository
  2. Run composer install
  3. Set up the database connection in .env file
  4. Run php artisan migrate --seed
  5. Start the server with php artisan serve

Usage

Authentication

  • Register a new User: POST /api/register
  • Login: POST /api/login
  • Get current User info: GET /api/me
  • Logout: POST /api/logout

User Management

  • Read all User: GET /api/users
  • Read User by ID: GET /api/users/{user}
  • Update User: PUT /api/users/{user}
  • Change password: PUT /api/change-password
  • Delete User: DELETE /api/users/{user}

Current User Management

  • Get ToDo items: GET /api/user/todos
  • Get ToDo item by ID: GET /api/user/todos/{todo}

Todo Management

  • Create new Todo item POST /api/todos
  • Read all ToDo item: GET /api/todos
  • Read Todo item by ID: GET /api/todos/{todo}
  • Update ToDo item by ID: PUT /api/todos/{todo}
  • Update ToDo item's status: PUT /api/todos/{todo}/completed
  • Delete ToDo item: DELETE api/todos/{todo}

Models

User

  • Attributes: username, email, password
  • Relationships: todos

Todo

  • Attributes: title, description, status
  • Relationships: users

Controllers

  • AuthController: Handles authentication endpoints
  • UserController: Handles User-related endpoints
  • TodoController: Handles ToDo-related endpoints
  • TodoUserController: Handles ToDo-User relationship endpoints

Security Considerations

  • Implement proper authentication and authorization checks using Laravel Sanctum
  • Validate input data on both client-side and server-side
  • Use HTTPS for all API communications
  • Implement rate limiting to prevent abuse

Testing

Run php artisan test to execute the PHPUnit tests.

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

License

This project is open-sourced software licensed under the MIT license.

About

A simple API-based application for managing to-do lists built with Laravel 11.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published