DEV Community

Hijen EL Khalifi
Hijen EL Khalifi

Posted on

2 2

Laravel Backend Api First Template

Yo.

i have been learning and using Laravel in the past 3 years and i like it , i fell in love with its simplicity, extensive features , community and its convention over configuration principle ! if you follow the rules you can create APIs in no time !

I.

usually create API's and back-end projects, and Laravel is always my go to, even though its a full-stack framework but its development experience never fails me and always keeps me performing as efficient as possible .

Yet.

I still repeat some stuff when ever i create a new project , they cant really be conventional like

  • user authentication
  • profile update and show
  • attachments handling

So.

Recently , i created a template for my future projects , it is an API first back-end that has those functionalities ready to use and it has other code that i can use as reference . it has been quite helpful and i am looking forward to make it better .

you can visit the github repo here :

GitHub logo HijenHEK / laravel-backend-template

Api first backend boilerplate build with laravel 🎯 you can use as a template 😉

Laravel Backend Template

i use this as a starting point for my backend projects , it saves time with basic auth functionalities and has code examples for repetitive blocks

What is it about ?

this is an API First Backend developed using laravel mysql and sacntum for authentification
A front end agnostic ready to use boilerplate for your next Mobile app or SPA

Features and Todo's

  • authentication system
  • profile fetch and update data
  • reset passwords
  • email verification
  • user roles
  • user crud for admins
  • public upload example (profile picture)
  • local upload example : private attachment
  • MFA
  • social login

Admin provider Todo

  • seperate admin provider (under feature/admin-provider)
  • authentication system
  • admin profile
  • clean main roles system

you can add suggestions by modifying this file :)

Installation

Docker ?

if you have docker installed , all you have to do is running

$ git clone https://github.com/hijenhek/laravel-backend-boilerplate 
$ cd laravel-backend-boilerplate 
$ composer install
$ ./vendor/bin/sail/up

it has those functionalities , feel free to comment and review it .

  • authentication system - sanctum
  • profile fetch and update data
  • reset passwords
  • email verification
  • user roles
  • user crud for admins
  • public upload example (profile picture)
  • local upload example : private attachment
  • MFA
  • social login

Thanks.

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay