Sistema de préstamos LabRe UABC — implementación inicial
Sistema web para gestión de préstamos de material del Laboratorio de Sistemas Computacionales de la UABC. - Backend: Supabase self-hosted, schema aislado `prestamos` con RLS, triggers de stock y audit log (supabase/migrations/0001_init.sql). - Auth: Google OAuth restringido a @uabc.edu.mx, verificado en middleware y como segunda línea en trigger de DB. - Frontend: Astro 7 (SSR con adapter Node) + React islands + Tailwind v4 con paleta UABC (primary #00723F, secondary #DD971A) bajo regla 60/30/10. - Interfaz alumno mobile-first: catálogo con filtro por categorías, solicitud de préstamos, historial personal. - Interfaz admin desktop-first: panel con KPIs, bandeja de solicitudes (aprobar/rechazar/devolver), CRUD de inventario y categorías, reportes filtrables con export CSV nativo. - Modales con `<dialog>` nativo, cero librerías de UI adicionales. - Deploy: Dockerfile multi-stage node:22-alpine + docker-compose para publicar bajo prestamos.buglabs.dev vía Cloudflare Tunnel. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
/// <reference path="../.astro/types.d.ts" />
|
||||
|
||||
import type { SupabaseClient, User } from '@supabase/supabase-js';
|
||||
|
||||
export type Profile = {
|
||||
id: string;
|
||||
email: string;
|
||||
nombre: string | null;
|
||||
matricula: string | null;
|
||||
rol: 'alumno' | 'admin';
|
||||
};
|
||||
|
||||
declare global {
|
||||
namespace App {
|
||||
interface Locals {
|
||||
supabase: SupabaseClient;
|
||||
user: User | null;
|
||||
profile: Profile | null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly PUBLIC_SUPABASE_URL: string;
|
||||
readonly PUBLIC_SUPABASE_ANON_KEY: string;
|
||||
readonly SUPABASE_SERVICE_ROLE_KEY: string;
|
||||
readonly PUBLIC_APP_URL: string;
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv;
|
||||
}
|
||||
Reference in New Issue
Block a user