Skip to content

SagorIslamOfficial/task-api-crud

Repository files navigation

Task Manager - Backend API

A Laravel REST API for managing tasks with user authentication, validation, and database operations.

Features

  • User authentication (register/login/logout)
  • Bearer token-based authorization (Laravel Sanctum)
  • Complete task management (CRUD operations)
  • Task prioritization (low, medium, high)
  • Task status tracking (pending, in_progress, completed)
  • Due date management
  • Data validation
  • Error handling with meaningful responses

Tech Stack

  • Laravel 12 - PHP web framework
  • PHP 8.3+ - Server-side language
  • SQLite - Database
  • Laravel Sanctum - API authentication
  • Eloquent ORM - Database abstraction

Quick Start

Prerequisites

  • PHP 8.3+
  • Composer
  • SQLite

Installation

# Clone and install
git clone <repository>
cd task-api-crud
composer install

# Setup environment
cp .env.example .env
php artisan key:generate

# Database setup
touch database/database.sqlite
php artisan migrate

# Start server
php artisan serve
# Runs on http://127.0.0.1:8000

API Endpoints

Authentication

  • POST /auth/register - Create new account
  • POST /auth/login - User login
  • POST /auth/logout - User logout

Tasks

  • GET /tasks - List all tasks
  • POST /tasks - Create task
  • GET /tasks/{id} - Get task details
  • PUT /tasks/{id} - Update task
  • DELETE /tasks/{id} - Delete task

All task endpoints require authentication header: Authorization: Bearer {token}

Documentation

For detailed API documentation, see README_API.md

Database Schema

Users Table: id, name, email, password, created_at, updated_at

Tasks Table: id, user_id, title, description, status, priority, due_date, is_completed, created_at, updated_at

License

MIT

Support

For issues or questions, please contact me me@sagorislam.dev or open an issue in the repository.

About

A api crud task from somewhere.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages