# vijay29705/cinematic-template architecture

> Architecture diagram of the GitHub repository vijay29705/cinematic-template, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vijay29705/cinematic-template
- Repository: https://github.com/vijay29705/cinematic-template

## Overview

#### Purpose and Runtime
A Vite-built React/TypeScript single-page portfolio site, likely for a film/creative studio. It renders a marketing home page plus project-specific case-study views, with motion-heavy presentation, media playback, and custom scrolling. Browser runtime starts from `src/main.tsx` and mounts `src/App.tsx`; Vite is configured in `vite.config.ts`.

#### Application Composition
`src/App.tsx` is the top-level composition and route-selection boundary. It coordinates the primary page views:
- Home page: `src/pages/Home.tsx`
- Case-study page: `src/pages/CaseStudyPage.tsx`

There is no visible dedicated router directory or server/API layer, so navigation is likely handled by application state, URL inspection, or anchor-based behavior inside the app.

#### Content Model
Content is separated from presentation in static TypeScript data modules:
- Project/case-study records: `src/data/projects.ts`
- Shared studio/site content: `src/data/site.ts`

`CaseStudyPage.tsx` likely resolves a selected project from `projects.ts`; home sections consume site and project data to build featured work, brands, testimonials, and contact material. This is a static-content boundary: changing content should generally not require changing layout components.

#### Home-Page Section Pipeline
`src/pages/Home.tsx` assembles the vertically ordered landing experience from independent section modules. Architecturally central stages include:
- Opening identity and primary CTA: `src/sections/Hero.tsx`
- Work discovery: `src/sections/FeaturedFilms.tsx`, `src/sections/CaseStudies.tsx`
- Reel/video-focused experience: `src/sections/FilmReel.tsx`
- Studio credibility and service messaging: `src/sections/About.tsx`, `src/sections/Services.tsx`
- Social proof and closing conversion: `src/sections/Testimonials.tsx`, `src/sections/Contact.tsx`
- Persistent site closeout: `src/sections/Footer.tsx`

Additional visual-content blocks such as `src/sections/Gallery.tsx`, `src/sections/Brands.tsx`, and `src/sections/Stats.tsx` fit into this compositional pipeline.

#### Shared Interaction and Motion Layer
Reusable components provide the site’s visual interaction primitives:
- Persistent navigation and conversion affordance: `src/components/Navbar.tsx`, `src/components/StickyCta.tsx`
- Video/media abstraction: `src/components/FilmPlayer.tsx`
- Scroll and visual effects: `src/components/SmoothScroll.tsx`, `src/components/ParallaxImage.tsx`, `src/components/FadeIn.tsx`
- Text/cursor treatment: `src/components/RevealText.tsx`, `src/components/CustomCursor.tsx`

The motion boundary is centralized in `src/lib/motion.ts`; smooth-scroll integration is isolated in `src/lib/lenis.ts`. This keeps animation/scroll implementation details out of section-level content composition.

#### Styling and Assets
Global styling is rooted in `src/index.css`, while components own their rendered structure and likely rely on shared global classes rather than per-component stylesheet files. Static media is served directly from `public/media`, making it the main local asset boundary for film imagery/video and other public-facing visuals. The document shell is `index.html`.

#### External Dependencies and Constraints
The runtime depends on React, TypeScript, and Vite as indicated by `package.json`, with likely animation, smooth-scroll, and media-player packages reflected by `src/lib/motion.ts`, `src/lib/lenis.ts`, and `src/types/react-player.d.ts`. The declaration file indicates an external React video-player dependency is used through `FilmPlayer.tsx`. No backend, database, authentication, or deployment infrastructure is represented in the supplied tree.

Main entry points: [`src/pages/Home.tsx`](https://github.com/vijay29705/cinematic-template/blob/master/src/pages/Home.tsx) (Home page), [`src/App.tsx`](https://github.com/vijay29705/cinematic-template/blob/master/src/App.tsx) (App route boundary), [`src/main.tsx`](https://github.com/vijay29705/cinematic-template/blob/master/src/main.tsx) (React mount), [`index.html`](https://github.com/vijay29705/cinematic-template/blob/master/index.html) (Document shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Browser Runtime"]
  node_vite{{"Vite build<br/>build tool<br/>[vite.config.ts]"}}
  node_document["Document shell<br/>HTML entry<br/>[index.html]"]
  node_main["React mount<br/>browser entry<br/>[main.tsx]"]
end

subgraph group_pages["Page Composition"]
  node_app["App route boundary<br/>application shell<br/>[App.tsx]"]
  node_homepage["Home page<br/>page composition<br/>[Home.tsx]"]
  node_casepage["Case-study page<br/>page view<br/>[CaseStudyPage.tsx]"]
end

subgraph group_home["Home Sections"]
  node_hero["Hero<br/>landing section<br/>[Hero.tsx]"]
  node_work["Work discovery<br/>landing sections"]
  node_reel["Film reel<br/>landing section<br/>[FilmReel.tsx]"]
  node_studio["Studio messaging<br/>landing sections"]
  node_conversion["Social proof &amp; contact<br/>landing sections"]
end

subgraph group_shared["Shared Experience Layer"]
  node_navigation["Navigation &amp; sticky CTA<br/>shared components"]
  node_media["Film player<br/>media component<br/>[FilmPlayer.tsx]"]
  node_motion["Motion primitives<br/>interaction components"]
  node_motionlib["Motion configuration<br/>animation boundary<br/>[motion.ts]"]
  node_lenis["Smooth-scroll integration<br/>scroll boundary<br/>[lenis.ts]"]
end

subgraph group_content["Content &amp; Assets"]
  node_projects["Project records<br/>static content<br/>[projects.ts]"]
  node_sitecontent["Site content<br/>static content<br/>[site.ts]"]
  node_styles["Global styles<br/>stylesheet<br/>[index.css]"]
  node_assets[("Public media<br/>static assets")]
end

node_vite -->|"builds"| node_document
node_document -->|"loads"| node_main
node_main -->|"mounts"| node_app
node_app -->|"home view"| node_homepage
node_app -->|"case-study view"| node_casepage
node_homepage -->|"composes"| node_hero
node_homepage -->|"composes"| node_work
node_homepage -->|"composes"| node_reel
node_homepage -->|"composes"| node_studio
node_homepage -->|"composes"| node_conversion
node_work -->|"reads"| node_projects
node_casepage -->|"resolves"| node_projects
node_homepage -->|"reads"| node_sitecontent
node_app -->|"uses"| node_navigation
node_homepage -->|"embeds"| node_media
node_media -->|"plays"| node_assets
node_homepage -->|"animates with"| node_motion
node_motion -->|"uses"| node_motionlib
node_motion -->|"integrates"| node_lenis
node_main -->|"loads"| node_styles

click node_vite "https://github.com/vijay29705/cinematic-template/blob/master/vite.config.ts"
click node_document "https://github.com/vijay29705/cinematic-template/blob/master/index.html"
click node_main "https://github.com/vijay29705/cinematic-template/blob/master/src/main.tsx"
click node_app "https://github.com/vijay29705/cinematic-template/blob/master/src/App.tsx"
click node_homepage "https://github.com/vijay29705/cinematic-template/blob/master/src/pages/Home.tsx"
click node_casepage "https://github.com/vijay29705/cinematic-template/blob/master/src/pages/CaseStudyPage.tsx"
click node_hero "https://github.com/vijay29705/cinematic-template/blob/master/src/sections/Hero.tsx"
click node_reel "https://github.com/vijay29705/cinematic-template/blob/master/src/sections/FilmReel.tsx"
click node_media "https://github.com/vijay29705/cinematic-template/blob/master/src/components/FilmPlayer.tsx"
click node_motionlib "https://github.com/vijay29705/cinematic-template/blob/master/src/lib/motion.ts"
click node_lenis "https://github.com/vijay29705/cinematic-template/blob/master/src/lib/lenis.ts"
click node_projects "https://github.com/vijay29705/cinematic-template/blob/master/src/data/projects.ts"
click node_sitecontent "https://github.com/vijay29705/cinematic-template/blob/master/src/data/site.ts"
click node_styles "https://github.com/vijay29705/cinematic-template/blob/master/src/index.css"
click node_assets "https://github.com/vijay29705/cinematic-template/tree/master/public/media"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_vite,node_document,node_main toneBlue
class node_app,node_homepage,node_casepage toneAmber
class node_hero,node_work,node_reel,node_studio,node_conversion toneMint
class node_navigation,node_media,node_motion,node_motionlib,node_lenis toneRose
class node_projects,node_sitecontent,node_styles,node_assets toneIndigo
```

## Components

### Browser Runtime

- [Vite build](https://github.com/vijay29705/cinematic-template/blob/master/vite.config.ts): build tool · `vite.config.ts`
- [Document shell](https://github.com/vijay29705/cinematic-template/blob/master/index.html): HTML entry · `index.html`
- [React mount](https://github.com/vijay29705/cinematic-template/blob/master/src/main.tsx): browser entry · `src/main.tsx`

### Page Composition

- [App route boundary](https://github.com/vijay29705/cinematic-template/blob/master/src/App.tsx): application shell · Selects home or case-study view. · `src/App.tsx`
- [Home page](https://github.com/vijay29705/cinematic-template/blob/master/src/pages/Home.tsx): page composition · Composes the vertical marketing experience. · `src/pages/Home.tsx`
- [Case-study page](https://github.com/vijay29705/cinematic-template/blob/master/src/pages/CaseStudyPage.tsx): page view · Resolves and presents a selected project. · `src/pages/CaseStudyPage.tsx`

### Home Sections

- [Hero](https://github.com/vijay29705/cinematic-template/blob/master/src/sections/Hero.tsx): landing section · `src/sections/Hero.tsx`
- **Work discovery**: landing sections · Featured films and case studies.
- [Film reel](https://github.com/vijay29705/cinematic-template/blob/master/src/sections/FilmReel.tsx): landing section · `src/sections/FilmReel.tsx`
- **Studio messaging**: landing sections · About and services content.
- **Social proof & contact**: landing sections · Testimonials, contact, and footer closeout.

### Shared Experience Layer

- **Navigation & sticky CTA**: shared components
- [Film player](https://github.com/vijay29705/cinematic-template/blob/master/src/components/FilmPlayer.tsx): media component · Wraps the external React video-player dependency. · `src/components/FilmPlayer.tsx`
- **Motion primitives**: interaction components · Scroll, parallax, fade, reveal, and cursor treatments.
- [Motion configuration](https://github.com/vijay29705/cinematic-template/blob/master/src/lib/motion.ts): animation boundary · `src/lib/motion.ts`
- [Smooth-scroll integration](https://github.com/vijay29705/cinematic-template/blob/master/src/lib/lenis.ts): scroll boundary · `src/lib/lenis.ts`

### Content & Assets

- [Project records](https://github.com/vijay29705/cinematic-template/blob/master/src/data/projects.ts): static content · `src/data/projects.ts`
- [Site content](https://github.com/vijay29705/cinematic-template/blob/master/src/data/site.ts): static content · `src/data/site.ts`
- [Global styles](https://github.com/vijay29705/cinematic-template/blob/master/src/index.css): stylesheet · `src/index.css`
- [Public media](https://github.com/vijay29705/cinematic-template/tree/master/public/media): static assets · Film imagery and video served directly by the browser. · `public/media`

## Connections

- Vite build → Document shell: builds
- Document shell → React mount: loads
- React mount → App route boundary: mounts
- App route boundary → Home page: home view
- App route boundary → Case-study page: case-study view
- Home page → Hero: composes
- Home page → Work discovery: composes
- Home page → Film reel: composes
- Home page → Studio messaging: composes
- Home page → Social proof & contact: composes
- Work discovery → Project records: reads
- Case-study page → Project records: resolves
- Home page → Site content: reads
- App route boundary → Navigation & sticky CTA: uses
- Home page → Film player: embeds
- Film player → Public media: plays
- Home page → Motion primitives: animates with
- Motion primitives → Motion configuration: uses
- Motion primitives → Smooth-scroll integration: integrates
- React mount → Global styles: loads
