Sistema de gestión de clientes — privado.
- Frontend: Next.js 14 + Tailwind CSS
- Auth & DB: Supabase
- Deploy: Vercel
- Clona el repo
- Instala dependencias:
npm install
- Copia el archivo de variables:
cp .env.example .env.local
- Llena
.env.localcon tus claves de Supabase - Crea la tabla en Supabase (ver abajo)
- Corre el proyecto:
npm run dev
Ejecuta este SQL en Supabase → SQL Editor:
create table clientes (
id uuid default gen_random_uuid() primary key,
nombre text not null,
cedula text not null,
telefono text not null,
telefono2 text,
status text not null default 'activo' check (status in ('activo', 'inactivo', 'pendiente')),
indicacion text default '',
created_at timestamptz default now(),
updated_at timestamptz default now()
);
-- Habilitar RLS
alter table clientes enable row level security;
-- Solo usuarios autenticados pueden acceder
create policy "Solo usuarios autenticados" on clientes
for all using (auth.role() = 'authenticated');- Push a GitHub
- Importa en Vercel
- Agrega las variables de entorno en Vercel Dashboard:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEY
- Deploy ✅