https://github.com/kevinthulnith/laravel-project
Laravel 11 project with Sanctum API and Breeze | Tailwind Frontend
https://github.com/kevinthulnith/laravel-project
api api-authentication api-token authentication breeze crud email-verification frontend laravel laravel-11 laravel-project php product-crud product-management sanctum sanctum-api sanctum-authentication token-authentication user-authentication
Last synced: about 1 month ago
JSON representation
Laravel 11 project with Sanctum API and Breeze | Tailwind Frontend
- Host: GitHub
- URL: https://github.com/kevinthulnith/laravel-project
- Owner: kevinThulnith
- Created: 2024-12-20T20:38:51.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-03-04T13:51:21.000Z (4 months ago)
- Last Synced: 2025-03-04T14:34:35.548Z (4 months ago)
- Topics: api, api-authentication, api-token, authentication, breeze, crud, email-verification, frontend, laravel, laravel-11, laravel-project, php, product-crud, product-management, sanctum, sanctum-api, sanctum-authentication, token-authentication, user-authentication
- Language: Blade
- Homepage:
- Size: 405 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Laravel 11 Project with Sanctum (API) and Breeze (Frontend)
This repository contains a **Laravel 11** application featuring a **Sanctum-based API** for authentication and product management, along with a **Breeze-powered frontend** (styled with Tailwind CSS). Below are the key features, setup instructions, and usage details.
For a step-by-step guide to building this project from scratch, refer to the INSTALL.md documentation.
## ๐ Key Features
### ๐ Authentication
- **Login**
- **Logout**
- **Email Verification**
- Built-in API authentication using **Sanctum** (requires API tokens for accessing and manipulating product data).### ๐ฆ Product Management
- **Add Product**
- **Delete Product**
- **Edit Product**
- **View Product**
- Only the users who created a product can manipulate its data.### ๐จ Frontend
- Built using [Laravel Breeze](https://laravel.com/docs/11.x/starter-kits#breeze) for a simple and elegant user interface.
- Fully responsive across multiple devices.
## ๐ ๏ธ Prerequisites
Before you begin, ensure you have the following installed on your system:
- **PHP >= 8.2**
- **Composer**
- **Node.js** and **npm**
- **MySQL** or any other supported database | **SQLite**## โ๏ธ Installation
1. Clone the repository:
```bash
git clone https://github.com/KevinThulnith/Laravel-project.git
cd Laravel-project
```2. Install PHP dependencies:
```bash
composer install
```3. Install JavaScript dependencies:
```bash
npm install && npm run dev
```4. Set up your environment file:
```bash
cp .env.example .env
```Update the `.env` file with your database credentials and other necessary configuration.
5. Generate the application key:
```bash
php artisan key:generate
```6. Run database migrations:
```bash
php artisan migrate
```7. Seed initial data (if any):
```bash
php artisan db:seed
```8. Serve the application:
```bash
php artisan serve
```
The application will be available at `http://localhost:8000`.## ๐ API Endpoints
### ๐ Authentication
- **Login:** `POST /api/login`
- **Logout:** `POST /api/logout`
- **Email Verification:** `POST /api/email/verify`### ๐ฆ Product Management
- **Add Product:** `POST /api/products`
- **Delete Product:** `DELETE /api/products/{id}`
- **Edit Product:** `PUT /api/products/{id}`
- **View Products:** `GET /api/products`### ๐ Notes:
- All product manipulation endpoints require an API token.
- Only the user who created a product can edit or delete it.## ๐จ Frontend
The frontend is built using Laravel Breeze and Tailwind styling, providing:
- Authentication pages (login, registration, password reset, email verification).
- Basic product management UI integrated with the backend API.## ๐งช Testing
Run the test suite to ensure everything is working as expected:
```bash
php artisan test
```## ๐ License
This project is open-source and available under the [MIT license](LICENSE).
---
Feel free to contribute and enhance the project! For questions or suggestions, open an issue or submit a pull request.