A modern single-page application built with React and Vite. It showcases product information, services, teams, and contact sections with smooth navigation and a polished UI.
- React 19
- Vite 7
- React Router 7
- Tailwind (utility layers integrated via
@tailwind components; @tailwind utilities;
) - ESLint 9
- Node.js
>= 20.19
or>= 22.12
(required by Vite)
- Install dependencies:
npm install
- Run the development server:
npm run dev
- The app runs on
http://localhost:5173/
(or the next free port).
- Build for production:
npm run build
- Preview the production build locally:
npm run preview
src/App.jsx
— App entry, Router setup, layout shellssrc/pages/
— Route-level pages (Home
,About
,Contact
)src/components/
— UI components (Navbar, Footer, Teams, Services, ContactSection)src/index.css
— Global styles, utility layers, scrollbar and selection stylespublic/
— Static assets (logos, SVGs)
- The
Navbar
provides links to Home (/
), About (/about
), and section buttons that smooth-scroll to in-page sections (services
,teams
,contact
). - Clicking the Home button or logo on the homepage scrolls smoothly to the top.
These changes were implemented to improve load time, responsiveness, and runtime efficiency:
- Route code-splitting:
About
andContact
are loaded withReact.lazy
and wrapped in<Suspense>
, reducing the initial bundle and speeding up first paint.
- Efficient scroll handling:
- The navbar scroll listener is throttled via
requestAnimationFrame
and uses passive event listeners to decrease main-thread work.
- The navbar scroll listener is throttled via
- Image performance:
- Team member images are marked with
loading="lazy"
anddecoding="async"
and given explicit dimensions to avoid layout shift and lower network priority.
- Team member images are marked with
- Avoiding unnecessary re-renders:
Navbar
,Footer
, andTeams
components are exported asReact.memo
to skip re-rendering when props don’t change.
- All interactive elements have accessible labels and states.
- Focus styles are preserved in key components (e.g., navigation, team cards).
- Run
npm run build
to generate the optimized production bundle. - Host the
dist/
folder on any static hosting (Netlify, Vercel, GitHub Pages, Nginx, etc.).
- If you see a Vite warning about Node version, upgrade Node to
20.19+
or22.12+
. - If
ERR_CONNECTION_REFUSED
occurs, ensure the dev server is running and use the URL printed in the terminal (port may differ if 5173 is occupied).
dev
— start Vite development serverbuild
— build for productionpreview
— preview the production build locallylint
— run ESLint rules