A comprehensive inventory management system, featuring real-time tracking, FIFO cost calculation, and comprehensive reporting capabilities.
- Real-time Inventory Tracking: Track inventory items with live updates
- FIFO Cost Calculation: Accurate cost tracking using First In, First Out method
- Master Data Management: Manage item templates and units
- Comprehensive Reporting: Detailed reports with trend analysis
- PWA Support: Works offline with native app-like experience
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Material Design: Beautiful, intuitive interface following Material Design principles
- Multi-tenant: Secure data isolation for multiple users
- Frontend: Next.js 14 with TypeScript and App Router
- UI Library: Material-UI (MUI) v5 with custom theming
- Database: Supabase (PostgreSQL with real-time capabilities)
- Authentication: Supabase Auth with Row Level Security
- PWA: next-pwa with Workbox for service worker management
- Charts: Recharts for data visualization
- Testing: Jest, React Testing Library, Playwright
- Code Quality: ESLint, Prettier, TypeScript
- Node.js 18.x or later
- npm or yarn package manager
- Supabase account (for database and authentication)
-
Clone the repository
git clone <repository-url> cd inventory-management-system
-
Install dependencies
npm install
-
Set up environment variables
cp .env.local.example .env.local
Update
.env.localwith your Supabase credentials:NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
npm test # Run tests once
npm run test:watch # Run tests in watch mode
npm run test:coverage # Run tests with coverage reportnpm run test:e2e # Run Playwright testsnpm run type-check # Check TypeScript typesnpm run lint # Run ESLint
npm run lint:fix # Fix ESLint issues
npm run format # Format code with Prettier
npm run format:check # Check code formattingnpm run build # Create production build
npm start # Start production serverThe application includes Progressive Web App capabilities:
- Offline functionality
- App-like experience on mobile devices
- Push notifications support
- Automatic updates
src/
├── app/ # Next.js App Router
│ ├── (auth)/ # Authentication routes
│ ├── (dashboard)/ # Protected dashboard routes
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── components/ # Reusable React components
│ ├── ui/ # Base UI components
│ ├── forms/ # Form components
│ └── layout/ # Layout components
├── lib/ # Utilities and configurations
│ ├── supabase/ # Supabase client and types
│ ├── theme/ # Material-UI theme configuration
│ └── utils/ # Helper functions
└── types/ # TypeScript type definitions
The application supports both light and dark themes with automatic system preference detection. The theme can be toggled manually and preferences are persisted in localStorage.
- Primary: Blue (#1976d2 light, #90caf9 dark)
- Secondary: Pink (#dc004e light, #f48fb1 dark)
- Background: Adaptive based on theme mode
- Row Level Security (RLS): Database-level security ensuring users only access their data
- Authentication: Secure email/password authentication with Supabase Auth
- Data Validation: Client and server-side validation using Zod schemas
- HTTPS Only: All production deployments use HTTPS
The application uses three main tables:
- profiles: User account information
- master_items: Item templates with names and units
- inventory_transactions: All inventory movements with FIFO tracking
The application is optimized for deployment on Vercel, Netlify, or any platform supporting Next.js applications.
NEXT_PUBLIC_SUPABASE_URL=your_production_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_production_supabase_anon_key
NEXT_PUBLIC_APP_NAME="Inventory Management System"
NEXT_PUBLIC_PWA_ENABLED=true- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some 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.
For support and questions:
- Create an issue in the repository
- Check the documentation in the
/docsfolder - Review the test files for usage examples
- Feature Development: Create feature branches from
develop - Testing: Ensure all tests pass before creating PR
- Code Quality: Run linting and formatting checks
- Review: All changes require code review
- Deployment: Automatic deployment on merge to
main
Built with ❤️ for marriage hall businesses to efficiently manage their inventory operations.