How gutix-site/arregla-tu-espacio-ahora works
Project type and purpose
• This is a full-stack, single-page application (SPA) built with React/TypeScript (via Vite) that serves as a customizable storefront/appointment system.
• It fetches and syncs data (products, categories, appointments, orders, theme config) from Supabase (PostgreSQL + Realtime).
File structure
• Top-level:
• public/index.html + static assets → entry point for the SPA
• src/ → all client-side code
• supabase/ → DB configuration and migrations
• tests/ → unit tests for utils and services
• config files: Vite, TS, ESLint, Tailwind
• Within src:
• api/supabase → thin wrapper around @supabase/supabase-js client
• components/ → React UI, subdivided into domain (BannerSlider, Cart, etc.), pages, admin panels, and a shared shadcn-ui “ui” library
• contexts → global state (cart, theme, business id)
• hooks → reusable data hooks (supabase queries, local storage, real-time updates)
• services → side-effects (realtime notifications)
• config → environment injection, theme application
• utils/lib → helper functions and logging
• data/schemas/types → fallback data and runtime validation
README for additional insights
• Core frameworks: Vite, React, TypeScript, Tailwind, shadcn-ui
• Deployment tightly integrated with Lovable (static hosting + CI/CD)
• Supabase credentials via .env; migrations in supabase/migrations
• Dynamic theming from a tema_config table, with CSS variables updated at runtime
Elements
• Labels for each component (e.g., “UI: ProductList”, “Hook: useSupabaseProducts”)
• HTTP(S) requests/responses
• WebSocket subscriptions → event pushes
• Context updates → UI re-render
• GREY cloud for static hosting/CDN