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.
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
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 is available in dev mode for debugging / performance monitoring under http://localhost:8000/clockwork/app