How mj0077/bmw-home works
1. This repository is a Next.js App Router project that renders a mostly static, visually rich landing page. The top-level application entrypoints are src/app/layout.tsx and src/app/page.tsx, with global styling in src/app/globals.css.
2. The architecture is component-driven: the page is assembled from a small set of focused UI sections under src/components/. Each component appears to represent one visible region of the marketing site rather than a shared business domain.
3. The main page content is split into recognizable layout blocks: Navbar, HeroVideo or HeroCanvas, BrandPillars, HighlightCards, ModelLineup, Footer, plus an alternative SpotlightCanvas. This suggests the page is composed from sequential visual sections with strong hero/feature/collection storytelling.
4. The interaction layer is lightweight and likely client-side only where needed. Components such as NavigationDrawer, HeroCanvas, HeroVideo, and SpotlightCanvas imply responsive navigation and animated/interactive media presentation rather than data-heavy state management or backend orchestration.
5. Media is a core subsystem. The public/ tree contains large binary assets such as public/bmw.mp4, image folders, and sequence folders (public/sequence1, public/sequence2). These assets are served directly by Next.js and are likely consumed by the hero and canvas-driven sections.
6. Frame-sequence rendering is explicitly supported by src/components/hooks/useFrameSequence.ts, with additional frame assets in frames/video1 and frames/video2. That indicates a pipeline where image sequences are used for scroll/canvas animation or video-like playback in the UI.
7. There is a small build-time asset conversion utility in scripts/convert-images.mjs. This suggests the repo includes a preprocessing step for preparing image assets, likely to generate optimized sequence frames or standardized media inputs for the front-end components.
8. Type boundaries are minimal but present. src/types/index.ts centralizes shared TypeScript types, which likely keeps the component props and media-related structures consistent across the UI sections.
9. The project uses standard Next.js and PostCSS tooling, with TypeScript configuration in tsconfig.json and linting via eslint.config.mjs. This points to a conventional front-end build pipeline rather than custom server infrastructure.
10. There does not appear to be a separate API layer, database, or external service integration in the repository tree. The architecture is primarily presentation plus static asset delivery, with all runtime behavior happening in the browser and via Next.js page rendering.
11. For an architecture diagram, the most important boundary is between the App Router page shell and the media-backed feature components. The data flow is: static assets in public/ and frames/ feed the canvas/video components, which are composed into the main page by src/app/page.tsx.
12. In short, this is a media-centric Next.js marketing site with a modular section layout, a small amount of client-side animation logic, and a supporting asset-preparation script rather than a traditional multi-layer application backend.
Main entry points: page.tsx Home Page · index.ts Shared Types · convert-images.mjs Image Converter · HeroCanvas.tsx Hero Canvas
Components 22
App Shell
Next.js App Router entrypoints and global styling
- Layout · Root document shell and global providers
src/app/layout.tsx - Home Page · Assembles the landing page sections
src/app/page.tsx - Global CSS · App-wide visual baseline and theme rules
src/app/globals.css
UI Sections
Composable landing-page regions
- Navbar · Top navigation for the landing page
src/components/Navbar.tsx - Drawer · Responsive navigation drawer for smaller screens
src/components/NavigationDrawer.tsx - Hero Canvas · Canvas-driven hero presentation and animation
src/components/HeroCanvas.tsx - Hero Video · Video-backed hero presentation
src/components/HeroVideo.tsx - Spotlight Canvas · Secondary canvas-based spotlight section
src/components/SpotlightCanvas.tsx - Brand Pillars · Feature/value proposition section
src/components/BrandPillars.tsx - Highlight Cards · Promotional highlight grid or cards
src/components/HighlightCards.tsx - Model Lineup · Collection-style model showcase
src/components/ModelLineup.tsx - Footer · Page footer and closing links
src/components/Footer.tsx
Media Assets
Static images, video, and frame sequences served by Next.js
- BMW Video · Primary video asset served from public
public/bmw.mp4 - Brand Images · Brand-related image assets
public/images/brand - Model Images · Model-related image assets
public/images/models - Sequence 1 · Animated frame assets served from public
public/sequence1 - Sequence 2 · Animated frame assets served from public
public/sequence2 - Video Frames 1 · Precomputed frame assets for sequence playback
frames/video1 - Video Frames 2 · Precomputed frame assets for sequence playback
frames/video2
Tooling
Build-time asset processing and shared types
- Frame Hook · Frame-sequence loading and playback logic
src/components/hooks/useFrameSequence.ts - Shared Types · Common interfaces used across components
src/types/index.ts - Image Converter · Build-time image processing utility
scripts/convert-images.mjs
Connections 26
- Layout → Home Page: renders · Root layout wraps the home page
- Layout → Global CSS: loads · Global styling is applied from the app shell
- Home Page → Navbar: composes · Home page includes the navigation bar
- Home Page → Hero Canvas: composes · Home page can render the canvas hero
- Home Page → Hero Video: composes · Home page can render the video hero
- Home Page → Brand Pillars: composes · Home page includes the brand pillars section
- Home Page → Highlight Cards: composes · Home page includes highlight cards
- Home Page → Model Lineup: composes · Home page includes the model lineup section
- Home Page → Spotlight Canvas: composes · Home page includes the spotlight canvas section
- Home Page → Footer: composes · Home page closes with the footer
- Navbar → Drawer: uses · Navigation bar delegates responsive behavior to the drawer
- Hero Canvas → Frame Hook: uses · Canvas hero consumes frame-sequence playback logic
- Spotlight Canvas → Frame Hook: uses · Spotlight canvas also relies on frame sequencing
- Hero Video → BMW Video: plays · Video hero uses the BMW video asset
- Hero Canvas → Sequence 1: renders · Canvas hero can draw from public frame sequences
- Spotlight Canvas → Sequence 2: renders · Spotlight canvas can draw from a second public sequence
- Frame Hook → Video Frames 1: loads · Hook consumes frame assets from the prepared frame folders
- Frame Hook → Video Frames 2: loads · Hook consumes the second frame set
- Image Converter → Brand Images: processes · Asset script prepares image inputs
- Image Converter → Model Images: processes · Asset script prepares model imagery
- Image Converter → Video Frames 1: outputs · Script may generate or standardize frame sequences
- Image Converter → Video Frames 2: outputs · Script may generate or standardize frame sequences
- Shared Types → Navbar: supports · Shared types keep component props aligned
- Shared Types → Hero Canvas: supports · Shared types keep media-related props aligned
- Shared Types → Hero Video: supports · Shared types keep media-related props aligned
- Shared Types → Spotlight Canvas: supports · Shared types keep media-related props aligned