ims-laravel-api-starter
is a streamlined backend API starter application built using the powerful Laravel framework.
Our primary focus is to provide you with a hassle-free and ready-to-use local development starter project. Unlike traditional API generators or code generators, this project aims to simplify the process of setting up your local development environment quickly and efficiently.
With ims-laravel-api-starter
, you can jumpstart your Laravel-based API development without unnecessary complexities, allowing you to focus on building your application logic rather than spending time on initial setup.
Explore this project and experience the convenience of a ready-made local development environment for your Laravel-based APIs.
-
Authentication using Laravel Sanctum: Implement secure authentication using Laravel Sanctum.
-
Extra Security with XSECURE: IMS introduces an additional layer of security, enhancing the API's reliability and resilience XSECURE Mode.
-
Role & Permission-Based Authorization: Utilize Laravel Permission for a flexible authorization system based on roles and permissions.
-
Multiple Language Support: Provide a multilingual experience with Laravel Lang to make your application accessible to a diverse user base.
-
Application and Database Backup System: Provide an application and database backup system with laravel-backup to make your application safe and ready for quick recovery.
-
Choose Your Local Development Tool:
Select your preferred local development tool, such as Laragon,Laravel Herd, XAMPP, WAMP, or any other tool that suits your needs.
- Node 16+
- PHP version 8.2+
- MYSQL version 8.0+
-
Configure Your Environment:
Update your
.env
file with the correct database credentials.Copy .env.example to .env:
Before proceeding, copy the .env.example file to .env to set up your environment variables:
cp .env.example .env
-
Install Dependencies:
To install local development packages, including Husky and other Laravel-specific packages, run the following commands:
npm install #for husky and other Laravel packages npx husky install #only once
Run the following command to install the required dependencies using Composer:
composer install
-
Migrate and Seed the Database: Initialize and seed the database with default data using:
php artisan migrate --seed
Now, your project is ready for use. You can use the postman collection provided in the repo to start playing with the API. If you've run the seed command, log in with the provided credentials. Customize and expand your application as needed.
Please visit this wiki page for XSECURE guide
Please Visit the WIKI Page for XSECURE, Docker Guide, Extra Artisan commands and much more.
Generate general IDE helper files for improved code autocompletion and navigation by running:
php artisan ide-helper:generate
Generate IDE model helper files without writing to model files using:
#use any one of this two commands
php artisan ide-helper:models -N
php artisan ide-helper:models --nowrite
php artisan csfixer:run
This command ensures that your code adheres to the predefined coding standards, making your codebase clean and readable.
Creating services for your application is made effortless. Use the following command to generate a service:
php artisan make:service subfolder/ServiceName
Replace subfolder and ServiceName with the actual values you need. You can also create a service without a subfolder:
php artisan make:service TestService
The newly created service will be located at app/Http/Services/TestService.php
, ready to handle your application's business logic.
Creating DTO(Data Transfer Object) for your application is made effortless. Use the following command to generate a service:
php artisan make:dto UserDTO
The newly created DTO will be located at app/Http/DTOs/UserDTO.php
, ready to Transfer your data across the application.
Generate all the necessary boilerplate files for a specific entity (such as model, controller, routes, resource, request, service, etc.) using the following command:
php artisan make:crud Test
This command will create all the required boilerplate files for the Test
entity.
Leverage these Artisan commands to streamline your development process and maintain a well-structured codebase.
This project is brought to you by Innovix Matrix System and is released as open-source software under the MIT license.
Feel free to use, modify, and distribute this starter project in accordance with the MIT license terms. We encourage collaboration and welcome contributions from the community to make this project even better.