Skip to content

Efoblack/Todo

Repository files navigation

Laravel Todo Application

A modern, full-stack Todo application built with Laravel, Inertia.js, and React. This application provides a seamless user experience with real-time updates and a beautiful, responsive interface.

Features

  • 🔐 User Authentication (Register, Login, Logout)
  • ✨ Create, Read, Update, and Delete (CRUD) Todo items
  • ✅ Mark todos as complete/incomplete
  • 📝 Add descriptions to todos
  • 🎨 Modern UI with Tailwind CSS
  • ⚡ Real-time updates with Inertia.js
  • 🔒 User-specific todos (each user can only manage their own todos)
  • 📱 Fully responsive design

Tech Stack

  • Backend: Laravel 12
  • Frontend: React 19
  • Styling: Tailwind CSS
  • State Management: Inertia.js
  • Authentication: Laravel Breeze
  • Database: SQLite (default) / MySQL / PostgreSQL

Prerequisites

Before you begin, ensure you have the following installed:

  • PHP 8.2 or higher
  • Composer
  • Node.js 18 or higher
  • Yarn
  • SQLite (or MySQL/PostgreSQL)

Installation

  1. Clone the repository:
git clone <repository-url>
cd todo-app
  1. Install PHP dependencies:
composer install
  1. Install JavaScript dependencies:
yarn install
  1. Create environment file:
cp .env.example .env
  1. Generate application key:
php artisan key:generate
  1. Configure your database in .env file:
DB_CONNECTION=sqlite
  1. Run migrations:
php artisan migrate:fresh
  1. Start the development servers:

In one terminal:

php artisan serve

In another terminal:

yarn dev

The application will be available at http://localhost:8000

Usage

  1. Registration/Login

    • Visit /register to create a new account
    • Visit /login to sign in to your account
  2. Managing Todos

    • After logging in, you'll be redirected to the dashboard
    • Create a new todo by filling out the form at the top
    • Click the checkbox to mark a todo as complete/incomplete
    • Click "Edit" to modify a todo's title or description
    • Click "Delete" to remove a todo

Project Structure

├── app/
│   ├── Http/
│   │   └── Controllers/
│   │       └── TodoController.php
│   └── Models/
│       └── Todo.php
├── resources/
│   ├── js/
│   │   ├── Pages/
│   │   │   └── Todos/
│   │   │       ├── Components/
│   │   │       │   └── TodoItem.jsx
│   │   │       └── Index.jsx
│   │   └── app.jsx
│   └── views/
│       └── app.blade.php
└── routes/
    └── web.php

API Endpoints

Method Endpoint Description
GET /dashboard View all todos
POST /todos Create a new todo
PUT /todos/{id} Update a todo
DELETE /todos/{id} Delete a todo

Security

  • All routes are protected by authentication middleware
  • Users can only access and modify their own todos
  • CSRF protection is enabled
  • Input validation is implemented for all requests

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

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

Acknowledgments

About

A todo list

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages