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.
- Overview
- Screenshots
- Features
- Tech Stack
- Getting Started
- Environment Variables
- API Endpoints
- Deployment
- Author
[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
π Add all screenshots to a
/screenshotsfolder in your repo root.
- [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 Feature 1 β e.g. Full CRUD on products/users]
- [Admin Feature 2 β e.g. Dashboard with analytics]
- [Admin Feature 3]
- 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]
| 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] |
Make sure you have these installed:
git clone https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git
cd YOUR_REPO_NAMEcd backend
npm installCreate a .env file in the /backend directory (see Environment Variables below), then:
# Development (with auto-restart)
npm run dev
# Production
npm startBackend runs on: http://localhost:YOUR_PORT
cd ../frontend
npm install
npm run devFrontend runs on: http://localhost:5173
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.envfile. It is already listed in.gitignore.
Base URL: http://localhost:YOUR_PORT/api/v1
Postman Collection: View on Postman
| Method | Endpoint | Description | Access |
|---|---|---|---|
| POST | /register |
Register a new user | Public |
| POST | /login |
Login and get token | Public |
| POST | /logout |
Logout user | Auth |
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 |
| Method | Endpoint | Description | Access |
|---|---|---|---|
| GET | / |
[Description] | Auth |
| POST | / |
[Description] | Auth |
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.
Protected routes require a Bearer token:
Authorization: Bearer <your_jwt_token>
- Push your frontend to GitHub
- Import the repo on vercel.com
- Set environment variables in the Vercel dashboard
- Deploy
Live Frontend: https://your-app.vercel.app
- Push your backend to GitHub
- Create a new Web Service on render.com or railway.app
- Set all environment variables
- Set build command:
npm installand start command:npm start
Live API: https://your-api.onrender.com
- Create a free cluster on mongodb.com/atlas
- Whitelist
0.0.0.0/0for deployment access - Copy the connection string into your
MONGO_URIenv variable
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
Thisal Gonsalkorala
Full-Stack Software Engineer
This project is licensed under the License.
Built with β and TypeScript by Thisal Gonsalkorala




