This is an e-commerce application built using Vite with React for the frontend and Express for the backend. The application provide feature to make a order and track the order.
The backend handles authentication using JWT for token generation and bcrypt for password hashing. The application includes login, logout, and signup functionalities.
- User authentication (signup, login, logout, currentuser)
- Password hashing using bcrypt
- Token-based authentication using JWT
- Frontend:
- Vite
- React
- Backend:
- Express
- JWT (JSON Web Tokens)
- bcrypt
PORT = "5000"
ACCESS_TOKEN_SECRET = "YOUR SECRET TOKEN"
ACCESS_TOKEN_EXPIRY= "1d"
REFRESH_TOKEN_SECRET = "YOUR SECRET TOKEN"
REFRESH_TOKEN_EXPIRY = "10d"
MONGODB_URI = "YOUR MONGODB URL"
allowedOrigin = "http://localhost:5173"
CLOUDINARY_CLOUD_NAME = "YOUR CLOUDINARY UNIQUE NAME"
CLOUDINARY_API_KEY = "YOUR CLOUDINARY API KEY"
CLOUDINARY_API_SECRET = "YOUR CLOUDINARY API SECRET TOKEN"
VITE_REDUX_DEVTOOLS = development
VITE_API_URL= "http://localhost:8000/api"
- Node.js (v14.x or later)
-
Clone the repository:
git clone https://github.com/Mr-jas91/mern-e-com.git cd mern-e-com
-
Install dependencies for both frontend and backend:
- For the frontend:
cd frontend
npm install
- for backend
cd backend
npm install
- Start the backend server:
cd backend
npm start
- Start the frontend server:
cd frontend
npm run dev
The user interface will be running on http://localhost:5173.
Visit http://localhost:5173 to access the user interface. Users can sign up, log in, and log out using the provided functionalities.
Jasvant maddheshiya
This project is licensed under the MIT License. See the LICENSE file for details.