This is the backend server for the Inventory Management System, built with Node.js and Express.
- RESTful API for inventory management
- User authentication and authorization
- Database integration with MongoDB
- Email notifications for low stock items
- Node.js
- Express.js
- MongoDB with Mongoose
- JSON Web Tokens for authentication
- Nodemailer for email notifications
- Cloudinary for image storage
- Node.js
- MongoDB
- Cloudinary account
-
Clone the repository:
git clone https://github.com/jonney2021/ims-backend.git cd ims-backend
-
Install dependencies:
npm install
-
Create a
.env
file in the root directory and add the following:PORT=5000 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret [email protected] EMAIL_PASS=your_email_password CLOUDINARY_URL=your_cloudinary_url
Replace the placeholders with your actual MongoDB URI, JWT secret, and email credentials.
-
Start the server:
npm start
The server will start running on http://localhost:5000.
/api/auth
- Authentication routes/api/items
- Item management routes/api/categories
- Category management routes/api/users
- User management routes
npm start
: Starts the servernpm run dev
: Starts the server with nodemon for developmentnpm test
: Runs the test suite
This project uses Cloudinary for image storage and management. When users upload images, the images are sent to Cloudinary for storage, and the resulting URL is saved in the database. This allows for efficient image management and delivery.