This repository contains both the Laravel 12 backend API and the Vue 3 + Vite frontend SPA for a modern, full-stack To-Do List application.
todo/
backend/ # Laravel 12 REST API
frontend/ # Vue 3 + Vite SPA
- PHP 8.2+ (for backend)
- Composer (for backend dependencies)
- Node.js (v18+) & npm (for frontend)
- PostgreSQL or SQLite (for backend database)
- DDEV (optional, for local dev containers)
git clone https://github.com/shayanabbas/todo.git
cd todo-
Install PHP dependencies:
cd backend composer install -
Copy and configure environment variables:
cp .env.example .env
- Edit
.envto set your database connection (PostgreSQL or SQLite). - Generate the application key:
php artisan key:generate
- Edit
-
Run database migrations:
php artisan migrate
-
(Optional) Seed the database:
php artisan db:seed
-
Start the backend server:
- With DDEV (recommended):
The API will be available at
ddev start ddev ssh php artisan serve --host=0.0.0.0 --port=8080
http://localhost:8080orhttps://todoapp.ddev.site/ - Or without DDEV:
php artisan serve
- With DDEV (recommended):
-
Install Node.js dependencies:
cd ../frontend npm install -
Copy and configure environment variables:
cp .env.example .env
- Edit
.envto set your API endpoint (e.g.,VITE_API_URL=http://localhost:8080/apiorVITE_API_URL=https://todoapp.ddev.site/api).
- Edit
-
Start the frontend dev server:
npm run dev
The app will be available at
http://localhost:5173(or as shown in your terminal). -
Build for production:
npm run build
-
Preview the production build:
npm run preview
- Access the frontend:
Open http://localhost:5173 in your browser. - API base URL:
The frontend expects the backend API at the URL set in your.env(e.g.,VITE_API_URL).
- User authentication (token-based, Laravel Sanctum)
- Task CRUD and recursive task hierarchy
- RESTful API (backend)
- Modern SPA with Vue 3, Pinia, Tailwind CSS, and Iconify (frontend)
- Dark mode support
- The frontend is functional with API integrated.
- The backend is API-only (no web views except Laravel default).
- See
backend/README.mdandfrontend/README.mdfor more details on each part.
MIT