A full-stack web application for managing customers, products, orders, and suppliers. Includes separate dashboards for customers and administrators, along with real-time stock validation and automatic order status updates.
- User registration and login (JWT-based)
- View available products
- Add to cart and place orders with future delivery date
- Update personal and payment details
- View order history
- Prevent over-ordering beyond stock
-
Admin login with protected access
-
Dashboard to manage:
- Orders (update status: delivered / rejected)
- Customers (view/edit)
- Products (with stock management)
- Suppliers and categories
-
Automatic daily update for overdue orders
-
Backup the database to file and to S3
- HTML, CSS (style.css)
- Vanilla JavaScript
- Node.js + Express
- MongoDB Atlas + Mongoose
- JWT authentication (token stored in cookies)
- Amazon S3 for database backups
- Railway deployment platform
frontend/: Static HTML pages, JS scripts, shared CSS, and dynamic navbar.backend/: Express server, models, routes, services, middleware, and database logic.
- Install dependencies:
npm install- Create a
.envfile in thebackend/folder (you can start by copying.env.example):
cp backend/.env.example backend/.env- Fill in your own values in the
.envfile:
PORT=3000
MONGODB_URI=your_mongodb_uri
secret_key=your_jwt_secret
AWS_ACCESS_KEY_ID=your_aws_key
AWS_SECRET_ACCESS_KEY=your_aws_secret
S3_BUCKET_NAME=your_bucket
VAT_RATE=0.17- Run the server:
node backend/server.js- Open
frontend/index.htmlin your browser.
- Username:
user1 - Password:
pass123
- Username:
admin1 - Password:
admin123
(You may also use createAdmin.js to add your own admin)
https://inventoryprj-production.up.railway.app/
https://github.com/MoradiAsaf/Inventory_project
- All orders are checked against available stock before being accepted.
- System automatically marks overdue orders as "delivered".
- Full S3 integration for daily backup routine.
- Clean, modular structure ready for scaling.