Skip to content

thisaldil/Inventorymate

Repository files navigation

πŸš€ InventoryMate

A professional Inventory Management System developed for a real client to manage stock levels, product records, inventory transactions, supplier information, and reporting through a centralized and scalable platform.

Project Banner

Live Demo API Docs GitHub


πŸ“Œ Table of Contents


🧭 Overview

[Write 3–5 sentences here. What problem does this solve? Who uses it? What makes it different from a basic CRUD app? Be specific about real-world value.]

Live URL: https://your-app.vercel.app
Backend API: https://your-api.onrender.com


πŸ“Έ Screenshots

Home / Landing Page

Home Page

Dashboard

Dashboard

[Key Feature β€” e.g. Product Listing / User Profile / Order Flow]

Feature Screenshot

Mobile View

Mobile View

πŸ“ Add all screenshots to a /screenshots folder in your repo root.


✨ Features

πŸ‘€ User

  • [Feature 1 β€” e.g. Register and log in with JWT authentication]
  • [Feature 2 β€” e.g. View and manage personal profile]
  • [Feature 3]
  • [Feature 4]

πŸ› οΈ Admin

  • [Admin Feature 1 β€” e.g. Full CRUD on products/users]
  • [Admin Feature 2 β€” e.g. Dashboard with analytics]
  • [Admin Feature 3]

βš™οΈ System

  • Role-based access control (e.g. User / Admin)
  • JWT authentication with secure HTTP-only cookies
  • Input validation and error handling
  • [Any other system-level feature β€” e.g. Email notifications, file uploads, pagination]

πŸ› οΈ Tech Stack

Layer Technology
Frontend React.js, [Tailwind CSS / Bootstrap / MUI]
Backend Node.js, Express.js
Database MongoDB, Mongoose ODM
Auth JWT, bcrypt
File Upload [Multer / Cloudinary β€” if used]
Deployment [Vercel / Render / Railway / AWS]
Other [Any other lib β€” e.g. Nodemailer, Socket.io, dotenv]

🚦 Getting Started

Prerequisites

Make sure you have these installed:


1. Clone the Repository

git clone https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git
cd YOUR_REPO_NAME

2. Set Up the Backend

cd backend
npm install

Create a .env file in the /backend directory (see Environment Variables below), then:

# Development (with auto-restart)
npm run dev

# Production
npm start

Backend runs on: http://localhost:YOUR_PORT


3. Set Up the Frontend

cd ../frontend
npm install
npm run dev

Frontend runs on: http://localhost:5173


πŸ” Environment Variables

Create a .env file inside /backend:

PORT=YOUR_PORT
NODE_ENV=development

# MongoDB
MONGO_URI=your_mongodb_connection_string

# JWT
JWT_SECRET=your_jwt_secret_key
JWT_EXPIRES_IN=7d

# Cloudinary (if used)
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret

# Email (if used)
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_app_password

# Add any other keys your project uses

⚠️ Never commit your .env file. It is already listed in .gitignore.


πŸ”Œ API Endpoints

Base URL: http://localhost:YOUR_PORT/api/v1
Postman Collection: View on Postman


Auth Routes β€” /api/v1/auth

Method Endpoint Description Access
POST /register Register a new user Public
POST /login Login and get token Public
POST /logout Logout user Auth

[Resource 1] Routes β€” /api/v1/[resource]

Replace [resource] with your actual resource (e.g. users, products, orders)

Method Endpoint Description Access
GET / Get all [resources] Public / Auth
GET /:id Get single [resource] Public / Auth
POST / Create [resource] Admin
PUT /:id Update [resource] Admin
DELETE /:id Delete [resource] Admin

[Resource 2] Routes β€” /api/v1/[resource2]

Method Endpoint Description Access
GET / [Description] Auth
POST / [Description] Auth

Request & Response Examples

POST /api/v1/auth/register

// Request body
{
  "name": "John Doe",
  "email": "john@example.com",
  "password": "securepassword123"
}

// Response
{
  "success": true,
  "message": "User registered successfully",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Add more examples for your key endpoints here.


Authentication Header

Protected routes require a Bearer token:

Authorization: Bearer <your_jwt_token>

πŸš€ Deployment

Frontend β€” Vercel

Deploy with Vercel

  1. Push your frontend to GitHub
  2. Import the repo on vercel.com
  3. Set environment variables in the Vercel dashboard
  4. Deploy

Live Frontend: https://your-app.vercel.app


Backend β€” Render / Railway

  1. Push your backend to GitHub
  2. Create a new Web Service on render.com or railway.app
  3. Set all environment variables
  4. Set build command: npm install and start command: npm start

Live API: https://your-api.onrender.com


Database β€” MongoDB Atlas

  1. Create a free cluster on mongodb.com/atlas
  2. Whitelist 0.0.0.0/0 for deployment access
  3. Copy the connection string into your MONGO_URI env variable

πŸ“ Project Structure

root/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   └── db.js                  # Database connection
β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   └── [resource]Controller.js
β”‚   β”œβ”€β”€ middlewares/
β”‚   β”‚   β”œβ”€β”€ authMiddleware.js
β”‚   β”‚   └── errorMiddleware.js
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   └── [Resource].js
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   └── [resource]Routes.js
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   └── [helpers].js
β”‚   β”œβ”€β”€ .env                       # Not committed
β”‚   β”œβ”€β”€ .gitignore
β”‚   β”œβ”€β”€ package.json
β”‚   └── server.js
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”œβ”€β”€ context/               # or /store for Redux
β”‚   β”‚   β”œβ”€β”€ services/              # API call functions
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   └── main.jsx
β”‚   β”œβ”€β”€ .env
β”‚   └── package.json
β”‚
β”œβ”€β”€ screenshots/                   # UI screenshots for README
β”‚   β”œβ”€β”€ banner.png
β”‚   β”œβ”€β”€ home.png
β”‚   β”œβ”€β”€ dashboard.png
β”‚   └── mobile.png
β”‚
└── README.md

πŸ‘¨β€πŸ’» Author

Thisal Gonsalkorala
Full-Stack Software Engineer

Portfolio LinkedIn GitHub Email


πŸ“„ License

This project is licensed under the License.


Built with β˜• and TypeScript by Thisal Gonsalkorala

About

A professional Inventory Management System developed for a real client to manage stock levels, product records, inventory transactions, supplier information, and reporting through a centralized and scalable platform.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors