How devlm/cloud_campus_countries_search works
Countries Search is a client-side country discovery app. Users start at the home page, search or browse REST Countries results, refine by region and country code, open a country’s details, and save or remove favorites; the dashboard provides a separate favorites view. TanStack Router connects the application entry point to these route screens. The search and detail request flows are visible in excerpts; the dashboard implementation was not excerpted, so its favorites relationship is based on the SOURCE INDEX. Other unsampled internals are not inferred.
Main entry points: search.tsx Search and filters · routeTree.gen.ts Route tree · country.$code.tsx Country details · favorites.ts Favorites state
Components 14
App and navigation
- App entry
src/main.tsx - Router config
src/router.tsx - Route tree
src/routeTree.gen.ts - Home page
src/routes/index.tsx - Root route
src/routes/__root.tsx
Country discovery
- Search and filters
src/routes/search.tsx - Region selector
src/components/ui/select.tsx - REST Countries API
Country information
- Country data model
src/types/country.ts - Country details
src/routes/country.$code.tsx
Favorites
- Favorites dashboard
src/routes/dashboard.tsx - Favorites state
src/store/favorites.ts - Browser local storage
Other components
- Visitor
Connections 19
- Visitor → App entry: opens app
- App entry → Router config: renders router
src/main.tsx - Router config → Route tree: uses route tree
src/router.tsx - Route tree → Root route: registers root
src/routeTree.gen.ts - Route tree → Home page: registers route
src/routeTree.gen.ts - Route tree → Search and filters: registers route
src/routeTree.gen.ts - Route tree → Country details: registers route
src/routeTree.gen.ts - Route tree → Favorites dashboard: registers route
src/routeTree.gen.ts - Home page → Search and filters: links to
src/routes/index.tsx - Search and filters → REST Countries API: fetches countries
src/routes/search.tsx - Search and filters → Region selector: renders selector
src/routes/search.tsx - Search and filters → Country data model: uses country type
src/routes/search.tsx - Search and filters → Country details: links to details
src/routes/search.tsx - Search and filters → Favorites state: updates favorites
src/routes/search.tsx - Country details → REST Countries API: fetches country
src/routes/country.$code.tsx - Country details → Country data model: uses country type
src/routes/country.$code.tsx - Country details → Favorites state: updates favorites
src/routes/country.$code.tsx - Favorites dashboard → Favorites state: reads favorites
src/routes/dashboard.tsx - Favorites state → Browser local storage: reads and writes
src/store/favorites.ts