# shine-5705/whatstyle_web architecture

> Architecture diagram of the GitHub repository shine-5705/whatstyle_web, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shine-5705/whatstyle_web
- Repository: https://github.com/shine-5705/whatstyle_web

## Overview

##### Project type and purpose
- This is a Next.js single-page application (React-based) with server-side rendering (SSR) and static site generation (SSG) capabilities.
- Its purpose is to deliver a multi-page marketing site (features, FAQ, pricing) with optimized fonts and animated Lottie assets, deployed on Vercel or similar platforms.

##### File structure
- Top-level files:
- next.config.ts, tsconfig.json, bun.lock, package.json – build and dependency configs
- middleware.ts – custom routing or headers logic
- public/ – static assets (Lottie JSON, manifest.json)
- src/app/ – Next.js App Router pages and layouts
- layout.tsx – root layout (shared headers, footers)
- page.tsx under each route (/, /faq, /features, /pricing)
- robots.ts, sitemap.ts – SEO and crawling
- src/components/ – reusable React components
- ui/ – UI primitives (e.g., FloatingNavbar)
- sections/ – page-specific sections (HeroSection)
- StructuredData.tsx – JSON-LD for SEO
- src/types/ – TypeScript types (SEO)

##### README for additional insights
- Bootstrapped with create-next-app
- Uses next/font for optimized font loading
- No backend API directory – it’s a front-end only project

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Layers
    Browser["Client Browser"]:::external
    Browser -->|"HTTP Request"| Middleware

    subgraph "Server Layer"
        direction TB
        Middleware["Middleware"]:::compute
        Middleware -->|"Pre-process Request"| NextJS["Next.js Server"]:::compute
    end

    subgraph "Build & Config"  
        direction TB
        NC["next.config.ts"]:::code
        PJ["package.json"]:::code
        BL["bun.lock"]:::code
        TC["tsconfig.json"]:::code
    end
    NextJS --> BuildConfig[[Build & Config]]
    BuildConfig --> NC
    BuildConfig --> PJ
    BuildConfig --> BL
    BuildConfig --> TC

    subgraph "File-Based Router (src/app)"  
        direction TB
        Layout["layout.tsx"]:::code
        HomePage["page.tsx"]:::code
        FAQPage["faq/page.tsx"]:::code
        FeaturesPage["features/page.tsx"]:::code
        PricingPage["pricing/page.tsx"]:::code
        Robots["robots.ts"]:::code
        Sitemap["sitemap.ts"]:::code
    end
    NextJS -->|"File Routing"| FileRouter
    FileRouter[[File-Based Router]] --> Layout
    FileRouter --> HomePage
    FileRouter --> FAQPage
    FileRouter --> FeaturesPage
    FileRouter --> PricingPage
    FileRouter --> Robots
    FileRouter --> Sitemap

    subgraph "React Components (src/components)"  
        direction TB
        Hero["Hero.tsx"]:::code
        StructuredData["StructuredData.tsx"]:::code
        HeroSection["sections/HeroSection.tsx"]:::code
        FloatingNavbar["ui/FloatingNavbar.tsx"]:::code
    end
    FileRouter -->|"Imports Components"| ReactComps

    subgraph "SEO & Config Modules"  
        direction TB
        Colors["src/config/colors.ts"]:::code
        SEOConfig["src/config/seo.ts"]:::code
        SEOLib["src/lib/seo.ts"]:::code
        SEOTypes["src/types/seo.ts"]:::code
    end
    NextJS -->|"Imports SEO & Config"| SEOConfigMod

    subgraph "Global Styles"  
        direction TB
        Globals["src/app/globals.css"]:::code
    end
    NextJS --> Globals

    subgraph "Static Assets CDN (public)"  
        direction TB
        Manifest["manifest.json"]:::static
        Lottie1["lottieFiles/Robot.lottie"]:::static
        Lottie2["lottieFiles/bot.lottie"]:::static
        Lottie3["lottieFiles/hero.lottie"]:::static
        Lottie4["lottieFiles/hero_mobile.lottie"]:::static
        Lottie5["lottieFiles/man_robot.lottie"]:::static
        Lottie6["lottieFiles/sander.lottie"]:::static
    end
    Browser -->|"Fetch Assets"| StaticAssets

    subgraph "Deployment & CDN"  
        direction TB
        Vercel["Vercel Platform"]:::deploy
    end
    BuildConfig --> Vercel
    NextJS --> Vercel
    StaticAssets --> Vercel

    NextJS -->|"SSR/SSG Response"| Browser

    %% Click Events
    click NC "https://github.com/shine-5705/whatstyle_web/blob/main/next.config.ts"
    click PJ "https://github.com/shine-5705/whatstyle_web/blob/main/package.json"
    click BL "https://github.com/shine-5705/whatstyle_web/blob/main/bun.lock"
    click TC "https://github.com/shine-5705/whatstyle_web/blob/main/tsconfig.json"
    click Layout "https://github.com/shine-5705/whatstyle_web/blob/main/src/app/layout.tsx"
    click HomePage "https://github.com/shine-5705/whatstyle_web/blob/main/src/app/page.tsx"
    click FAQPage "https://github.com/shine-5705/whatstyle_web/blob/main/src/app/faq/page.tsx"
    click FeaturesPage "https://github.com/shine-5705/whatstyle_web/blob/main/src/app/features/page.tsx"
    click PricingPage "https://github.com/shine-5705/whatstyle_web/blob/main/src/app/pricing/page.tsx"
    click Robots "https://github.com/shine-5705/whatstyle_web/blob/main/src/app/robots.ts"
    click Sitemap "https://github.com/shine-5705/whatstyle_web/blob/main/src/app/sitemap.ts"
    click Middleware "https://github.com/shine-5705/whatstyle_web/blob/main/middleware.ts"
    click Hero "https://github.com/shine-5705/whatstyle_web/blob/main/src/components/Hero.tsx"
    click StructuredData "https://github.com/shine-5705/whatstyle_web/blob/main/src/components/StructuredData.tsx"
    click HeroSection "https://github.com/shine-5705/whatstyle_web/blob/main/src/components/sections/HeroSection.tsx"
    click FloatingNavbar "https://github.com/shine-5705/whatstyle_web/blob/main/src/components/ui/FloatingNavbar.tsx"
    click Manifest "https://github.com/shine-5705/whatstyle_web/blob/main/public/manifest.json"
    click Lottie1 "https://github.com/shine-5705/whatstyle_web/blob/main/public/lottieFiles/Robot.lottie"
    click Lottie2 "https://github.com/shine-5705/whatstyle_web/blob/main/public/lottieFiles/bot.lottie"
    click Lottie3 "https://github.com/shine-5705/whatstyle_web/blob/main/public/lottieFiles/hero.lottie"
    click Lottie4 "https://github.com/shine-5705/whatstyle_web/blob/main/public/lottieFiles/hero_mobile.lottie"
    click Lottie5 "https://github.com/shine-5705/whatstyle_web/blob/main/public/lottieFiles/man_robot.lottie"
    click Lottie6 "https://github.com/shine-5705/whatstyle_web/blob/main/public/lottieFiles/sander.lottie"
    click Colors "https://github.com/shine-5705/whatstyle_web/blob/main/src/config/colors.ts"
    click SEOConfig "https://github.com/shine-5705/whatstyle_web/blob/main/src/config/seo.ts"
    click SEOLib "https://github.com/shine-5705/whatstyle_web/blob/main/src/lib/seo.ts"
    click SEOTypes "https://github.com/shine-5705/whatstyle_web/blob/main/src/types/seo.ts"
    click Globals "https://github.com/shine-5705/whatstyle_web/blob/main/src/app/globals.css"

    %% Styles
    classDef compute fill:#D0E8FF,stroke:#0366d6,color:#000
    classDef code fill:#DFFFD8,stroke:#28a745,color:#000
    classDef static fill:#FFE4B5,stroke:#d29922,color:#000
    classDef deploy fill:#E9D0FF,stroke:#6f42c1,color:#000
    classDef external fill:#F0F0F0,stroke:#888,color:#000
```
