How warpshlczy/cityuhk-hub works
CityUHK Hub is a multilingual directory for discovering and submitting CityUHK student projects. Contributors submit repository descriptions; the parser enriches and translates them into a static catalog, which the web app loads, filters, and presents as project cards and detail pages. The README documents category, tag, language, and author filters, shareable URL state, README rendering, and submission. Parser and UI links are based on excerpts or indexed references; links involving unsampled features are included only where documented.
Main entry points: build-index.mjs Index builder · App.tsx Application routes · HomePage.tsx Browse projects · useProjects.ts Project loading
Components 23
Catalog generation
- Index builder
repos-parser/src/build-index.mjs - Entry parsing
repos-parser/src/lib/frontmatter.js - GitHub metadata
repos-parser/src/lib/github.js - README processing
repos-parser/src/lib/markdown.js - Translations
repos-parser/src/lib/translate.js - Catalog aggregates
repos-parser/src/lib/aggregate.js - Star history
repos-parser/src/lib/starHistory.js
Project discovery
- Browse projects
web/src/pages/HomePage.tsx - Project loading
web/src/hooks/useProjects.ts - Search input
web/src/components/SearchBar.tsx - Query syntax
web/src/utils/searchParser.ts - Search and sorting
web/src/hooks/useSearch.ts - Shareable URL state
web/src/hooks/useUrlState.ts
Project details
- Project detail
web/src/pages/ProjectDetailPage.tsx - Project submission
web/src/pages/SubmitPage.tsx
Shared platform
- Catalog data access
web/src/api/projects.ts - Runtime GitHub enrichment
web/src/api/github.ts - Application routes
web/src/App.tsx - Localization
web/src/i18n/index.tsx - Visit statistics API
api/stats.js - Redis REST client
lib/upstash.js
Other components
- Project contributors
- Upstash Redis
Connections 26
- Project contributors → Index builder: submit entries
- Index builder → Entry parsing: parses entries
repos-parser/src/build-index.mjs - Index builder → GitHub metadata: fetches metadata
repos-parser/src/build-index.mjs - Index builder → README processing: analyzes README
repos-parser/src/build-index.mjs - Index builder → Translations: translates content
repos-parser/src/build-index.mjs - Index builder → Catalog aggregates: builds aggregates
repos-parser/src/build-index.mjs - Index builder → Star history: reads snapshots
repos-parser/src/build-index.mjs - Index builder → Catalog data access: writes catalog for
- Application routes → Browse projects: routes to
web/src/App.tsx - Application routes → Project detail: routes to
web/src/App.tsx - Application routes → Project submission: routes to
web/src/App.tsx - Application routes → Visit statistics API: tracks visit
web/src/App.tsx - Visit statistics API → Redis REST client: uses client
api/stats.js - Redis REST client → Upstash Redis: sends pipeline
lib/upstash.js - Browse projects → Project loading: loads projects
web/src/pages/HomePage.tsx - Project detail → Project loading: loads project
web/src/pages/ProjectDetailPage.tsx - Project loading → Catalog data access: fetches catalog
web/src/hooks/useProjects.ts - Project loading → Runtime GitHub enrichment: enriches projects
web/src/hooks/useProjects.ts - Browse projects → Search input: renders search
web/src/pages/HomePage.tsx - Search input → Query syntax: parses query
web/src/components/SearchBar.tsx - Browse projects → Search and sorting: filters projects
web/src/pages/HomePage.tsx - Search and sorting → Query syntax: parses query
web/src/hooks/useSearch.ts - Browse projects → Shareable URL state: syncs filters
web/src/pages/HomePage.tsx - Localization → Shareable URL state: reads language
web/src/i18n/index.tsx - Application routes → Localization: provides localization
web/src/App.tsx - Project submission → Runtime GitHub enrichment: uses GitHub API
web/src/pages/SubmitPage.tsx