Get started with SmartShelf
This quickstart guide will help you set up SmartShelf on your local machine and start managing inventory right away.Prerequisites
Before you begin, ensure you have the following installed:- Node.js version 18 or higher - Download
- MongoDB version 6 or higher - Download
- Git - Download
- npm or yarn package manager (comes with Node.js)
You can verify your installations by running
node --version, mongo --version, and git --version in your terminal.Installation steps
Set up the backend
Navigate to the backend directory and install dependencies:Create a Edit the Start the backend server:The backend API will be available at
.env file from the example:.env file with your configuration:http://localhost:5000Set up the frontend
Open a new terminal window and navigate to the frontend directory:Create a Add the API URL to your Start the frontend development server:The frontend will be available at
.env file for the frontend:.env file:http://localhost:5173Start MongoDB
Make sure MongoDB is running on your system:
If you prefer using MongoDB Atlas (cloud database), see the installation guide for detailed setup instructions.
Create your first account
Open your browser and navigate to
http://localhost:5173Click on the Register link and create a new account:- Name: Your full name
- Email: Your email address
- Password: A secure password
- Role: Select from Admin, Manager, or Worker
The first account you create should be an Admin account to have full access to all features.
Access the dashboard
After registration, you’ll be automatically logged in and redirected to your role-specific dashboard:
- Admin Dashboard: System overview, user management, and all features
- Manager Dashboard: Live alerts, forecasting, FEFO ordering, and inventory management
- Worker Dashboard: Assigned tasks with status updates
What’s next?
Now that SmartShelf is running, you can:Add inventory items
Start tracking your warehouse inventory
View FEFO ordering
See items prioritized by expiry date
Check demand forecasts
View 7-day demand projections
Create tasks
Assign tasks to warehouse workers
Quick verification checklist
Verify your installation is working correctly:- Backend server running at
http://localhost:5000 - Frontend application accessible at
http://localhost:5173 - MongoDB connection successful (check backend console)
- User registration and login working
- Dashboard loads without errors
Troubleshooting
Backend fails to start
Backend fails to start
- Verify MongoDB is running:
mongoshormongocommand - Check if port 5000 is already in use
- Ensure all environment variables are set in
.env - Check the backend console for specific error messages
Frontend can't connect to backend
Frontend can't connect to backend
- Verify
VITE_API_URLin frontend.envis set tohttp://localhost:5000/api - Ensure backend server is running
- Check browser console for CORS errors
- Clear browser cache and reload the page
MongoDB connection error
MongoDB connection error
- Verify MongoDB service is running
- Check
MONGODB_URIin backend.envis correct - If using MongoDB Atlas, ensure your IP is whitelisted
- Verify MongoDB is listening on port 27017