Initial commit: Estructura backend y frontend con estándar VPS

- Backend migrado a estructura VPS (src/ subfolder)
- Frontend con estructura Vite + React 19 + Tailwind
- Configuración PostgreSQL con Pool
- API service con interceptores JWT
- Ambos servidores funcionando (backend:3001, frontend:5173)
This commit is contained in:
2025-12-09 00:35:46 -03:00
commit 2a88b4a71b
106 changed files with 22508 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
-- ================================================
-- CREAR USUARIO ADMINISTRADOR
-- Ejecutar en la base de datos ofertaweb
-- ================================================
-- Usuario: admin@ofertaweb.cl
-- Contraseña: admin123
-- Hash bcrypt generado con bcryptjs (10 rounds)
INSERT INTO users (
email,
password_hash,
nombre,
apellido,
telefono,
role,
is_active,
email_verificado
) VALUES (
'admin@ofertaweb.cl',
'$2a$10$zt.nWuEczQFQAwFFjuuPX.cx6cgSqSYZpYmcaEZdRSn5XRNVFI4YS',
'Administrador',
'Sistema',
'+56912345678',
'admin',
true,
true
)
ON CONFLICT (email) DO UPDATE SET
password_hash = EXCLUDED.password_hash,
role = EXCLUDED.role,
is_active = EXCLUDED.is_active,
email_verificado = EXCLUDED.email_verificado;
-- Verificar que se creó
SELECT id, email, nombre, apellido, role, is_active, email_verificado, created_at
FROM users
WHERE email = 'admin@ofertaweb.cl';