When I set out to start learning React, I found a ton of boilerplate code. First of all, boilerplate is great for someone with a grasp of the programming language or framework, but it’s a terrible place to start when you don’t know what you’re doing. So, I took a step back. I took some courses on Udemy. I followed some tutorials online. I got better. I built things. Then, I came back to the boilerplates.

And they all had the same two problems:

  1. They were too specific to be useful as a baseline for a project
  2. They did not include authentication

Again, these two problems only apply once you have some notion of what you’re doing. When you don’t have a clue how to develop apps in React (or any other language), a boilerplate is a boilerplate. Specificity of route names and file naming structure don’t matter all that much when you’re starting out. And authentication? Eff that noise.

But, now that I’ve built a few apps and feel a lot more comfortable with the MERN stack, I wanted to contribute something to the community that was useful and extendable.

Introducing the React-Auth-Crud-Boilerplate. For my first open source contribution, I’ve built a starting point for anyone that wants to build an app with React that requires both database storage and authentication.

You’ll notice the file names, the schema models, the route names, and everything else are kept as generic as possible to allow this code to be used in as many different types of projects as necessary without rewriting too much code.

Take it for a spin here, and go clone the repository here:

Contribute to react-auth-crud-boilerplate development by creating an account on GitHub.

The project uses PassportJS for Google authentication and assumes you’ll use mLab for your MongoDB management.

Give it a try and let me know what you think. Since this is my first open source project, I’d love to get some feedback.