How brajeshkumar87096/gurukul-maths-classes-hub works
Project type and purpose
• This is a front-end SPA (single-page application) scaffolded with Vite and TypeScript, using React and Tailwind CSS (via shadcn-ui).
• There is no custom back-end code here; API calls (e.g., auth, data fetching) would go to external services (not shown in this repo).
Main components
a. Developer Environment
• IDE / GitHub / Codespaces
• Node.js & npm/Yarn
• Vite Dev Server
b. Source Code Modules
• Pages layer (src/pages)
• Feature components (src/components/home, src/components/auth, src/components/layout, src/components/shared)
• UI primitives library (src/components/ui)
• Hooks (src/hooks) and Utilities (src/lib)
• Static assets (public/ and standalone/)
c. Build & Deployment
• Vite bundler → dist/
• Tailwind CSS processing (tailwind.config.ts)
• Deployment via Lovable platform (publishes to CDN)
d. Runtime Environment
• Browser executing the static bundle
• Optional: external APIs (authentication, data services)
Relationships & Interactions
• Developer pushes code to GitHub → Lovable detects push → runs build (npm run build) → deploys bundled static assets to CDN.
• In development: IDE → npm run dev → Vite serves code on localhost → browser hot-reloads.
• At runtime: Browser requests index.html from CDN → loads JS/CSS bundles → React Router loads pages → components render → hooks/utilities handle UI logic → (when needed) API calls go to external endpoints.
Architectural patterns & design principles
• Component-based decomposition:
• “UI primitives” (buttons, inputs, dialogs) are abstracted under src/components/ui.
• “Feature modules” (Auth, Home, Shared, Layout) assemble primitives into pages.
• Separation of concerns between routing (src/main.tsx → React Router), styling (Tailwind + PostCSS), and business logic (hooks + lib/utils).
• Code-split pages automatically via Vite/Rollup for optimized bundle sizes.