ironoc

@conorheffron/ironoc-frontend

The React-based Single-Page Application (SPA) user interface for the iRonoc personal portfolio and web application ecosystem.

License: GPL v3 Node.js Package Node.js CI


๐Ÿ”— Project Source & Packages


๐Ÿ“ Frontend Component Architecture & UX Render Flows

The frontend is implemented as a single-page React 19 application. It handles routing locally, renders structured layouts with components from MUI and React-Bootstrap, and integrates both REST APIs (via Axios/Fetch) and GraphQL endpoints (via Apollo Client).

1. Component Rendering Topology

graph TD
    App[App.js Entry] -->|Router Engine| AppNavbar[AppNavbar.js Layout]
    
    AppNavbar -->|Static Presentation| Static[Static Views]
    AppNavbar -->|State & API Driven| Dynamic[Dynamic Functional Views]
    
    Static --> About[About.js Profile]
    Static --> Home[Home.js Landing]
    Static --> NotFound[NotFound.js 404]
    
    Dynamic --> Donate[Donate.js Charity Grid]
    Dynamic --> CoffeeHome[CoffeeHome.js Brews List]
    Dynamic --> RepoDetails[RepoDetails.js Backlog Manager]
    
    Donate -->|GraphQL WebSocket Subscriptions| Apollo[Apollo Client]
    CoffeeHome -->|REST HTTP Fetch| Fetch[Fetch API]
    RepoDetails -->|REST Axios Client| Axios[Axios API]

2. Live Data Synchronizing Pipelines

To achieve reactive user experiences, the frontend splits its data retrieval strategies cleanly across protocols:

sequenceDiagram
    autonumber
    actor Client as Client Browser
    participant Router as App.js Splitter
    participant REST as Axios / Fetch Engine
    participant Apollo as Apollo Link (ws/http)
    participant WS as WebSocket Connection (graphql-ws)

    Client->>Router: Navigates view / triggers action
    
    alt Standard API / Metadata Query
        Router->>REST: Dispatch HTTP GET / PUT / POST
        REST-->>Client: Return JSON response
    else Real-Time Subscription Gateway
        Router->>Apollo: Dispatch subscription MySubscription
        Apollo->>WS: Route query over ws://localhost:8080/graphql
        activate WS
        WS-->>Client: Instant push update: donateItemsSubscription (newCharity)
        deactivate WS
    end

๐Ÿ› ๏ธ Tech Stack & Key Libraries


๐Ÿ“ Project Directory Structure

frontend
โ”œโ”€โ”€ package.json         # Package scripts & dependencies
โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ index.html       # HTML5 entry wrapper
โ”‚   โ””โ”€โ”€ camera-roll.yml  # Config file for background image rosters
โ””โ”€โ”€ src/
    โ”œโ”€โ”€ App.js           # Core Router and Apollo Provider Link setups
    โ”œโ”€โ”€ AppNavbar.js     # Shared navigation navbar
    โ”œโ”€โ”€ Footer.js        # Shared page footer
    โ”œโ”€โ”€ components/      # View components
    โ”‚   โ”œโ”€โ”€ Home.js      # Landing page (implements Navy theme)
    โ”‚   โ”œโ”€โ”€ About.js     # Technical profile
    โ”‚   โ”œโ”€โ”€ Donate.js    # Charities grid (uses GraphQL WebSocket Subscriptions)
    โ”‚   โ”œโ”€โ”€ CoffeeHome.js# Brew cards & preparation details
    โ”‚   โ”œโ”€โ”€ RepoDetails.js# GitHub repo manager (Axios REST fetches)
    โ”‚   โ””โ”€โ”€ __tests__/   # Jest & React Testing Library suites
    โ””โ”€โ”€ utils/
        โ”œโ”€โ”€ activityTracker.js   # Telemetry beacon clicks dispatcher
        โ””โ”€โ”€ cameraRollConfig.js  # Loader helper for camera roll images

๐Ÿš€ Getting Started (Development Quickstart)

Prerequisites

Local Installation & Setups

  1. Clone the repository and navigate into the frontend folder:
    cd frontend
    
  2. Clear any stale directory locks and clean install dependencies:
    rm -rf node_modules package-lock.json
    npm cache clean --force
    npm install --legacy-peer-deps
    
  3. Run the application locally in development mode:
    npm start
    

    Open http://localhost:3000 to view it in your browser. The page will auto-reload when you modify components.


๐Ÿงช Testing & Code Coverage

Our frontend test coverage is thoroughly verified using Jest and React Testing Library (with virtualized JSDOM browser containers).


๐ŸŽจ Camera Roll Background Configuration

The rotating background image rosters for the Home (Landing) and About pages are dynamically driven by the static asset config file located at public/camera-roll.yml.

Example config:

home:
  - navy-bg
about:
  - navy-bg
  - red-bg
  - teal-bg

Supported theme image keys are teal-bg, navy-bg, and red-bg.


๐Ÿ“ฆ Production Builds

To compile and bundle the application into highly optimized, minified, and hash-mapped static assets ready for deployment:

npm run build

The compiled files will be output to the build/ directory. When building via the backend Spring Boot maven plugin, these static resources are automatically packaged into the Tomcat /static/ classpath registry inside the WAR artifact.