Connectez BASSARI Vision à votre base Supabase gratuite
📋 Étapes de configuration (5 minutes)
1
Allez sur supabase.com → créez un compte gratuit → cliquez "New project"
2
Dans votre projet → allez dans SQL Editor → copiez-collez le schéma ci-dessous et exécutez-le
3
Allez dans Settings → API → copiez votre Project URL et votre anon key
4
Collez-les dans les champs ci-dessous → cliquez Tester la connexion
🗃️ Schéma SQL à exécuter
-- BASSARI Vision — Schéma SQL SupabaseCREATE TABLEprofiles (
id uuid REFERENCES auth.users PRIMARY KEY,
name text, role text DEFAULT'vendeur', created_at timestamptz DEFAULT now()
);
CREATE TABLEcustomers (
id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
name text NOT NULL, phone text UNIQUE NOT NULL,
city text, addr text, ref text, orders int DEFAULT 0,
total numeric DEFAULT 0, created_at date DEFAULT now()
);
CREATE TABLEproducts (
id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
ref text UNIQUE NOT NULL, name text, cat text, mat text,
idx text, trt text, smin numeric, smax numeric, cmin numeric,
has_add boolean DEFAULT false, stock int DEFAULT 0,
smin_s int DEFAULT 5, pa numeric, pv numeric, fournisseur text
);
CREATE TABLEorders (
id text PRIMARY KEY, customer_id uuid REFERENCES customers,
status text, total numeric, profit numeric,
date date DEFAULT now(), items int, user_name text
);
CREATE TABLEorder_lines (
id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
order_id text REFERENCES orders, pname text, pref text,
sph text, cyl text, axe text, add_val text, eye text,
qty int, total numeric, profit numeric
);
CREATE TABLEorder_history (
id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
order_id text REFERENCES orders, status text,
created_at timestamptz DEFAULT now(), user_name text, comment text
);
-- Enable Row Level Security (recommended)ALTER TABLE customers ENABLE ROW LEVEL SECURITY;
ALTER TABLE products ENABLE ROW LEVEL SECURITY;
ALTER TABLE orders ENABLE ROW LEVEL SECURITY;
-- Allow authenticated users full accessCREATE POLICY"auth_all"ON customers FOR ALL TO authenticated USING (true);
CREATE POLICY"auth_all"ON products FOR ALL TO authenticated USING (true);
CREATE POLICY"auth_all"ON orders FOR ALL TO authenticated USING (true);
🔑 Vos identifiants Supabase
Sans Supabase : données sauvées dans le navigateur (localStorage). Multi-utilisateurs non disponible.
👁
BASSARI Vision
Gestion Optique Professionnelle
Sponsor : PRESBYTA — Marque de verre optique
Connexion
⚠
👑AdminAccès total
📊GestionnaireCommandes + Stock
🛒VendeurCommandes uniquement
📦MagasinierStock uniquement
Mode local · Données sauvegardées dans le navigateur
👁
Suivi de Commande
BASSARI Vision — Entrez votre N° de commande ou téléphone