How m3ayush/study-zen-23 works
Project type and purpose
• This is a full-stack (front-end + BaaS) Single-Page Application built with Vite, TypeScript, React, Tailwind CSS, and shadcn-ui.
• The “backend” is provided by Supabase (PostgreSQL, Auth, Storage) via the src/integrations/supabase client.
Main components
A. Frontend
• Browser / User Interface
• HTML/CSS/JS served by Vite (or static host after build)
• React components (pages under src/pages, UI under src/components/ui)
• Build & Deployment
• Vite build → static assets (index.html, JS bundle, CSS)
• Deployed via Lovable (static hosting + optional custom domain)
B. Backend (Supabase)
• Authentication service
• PostgreSQL database (with migrations under supabase/migrations)
• Storage (if used)
• Supabase REST/WebSocket APIs
Relationships and interactions
• The Browser loads the React SPA from the static host.
• The React SPA initializes the Supabase client (src/integrations/supabase/client.ts).
• User actions (login, CRUD operations) → client calls Supabase Auth & Database endpoints.
• Supabase returns data/responses → React state updates (via hooks and context).
Architectural patterns and design principles
• Separation of concerns: UI layer vs. data layer (BaaS).
• SPA pattern: client-side routing (src/pages + ProtectedRoute).
• Utility / integration layer: src/lib/utils.ts, src/integrations/supabase.
• UI component library: shadcn-ui under src/components/ui.
Summary
• Focus only on the two main systems: Frontend SPA vs. Supabase backend.
• Exclude deep dives into individual components like App.tsx.