/Ajay_React-Ums-using-Redux-tailwind

Ajay_React-Ums-using-Redux-tailwind

Primary LanguageJavaScript

MERN Auth using Redux and JWT

drawing

This project is a full-stack authentication system built using the MERN stack (MongoDB, Express, React, Node.js) along with Redux for state management and JSON Web Tokens (JWT) for authentication.

Features

  • User registration and login functionality
  • JWT-based authentication system
  • Secure password hashing with bcrypt
  • Redux for global state management
  • MongoDB for database storage
  • Express.js for API endpoints
  • React Vite for frontend development and bundling
  • Scalable and modular codebase

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/mern-auth-redux-jwt.git
    
  2. Navigate to the project directory:

    cd mern-auth-redux-jwt
  3. Install dependencies for both the client and server:

    cd client && npm install
    cd ../server && npm install
  4. Set up environment variables:

Create a .env file in the server directory and add necessary environment variables such as MongoDB URI, JWT secret, etc. 5. Start the development server:

cd ../client && npm run dev
cd ../server && npm run dev

else

npm run dev

Open your browser and navigate to http://localhost:3000 to view the application.

Dependencies

React Redux Toolkit Tailwind CSS material Ui Axios (for API requests) etc.

Usage

Register a new user with a unique email and password. Log in using the registered credentials. Access protected routes by providing the JWT token in the request headers.