How mbwk25/optimum-solutions-group works
Project type and purpose
• This is a single-page application (SPA) built with Vite, React, TypeScript, Tailwind CSS, and shadcn-ui.
• There is no separate backend in this repo—data may be fetched from external APIs or serverless endpoints.
• The purpose is to serve a portfolio/site with various feature sections (About, Contact, IoT Solutions, etc.).
Top-level architectural components
• Developer Workstation/IDE
– Local Git clone, Node.js & npm environment
– Vite development server (hot-reload)
• Source Code
– src/main.tsx (entry point) & index.html (template)
– Feature modules under src/features/*
– Shared components, hooks, utils under src/shared/*
– UI primitives under src/shared/ui (shadcn-ui + custom)
– Static assets under src/assets & public/
• Build System
– Vite bundler (vite.config.ts) produces optimized static assets (JS/CSS)
– Tailwind CSS processor (tailwind.config.ts + postcss.config.mjs)
• Testing
– Jest + ts-jest + React Testing Library + jest-dom
– Test files in __tests__ alongside components, global setup in src/setupTests.ts
• Deployment / Hosting
– Lovable platform: triggers on git push or manual “Publish”
– Deployed as static site on CDN (with optional custom domain)
• Client / Browser
– Loads index.html → bundles → hydrates React SPA
– Interactions handled by React components/hooks
Mapping relationships and data flow
• Developer commits code → Git repo → Lovable CI/CD (or local npm run dev)
→ Vite builds → static assets → CDN/Hosting
• Browser requests index.html → bundles → React renders feature & shared components
• Components call shared hooks/utils for analytics, performance budgeting, SEO, etc.
• Optional external services (e.g., analytics endpoint, contact form API).
Architectural patterns and design principles
• Component-based architecture: features vs. shared
• Feature modularization: one folder per site section
• Shared UI primitives (buttons, cards, dialogs) follow Atomic/Design System pattern
• Hook-based logic extraction (useInput, useToast, usePerformanceMonitor)
• CSS-in-JS separation: Tailwind utility classes + critical CSS prefetch