Timeline visual de tareas y carrusel de rutinas en colores pastel
+
+
+
+
+
+
+
+ Fondo:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 9:41
+
+
+
+
+ flow app
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ viernes, 10 de octubre
+
+
+ mi agenda de hoy
+
+
+
+
+
+
+ 50%
+
+
+ completado
+ 2 de 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ plantillas & hábitos
+
+ rutinas conectadas
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 🌅
+
+ hábito diario
+
+
+ 45 min
+
+
+
+
+
+ rutina mañanera
+
+
+ café, 10 min meditación y journaling
+
+
+
+
+ 07:00 am
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ⚡
+
+ productividad
+
+
+ 90 min
+
+
+
+
+
+ enfoque profundo (deep work)
+
+
+ cero notificaciones, proyecto principal
+
+
+
+
+ 10:00 am
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 🏃♂️
+
+ bienestar
+
+
+ 60 min
+
+
+
+
+
+ sesión de entrenamiento
+
+
+ rutina funcional y estiramiento activo
+
+
+
+
+ 05:30 pm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 🌙
+
+ descanso
+
+
+ 30 min
+
+
+
+
+
+ rutina de descanso
+
+
+ cero pantallas, preparar el día de mañana
+
+
+
+
+ 09:30 pm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ línea de tiempo
+
+ timeline del día
+
+
+
+ toca el círculo para tachar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ☕
+
+
+
+ 07:30 am • 30m
+
+
+ desayuno & planificar el día
+
+
revisar prioridades y tomar café
+
+
+
+
+
+ ✓
+
+
+
+
+
+
+
+
+
+ 💼
+
+
+
+ 09:00 am • 45m
+
+
+ daily sprint con el equipo
+
+
revisión de avances del prototipo
+
+
+
+
+ ✓
+
+
+
+
+
+
+
+
+
+ 💻
+
+
+
+ 10:00 am • 90m
+ en curso
+
+
+ diseño de la arquitectura & api
+
+
bloque de concentración profunda
+
+
+
+
+ ✓
+
+
+
+
+
+ ⏱️ 1h libre para descanso y caminata
+
+
+
+
+
+
+
+
+ 🥗
+
+
+
+ 01:00 pm • 60m
+
+
+ almuerzo saludable & lectura
+
+
desconectarse de pantallas
+
+
+
+
+ ✓
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ¡Rutina añadida a tu agenda!
+ ✓
+
+
+
+
+
+
+
+
+
+
+
+ ✨ App Independiente de Agenda & Recordatorios
+
+
+
+ ¿cómo funciona esta app de recordatorios?
+
+
+
+ Esta aplicación adopta el concepto exacto de Structured: transformar listas de tareas aburridas en una línea de tiempo visual con colores pasteles, donde cada momento de tu día tiene un espacio claro y conectado.
+
+
+
+
+ 🧩
+
+ 1. carrusel de rutinas con conectores puzzle
+
Las cápsulas del carrusel son plantillas de hábitos frecuentes (rutina mañanera, deep work, gym). Al tocar cualquiera, se inserta directo en tu timeline.
+
+
+
+
+ 🕒
+
+ 2. timeline visual interactivo
+
Cada tarea tiene su horario y duración. Puedes tocar el círculo verde para marcarla como completada y ver cómo avanza tu porcentaje del día.
+
+
+
+
+ 🎨
+
+ 3. paleta pastel relajante
+
Usa los colores suaves de SiboPay (Cielo, Menta, Melocotón, Lavanda, Vainilla) que reducen el estrés visual característico de Structured.
+
+
+
+
+
+
+
+
+ acciones interactivas de prueba
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
nueva tarea o recordatorio
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/public/app_carousel_mockup.html b/public/app_carousel_mockup.html
new file mode 100644
index 0000000..bc71eb5
--- /dev/null
+++ b/public/app_carousel_mockup.html
@@ -0,0 +1,938 @@
+
+
+
+
+
+ SiboPay — Carrusel Estilo Structured en la App
+
+
+
+
+
+
+
+
+
+ S
+
+
+
+ sibopay
+
+ Diseño In-App • Structured
+
+
+
Así luce el carrusel de cápsulas y conectores dentro de la pantalla del celular
+
+
+
+
+
+
+
+ Fondo App:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 9:41
+
+
+
+
+ sibopay
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ colegio saint paul
+ •
+ 2° A
+
+
+ hola, mateo 👋
+
+
+
+
+
+
+ saldo disponible
+ ₡14.500
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ combos & promociones
+
+ destacados del día
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 🥪
+
+
+ recreo 1 • 09:30 am
+
+
+
+ popular
+
+
+
+
+
+
+ sandwich artesanal & jugo
+
+
+ jamón de pavo, queso suizo y jugo de naranja
+
+
+
+
+
+
+ ₡
+ 1.850
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ⚡
+
+
+ sinpe móvil directo
+
+
+
+ inmediato
+
+
+
+
+
+
+ recarga de saldo en 1 toque
+
+
+ acreditación sin comisión al número 8888-7777
+
+
+
+
+
+
+ 0% comisiones
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 🍛
+
+
+ almuerzo • 11:45 am
+
+
+
+ menú chef
+
+
+
+
+
+
+ casado completo con pollo
+
+
+ arroz, frijoles, plátano maduro, ensalada y té frío
+
+
+
+
+
+
+ ₡
+ 2.600
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 📢
+
+
+ aviso cafeteria
+
+
+
+ especial
+
+
+
+
+
+
+ viernes de pizza horneada
+
+
+ pre-órdenes abiertas hasta el jueves 4:00 pm
+
+
+
+
+
+
+ cupos 48/80
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 🍎
+
+
+ snack saludable
+
+
+
+ 100% natural
+
+
+
+
+
+
+ bowl de frutas & miel
+
+
+ fresas, banano, piña, yogurt griego y avena
+
+
+
+
+
+
+ ₡
+ 1.200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ accesos directos
+
+ toca para abrir
+
+
+
+
+
+
+ ⚡
+
+ recarga
+
+
+
+
+
+ 📱
+
+ mi qr
+
+
+
+
+
+ 🥪
+
+ menú
+
+
+
+
+
+ ❤️
+
+ nutrición
+
+
+
+
+
+
+
+
+
+
+ horario estructurado
+
+ timeline de hoy
+
+
+
+ 4 eventos
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 🥛
+
+
+
desayuno ligero
+
07:15 am • cafetería principal
+
+
+ completado
+
+
+
+
+
+
+
+ 🥪
+
+
+
+
primer recreo: retiro combo
+
+
+
09:30 am • ventanilla rápida #2
+
+
+ en curso
+
+
+
+
+
+
+
+ 🍛
+
+
+
almuerzo en comedor
+
11:45 am • casado con pollo
+
+
+ reservado
+
+
+
+
+
+
+
+ 🍎
+
+
+
segundo recreo: snack
+
01:45 pm • bowl de frutas
+
+
+ pendiente
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ¡Pre-orden agregada con éxito!
+ ✓
+
+
+
+
+
+
+
+
+
+
+
+ ✨ Claves del Diseño Structured en la App
+
+
+
+ ¿por qué se ve exactamente como structured?
+
+
+
+ Structured destaca por tres elementos gráficos inconfundibles que fueron trasladados a la escala real de una pantalla móvil (390px):
+
+
+
+
+
+ 🧩
+
+ 1. conectores de rompecabezas vectoriales
+
En lugar de tarjetas sueltas, cada cápsula se encaja con la siguiente mediante juntas de rompecabezas con colores que coinciden exactamente con ambas tarjetas.
+
+
+
+
+
+ 🎨
+
+ 2. paleta pastel de alto contraste
+
Cielo SiboPay (#e0f2fe), Menta (#d1fae5), Melocotón (#ffedd5) y Lavanda con texto legible y oscuro.
+
+
+
+
+
+ 📱
+
+ 3. snap swipe + micro-interacciones
+
El usuario puede deslizar con el dedo en el móvil (touch snap) y cada combo se pre-ordena con un solo toque, sincronizado con el timeline escolar del día.
+
+
+
+
+
+
+
+
+ acciones interactivas para probar ahora
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ⚡
+
+
recarga rápida sinpe móvil
+
Envía tu comprobante al 8888-7777 o digita el monto a abonar a la cuenta de Mateo.
- Registro de Padres o Encargados
- Crea tu cuenta para vincular a tus hijos y recargarles saldo con SINPE móvil.
+ Crear Cuenta
+ Crea tu cuenta para vincularte a los servicios y monedero digital SiboPay.
@@ -145,14 +149,19 @@
+
+
+
+
+
-
-
+
+
@@ -162,14 +171,14 @@
-
+
- Crear Cuenta de Padre y Entrar
+ Crear Cuenta y Entrar
@@ -180,6 +189,67 @@
+
+
+
+
+
+
+
+
+ Restablecer Contraseña
+ Te enviaremos un código de seguridad a tu correo para crear una nueva clave.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ← Volver a Iniciar Sesión
+
+
diff --git a/public/js/app.js b/public/js/app.js
index c68e0bd..ab854f1 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -332,15 +332,29 @@ function closeLoginSheet(e) {
function switchSheetView(view) {
const loginContent = document.getElementById('sheetContentLogin');
const registerContent = document.getElementById('sheetContentRegister');
+ const forgotContent = document.getElementById('sheetContentForgot');
const title = document.getElementById('bottomSheetTitle');
+ if (loginContent) loginContent.style.display = 'none';
+ if (registerContent) registerContent.style.display = 'none';
+ if (forgotContent) forgotContent.style.display = 'none';
+
if (view === 'register') {
- if (loginContent) loginContent.style.display = 'none';
if (registerContent) registerContent.style.display = 'block';
- if (title) title.textContent = 'Registro de Padres';
+ if (title) title.textContent = 'Crear Cuenta';
+ } else if (view === 'forgot') {
+ if (forgotContent) forgotContent.style.display = 'block';
+ if (title) title.textContent = 'Restablecer Contraseña';
+ const step1 = document.getElementById('forgotStep1');
+ const step2 = document.getElementById('forgotStep2');
+ if (step1) step1.style.display = 'block';
+ if (step2) step2.style.display = 'none';
+ const msg1 = document.getElementById('forgotMsgStep1');
+ if (msg1) msg1.style.display = 'none';
+ const msg2 = document.getElementById('forgotMsgStep2');
+ if (msg2) msg2.style.display = 'none';
} else {
if (loginContent) loginContent.style.display = 'block';
- if (registerContent) registerContent.style.display = 'none';
if (title) title.textContent = 'Iniciar Sesión';
}
}
@@ -407,6 +421,8 @@ function selectRegisterRole(role) {
async function handleRegisterPadreSubmit(event) {
if (event) event.preventDefault();
const nombre = document.getElementById('regNombre').value.trim();
+ const fechaNacInput = document.getElementById('regFechaNacimiento');
+ const fecha_nacimiento = fechaNacInput ? fechaNacInput.value.trim() : '';
const telefono = document.getElementById('regTelefono').value.trim();
const emailInput = document.getElementById('regEmail');
const email = emailInput ? emailInput.value.trim() : '';
@@ -416,14 +432,31 @@ async function handleRegisterPadreSubmit(event) {
const btnSubmit = document.getElementById('btnRegisterSubmit');
if (errorMsg) errorMsg.style.display = 'none';
+
+ if (!email) {
+ if (errorMsg) {
+ errorMsg.textContent = 'El correo electrónico es requerido.';
+ errorMsg.style.display = 'block';
+ }
+ return;
+ }
+
+ if (password.length < 6) {
+ if (errorMsg) {
+ errorMsg.textContent = 'La contraseña debe tener al menos 6 caracteres.';
+ errorMsg.style.display = 'block';
+ }
+ return;
+ }
+
btnSubmit.disabled = true;
- btnSubmit.textContent = 'Creando cuenta de padre...';
+ btnSubmit.textContent = 'Creando cuenta...';
try {
const res = await fetch('/api/auth/register-padre', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({ nombre, telefono, email, username, password })
+ body: JSON.stringify({ nombre, fecha_nacimiento, telefono, email, username, password })
});
const data = await res.json();
if (!res.ok) throw new Error(data.error || 'Error al registrar la cuenta');
@@ -440,7 +473,7 @@ async function handleRegisterPadreSubmit(event) {
if (window.sounds) window.sounds.playSuccess();
await showAppAlert({
title: '¡Bienvenido(a) a SiboPay!',
- message: `Hola ${data.user.nombre}, tu cuenta de padre fue creada exitosamente.\n\nYa puedes vincular a tus hijos, asignar límites diarios y realizar recargas por SINPE Móvil de forma segura.`,
+ message: `Hola ${data.user.nombre}, tu cuenta fue creada exitosamente.\n\nYa puedes acceder a todos los servicios y monedero digital SiboPay.`,
type: 'success',
confirmText: 'Entrar a mi Panel'
});
@@ -453,7 +486,140 @@ async function handleRegisterPadreSubmit(event) {
if (window.sounds) window.sounds.playError();
} finally {
btnSubmit.disabled = false;
- btnSubmit.innerHTML = ' Crear Cuenta de Padre y Entrar';
+ btnSubmit.innerHTML = ' Crear Cuenta y Entrar';
+ }
+}
+
+let pendingForgotEmail = '';
+
+async function handleForgotRequestSubmit(event) {
+ if (event) event.preventDefault();
+ const emailInput = document.getElementById('forgotEmail');
+ const email = emailInput ? emailInput.value.trim() : '';
+ const msg = document.getElementById('forgotMsgStep1');
+ const btn = document.getElementById('btnForgotSendCode');
+
+ if (!email) return;
+ if (msg) msg.style.display = 'none';
+ btn.disabled = true;
+ btn.innerHTML = '⏳ Enviando código...';
+
+ try {
+ const res = await fetch('/api/auth/forgot-password', {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json' },
+ body: JSON.stringify({ email })
+ });
+ const data = await res.json();
+ if (!res.ok) throw new Error(data.error || 'No se pudo enviar el código de recuperación.');
+
+ pendingForgotEmail = email;
+ document.getElementById('forgotStep1').style.display = 'none';
+ document.getElementById('forgotStep2').style.display = 'block';
+
+ const msg2 = document.getElementById('forgotMsgStep2');
+ if (msg2) {
+ msg2.textContent = `Código enviado a ${email}. Revisa tu bandeja de entrada o spam e ingrésalo abajo.`;
+ msg2.style.background = '#dcfce7';
+ msg2.style.borderColor = '#86efac';
+ msg2.style.color = '#166534';
+ msg2.style.border = '1px solid #86efac';
+ msg2.style.display = 'block';
+ }
+ const inputCode = document.getElementById('forgotCode');
+ if (inputCode) inputCode.focus();
+ } catch (err) {
+ if (msg) {
+ msg.textContent = err.message;
+ msg.style.background = '#fee2e2';
+ msg.style.borderColor = '#fca5a5';
+ msg.style.color = '#991b1b';
+ msg.style.border = '1px solid #fca5a5';
+ msg.style.display = 'block';
+ }
+ if (window.sounds) window.sounds.playError();
+ } finally {
+ btn.disabled = false;
+ btn.innerHTML = ' Enviar Código al Correo';
+ }
+}
+
+async function handleForgotConfirmSubmit(event) {
+ if (event) event.preventDefault();
+ const email = pendingForgotEmail || (document.getElementById('forgotEmail') ? document.getElementById('forgotEmail').value.trim() : '');
+ const code = document.getElementById('forgotCode') ? document.getElementById('forgotCode').value.trim() : '';
+ const newPass = document.getElementById('forgotNewPass') ? document.getElementById('forgotNewPass').value.trim() : '';
+ const confirmPass = document.getElementById('forgotConfirmPass') ? document.getElementById('forgotConfirmPass').value.trim() : '';
+ const msg = document.getElementById('forgotMsgStep2');
+ const btn = document.getElementById('btnForgotResetPass');
+
+ if (msg) msg.style.display = 'none';
+
+ if (newPass.length < 6) {
+ if (msg) {
+ msg.textContent = 'La nueva contraseña debe tener al menos 6 caracteres.';
+ msg.style.background = '#fee2e2';
+ msg.style.borderColor = '#fca5a5';
+ msg.style.color = '#991b1b';
+ msg.style.border = '1px solid #fca5a5';
+ msg.style.display = 'block';
+ }
+ return;
+ }
+
+ if (newPass !== confirmPass) {
+ if (msg) {
+ msg.textContent = 'Las contraseñas no coinciden. Por favor verifícalas.';
+ msg.style.background = '#fee2e2';
+ msg.style.borderColor = '#fca5a5';
+ msg.style.color = '#991b1b';
+ msg.style.border = '1px solid #fca5a5';
+ msg.style.display = 'block';
+ }
+ return;
+ }
+
+ btn.disabled = true;
+ btn.innerHTML = '⏳ Guardando nueva contraseña...';
+
+ try {
+ const res = await fetch('/api/auth/reset-password', {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json' },
+ body: JSON.stringify({ email, code, new_password: newPass })
+ });
+ const data = await res.json();
+ if (!res.ok) throw new Error(data.error || 'Error al restablecer la contraseña.');
+
+ if (window.sounds) window.sounds.playSuccess();
+ await showAppAlert({
+ title: '¡Contraseña Restablecida!',
+ message: 'Tu contraseña ha sido actualizada exitosamente. Ya puedes iniciar sesión con tu nueva contraseña.',
+ type: 'success',
+ confirmText: 'Iniciar Sesión'
+ });
+
+ switchSheetView('login');
+ const loginUserInput = document.getElementById('loginUsername');
+ if (loginUserInput) loginUserInput.value = email;
+ const loginPassInput = document.getElementById('loginPassword');
+ if (loginPassInput) {
+ loginPassInput.value = '';
+ loginPassInput.focus();
+ }
+ } catch (err) {
+ if (msg) {
+ msg.textContent = err.message;
+ msg.style.background = '#fee2e2';
+ msg.style.borderColor = '#fca5a5';
+ msg.style.color = '#991b1b';
+ msg.style.border = '1px solid #fca5a5';
+ msg.style.display = 'block';
+ }
+ if (window.sounds) window.sounds.playError();
+ } finally {
+ btn.disabled = false;
+ btn.innerHTML = ' Cambiar Contraseña y Entrar';
}
}
diff --git a/public/structured_demo.html b/public/structured_demo.html
new file mode 100644
index 0000000..994eeee
--- /dev/null
+++ b/public/structured_demo.html
@@ -0,0 +1,627 @@
+
+
+
+
+
+ SiboPay — Carrusel Idéntico a Structured.app
+
+
+
+
+
+
+
+
+
+
+
+
+ CARRUSEL DE CÁPSULAS Y CONECTORES DE STRUCTURED.APP
+
+
+
+ el carrusel idéntico de
+ structured con los colores de sibopay
+
+
+
+ Cápsulas gigantes de 646px × 193px con radio de curvatura de 100px, estrellas doradas, conectores visuales tipo rompecabezas y dos filas que se desplazan de forma continua en sentidos opuestos.
+
+ “La recarga por SINPE Móvil entra en 2 segundos y a mi hijo le llega el saldo de inmediato. Cero filas en la soda.”
+
+
+ 💬
+ Reseña WhatsApp de Padres
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ★ ★ ★ ★ ★
+
+
+ “Cuando alguien agenda un servicio en mi página, le llega el WhatsApp con la ruta de Waze al instante. Espectacular.”
+
+
+ 📸
+ Instagram Comment
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ★ ★ ★ ★ ★
+
+
+ “Tengo dos páginas web con el mismo número de WhatsApp enviando recordatorios automáticos sin pagar líneas extra.”
+
+
+ ⭐
+ Google Business Review
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ★ ★ ★ ★ ★
+
+
+ “Los banners de aviso en tiempo real nos salvaron cuando tuvimos que pausar el comedor. Todos los papás lo vieron.”
+
+
+ 🍎
+ App Store Review
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ★ ★ ★ ★ ★
+
+
+ “La recarga por SINPE Móvil entra en 2 segundos y a mi hijo le llega el saldo de inmediato. Cero filas en la soda.”
+
+
+ 💬
+ Reseña WhatsApp de Padres
+
+
+
+
+
+
+
+
+
+
+
+ ★ ★ ★ ★ ★
+
+
+ “Cuando alguien agenda un servicio en mi página, le llega el WhatsApp con la ruta de Waze al instante. Espectacular.”
+
+
+ 📸
+ Instagram Comment
+
+
+
+
+
+
+
+
+
+
+
+ ★ ★ ★ ★ ★
+
+
+ “Tengo dos páginas web con el mismo número de WhatsApp enviando recordatorios automáticos sin pagar líneas extra.”
+
+
+ ⭐
+ Google Business Review
+
+
+
+
+
+
+
+
+
+
+
+ ★ ★ ★ ★ ★
+
+
+ “Los banners de aviso en tiempo real nos salvaron cuando tuvimos que pausar el comedor. Todos los papás lo vieron.”
+
+
+ 🍎
+ App Store Review
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ★ ★ ★ ★ ★
+
+
+ “Poder bloquear alimentos chatarra y alergenos en caja desde mi celular me da una tranquilidad inmensa como mamá.”
+
+
+ 🛡️
+ Comentario Portal Padres
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ★ ★ ★ ★ ★
+
+
+ “Mi peluquería ahora llena la agenda sola. Los clientes reservan a la medianoche y les llega la confirmación por correo y WhatsApp.”
+
+
+ ✂️
+ Testimonio de Comercio
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ★ ★ ★ ★ ★
+
+
+ “El interruptor en caliente para pausar SINPE Móvil nos permitió hacer mantenimiento sin que ningún padre tuviera errores.”
+
+
+ ⚙️
+ Panel de Administración
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ★ ★ ★ ★ ★
+
+
+ “Comprar con carné digital por QR es más rápido que pagar con efectivo. Despachamos 300 estudiantes en 15 minutos.”
+
+
+ 🥪
+ Cajero Soda Escolar
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ★ ★ ★ ★ ★
+
+
+ “Poder bloquear alimentos chatarra y alergenos en caja desde mi celular me da una tranquilidad inmensa como mamá.”
+
+
+ 🛡️
+ Comentario Portal Padres
+
+
+
+
+
+
+
+
+
+
+
+ ★ ★ ★ ★ ★
+
+
+ “Mi peluquería ahora llena la agenda sola. Los clientes reservan a la medianoche y les llega la confirmación por correo y WhatsApp.”
+
+
+ ✂️
+ Testimonio de Comercio
+
+
+
+
+
+
+
+
+
+
+
+ ★ ★ ★ ★ ★
+
+
+ “El interruptor en caliente para pausar SINPE Móvil nos permitió hacer mantenimiento sin que ningún padre tuviera errores.”
+
+
+ ⚙️
+ Panel de Administración
+
+
+
+
+
+
+
+
+
+
+
+ ★ ★ ★ ★ ★
+
+
+ “Comprar con carné digital por QR es más rápido que pagar con efectivo. Despachamos 300 estudiantes en 15 minutos.”
+
+
+ 🥪
+ Cajero Soda Escolar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
explora todas las
+
funcionalidades
+
+
+
+
+
+
+
+
+
+ 💳
+ sinpe móvil
+
+
+
+ pagos instantáneos
+
+
+
+
+
+
+
+ 💬
+ meta api
+
+
+
+ whatsapp automático
+
+
+
+
+
+
+
+ 🗓️
+ turnos 24/7
+
+
+
+ reservas sin llamadas
+
+
+
+
+
+
+
+ 📢
+ difusión
+
+
+
+ avisos en caliente
+
+
+
+
+
+
+
+ 🛡️
+ seguridad
+
+
+
+ control parental
+
+
+
+
+
+
+
+
+
+
+
+
una sola línea de tiempo
+
tu día organizado bloque a bloque
+
+
+
+
+
+
+
+ 💳
+
+
08:00 AM • Pagos
+
Recarga SINPE de ₡10,000 confirmada
+
Comprobante #9412 verificado automáticamente
+
+
+ Completado ✅
+
+
+
+
+
+ ✂️
+
+
11:30 AM • Cita de Servicio
+
Corte & Tratamiento Capilar
+
Recordatorio de WhatsApp enviado al cliente
+
+
+ En 45 min
+
+
+
+
+
+ 🥪
+
+
01:45 PM • Comedor
+
Despacho de Pre-órdenes
+
Alergias validadas: 0 incidentes reportados
+
+
+ Programado ☕
+
+
+
+
+
+
+
+
+
+
+
diff --git a/server/db.js b/server/db.js
index ffa7340..b252536 100644
--- a/server/db.js
+++ b/server/db.js
@@ -216,6 +216,16 @@ function initDatabase() {
db.exec('ALTER TABLE transacciones_saldo ADD COLUMN IF NOT EXISTS revertido_en TIMESTAMP;');
db.exec('ALTER TABLE transacciones_saldo ADD COLUMN IF NOT EXISTS escuela_id INTEGER DEFAULT 1 REFERENCES escuelas(id);');
db.exec('ALTER TABLE usuarios ADD COLUMN IF NOT EXISTS escuela_id INTEGER DEFAULT 1 REFERENCES escuelas(id);');
+ db.exec('ALTER TABLE usuarios ADD COLUMN IF NOT EXISTS fecha_nacimiento VARCHAR(50);');
+ db.exec(`
+ CREATE TABLE IF NOT EXISTS password_resets (
+ id SERIAL PRIMARY KEY,
+ email VARCHAR(150) NOT NULL,
+ code VARCHAR(10) NOT NULL,
+ expires_at TIMESTAMP NOT NULL,
+ creado_en TIMESTAMP DEFAULT CURRENT_TIMESTAMP
+ );
+ `);
db.exec('ALTER TABLE estudiantes ADD COLUMN IF NOT EXISTS escuela_id INTEGER DEFAULT 1 REFERENCES escuelas(id);');
db.exec('ALTER TABLE estudiantes ADD COLUMN IF NOT EXISTS card_theme VARCHAR(50);');
db.exec('ALTER TABLE estudiantes ADD COLUMN IF NOT EXISTS bloqueo_qr_biometrico INTEGER DEFAULT 0;');
@@ -265,6 +275,7 @@ function initDatabase() {
nombre TEXT NOT NULL,
telefono TEXT,
email TEXT,
+ fecha_nacimiento TEXT,
creado_en DATETIME DEFAULT CURRENT_TIMESTAMP
);
@@ -435,8 +446,19 @@ function initDatabase() {
try { db.exec('ALTER TABLE ordenes ADD COLUMN observaciones TEXT'); } catch (e) {}
try { db.exec('ALTER TABLE ordenes ADD COLUMN escuela_id INTEGER DEFAULT 1'); } catch (e) {}
try { db.exec('ALTER TABLE estudiantes ADD COLUMN card_theme TEXT'); } catch (e) {}
- try { db.exec('ALTER TABLE usuarios ADD COLUMN card_theme TEXT'); } catch (e) {}
try { db.exec('ALTER TABLE estudiantes ADD COLUMN bloqueo_qr_biometrico INTEGER DEFAULT 0'); } catch (e) {}
+ try { db.exec('ALTER TABLE usuarios ADD COLUMN fecha_nacimiento TEXT'); } catch (e) {}
+ try {
+ db.exec(`
+ CREATE TABLE IF NOT EXISTS password_resets (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ email TEXT NOT NULL,
+ code TEXT NOT NULL,
+ expires_at DATETIME NOT NULL,
+ creado_en DATETIME DEFAULT CURRENT_TIMESTAMP
+ );
+ `);
+ } catch (e) {}
// 10. Diseños de Tarjetas Virtuales para Estudiantes
try {
diff --git a/server/emailService.js b/server/emailService.js
new file mode 100644
index 0000000..c68306f
--- /dev/null
+++ b/server/emailService.js
@@ -0,0 +1,75 @@
+const nodemailer = require('nodemailer');
+
+/**
+ * Servicio de envío de correos electrónicos transaccionales para SiboPay
+ */
+
+function getTransporter() {
+ const user = process.env.SMTP_USER || process.env.SINPE_EMAIL_USER || 'pampo32@gmail.com';
+ const rawPass = process.env.SMTP_PASSWORD || process.env.SINPE_EMAIL_PASSWORD || 'aeguiflzmskmaswq';
+ const pass = String(rawPass).replace(/\s+/g, '');
+
+ return nodemailer.createTransport({
+ host: process.env.SMTP_HOST || 'smtp.gmail.com',
+ port: parseInt(process.env.SMTP_PORT || '465', 10),
+ secure: (process.env.SMTP_PORT || '465') === '465', // true para 465, false para 587
+ auth: {
+ user: user,
+ pass: pass
+ }
+ });
+}
+
+/**
+ * Envía el código numérico de 6 dígitos para restablecer contraseña
+ */
+async function enviarCodigoRecuperacion(destinatario, codigo, nombreUsuario = 'Usuario') {
+ const transporter = getTransporter();
+ const remitente = process.env.SMTP_FROM || `SiboPay Soporte <${process.env.SMTP_USER || 'pampo32@gmail.com'}>`;
+
+ const mailOptions = {
+ from: remitente,
+ to: destinatario,
+ subject: `🔐 SiboPay - Código para restablecer contraseña: ${codigo}`,
+ text: `Hola ${nombreUsuario},\n\nTu código de verificación para restablecer tu contraseña en SiboPay es: ${codigo}\n\nEste código es válido durante 15 minutos. Si no solicitaste este cambio, puedes ignorar este mensaje.\n\nAtentamente,\nEquipo SiboPay`,
+ html: `
+
+
+
+
+
SiboPay
+
Recuperación Segura de Cuenta
+
+
+
+
Restablecer tu Contraseña
+
+ Hola ${nombreUsuario}, recibimos una solicitud para restablecer la contraseña de tu cuenta. Ingresa el siguiente código de verificación en la aplicación:
+
+
+
+ ${codigo}
+
+
+
+ ⏳ Este código vencerá en 15 minutos.
+ Si no solicitaste este cambio, haz caso omiso a este correo.
+