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
710% Growth on my tiny productivity tool hit differently, here is what worked in January User Avatar 65 comments Write COLD DM like this and get clients easily User Avatar 34 comments I built a tool to search all my messages (Slack, LinkedIn, Gmail, etc.) in one place because I was losing my mind. User Avatar 26 comments Learning Rails at 48: Three Weeks from Product Owner to Solo Founder User Avatar 15 comments Our clients have raised over $ 2.5 M in funding. Here’s what we actually do User Avatar 15 comments 🚀 I Built a Chrome ExtensionThat Turns Reddit Into a Real-Time Lead & Research Engine(Free for First 10 Users) User Avatar 13 comments