A full-stack web application built with React frontend and Node.js backend, featuring user authentication, sidebar navigation, and product management capabilities.
- User Authentication: JWT-based authentication with sign-in/sign-up
- Sidebar Navigation: Dynamic navigation with Products, Categories, Brands
- Product Management: CRUD operations for products with detailed views
- Responsive Design: Works on desktop and mobile devices
- Modern UI: Clean and user-friendly interface
- React.js
- Bootstrap (for styling)
- Axios (for API calls)
- React Router (for navigation)
- Node.js
- Express.js
- MongoDB (with Mongoose)
- JWT (JSON Web Tokens)
- bcryptjs (for password hashing)
- Node.js (v14 or higher)
- MongoDB
- npm or yarn
-
Clone the repository
git clone <repository-url> cd ERP
-
Install dependencies
npm run install-all
-
Environment Setup Create a
.envfile in the root directory:PORT=5000 MONGODB_URI=mongodb://localhost:27017/erp-system JWT_SECRET=your-super-secret-jwt-key JWT_EXPIRE=7d -
Start MongoDB Make sure MongoDB is running on your system.
-
Run the application
# Run both frontend and backend npm run dev:full # Or run separately npm run server # Backend only npm run client # Frontend only
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/me- Get current user
GET /api/products- Get all productsGET /api/products/:id- Get product by IDPOST /api/products- Create new productPUT /api/products/:id- Update productDELETE /api/products/:id- Delete product
GET /api/categories- Get all categoriesPOST /api/categories- Create new category
GET /api/brands- Get all brandsPOST /api/brands- Create new brand
ERP/
├── server/
│ ├── controllers/
│ ├── models/
│ ├── routes/
│ ├── middleware/
│ └── index.js
├── client/
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── context/
│ │ └── services/
│ └── public/
├── package.json
└── README.md
- Sign Up/Sign In: Create an account or log in with existing credentials
- Navigation: Use the sidebar to navigate between Products, Categories, and Brands
- Product Management:
- View all products in a list format
- Click on a product to view detailed information
- Edit or delete products using the action buttons
- Add new products using the add button
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.