How japser34/celeracing works
Project type and purpose
• This is a Next.js (React + TypeScript) web application using the new “app/” directory.
• It delivers a static or server-rendered marketing site (“Celeracing”) with pages (About, Blog, Contact, Home), shared components, static data, and public assets.
File structure
• Top-level files
• next.config.ts, tsconfig.json, postcss.config.mjs, eslint.config.mjs – build, lint and framework configs
• package.json / package-lock.json – dependencies and scripts
• public/ – static assets served directly (images of team, vehicles, etc.)
• src/app/ – Next.js routes and layouts
• page.tsx files for each route
• layout.tsx – global layout wrapper
• hooks/useScrollDirection.tsx – custom client hook
• src/components/ – reusable UI components (Header, Footer, Card variants)
• src/data/ – in-memory JSON-like TypeScript modules (partners, team, vehicles)
• src/styles/ – global and component-scoped CSS
Additional insights from README
• The README gives only the project name (“Celeracing”) and no further architectural notes.
a. Main components to include
• Client Browser
• CDN / Static-asset layer (public/)
• Next.js Server (or Vercel/Netlify host)
• Application Core
• Routing layer (src/app)
• Layout & Pages
• Client hook (useScrollDirection)
• Component Library (src/components)
• Data Layer (src/data modules)
• Stylesheet processor (Tailwind/PostCSS or CSS pipelines)
• Build System (Next.js webpack bundler)
b. Relationships & interactions
• Browser → fetches HTML/CSS/JS from CDN or server
• Next.js Server → uses routing and page components to render HTML
• Page components → import Data modules + UI Components + CSS
• Components → reference public assets as needed (e.g., images)
• Styles → PostCSS transforms CSS, loaded into pages
• Hook → runs in browser to detect scroll direction and passes props to components
c. Architectural patterns & design principles
• File‐based routing (Next.js “app/” directory)
• Component–driven UI composition
• Data‐at‐build (no external API calls: data.ts modules)
• Static Site Generation (SSG) or hybrid SSR
d. Key technologies & libraries
• Next.js framework
• React + TypeScript
• PostCSS (and Tailwind if used)
• ESLint for linting
• Public folder for static asset delivery