This is the backend API for the To-Do List application built with Laravel. It provides RESTful endpoints for task management and user authentication.
- PHP 8.x
 - Composer
 - MySQL/MariaDB
 - Laravel CLI
 
- 
Clone the repository and navigate to the backend directory
 - 
Install PHP dependencies:
composer install
 - 
Copy the environment file:
cp .env.example .env
 - 
Generate application key:
php artisan key:generate
 - 
Run database migrations:
php artisan migrate
 - 
Create a symbolic link for storage:
php artisan storage:link
 - 
Start the development server:
php artisan serve
 
The API will be available at http://localhost:8000
POST /api/register- Register a new userPOST /api/login- User loginPOST /api/logout- User logout (requires authentication)GET /api/profile- Get user profile (requires authentication)POST /api/upload-profile-picture- Upload profile picture (requires authentication)
All task endpoints require authentication:
GET /api/tasks- List all tasksPOST /api/tasks- Create a new taskGET /api/tasks/{id}- Get a specific taskPUT /api/tasks/{id}- Update a taskDELETE /api/tasks/{id}- Delete a taskPATCH /api/tasks/{id}/complete- Mark a task as complete
The application includes the following main tables:
users- Store user informationtasks- Store task informationpersonal_access_tokens- For API authenticationsessions- For session management
- API authentication is handled using Laravel Sanctum
 - All sensitive routes are protected with authentication middleware
 - CORS is configured for frontend access
 
- The application follows Laravel's MVC architecture
 - API routes are defined in 
routes/api.php - Controllers are located in 
app/Http/Controllers - Models are located in 
app/Models