nitish/laravel-api-starter

A Laravel API Starter Kit with Repository-Service Pattern and Swagger, Sanctum, Spatie Integration.

v1.0.0 2025-06-28 10:32 UTC

This package is not auto-updated.

Last update: 2025-06-29 09:11:37 UTC


README

A scalable, modular, and well-structured Laravel API Starter Kit built with best industry practices including Authentication, Authorization, Role & Permission Management, CRUD APIs, and Swagger API Documentation.

โœ… Features

  • ๐Ÿ” Authentication (Login & Register)
  • ๐Ÿ‘ฅ Authorization (Role & Permission based access)
  • ๐Ÿง‘โ€๐Ÿ’ผ User Management (CRUD)
  • ๐Ÿงฉ Module Management (CRUD)
  • ๐Ÿ”„ Role & Permission Management
  • ๐Ÿงพ Swagger API Documentation for easy API testing
  • ๐Ÿงฌ Built using Repository-Service Pattern
  • ๐ŸŒฑ Seeders for Users, Roles, and Permissions

๐Ÿ“ฆ Packages Used

Feature Package
Role & Permissions spatie/laravel-permission
Swagger API Docs l5-swagger
Media Uploads spatie/laravel-medialibrary

๐Ÿ—๏ธ Project Architecture

  • Repository Pattern
  • Service Layer
  • Swagger Integration
  • Modular & Scalable Codebase

๐Ÿ› ๏ธ Installation

Prerequisites

  • PHP >= 8.2
  • Composer
  • Laravel >= 12.x
  • MySQL or compatible DB

๐Ÿงฌ Clone & Setup

# Create a new Laravel project using this starter
composer create-project nitish/laravel-api-starter

# Navigate into the project
cd laravel-api-starter

# Install PHP dependencies
composer install

# Copy environment file
cp .env.example .env

# Generate application key
php artisan key:generate

# Configure your `.env` file with database and mail details

# Run migrations and seeders
php artisan migrate --seed

# Install Swagger
php artisan vendor:publish --provider "L5Swagger\L5SwaggerServiceProvider"
php artisan l5-swagger:generate

---

## ๐Ÿ“œ License

This project is open-source and available under the [MIT License](LICENSE).

---

## ๐Ÿ‘จโ€๐Ÿ’ป Author

Developed by **Nitish Kumar**  
Feel free to contribute or fork this repository.

---

## ๐Ÿ™Œ Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

---

## ๐Ÿ’ก Support

If you find this project helpful, give it a โญ on GitHub and share it with your dev friends!