This is a full-stack web application built with Laravel 12 (backend) and Vue 3 (frontend) implementing a CRUD system with user authentication. The application allows users to Create, Read, Update, and Delete tasks (or any other chosen module), while securely managing authenticated operations via Laravel Sanctum.
-
Complete RESTful API for the chosen module (Tasks)
-
Authentication using Laravel Sanctum
-
Input validation and meaningful error responses
-
Modular and clean folder structure:
- Controllers
- Services
- Resources
-
API endpoints:
POST /api/register– User registrationPOST /api/login– User loginGET /api/tasks– List tasksPOST /api/tasks– Create taskGET /api/tasks/{id}– View single taskPUT /api/tasks/{id}– Update taskDELETE /api/tasks/{id}– Delete task
-
Task model fields:
title– stringdescription– stringstatus– pending / in_progress / completedpriority– low / medium / highdue_date– date
-
Single Page Application (SPA) with Vue 3 and TypeScript
-
Pages included:
- Login Page – User authentication
- Register Page – User registration
- Task List Page – View all tasks
- Task Create/Edit Modal – Add or update tasks
-
Features:
- Interactive task CRUD operations
- Task status update (pending / in progress / completed)
- Task priority display
- Responsive layout using Tailwind CSS
- Toast notifications for create, update, delete actions
- Confirmation modals for deletion
- Paginated task list display
Backend:
- PHP 8+ / Laravel 12
- Laravel Sanctum for API authentication
- MySQL / MariaDB (or any relational database)
- Composer for dependency management
Frontend:
- Vue 3 + TypeScript
- Vue Router for SPA navigation
- Pinia for state management
- Axios for API requests
- Tailwind CSS for styling
- Optional: Vite as the build tool
-
Clone the repository:
git clone <repository-url> cd backend
-
Install dependencies:
composer install
-
Copy
.env.exampleto.envand set up database credentials:cp .env.example .env
-
Generate application key:
php artisan key:generate
-
Run migrations:
php artisan migrate
-
Start Laravel server:
php artisan serve
-
Navigate to frontend folder:
cd frontend -
Install dependencies:
npm install
-
Start development server:
npm run dev
-
Make sure the Vite proxy is correctly pointing to the backend API (
http://127.0.0.1:8000 or http://localhost:8000).
-
Open the app in your browser (
http://localhost:5173). -
Register a new account or login using an existing user.
-
After login, you can:
- View all tasks
- Create a new task
- Edit or delete a task
- Update task status
-
All actions are performed through the API, and notifications appear for successful operations.
Backend (Laravel)
app/
├─ Http/
│ ├─ Controllers/
│ └─ Requests/
├─ Models/
├─ Services/
└─ Resources/
routes/
└─ api.php
Frontend (Vue 3)
src/
├─ components/
├─ pages/
├─ router/
├─ store/
├─ services/ (API calls)
└─ App.vue
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/register | Register user |
| POST | /api/login | Login user |
| GET | /api/tasks | Get all tasks |
| POST | /api/tasks | Create new task |
| GET | /api/tasks/{id} | Get task details |
| PUT | /api/tasks/{id} | Update task |
| DELETE | /api/tasks/{id} | Delete task |