A modern React + Vite country explorer web app with smooth animations, routing, filtering, and detailed country pages powered by the REST Countries API.
- Browse countries with a responsive card-based UI.
- Search countries by name with 500ms debounced input.
- Filter countries by region.
- Open detailed country pages with extra metadata:
- native names
- region
- languages
- currency
- population
- capital
- Lazy-loaded routes with Suspense fallback loader.
- Animated UI using GSAP (
@gsap/react,ScrollTrigger). - Scroll-to-top support on route/page navigation.
- Theme and sidebar controls managed with app-level logic hooks.
- React 19
- Vite 6
- React Router DOM 7
- GSAP +
@gsap/react - React Icons
- ESLint
npm installnpm run devnpm run buildnpm run previewnpm run dev- Start Vite dev servernpm run build- Build optimized production outputnpm run preview- Preview the production build locallynpm run lint- Run ESLint checks
This project fetches country data from:
https://restcountries.com/v3.1/all?fields=name,population,region,capital,flagshttps://restcountries.com/v3.1/name/{countryName}
- A Netlify-style redirect file exists at
public/_redirectsfor SPA routing support during deployment. - If API requests fail, users are redirected to the error page.