Skip to content

AadhilKassim/MERN-AUTH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MERN-Auth

A full-stack authentication project using the MERN stack (MongoDB, Express, React, Node.js).

Features

  • User registration and login
  • JWT-based authentication
  • Protected routes (backend & frontend)
  • Password hashing with bcrypt
  • User profile management

Technologies

  • Frontend: React, Axios, React Router
  • Backend: Node.js, Express
  • Database: MongoDB, Mongoose
  • Authentication: JWT, bcrypt

Getting Started

Prerequisites

  • Node.js & npm
  • MongoDB

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/mern-auth.git
    cd mern-auth
  2. Install backend dependencies:

    cd server
    npm install
  3. Install frontend dependencies:

    cd ../client
    npm install
  4. Set up environment variables in both backend/.env and frontend/.env.

Running the App

  • Start the backend server:

    cd server
    npm run dev
  • Start the frontend app:

    cd ../client
    npm start

Folder Structure

mern-auth/
  server/
     models/
     routes/
     controllers/
     ...
  client/
     src/
     components/
     pages/
     ...

License

This project is licensed under the MIT License.

About

A comprehensive Express based Authorization and Authentication Backend for Full stack Websites.

Resources

Stars

Watchers

Forks