How mizcausevic-dev/portfolio-constellation works
Purpose and principal workflow: A portfolio dashboard for visitors exploring one engineer’s public GitHub repositories, grouped into named platforms and industry verticals. The visitor initiates the main workflow by opening the site: it renders a build-time repository snapshot, derives cleaned and classified data for its visualizations and filterable grid, then attempts a live GitHub API refresh after first paint. Separately, a scheduled GitHub Action refreshes the snapshot used by future builds.
Components
Application and rendering
• Browser entry and hydration — src/main.tsx: mounts the React app in the browser, hydrating prerendered HTML when present or rendering a new tree otherwise.
• Dashboard orchestration — src/App.tsx: owns snapshot, live-refresh and filter state; cleans repository data, computes statistics, and composes the page’s major views.
• Server prerender — src/entry-server.tsx: renders the app to HTML for prerendering; its documented render path uses the baked snapshot because effects do not run.
Repository data and interpretation
• Bundled snapshot — src/data/repos.json: checked-in repository snapshot bundled into the build and used for the initial render.
• Snapshot ingestion and live refresh — src/lib/data.ts: exposes the baked snapshot, fetches public repositories from the GitHub API, and caches successful results in browser local storage.
• Repository curation — src/lib/curate.ts: supplies the cleaned repository set used by the dashboard; the app describes this as excluding forks, archived repositories, and stubs.
• Cluster and vertical classifier — src/lib/classifier.ts: assigns platform clusters and industry verticals using explicit name allowlists and topic/name heuristics, and classifies freshness.
• Portfolio aggregation — src/lib/aggregate.ts: computes overview counts and language, cluster, vertical, and signal statistics from repositories.
Portfolio exploration UI
• Portfolio overview and visual atlas — src/components/Hero.tsx: presents headline counts and snapshot/live status. The broader page also includes featured, cluster, language, and industry views.
• Constellation explorer — src/components/PortfolioConstellation.tsx: renders the interactive platform constellation, repository leaves, details, and platform selection controls.
• Repository search and filters — src/components/Filters.tsx: provides composable search, platform, vertical, language, and freshness filters for the repository grid.
Snapshot refresh
• Scheduled snapshot refresh — .github/workflows/refresh-snapshot.yml: the README documents this GitHub Action as running every six hours and committing changed snapshot data; workflow steps are not included in the sampled source.
External actors and interfaces
• Portfolio visitor — null repository path: opens the site and interacts with its visualizations and filters.
• GitHub REST API — null repository path: supplies public repository data to the client-side live refresh and, according to the README, the snapshot-refresh process.
• Scheduled GitHub Actions runner — null repository path: executes the documented periodic snapshot-refresh workflow.
Relationships
• Portfolio visitor -> Browser entry and hydration: opens the site; the entry selects hydration or client rendering based on whether prerendered HTML exists.
• Browser entry and hydration -> Dashboard orchestration: mounts or hydrates the React app.
• Server prerender -> Dashboard orchestration: renders the app to HTML using the baked snapshot.
• Dashboard orchestration -> Bundled snapshot: initializes its snapshot state from the build-time data.
• Dashboard orchestration -> Snapshot ingestion and live refresh: requests a live refresh after first paint and accepts a non-null result only when it is not smaller than the current repository set.
• Snapshot ingestion and live refresh -> GitHub REST API: fetches public repositories by user, handling pagination and mapping API fields into repository records.
• Snapshot ingestion and live refresh -> Snapshot ingestion and live refresh: reads and writes a six-hour browser local-storage cache for live results.
• Dashboard orchestration -> Repository curation: obtains the cleaned set that drives counts and rendered repository views.
• Repository curation -> Cluster and vertical classifier: uses repository classification and freshness in deriving the curated dashboard data.
• Dashboard orchestration -> Portfolio aggregation: computes portfolio statistics from the cleaned set.
• Dashboard orchestration -> Portfolio overview and visual atlas: supplies overview values and derived statistics to the page’s visual sections.
• Dashboard orchestration -> Constellation explorer: supplies cluster statistics; selection updates the dashboard’s platform filter.
• Dashboard orchestration -> Repository search and filters: supplies the grid’s filter state and update handler.
• Scheduled GitHub Actions runner -> Scheduled snapshot refresh: starts the documented periodic workflow.
• Scheduled snapshot refresh -> GitHub REST API: the README documents repository-list refresh via gh api.
• Scheduled snapshot refresh -> Bundled snapshot: commits changed repository-list data for subsequent builds.
Coverage limits: The sampled source does not include the refresh script, workflow contents, repository JSON, RepoGrid, or most visualization components. The README establishes the scheduled refresh behavior, but its exact command sequence and deployment wiring could not be verified here.
Main entry points: App.tsx Dashboard Orchestration · data.ts Snapshot and Live Refresh · refresh-snapshot.yml Scheduled Snapshot Refresh · main.tsx Browser Entry
Components 15
Application and Rendering
- Browser Entry
src/main.tsx - Dashboard Orchestration
src/App.tsx - Server Prerender
src/entry-server.tsx
Repository Data and Interpretation
- Bundled Snapshot
src/data/repos.json - Snapshot and Live Refresh
src/lib/data.ts - Repository Curation
src/lib/curate.ts - Cluster and Vertical Classifier
src/lib/classifier.ts - Portfolio Aggregation
src/lib/aggregate.ts
Portfolio Exploration UI
- Portfolio Overview
src/components/Hero.tsx - Constellation Explorer
src/components/PortfolioConstellation.tsx - Repository Search and Filters
src/components/Filters.tsx
Snapshot Refresh
- Scheduled Snapshot Refresh
.github/workflows/refresh-snapshot.yml
Other components
- Portfolio Visitor
- GitHub REST API
- Scheduled Actions Runner
Connections 17
- Portfolio Visitor → Browser Entry: opens site
- Browser Entry → Dashboard Orchestration: mounts or hydrates
- Server Prerender → Dashboard Orchestration: renders HTML · Uses the baked snapshot; effects do not run during prerendering.
- Dashboard Orchestration → Bundled Snapshot: initializes from
- Dashboard Orchestration → Snapshot and Live Refresh: requests refresh · Requested after first paint; accepts a non-null result only when it is not smaller than the current set.
- Snapshot and Live Refresh → GitHub REST API: fetches repositories
- Snapshot and Live Refresh → Snapshot and Live Refresh: caches results · Reads and writes a six-hour browser local-storage cache.
- Dashboard Orchestration → Repository Curation: gets cleaned set
- Repository Curation → Cluster and Vertical Classifier: uses classification
- Dashboard Orchestration → Portfolio Aggregation: computes statistics
- Dashboard Orchestration → Portfolio Overview: supplies values
- Dashboard Orchestration → Constellation Explorer: supplies cluster stats
- Constellation Explorer → Dashboard Orchestration: updates platform filter
- Dashboard Orchestration → Repository Search and Filters: supplies filter state
- Scheduled Actions Runner → Scheduled Snapshot Refresh: starts workflow
- Scheduled Snapshot Refresh → GitHub REST API: refreshes repository list · The README documents refresh via gh api.
- Scheduled Snapshot Refresh → Bundled Snapshot: commits changes · Updated snapshot data is used by subsequent builds.