feat: integrate barcode scanning functionality and enhance Appwrite setup
- Added a new `barcode_products` collection to the Appwrite setup for managing barcode data. - Implemented barcode scanning feature with a dedicated modal for scanning and adding products. - Introduced new components for barcode product preview and management. - Updated the setup script to seed verified barcode products from a JSON file. - Enhanced the application state management to handle barcode-related actions and user interactions.
This commit is contained in:
@@ -37,6 +37,7 @@ Configured defaults:
|
||||
- Database ID: `redbull_tracker`
|
||||
- Collection ID: `intake_entries`
|
||||
- Chat collection ID: `coach_chats`
|
||||
- Barcode collection ID: `barcode_products`
|
||||
|
||||
`client.ping()` is called automatically during app boot in `src/App.tsx` through `pingAppwrite()` from `src/lib/appwrite.ts`.
|
||||
|
||||
@@ -86,6 +87,8 @@ So if the Console asks you to create a **table**, that is the same resource as t
|
||||
|
||||
The app uses Appwrite's current `TablesDB` SDK methods (`listRows`, `createRow`, `updateRow`, `deleteRow`). The env var remains named `VITE_APPWRITE_COLLECTION_ID` for compatibility with the first setup pass, but its value should be your table ID.
|
||||
|
||||
The barcode scanner uses a separate `barcode_products` table by default. Verified Red Bull barcode rows are seeded by `scripts/setup-appwrite.mjs` using `APPWRITE_API_KEY`; browser code can only read verified rows and create/update the current user's own mappings with row-level permissions.
|
||||
|
||||
Create a database with ID:
|
||||
|
||||
```text
|
||||
|
||||
Reference in New Issue
Block a user