How namsrkt/refonte-afo works
This is a small Next.js landing page with French/English localization. The primary user-facing path is a locale-specific home page rendered with a shared navigation bar and hero section; users can switch locales while retaining the current path. Localization is implemented through shared routing configuration, navigation helpers, middleware, and request-time message loading. The excerpts show these direct relationships, but do not establish a runtime call from the request configuration to the app layout, so that link is omitted.
Main entry points: routing.ts Locale routing · navbar.tsx Navigation bar · locale-switcher.tsx Locale switcher · navigation.ts Localized navigation
Components 11
Landing page
- Locale layout
src/app/[locale]/layout.tsx - Home page
src/app/[locale]/page.tsx - Hero section
src/features/home/heroSection/hero-section.tsx
Shared shell
- Navigation bar
src/components/common/navbar.tsx - Locale switcher
src/components/common/locale-switcher.tsx
Localization
- Locale middleware
src/proxy.ts - Localized navigation
src/i18n/navigation.ts - Locale routing
src/i18n/routing.ts - Message loading
src/i18n/request.ts - Translation catalogs
messages
Other components
- Site visitor
Connections 11
- Locale layout → Navigation bar: renders
src/app/[locale]/layout.tsx - Locale layout → Locale routing: validates locale
src/app/[locale]/layout.tsx - Home page → Hero section: renders
src/app/[locale]/page.tsx - Navigation bar → Locale switcher: renders
src/components/common/navbar.tsx - Navigation bar → Localized navigation: links through
src/components/common/navbar.tsx - Locale switcher → Localized navigation: changes path
src/components/common/locale-switcher.tsx - Locale switcher → Locale routing: lists locales
src/components/common/locale-switcher.tsx - Localized navigation → Locale routing: configures
src/i18n/navigation.ts - Locale middleware → Locale routing: uses configuration
src/proxy.ts - Message loading → Locale routing: validates locale
src/i18n/request.ts - Message loading → Translation catalogs: loads messages
src/i18n/request.ts