inventrack 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/api/index.js +13 -0
- package/backend/README.md +35 -0
- package/backend/data/db.json +1239 -0
- package/backend/package-lock.json +532 -0
- package/backend/package.json +8 -0
- package/frontend/README.md +22 -0
- package/frontend/assets/Icon.png +0 -0
- package/frontend/assets/IconSort.png +0 -0
- package/frontend/assets/activity-1.png +0 -0
- package/frontend/assets/activity-2.png +0 -0
- package/frontend/assets/activity-3.png +0 -0
- package/frontend/assets/activity-4.png +0 -0
- package/frontend/assets/card-icon-1.png +0 -0
- package/frontend/assets/card-icon-2.png +0 -0
- package/frontend/assets/card-icon-3.png +0 -0
- package/frontend/assets/card-icon-4.png +0 -0
- package/frontend/assets/login.png +0 -0
- package/frontend/assets/logo.png +0 -0
- package/frontend/categories.html +143 -0
- package/frontend/css/all.min.css +9 -0
- package/frontend/css/bootstrap.min.css +6 -0
- package/frontend/css/categories.css +359 -0
- package/frontend/css/dashboard.css +373 -0
- package/frontend/css/inventoryInsights.css +308 -0
- package/frontend/css/inventoryOverview.css +353 -0
- package/frontend/css/orders.css +632 -0
- package/frontend/css/products.css +364 -0
- package/frontend/css/signin.css +120 -0
- package/frontend/css/style.css +282 -0
- package/frontend/css/suppliers.css +136 -0
- package/frontend/dashboard.html +160 -0
- package/frontend/index.html +124 -0
- package/frontend/inventoryInsights.html +182 -0
- package/frontend/inventoryOverview.html +187 -0
- package/frontend/js/api.js +55 -0
- package/frontend/js/auth.js +70 -0
- package/frontend/js/bootstrap.bundle.min.js +7 -0
- package/frontend/js/categories.js +356 -0
- package/frontend/js/dashboard.js +341 -0
- package/frontend/js/inventoryInsights.js +396 -0
- package/frontend/js/inventoryOverview.js +503 -0
- package/frontend/js/orders.js +662 -0
- package/frontend/js/products.js +650 -0
- package/frontend/js/suppliers.js +535 -0
- package/frontend/js/utils.js +234 -0
- package/frontend/orders.html +216 -0
- package/frontend/products.html +152 -0
- package/frontend/suppliers.html +175 -0
- package/frontend/webfonts/fa-brands-400.woff2 +0 -0
- package/frontend/webfonts/fa-regular-400.woff2 +0 -0
- package/frontend/webfonts/fa-solid-900.woff2 +0 -0
- package/frontend/webfonts/fa-v4compatibility.woff2 +0 -0
- package/package.json +38 -0
- package/vercel.json +18 -0
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Inventory Management System
|
|
2
|
+
A responsive web-based dashboard for managing products, categories, suppliers, and purchase orders. The system tracks inventory levels, generates low-stock alerts, records activity logs, and provides reports such as inventory value and stock insights. Built with HTML, CSS, Bootstrap, JavaScript, and a fake REST API using json-server.
|
|
3
|
+
|
|
4
|
+
This project has been restructured into a frontend for the user interface and a backend for data management.
|
|
5
|
+
|
|
6
|
+
## Project Structure
|
|
7
|
+
|
|
8
|
+
- `frontend/`: Contains all the client-side code, including HTML, CSS, and JavaScript.
|
|
9
|
+
- `backend/`: Contains the server-side code, primarily using `json-server` to serve a REST API from a `db.json` file.
|
|
10
|
+
|
|
11
|
+
## Setup and Installation
|
|
12
|
+
|
|
13
|
+
To set up and run this project locally, follow the instructions below for both the frontend and backend.
|
|
14
|
+
|
|
15
|
+
### Frontend
|
|
16
|
+
|
|
17
|
+
Refer to the `frontend/README.md` for detailed instructions on setting up and running the frontend application.
|
|
18
|
+
|
|
19
|
+
### Backend
|
|
20
|
+
|
|
21
|
+
Refer to the `backend/README.md` for detailed instructions on setting up and running the backend API.
|
|
22
|
+
|
|
23
|
+
## Deployment
|
|
24
|
+
|
|
25
|
+
This project is configured for deployment on Vercel. See the [Vercel deployment section](#vercel-deployment) for more details.
|
package/api/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const jsonServer = require("json-server");
|
|
2
|
+
const path = require("path");
|
|
3
|
+
const server = jsonServer.create();
|
|
4
|
+
|
|
5
|
+
const dbPath = path.resolve(__dirname, "../backend/data/db.json");
|
|
6
|
+
const router = jsonServer.router(dbPath);
|
|
7
|
+
const middlewares = jsonServer.defaults();
|
|
8
|
+
|
|
9
|
+
server.use(middlewares);
|
|
10
|
+
server.use(jsonServer.rewriter({ "/api/*": "/$1" }));
|
|
11
|
+
server.use(router);
|
|
12
|
+
|
|
13
|
+
module.exports = server;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Backend - Inventory Management System
|
|
2
|
+
|
|
3
|
+
This directory contains the server-side code for the Inventory Management System. It primarily uses `json-server` to provide a fake REST API based on the `db.json` file.
|
|
4
|
+
|
|
5
|
+
## Technologies Used
|
|
6
|
+
|
|
7
|
+
- Node.js
|
|
8
|
+
- `json-server` (for creating a fake REST API)
|
|
9
|
+
|
|
10
|
+
## Setup and Running Locally
|
|
11
|
+
|
|
12
|
+
1. **Install Dependencies:**
|
|
13
|
+
Navigate to the `backend` directory and install the necessary Node.js packages:
|
|
14
|
+
```bash
|
|
15
|
+
cd backend
|
|
16
|
+
npm install
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
2. **Start the JSON Server:**
|
|
20
|
+
Once dependencies are installed, you can start the JSON server:
|
|
21
|
+
```bash
|
|
22
|
+
npm start
|
|
23
|
+
```
|
|
24
|
+
This will typically start the server on `http://localhost:3000` (or another port if 3000 is in use), serving your `db.json` file as a REST API.
|
|
25
|
+
|
|
26
|
+
## API Endpoints
|
|
27
|
+
|
|
28
|
+
The `db.json` file defines the data structure and available endpoints. Common endpoints will include:
|
|
29
|
+
|
|
30
|
+
- `/products`
|
|
31
|
+
- `/categories`
|
|
32
|
+
- `/suppliers`
|
|
33
|
+
- `/orders`
|
|
34
|
+
|
|
35
|
+
Refer to the `json-server` documentation for more details on interacting with the API.
|