A comprehensive web-based management system for confectionery businesses built with Next.js, React, and modern web technologies. This system provides complete functionality for managing products, inventory, orders, customers, and analytics for sweet shops and candy stores.
- Real-time business metrics and KPIs
- Revenue trends visualization
- Top-selling products analysis
- Sales by category breakdown
- Inventory alerts and notifications
- AI-powered insights and recommendations
- Complete product catalog management
- Category-based organization (chocolates, gummies, hard candy, lollipops, fudge, caramels)
- Detailed product information including ingredients and allergens
- Nutritional information tracking
- Cost and pricing management with profit margin calculations
- Product image management
- Advanced filtering and sorting capabilities
- Real-time stock level monitoring
- Automated low stock and out-of-stock alerts
- Min/max stock level configuration
- Quick stock adjustment tools
- AI-powered inventory predictions
- Bulk inventory operations
- Inventory value tracking
- Complete order lifecycle management
- Customer order history
- Order status tracking (pending, completed, cancelled)
- Multiple payment method support
- Order filtering and search
- Detailed order breakdown with itemized billing
- Tax calculation and management
- Comprehensive customer profiles
- Customer segmentation (New, Regular, VIP)
- Purchase history and analytics
- Customer preferences and allergy tracking
- Address and contact information management
- Communication preferences
- Customer loyalty insights
- Product recommendation engine
- Inventory demand forecasting
- Customer behavior analysis
- Pricing optimization suggestions
- Sales pattern recognition
- Automated business insights
- Next.js 16.0.10 - React framework for production
- React 18.2.0 - UI library
- React Hot Toast - Elegant notifications
- React Icons - Icon library
- Canvas Confetti - Celebration animations
- Next.js API Routes - Serverless API endpoints
- File-based JSON Database - Simple data persistence
- Custom Database Layer - CRUD operations abstraction
- Jest - Testing framework
- React Testing Library - Component testing utilities
- ESLint - Code linting and formatting
- Jest Environment JSDOM - DOM testing environment
- CSS Modules - Scoped styling
- Responsive Design - Mobile-first approach
- Modern UI Components - Clean and intuitive interface
The output/ folder contains screenshots demonstrating all major features:
dashboard_output.png- Main dashboard with analyticsdashboard.png- Dashboard overviewproject_management.png- Product management interfaceinventory_management.png- Inventory tracking systemorder_management.png- Order processing interfacenew_order.png- New order creation formadd_customer.png- Customer registration form
sweet-shop-management/
βββ components/ # React components
β βββ Dashboard.jsx # Main dashboard component
β βββ ProductManagement.jsx # Product CRUD operations
β βββ InventoryManagement.jsx# Inventory tracking
β βββ OrderManagement.jsx # Order processing
β βββ CustomerManagement.jsx # Customer management
β βββ Layout.jsx # App layout wrapper
β βββ Navbar.jsx # Navigation component
β βββ Footer.jsx # Footer component
β βββ index.js # Component exports
βββ pages/ # Next.js pages
β βββ api/ # API routes
β β βββ analytics/ # Analytics endpoints
β β βββ customers/ # Customer CRUD APIs
β β βββ inventory/ # Inventory management APIs
β β βββ orders/ # Order processing APIs
β β βββ products/ # Product management APIs
β βββ index.js # Main application page
β βββ _app.js # App configuration
βββ lib/ # Utility libraries
β βββ database.js # Database operations
β βββ ai-helpers.js # AI recommendation engine
β βββ utils.js # Utility functions
βββ data/ # JSON data files
β βββ products.json # Product catalog
β βββ customers.json # Customer database
β βββ orders.json # Order history
β βββ inventory.json # Stock levels
β βββ analytics.json # Analytics data
βββ styles/ # CSS styles
β βββ globals.css # Global styles
βββ __tests__/ # Test files
βββ output/ # Application screenshots
βββ public/ # Static assets
- Node.js 16.x or higher
- npm or yarn package manager
-
Clone the repository
git clone <repository-url> cd sweet-shop-management
-
Install dependencies
npm install # or yarn install -
Set up environment variables
cp .env.example .env
Edit
.envfile with your configuration settings. -
Initialize the database The application will automatically create initial data files on first run.
-
Start the development server
npm run dev # or yarn dev -
Open your browser Navigate to http://localhost:3000
# Build the application
npm run build
# Start production server
npm startThe project includes comprehensive testing setup with Jest and React Testing Library.
# Run tests in watch mode
npm test
# Run tests with coverage
npm run test:ci
# Run linting
npm run lintThe application uses a file-based JSON database system for simplicity and portability:
- Products: Complete product catalog with pricing, ingredients, and nutritional info
- Customers: Customer profiles with preferences and purchase history
- Orders: Order transactions with detailed item breakdown
- Inventory: Real-time stock levels and management data
- Analytics: Business metrics and performance data
- Product Recommendations: Based on sales history and customer preferences
- Inventory Predictions: Forecasts stock needs using historical sales data
- Customer Behavior Analysis: Segments customers and identifies patterns
- Pricing Optimization: Suggests optimal pricing based on market analysis
- Sales Metrics: Revenue, order count, and average order value
- Product Performance: Top-selling items and category breakdown
- Customer Insights: Active customers, segments, and loyalty metrics
- Inventory Health: Stock levels, alerts, and value tracking
- Mobile-first approach for all screen sizes
- Touch-friendly interface for tablet use
- Optimized for both desktop and mobile workflows
- Consistent user experience across devices
# Add your environment-specific configurations
NEXT_PUBLIC_APP_NAME=Sweet Shop Management
NEXT_PUBLIC_APP_VERSION=1.0.0The system automatically initializes with sample data including:
- 2 sample products (Chocolate Truffles, Gummy Bears)
- Empty customer and order databases
- Initial inventory levels
- Basic analytics structure
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js team for the excellent React framework
- React community for the amazing ecosystem
- All contributors and testers who helped improve this system






