# shubhexists/terminal-portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/shubhexists/terminal-portfolio
- Repository: https://github.com/shubhexists/terminal-portfolio

## Overview

##### Project type and purpose
- This is a single-page front-end application built with ReactJS and TailwindCSS.
- It serves as a terminal-style portfolio template, displaying information (resume, links) in a command-line interface style.

##### File structure
Top-level directories and files:
- public/ – contains static assets (index.html, manifest.json, robots.txt, resume.pdf, preview image)
- src/ – React source code, organized into components and utility modules
- .github/workflows/node.js.yml – CI pipeline for installing, testing, building
- tailwind.config.js, post-install configs, tsconfig.json – build and type settings
Key patterns:
- A clear separation between static assets (public) and React application (src).
- Components in src/components implement the UI (header, terminal view, command input area).
- Utils in src/utils handle command definitions and keyboard bindings.

##### README for additional insights
- Confirms it’s a TailwindCSS + ReactJS portfolio template.
- No mention of a backend or external API—app is purely client-side, consuming only its own static assets.

##### Main components
4.a. Frontend Client (Browser)
– React Application (App.tsx)
- Header Component
- Terminal Component (renders command output)
- Command-Area Component (accepts user input)
- Utilities: commands.tsx, keybindings.tsx
– Styling Engine (TailwindCSS)
4.b. Static Asset Server / CDN (e.g., GitHub Pages, Netlify)
– Serves index.html, JS/CSS bundles, resume.pdf, manifest.json, robots.txt, images
4.c. CI/CD Pipeline (GitHub Actions)
– node.js.yml installs dependencies, runs tests, builds production bundle, and deploys

##### Relationships and data flow
- User → Browser → requests index.html & JS bundle from CDN
- Browser renders React App, loads TailwindCSS styles
- User types commands → Command-Area component captures keystrokes (via keybindings.tsx)
- Commands utility module processes input and returns output → Terminal component displays it
- If user invokes “view resume,” the app navigates or fetches resume.pdf from the static server

##### Architectural patterns and principles
- Component-based UI: each reusable portion (header, terminal, input area) is its own React component
- Unidirectional data flow in React: parent App passes props/state down to components
- Separation of concerns: UI components vs. utility modules vs. static assets
- Static hosting model: no server-side logic, everything runs in the client

##### Putting it all together
- Top-level: User’s Browser on the left, CDN/static server in the center, CI/CD on the right

## Diagram (Mermaid)

```mermaid
graph TB
    User["User"]:::external
    Browser["Browser"]:::external

    User -->|Interacts| Browser

    subgraph "Browser / Client"
        ReactApp["React App"]:::frontend
        TailwindConfig["TailwindCSS Config"]:::frontend

        subgraph "Styles"
            IndexCSS["src/index.css"]:::frontend
            OutputCSS["src/output.css"]:::frontend
            AppCSS["src/App.css"]:::frontend
        end

        subgraph "Components"
            Header["Header Component"]:::frontend
            TerminalComp["Terminal Component"]:::frontend
            CommandArea["Command-Area Component"]:::frontend
        end

        subgraph "Utilities"
            Commands["Commands Module"]:::frontend
            Keybindings["Keybindings Module"]:::frontend
        end
    end

    Browser -->|initializes| ReactApp
    ReactApp -->|"renders"| Header
    ReactApp -->|"renders"| TerminalComp
    ReactApp -->|"renders"| CommandArea
    CommandArea -->|"captures keystrokes"| Keybindings
    CommandArea -->|"invokes commands"| Commands
    Commands -->|"returns output"| TerminalComp
    ReactApp -->|"applies styles"| IndexCSS
    ReactApp -->|"applies styles"| OutputCSS
    ReactApp -->|"applies styles"| AppCSS
    ReactApp -->|uses| TailwindConfig

    subgraph "Static Asset Server / CDN"
        PublicDir["public/"]:::asset
        IndexHTML["public/index.html"]:::asset
        Manifest["public/manifest.json"]:::asset
        ResumePDF["public/resume.pdf"]:::asset
        RobotsTXT["public/robots.txt"]:::asset
        PublicDir --> IndexHTML
        PublicDir --> Manifest
        PublicDir --> ResumePDF
        PublicDir --> RobotsTXT
    end

    Browser -->|GET index.html| IndexHTML
    Browser -->|GET bundle.js| PublicDir
    Browser -->|GET styles.css| PublicDir
    Browser -->|GET resume.pdf| ResumePDF

    subgraph "CI/CD Pipeline"
        CICD["GitHub Actions Workflow"]:::cicd
    end

    CICD -->|Deploy production build| PublicDir

    click ReactApp "https://github.com/shubhexists/terminal-portfolio/blob/master/src/App.tsx"
    click Header "https://github.com/shubhexists/terminal-portfolio/blob/master/src/components/header.tsx"
    click TerminalComp "https://github.com/shubhexists/terminal-portfolio/blob/master/src/components/terminal.tsx"
    click CommandArea "https://github.com/shubhexists/terminal-portfolio/blob/master/src/components/command-area.tsx"
    click Commands "https://github.com/shubhexists/terminal-portfolio/blob/master/src/utils/commands.tsx"
    click Keybindings "https://github.com/shubhexists/terminal-portfolio/blob/master/src/utils/keybindings.tsx"
    click TailwindConfig "https://github.com/shubhexists/terminal-portfolio/blob/master/tailwind.config.js"
    click IndexCSS "https://github.com/shubhexists/terminal-portfolio/blob/master/src/index.css"
    click OutputCSS "https://github.com/shubhexists/terminal-portfolio/blob/master/src/output.css"
    click AppCSS "https://github.com/shubhexists/terminal-portfolio/blob/master/src/App.css"
    click PublicDir "https://github.com/shubhexists/terminal-portfolio/tree/master/public/"
    click IndexHTML "https://github.com/shubhexists/terminal-portfolio/blob/master/public/index.html"
    click Manifest "https://github.com/shubhexists/terminal-portfolio/blob/master/public/manifest.json"
    click ResumePDF "https://github.com/shubhexists/terminal-portfolio/blob/master/public/resume.pdf"
    click RobotsTXT "https://github.com/shubhexists/terminal-portfolio/blob/master/public/robots.txt"
    click CICD "https://github.com/shubhexists/terminal-portfolio/blob/master/.github/workflows/node.js.yml"

    classDef frontend fill:#E8F1FB,stroke:#2C6CBF;
    classDef asset fill:#F0EDE5,stroke:#A57548;
    classDef cicd fill:#EEF8F1,stroke:#3E8E41;
    classDef external fill:#FFFFFF,stroke:#000000;
```
