InInventer - Inventory Management System
A modern web-based inventory management system with role-based access control (RBAC), built using the MERN stack (MongoDB, Express, React, Node.js).
Features
-
Role-Based Access Control (RBAC)
- Superadmin: Full system access
- Company Admin: Manage company users and products
- Employer: View products and limited actions
-
Product Management
- Add, edit, and delete products
- Track quantities with visual indicators
- Search and filter capabilities
-
User Management
- Create and manage users
- Assign roles and companies
-
Modern UI/UX
- Responsive design with Tailwind CSS
- Gradient themes and animations
- Clean, intuitive interface
Tech Stack
- Frontend: React, Vite, Tailwind CSS
- Backend: Node.js, Express.js
- Database: MongoDB
- Authentication: JWT
- Containerization: Docker
Prerequisites
- Docker and Docker Compose
- Node.js 18+ (for local development)
- Git
Quick Start
-
Clone the repository
git clone https://github.com/yourusername/ininventer.git cd ininventer
-
Set up environment variables
# Copy example files cp .env.example .env cp frontend/.env.example frontend/.env # Edit .env with your configuration # IMPORTANT: Change all default values, especially: # - MONGO_INITDB_ROOT_USERNAME # - MONGO_INITDB_ROOT_PASSWORD # - JWT_SECRET # - SUPERADMIN_EMAIL # - SUPERADMIN_PASSWORD
-
Start with Docker Compose
docker-compose up -d
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- MongoDB: localhost:27017
-
Initial Login
- Use the credentials you set in SUPERADMIN_EMAIL and SUPERADMIN_PASSWORD
- Important: Change the password immediately after first login
Environment Configuration
Required Environment Variables
See .env.example
for all available options. Key variables:
MONGO_URI
: MongoDB connection stringJWT_SECRET
: Secret key for JWT tokens (use a long random string)SUPERADMIN_EMAIL
: Initial admin emailSUPERADMIN_PASSWORD
: Initial admin passwordNODE_ENV
: Environment (development/production)
Development
Local Development Setup
-
Backend
cd backend npm install npm run dev
-
Frontend
cd frontend npm install npm run dev
Project Structure
ininventer/
├── backend/ # Express.js API
│ ├── models/ # MongoDB schemas
│ ├── routes/ # API endpoints
│ ├── middleware/ # Auth & error handling
│ └── utils/ # Helper functions
├── frontend/ # React application
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── contexts/ # Context providers
│ │ └── styles/ # CSS files
├── nginx/ # Nginx configuration
├── docker-compose.yml # Docker composition
└── README.md
Deployment
See DEPLOYMENT.md
for detailed production deployment instructions.
Security Notes
- Never commit
.env
files or any file with real credentials - Always use strong, unique passwords
- Regularly update dependencies
- Use HTTPS in production
- Enable MongoDB authentication
License
This project is licensed under the MIT License.
Description
Languages
JavaScript
82.3%
Shell
13.5%
CSS
3.7%
Dockerfile
0.3%
HTML
0.2%