Bicyblex Store uses three PostgreSQL tables hosted on Supabase:Documentation 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.
products, categories, and news. This page documents every column, its type, constraints, and how the tables relate to each other — giving you everything you need to recreate the schema in a new Supabase project or understand the data model when extending the application.
categories table
Categories classify products and control which dynamic spec fields appear in the product form. Each category must have a unique slug value that matches a key in the CONFIG object inside src/components/dashboard/product/ProductForm.jsx.
| Column | Type | Constraints | Description |
|---|---|---|---|
id | SERIAL | Primary Key | Auto-incrementing integer ID |
name | TEXT | NOT NULL | Display name shown in dropdowns and the storefront |
slug | TEXT | NOT NULL, UNIQUE | URL-safe identifier, auto-generated from name |
Default categories
The four built-in categories whose slugs map to spec field schemas:The
slug value must exactly match a key in ProductForm.jsx’s CONFIG object for spec fields to appear in the product form. See Category Management for details on how slugs are generated and how to add new ones.products table
The products table stores every item in the Bicyblex catalog. The specs column is a flexible JSONB field whose structure depends on the product’s category.
| Column | Type | Constraints | Description |
|---|---|---|---|
id | SERIAL | Primary Key | Auto-incrementing integer ID |
name | TEXT | NOT NULL | Product display name |
price | NUMERIC | NOT NULL, DEFAULT 0 | Price in local currency |
stock | INTEGER | NOT NULL, DEFAULT 0 | Number of units in inventory |
category_id | INTEGER | FK → categories.id | References the product’s category |
specs | JSONB | DEFAULT '{}' | Dynamic technical specs; structure varies by category |
image | TEXT | — | Public URL of the product image in Supabase Storage |
tag | TEXT | DEFAULT 'general' | Optional display label for storefront filtering |
specs JSONB structure by category
The shape of the specs object depends on which category a product belongs to. The keys below match exactly the key values defined in ProductForm.jsx’s CONFIG object:
Product query used by the application
The dashboard and storefront fetch products with a join to get the category name:categories object: { name: "Bicicletas" }.
news table
The news table stores articles published to the storefront’s newsletter section. Slugs and excerpts are auto-generated by the admin dashboard when an article is saved.
| Column | Type | Constraints | Description |
|---|---|---|---|
id | SERIAL | Primary Key | Auto-incrementing integer ID |
title | TEXT | NOT NULL | Article headline |
content | TEXT | NOT NULL | Full article body text |
image | TEXT | — | Public URL of the cover image in Supabase Storage |
slug | TEXT | NOT NULL, UNIQUE | Auto-generated from the title |
excerpt | TEXT | — | Auto-truncated to 150 characters from content |
created_at | TIMESTAMPTZ | DEFAULT NOW() | Timestamp set automatically on insert |
The
slug and excerpt columns are always populated by the dashboard’s save logic — never enter them manually. See News Management for the generation algorithm.Entity relationships
The only explicit foreign key relationship is betweenproducts and categories:
news table is standalone — it has no foreign key relationships to the other tables.
Setting up the schema
To recreate the full schema in a new Supabase project, run the threeCREATE TABLE statements above in order (categories first, then products, then news), seed the default categories, and configure the storage buckets. See Supabase Setup for the complete walkthrough.