How fantasma369to/pos-ventas-30-04-2025 works
Main high-level components
• Developer environment
– Vite dev server & build pipeline
– ESLint/Babel or SWC for Fast Refresh
• Frontend Application (React SPA)
– Atomic/Molecular/Organism/Template components
– Pages & Router (TanStack/React Router)
– State management (stores in /src/store)
– Context & hooks (/src/context, /src/hooks)
– Utilities & assets (/src/utils, /src/assets)
– Supabase client modules (/src/supabase/*.jsx)
• Cloud Services
– Firebase Hosting (serves built files)
– Supabase (Auth, Postgres DB, Realtime subscriptions, Storage)
Relationships & data‐flow
• Developer → (runs) Vite Dev Server → Browser (localhost)
• Developer → (runs) Vite build → (outputs) static files → Firebase Hosting → Browser (production)
• Browser (React SPA) ↔ Supabase SDK modules → Supabase Cloud
– Auth flows via supabase.auth.*
– CRUD operations via supabase.from(...).select/insert/...
– Realtime subscriptions via useSupabaseSubscription hook
Architectural patterns & design principles
• Atomic Design for UI components (atoms, molecules, organisms, templates)
• Separation of concerns:
– UI layer (components)
– Routing layer (/src/routers)
– State layer (/src/store)
– Data layer (/src/supabase)
– Utilities layer (/src/utils)
• Hooks & Context for cross-cutting concerns (auth, layout, protected routes)
• BaaS integration—no custom backend servers
Technologies/Frameworks to annotate
• React 18 + Vite
• @vitejs/plugin-react or plugin-react-swc
• Firebase CLI & firebase.json for hosting
• Supabase JS SDK & Postgres
• TanStack Router (React Router)
• Zustand-style or custom stores in /src/store
• ESLint, Babel/SWC
Don’t over-complicate—capture all layers
• Top-level directory (components, pages, store, supabase, routers) is represented
• How UI → State → Data → BaaS link together