A production-ready inventory management application built with the MERN stack. Features real-time product management, advanced search/filtering, and secure JWT authentication.
π Live Demo | π API Docs
For quick testing, use:
- Email:
demo@cooee.com - Password:
Demo@123
Or create your own account via the signup page.
- β User Registration & Login
- β JWT-based authentication with secure token storage
- β Protected routes (Products page accessible only after login)
- β Automatic token refresh
- β Secure logout functionality
- β Add new products with validation
- β Edit existing products
- β Delete products with confirmation
- β View products in responsive table format
- β Form validation and error handling
- React 18 (with Vite for fast builds)
- Axios for API communication
- React Hooks (useState, useEffect, useContext)
- React Router for navigation
- CSS3 with custom styling
- Responsive Design (mobile-first approach)
- Node.js (v18+)
- Express.js for REST API
- MongoDB with Mongoose ODM
- JWT (jsonwebtoken) for authentication
- bcrypt for password hashing
- CORS configuration for secure cross-origin requests
- dotenv for environment management
---
## π‘ API Endpoints
### Authentication
| Method | Endpoint | Description | Auth Required |
|--------|----------|-------------|---------------|
| POST | `/api/v1/auth/register` | Create new user account | β |
| POST | `/api/v1/auth/login` | Login existing user | β |
| GET | `/api/v1/auth/me` | Get current user info | β
|
| POST | `/api/v1/auth/logout` | Logout user | β
|
### Products
| Method | Endpoint | Description | Auth Required |
|--------|----------|-------------|---------------|
| GET | `/api/v1/products` | Get all products (with pagination, search, filter) | β
|
| GET | `/api/v1/products/:id` | Get single product by ID | β
|
| POST | `/api/v1/products` | Create new product | β
|
| PUT | `/api/v1/products/:id` | Update existing product | β
|
| DELETE | `/api/v1/products/:id` | Delete product | β
|
Sanika Menkudale