How ghulamrasool154/trading-nations works
Project type and purpose
• This is a Next.js web application (bootstrapped with create-next-app) focused on a marketing/ informational site (“trading-nations”) with multi-language support (via the app router’s [lang] parameter).
• Key features: server-rendered and statically generated pages, TailwindCSS styling, a localized routing structure, static assets (images, videos), reusable React components, and client-side hooks (theme switching).
File structure
• Top-level config:
• next.config.mjs, jsconfig.json, postcss.config.js/mjs, tailwind.config.js, package.json/lock
• Public folder:
• public/assets (gics, logos, map, social), public/videos → static assets served by Next.js/ CDN
• Source code in src/:
• app/ – Next.js App Router: dynamic [lang] subfolder, nested route groups for services, pages (about, contact, etc.), global layout, loading/404
• components/ – isolated UI components (headings, chatbox, nav, hero, cards, UI/button variants)
• layout/ – global header, footer, theme mode management
• hooks/ – custom hook for theme switching
• localization/ – i18n config, dictionary loader, language JSON files
• screen/ – per-page wrappers (home, about-us, services/quantum-resilient, etc.)
• seo/ – meta-data utilities
• utils/ – fonts loader
README for additional insights
• No backend/API routes; purely Next.js pages with optional SSR/SSG.
• Deployment is likely on Vercel, leveraging Next.js features (image optimization, built-in routing, file-based page generation).
Elements
• Client → Next.js Runtime (routing requests)
• Next.js Runtime → Localization JSONs
• Next.js Runtime → Component Library
• Next.js Runtime → CDN (static requests)
• Next.js Runtime → External APIs
• CDN → Client (asset delivery)
• Blue for runtime services (Next.js Server, CDN)
• Green for code modules (Component Library, Hooks, Localization)
• Orange for external dependencies (Google Fonts, analytics)
• Gray for client