In this episode, we set up the groundwork for our app by creating both our backend API with Laravel and our frontend client with Nuxt. We start by initializing a Laravel project inside a dedicated folder to keep our code organized, choosing MySQL as our database, and running the migrations to get things started. Even though we won't spend much time on the backend just yet, it's good to have it ready to go.
Next up, we scaffold a new Nuxt project for our client, again keeping everything tidy by using a separate folder. We walk through the Nuxt setup prompts—nothing too fancy here, just the basics to get the initial app running. After both projects are set up, we open them in our code editor and get them both running, verifying that the API and client are accessible.
A key takeaway in this setup is making sure both the Nuxt client and Laravel API share the same domain (just different ports). This is super important down the road when we deal with authentication, especially with Laravel Sanctum, which expects the domain to match. We update the Nuxt config to serve the client from the right host, restart the dev server, and check that both projects are working as expected.
Finally, we clean up the Nuxt app to keep things minimal—removing extra boilerplate and leaving just a simple starter view. Now with a clean foundation in place, we're ready to actually start building out features and connecting the two!