A comprehensive full-stack application for managing grocery inventory, shopping lists, and generating reports.
- Dashboard: Overview of inventory with key metrics and alerts
- Inventory Management: Add, edit, delete, and track grocery items
- Shopping List: Create and manage shopping lists with purchase tracking
- Reports & Analytics: View insights on inventory value, low stock, and expiring items
- Responsive Design: Built with React and Tailwind CSS
- Local Storage: Data persistence in the browser
- RESTful API: Built with Node.js and Express
- MongoDB Integration: Database support with Mongoose
- CRUD Operations: Full create, read, update, delete functionality
- Data Validation: Input validation and error handling
- CORS Support: Cross-origin resource sharing enabled
Grocery-Management/
โโโ Client/ # React frontend application
โ โโโ public/
โ โโโ src/
โ โ โโโ components/ # Reusable UI components
โ โ โ โโโ common/ # Button, Input, Card, Modal, Select
โ โ โ โโโ layout/ # Navbar, Footer, Layout
โ โ โโโ pages/ # Main application pages
โ โ โ โโโ Dashboard.jsx
โ โ โ โโโ Inventory.jsx
โ โ โ โโโ ShoppingList.jsx
โ โ โ โโโ Reports.jsx
โ โ โโโ context/ # React Context for state management
โ โ โ โโโ GroceryContext.jsx
โ โ โโโ hooks/ # Custom React hooks
โ โ โ โโโ useLocalStorage.js
โ โ โโโ services/ # API services
โ โ โโโ utils/ # Utility functions
โ โ โโโ App.jsx # Main app component with routing
โ โ โโโ main.jsx # Entry point
โ โ โโโ index.css # Global styles
โ โโโ package.json
โ โโโ vite.config.js
โ โโโ tailwind.config.cjs
โ
โโโ Server/ # Node.js backend application
โโโ src/
โ โโโ controllers/ # Route controllers
โ โ โโโ inventoryController.js
โ โ โโโ shoppingListController.js
โ โโโ models/ # Mongoose models
โ โ โโโ Inventory.js
โ โ โโโ ShoppingList.js
โ โโโ routes/ # API routes
โ โ โโโ inventoryRoutes.js
โ โ โโโ shoppingListRoutes.js
โ โโโ middleware/ # Custom middleware
โ โโโ config/ # Configuration files
โ โโโ database.js
โโโ server.js # Express server setup
โโโ package.json
โโโ .env.example # Environment variables template
- Node.js (v18 or higher)
- npm or yarn
- MongoDB (optional, for database features)
git clone https://github.com/Nandkishorjadhav/Grocery-Management.git
cd Grocery-Managementcd Client
npm installcd ../Server
npm installCreate a .env file in the Server directory:
cp .env.example .envEdit .env with your configuration:
PORT=5000
NODE_ENV=development
MONGODB_URI=mongodb://localhost:27017/grocery_management
JWT_SECRET=your_jwt_secret_key_herecd Client
npm run devThe client will run on http://localhost:5173
cd Server
npm run devThe server will run on http://localhost:5000
cd Client
npm run buildcd Server
npm startGET /api/inventory- Get all inventory itemsGET /api/inventory/:id- Get single itemPOST /api/inventory- Create new itemPUT /api/inventory/:id- Update itemDELETE /api/inventory/:id- Delete itemGET /api/inventory/low-stock- Get low stock itemsGET /api/inventory/expiring-soon- Get expiring items
GET /api/shopping-list- Get all shopping list itemsGET /api/shopping-list/:id- Get single itemPOST /api/shopping-list- Create new itemPUT /api/shopping-list/:id- Update itemDELETE /api/shopping-list/:id- Delete itemPATCH /api/shopping-list/:id/toggle- Toggle purchased statusDELETE /api/shopping-list/purchased/clear- Clear purchased items
- React 19 - UI library
- React Router DOM 6 - Routing
- Tailwind CSS 4 - Styling
- Vite 7 - Build tool
- ESLint - Code linting
- Node.js - Runtime environment
- Express 4 - Web framework
- MongoDB - Database
- Mongoose 8 - ODM
- CORS - Cross-origin support
- dotenv - Environment variables
- nodemon - Development server
- View total items and inventory value
- Low stock alerts
- Expiring soon notifications
- Quick action buttons
- Add new items with details (name, category, quantity, price, expiry date)
- Edit existing items
- Delete items
- Search and filter by category
- Sort by various criteria
- Stock status indicators
- Create shopping lists
- Mark items as purchased
- Filter by status (all, pending, purchased)
- Clear completed items
- Category organization
- Category-based breakdown
- Top value items
- Inventory health metrics
- Shopping list analytics
- Stock and expiry status
- Button - Various variants (primary, secondary, success, danger, warning, outline)
- Input - Form input with label and error handling
- Select - Dropdown selection
- Card - Container component
- Modal - Dialog for forms and confirmations
- Navbar - Navigation with mobile support
- Footer - Application footer
- Layout - Page wrapper
This project is open source and available under the MIT License.
Nandkishor Jadhav
- GitHub: @Nandkishorjadhav
Contributions, issues, and feature requests are welcome!
Give a โญ๏ธ if this project helped you!
Made with โค๏ธ by Nandkishor Jadhav