# remi-h/remi architecture

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

- Interactive diagram: https://gitdiagram.com/remi-h/remi
- Repository: https://github.com/remi-h/remi

## Overview

##### Project Type Analysis
This is a Next.js-based web application using the App Router pattern (evident from the /app directory structure). It's a frontend-focused application with static and dynamic routes, utilizing React components and modern web technologies like TypeScript and Tailwind CSS.

##### Main Components

A. Client-Side Layer:
- Common web technologies (HTML, CSS, JavaScript)

B. Next.js Application Layer (Primary Focus):

1. Pages/Routing Layer:
- Main routes (/log, /photo, /forfriends)
- Nested routes under /forfriends
- App Router structure

2. Component Layer:
- Shared components (Header, Footer, Social, FikaTicket)
- Layout components (app/layout.tsx)
- Page components

3. Asset Management:
- Static files (public/images)
- Global styles (globals.css)

4. Configuration Layer:
- Next.js config (next.config.js)
- TypeScript config (tsconfig.json)
- Tailwind config (tailwind.config.ts)

**┌─ Client Browser ─────────────────────────┐**

- ┌─ Next.js Application ──────────────┐ │

- ┌─ Routing Layer ──────────────┐  │ │
- • Main Routes              │  │ │
- • Nested Routes            │  │ │
- ┘  │ │

- ┌─ Component Layer ────────────┐  │ │
- • Shared Components        │  │ │
- • Page Components         │  │ │
- ┘  │ │

- ┌─ Asset Management ───────────┐  │ │
- • Static Files            │  │ │
- • Styles                 │  │ │
- ┘  │ │

- ┘ │

- ┘

##### Additional Elements

- Version information for key technologies
- Build/deployment flow
- Static vs. dynamic routes
- Entry points and data flow direction

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Client["Client Browser"]
        WebTech["HTML/CSS/JavaScript"]
    end

    subgraph NextApp["Next.js Application"]
        subgraph Routing["Routing Layer"]
            MainRoutes{{"Main Routes"}}
            HomeRoute["Home"]:::route
            LogRoute["Log"]:::route
            PhotoRoute["Photo"]:::route
            ForFriendsRoute["ForFriends"]:::route
            
            subgraph NestedRoutes["Nested Routes (ForFriends)"]
                HBDRoute["HBD Oskar"]:::route
                HotelRoute["Hotel"]:::route
                TripLogRoute["Trip Log"]:::route
            end
        end

        subgraph Components["Component Layer"]
            RootLayout["Root Layout"]:::component
            Providers["Providers"]:::component
            
            subgraph Shared["Shared Components"]
                Header["Header"]:::component
                Footer["Footer"]:::component
                Social["Social"]:::component
                FikaTicket["FikaTicket"]:::component
            end
        end

        subgraph Assets["Asset Management"]
            StaticImages["Static Images"]:::asset
            FilmImages["Film Images"]:::asset
            GlobalStyles["Global Styles"]:::asset
        end

        subgraph Config["Configuration Layer"]
            NextConfig["Next.js Config"]:::config
            TSConfig["TypeScript Config"]:::config
            TailwindConfig["Tailwind Config"]:::config
            PostCSSConfig["PostCSS Config"]:::config
        end
    end

    %% Relationships
    Client --> NextApp
    MainRoutes --> HomeRoute & LogRoute & PhotoRoute & ForFriendsRoute
    ForFriendsRoute --> NestedRoutes
    RootLayout --> Providers
    Providers --> MainRoutes

    %% Component Mappings
    click HomeRoute "https://github.com/remi-h/remi/blob/main/app/page.tsx"
    click LogRoute "https://github.com/remi-h/remi/blob/main/app/log/page.tsx"
    click PhotoRoute "https://github.com/remi-h/remi/blob/main/app/photo/page.tsx"
    click ForFriendsRoute "https://github.com/remi-h/remi/blob/main/app/forfriends/page.tsx"
    click HBDRoute "https://github.com/remi-h/remi/blob/main/app/forfriends/hbd-oskar/page.tsx"
    click HotelRoute "https://github.com/remi-h/remi/blob/main/app/forfriends/hotel/page.tsx"
    click TripLogRoute "https://github.com/remi-h/remi/blob/main/app/forfriends/trip-log/page.tsx"
    click RootLayout "https://github.com/remi-h/remi/blob/main/app/layout.tsx"
    click Providers "https://github.com/remi-h/remi/blob/main/app/providers.tsx"
    click GlobalStyles "https://github.com/remi-h/remi/blob/main/app/globals.css"
    click Header "https://github.com/remi-h/remi/blob/main/components/Header.tsx"
    click Footer "https://github.com/remi-h/remi/blob/main/components/Footer.tsx"
    click Social "https://github.com/remi-h/remi/blob/main/components/Social.tsx"
    click FikaTicket "https://github.com/remi-h/remi/blob/main/components/FikaTicket.tsx"
    click StaticImages "https://github.com/remi-h/remi/tree/main/public/images"
    click FilmImages "https://github.com/remi-h/remi/tree/main/public/images/film"
    click NextConfig "https://github.com/remi-h/remi/blob/main/next.config.js"
    click TSConfig "https://github.com/remi-h/remi/blob/main/tsconfig.json"
    click TailwindConfig "https://github.com/remi-h/remi/blob/main/tailwind.config.ts"
    click PostCSSConfig "https://github.com/remi-h/remi/blob/main/postcss.config.js"

    %% Styling
    classDef route fill:#90EE90,stroke:#333,stroke-width:2px
    classDef component fill:#FFB347,stroke:#333,stroke-width:2px
    classDef asset fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef config fill:#D3D3D3,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        Route["Route"]:::route
        Component["Component"]:::component
        Asset["Asset"]:::asset
        Configuration["Configuration"]:::config
    end
```
