A comprehensive inventory management system for bakeries, helping track ingredients, recipes, bakes, deliveries, and removals.
- Inventory tracking with minimum stock levels and alerts
- Recipe management with ingredient requirements
- Bake tracking with production efficiency metrics
- Delivery and removal management
- User authentication with role-based access control
- Responsive design for all screen sizes
This project has been migrated from Supabase to a local database solution using localStorage. This is a temporary solution that can be replaced with a real database in the future.
-
Remove Supabase Dependencies
Remove the following dependencies from your
package.json
:"@supabase/supabase-js": "^2.x.x"
-
Remove Supabase Configuration
Remove the Supabase configuration from your
.env
file:VITE_SUPABASE_URL=your-supabase-url VITE_SUPABASE_ANON_KEY=your-supabase-anon-key
-
Add New Database and Auth Services
The following files have been added to replace Supabase:
src/services/database.ts
: A localStorage-based database servicesrc/services/auth.ts
: A localStorage-based authentication service
-
Update Imports and API Calls
Run the migration script to update imports and API calls:
node update-imports.js
This script will:
- Remove Supabase imports
- Add imports for the new database and auth services
- Update Supabase API calls to use the new services
-
Update Auth Store
The auth store has been updated to use the new auth service:
src/stores/auth.ts
-
Test the Application
After migration, test all features of the application to ensure they work correctly with the new database service.
- Clone the repository
- Install dependencies:
npm install
- Start the development server:
npm run dev
npm run build
The local database is initialized with the following users:
- Admin: admin@example.com (no password required in demo mode)
- User: user@example.com (no password required in demo mode)
The database is initialized with sample data in src/services/database.ts
. You can modify this data to suit your needs.
- Replace localStorage with a real database
- Add offline support with IndexedDB
- Implement data export/import functionality
- Add barcode scanning for inventory management
- Implement batch tracking and expiry date management