11# Cannabis Inventory Management System
22
3- A comprehensive React-based web application designed for cannabis inventory tracking, barcode scanning, and thermal label generation. The system supports multiple data sources, automatic allergen detection, and production-ready label printing optimized for Zebra ZT610 thermal printers.
3+ [ ![ React] ( https://img.shields.io/badge/React-18-61DAFB?logo=react&logoColor=white )] ( https://reactjs.org/ )
4+ [ ![ Vite] ( https://img.shields.io/badge/Vite-5-646CFF?logo=vite&logoColor=white )] ( https://vitejs.dev/ )
5+ [ ![ Tailwind] ( https://img.shields.io/badge/Tailwind-3.4-06B6D4?logo=tailwindcss&logoColor=white )] ( https://tailwindcss.com/ )
6+ [ ![ Supabase] ( https://img.shields.io/badge/Supabase-PostgreSQL-3ECF8E?logo=supabase&logoColor=white )] ( https://supabase.com/ )
7+ [ ![ CI] ( https://github.com/claygeo/cannabis-inventory-system/actions/workflows/ci.yml/badge.svg )] ( https://github.com/claygeo/cannabis-inventory-system/actions/workflows/ci.yml )
8+ [ ![ License] ( https://img.shields.io/badge/License-MIT-green )] ( LICENSE )
9+
10+ A production React application for cannabis inventory tracking, barcode scanning, and thermal label generation. Handles multi-source CSV/Excel imports, automatic allergen detection, and Zebra ZT610-optimized label printing at 203 DPI. Cloud-synced master product list via Supabase with offline localStorage fallback.
11+
12+ Running in production since 2024. Currently at v7.4.1.
413
514## Table of Contents
615
716- [ Features] ( #features )
17+ - [ Tech Stack] ( #tech-stack )
818- [ Prerequisites] ( #prerequisites )
919- [ Setup] ( #setup )
1020- [ Environment Configuration] ( #environment-configuration )
@@ -13,6 +23,7 @@ A comprehensive React-based web application designed for cannabis inventory trac
1323- [ Label Generation] ( #label-generation )
1424- [ Thermal Printer Configuration] ( #thermal-printer-configuration )
1525- [ Development] ( #development )
26+ - [ Build] ( #build )
1627- [ Production Deployment] ( #production-deployment )
1728- [ Security Notes] ( #security-notes )
1829
@@ -29,12 +40,31 @@ A comprehensive React-based web application designed for cannabis inventory trac
2940- ** Responsive Dark UI** : Modern dark theme optimized for warehouse environments
3041- ** Label Preview** : Live preview of labels before printing
3142- ** Calibration Tools** : Printer alignment testing and calibration utilities
43+ - ** Master List Cloud Sync** : Supabase-backed product list with 1000+ record pagination
44+ - ** Unmapped Product Admin** : Override system for unrecognized products with remap history
45+ - ** Multi-Location Support** : HSTD (horizontal) and MTD (vertical) label formats
46+ - ** Version-Aware State** : Automatic cache invalidation on app updates
47+
48+ ---
49+
50+ ## Tech Stack
51+
52+ | Layer | Technology |
53+ | -------| ------------|
54+ | Frontend | React 18, React Router 6 |
55+ | Build | Vite 5 |
56+ | Styling | Tailwind CSS 3.4 (custom dark theme, 400+ lines) |
57+ | Labels | jsPDF (PDF generation), JsBarcode (Code 39) |
58+ | Data Import | PapaParse (CSV), SheetJS (Excel) |
59+ | Cloud Sync | Supabase (PostgreSQL, master product list) |
60+ | Printer | Zebra Browser Print SDK (ZPL generation) |
61+ | Hosting | Netlify (SPA routing, security headers, asset caching) |
3262
3363## Prerequisites
3464
3565Before setting up the project, ensure you have the following:
3666
37- - ** Node.js (v16 +) and npm** : Install from [ nodejs.org] ( https://nodejs.org )
67+ - ** Node.js (v18 +) and npm** : Install from [ nodejs.org] ( https://nodejs.org )
3868- ** Modern Web Browser** : Chrome, Firefox, Safari, or Edge
3969- ** Zebra ZT610 Thermal Printer** (optional): For physical label printing
4070- ** Label Stock** : 4" × 6" thermal labels compatible with Zebra ZT610
@@ -47,7 +77,7 @@ Follow these steps to set up the project locally:
4777### 1. Clone the Repository
4878
4979``` bash
50- git clone https://github.com/your-username /cannabis-inventory-system.git
80+ git clone https://github.com/claygeo /cannabis-inventory-system.git
5181cd cannabis-inventory-system
5282```
5383
@@ -209,16 +239,6 @@ src/
209239└── constants.js # Application constants
210240```
211241
212- ### Key Technologies
213-
214- - ** React 18+** : Modern React with hooks and context
215- - ** Vite** : Fast build tool and dev server
216- - ** Tailwind CSS** : Utility-first CSS framework
217- - ** React Router** : Client-side routing
218- - ** jsPDF** : PDF generation for labels
219- - ** Papa Parse** : CSV processing
220- - ** SheetJS** : Excel file processing
221-
222242### Development Scripts
223243
224244``` bash
@@ -228,6 +248,26 @@ npm run preview # Preview production build
228248npm run lint # Run ESLint
229249```
230250
251+ ---
252+
253+ ## Build
254+
255+ Production build via Vite with manual chunk splitting for optimal caching.
256+
257+ | Chunk | Raw | Gzip |
258+ | -------| -----| ------|
259+ | react | 141 KB | 45 KB |
260+ | utils (papaparse, jsbarcode, jspdf, xlsx) | 872 KB | 281 KB |
261+ | html2canvas | 201 KB | 48 KB |
262+ | app code | 482 KB | 118 KB |
263+ | router | 21 KB | 8 KB |
264+ | ui (lucide, toast) | 22 KB | 8 KB |
265+ | CSS | 101 KB | 14 KB |
266+
267+ CI pipeline runs on every push and PR to master: ` npm ci ` and ` npm run build ` .
268+
269+ ---
270+
231271## Production Deployment
232272
233273### Environment Setup
@@ -329,8 +369,15 @@ For support and questions:
329369
330370## Changelog
331371
332- ### Version 5.5.0
333- - Added environment variable configuration
334- - Improved security for credential management
372+ ### v7.4.1
373+ - Unmapped products admin dashboard with remap history
374+ - Fix dark theme consistency on admin pages
375+
376+ ### v7.3.0
377+ - Supabase cloud sync for master product list
378+ - Pagination support for 1000+ products
379+ - Auto-fix strain placeholder with actual strain data
380+
381+ ### v5.5.0
382+ - Environment variable configuration for credentials
335383- Enhanced documentation and setup process
336- - Updated authentication system with fallbacks
0 commit comments