5
7 Comments

A Laravel + Next.js Starter Kit to save your time

Hi everybody,
this is my first real post here, so please be gentle ;)

I am someone who unfortunately switches product ideas and code bases like my underwear. Therefore, I often have to start from scratch... Laravel and Next.js already make life a lot easier, but hooking the API up to the frontend can be a quite tedious task, especially if authentication is required. I guess that many others have the same problem, so I developed a small Start Kit that does all that for you.

Here is what's included so far:

  • Hooking up backend and frontend (CORS, settings, default base URLs etc.)
  • Laravel sanctum for authentication api routes on the backend
  • Full authentication functionality on the frontend (Registration, login, email verification, password restoring)
  • Protected frontend routes without page flashing
  • Redux
  • Google Tag Manager support
  • Some default React components that can be re-used across the frontend
  • Tailwind CSS
  • Flexible customisation options via .env files
  • User roles
  • TypeScript support.

I'm planning to add some more functionality, maybe even some more specific stuff (dashboard views etc.).

I would be very happy about any feedback and even happier if it helps anyone of you guys!

Here's the link to the repo:
https://github.com/NiclasTimmeDev/laravel-nextjs-starter

Cheers,

posted to Icon for group Developers
Developers
on January 4, 2021
  1. 1

    Nice post! However I would be really interested to achieve this with the next-auth package (https://next-auth.js.org). Anyone with Next.js experience that already tried it and is able to share some of his experience? Thanks in advance. Myself I'm coming from Nuxt/Vue ecosystem.

  2. 1

    Hey Niclas,
    Neco here, senior full-stack with Nextjs as preferred frontend. I have quite some experience with NextJs, I would like to take your boilerplate to next level but since I'm new to Laravel seen I need some help would you interested to jump a call and discuss how we can? dm me @necmttn at twitter.

  3. 1

    have any configuration to host on heroku? Nice Post 🔥

  4. 1

    I don't use Laravel or Next.js, but what you've shared is really valuable. Highly appreciated!

    1. 1

      Thank you so much! I‘ll keep on making ist better!
      What do you use for your projects :)?

      1. 1

        I use Spring Boot, JSP, jQuery.
        Recently I started learning Node.js and React.

Trending on Indie Hackers
I've been reading 50 indie builder posts a day for the past month. Here's the pattern nobody talks about. User Avatar 99 comments $36K in 7 days: Why distribution beats product (early on) User Avatar 98 comments Where is your revenue quietly disappearing? User Avatar 89 comments We made Android 10x faster. Now, we’re doing it for the Web. 🚀 User Avatar 71 comments a16z says "these startups don't exist yet - it's your time to build." I've been building one. User Avatar 57 comments The workflow test for finding strong AI ideas User Avatar 54 comments