The PRODUCTOS tab is the primary inventory management interface in the Bicyblex admin dashboard. Accessible as the default active tab on dashboard load, it is powered by theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/bicyblex/bicyblexStore/llms.txt
Use this file to discover all available pages before exploring further.
ProductManager component (src/components/dashboard/product/ProductManager.jsx), which coordinates a product table, a modal form, and a detail view. All product data is fetched from and persisted to the Supabase products table, with product images stored in the Supabase products storage bucket and automatically converted to WebP format before upload.
Product fields
Each product record in theproducts table contains the following fields:
| Field | Type | Description |
|---|---|---|
name | text | Product display name |
price | numeric | Price in currency (stored as a float via parseFloat) |
stock | integer | Available units in inventory (stored via parseInt) |
category_id | integer (FK) | Foreign key referencing categories.id |
specs | JSONB | Dynamic spec fields; structure varies by category slug |
image | text | Public URL of the product image in Supabase Storage |
tag | text | Optional display tag; defaults to "general" if not provided |
product.categories.name available for display in the table and filters without a separate categories fetch.
Category-driven spec fields
When you select a category in the product form, a set of category-specific spec input fields appears dynamically beneath the main fields. The form resolves the selected category’sslug from the categories list and looks it up in the CONFIG object inside ProductForm.jsx to determine which fields to render.
key in the spec fields array becomes a key in the product’s specs JSONB column. Changing the category selection clears the current specs object so stale spec data from a prior category doesn’t carry over.
Image upload & WebP conversion
Product images are processed client-side before being stored. When a file is selected in the product form, it is not uploaded as-is — instead it is first converted to WebP format using theconvertToWebP() utility (src/utils/imageUtils). The resulting WebP file is then uploaded to the Supabase products storage bucket. This keeps image sizes small and format consistent across all product listings.
Fill the form and select an image
Complete all required product fields (name, price, stock, category, specs) and pick an image file from disk using the file input. Any common image format is accepted as input.
Client-side WebP conversion
On form submit,
convertToWebP(payload.imageFile) is called. This converts the original image to a .webp file entirely in the browser before any network request is made.Upload to Supabase Storage
The converted WebP file is uploaded to the
products bucket with a timestamped, randomised filename to avoid collisions:image URL is preserved unchanged — the upload and conversion steps are skipped entirely.
Search and filter
The product table (ProductTable component) includes two controls that work together to narrow the visible rows:
- Search input — matches against
name,id,price, andcategories.namesimultaneously. The search is case-insensitive and runs entirely client-side against the already-loaded product list. - Category dropdown — filters to products belonging to a specific category by
category_id. Defaults to"all"(show everything).
pageSize = 10 constant in ProductManager.
Viewing product details
Each product row in the table includes three action buttons at the right:- Eye icon (
FiEye) — opens a read-only detail modal showing the product image, category, price, stock, tag, and the fullspecsJSONB object rendered as a key-value list - Edit icon (
FiEdit2) — opens theProductFormmodal pre-filled with all existing product values - Trash icon (
FiTrash2) — triggers awindow.confirmprompt before permanently deleting the product row from Supabase
