Omnilios

MERN Auth Template

Fast start for MERN project

Everytime I want to do a MERN project I have to go through lengthy process of setting project up and do authentication, with token, cookies, email verification, ui design and protected route. So here is a template to help that

The template has route guard and the styling on all these form is made by charka ui so they exist independently from other styling in your page and will not mess the styling up

Video demo of the template here, it is on localhost because I do not want to host a template like this on Render but it is set up to host there

All you need to do when want to make a new MERN project is clone the project, edit env according to read me. If you want to add new collection and end point, you just need to follow auth end point or the example end point I made (make controller, model, route on backend and create state "store" in front end where you call backend api and handle state)

I use mailtrap without a domain name so I can only send email to myself but if you have domain name you can set up your own mailtrap and edit mailtrap code in env

Since I use this for small project this template still lack forgot password, although I do have back end set up for that, and password strength check

Source code at https://github.com/VietTran8611/mern-template