mattvb91 / laravel-next-serverless

NextJs with Laravel API Lambda template deployed through github actions with Storybook deployed to github pages: mattvb91.github.io/laravel-next-serverless/

Home Page:https://d33xhxovqf36ox.cloudfront.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel API / NextJs / Serverless Template

This is an "opinionated" (see below) template for a backend API running on Laravel with JWT Authentication and a NextJS frontend with Lambda deployments through the Serverless framework with github actions.

The local development environment is also provided through docker compose.

Some default Laravel providers have been disabled that are not needed (?) when using purely as a JSON api. See here for more. PR's welcome to remove more unneeded.

Define "opinionated"

In this starter kit we make use of some libraries on the frontend & backend that you may not need or wish to use. You can of course remove them and instead use your own as your requirements specify.

This starter kit comes with some of the following libs already integrated ready to go:

There is also a predefined github action CI/CD workflow (WIP) for running various tests (PHPUnit & Cypress) before deployment. Storybook is also deployed to github pages: https://mattvb91.github.io/laravel-next-serverless/

docker-compose up -d
docker-compose run composer composer install
docker-compose run composer php artisan key:generate
docker-compose run composer php artisan migrate
docker-compose run composer php artisan optimize

API

The /api route is proxied through to the Laravel API Lambda. You can check out an internal proxied API request on the index page getServerSideProps

Clockwork API Debugging / Monitoring in dev mode

Clockwork is available in dev mode for debugging / performance monitoring under http://localhost:8000/clockwork/app

image

About

NextJs with Laravel API Lambda template deployed through github actions with Storybook deployed to github pages: mattvb91.github.io/laravel-next-serverless/

https://d33xhxovqf36ox.cloudfront.net/


Languages

Language:PHP 72.6%Language:TypeScript 15.8%Language:Dockerfile 3.7%Language:CSS 3.4%Language:JavaScript 2.8%Language:Shell 1.6%