How nileshdhakad18/google-cloud-study-jam works
Purpose and Runtime
This is a Next.js web application for publishing a Google Cloud Study Jams participant leaderboard and individual profile badges. It runs locally via npm run dev on port 3000 and uses the Next.js App Router. Styling is global/Tailwind-oriented.
Core runtime files: package.json, next.config.js, src/app/layout.js.
Application Entry Points
The root leaderboard page is implemented at src/app/page.js; shared document layout and global styles are established by src/app/layout.js and src/app/globals.css.
A separate profile-badge route exists at src/app/profilebadge/page.js, likely serving a participant-focused badge generation/view flow.
Static Data Boundary
Leaderboard data is stored as a versioned static JSON asset at public/data.json. Updating the leaderboard is an offline content operation: source CSV is converted to JSON and its contents replace this file.
This creates no required database, API, authentication, or backend service boundary. Browser-side application code consumes the packaged public data.
Relevant paths: public/data.json, convert.js, README.md.
Leaderboard Presentation Pipeline
The root page coordinates leaderboard display components. Table rendering is decomposed into a table shell, body, and row layer, separating collection-level layout from per-participant presentation.
Primary component paths: src/components/Table.Index.js, src/components/TableBody.js, src/components/TableRow.js.
Expected flow: static participant records → page-level loading/state → table body iteration → individual ranked rows.
Participant Progress Visualization
Speedometer.js is the dedicated visual progress/status component, likely used to turn numeric Study Jam progress into a graphical indicator. This keeps progress visualization separate from tabular ranking logic.
Relevant paths: src/components/Speedometer.js, src/components/TableRow.js, src/app/page.js.
Badge and Download Flow
Badge rendering is isolated from the leaderboard in BadgeComponent.js; DownloadBadge.js handles exporting or downloading the rendered badge. The profile-badge route provides the route-level surface for this feature.
Relevant paths: src/app/profilebadge/page.js, src/components/BadgeComponent.js, src/components/DownloadBadge.js.
Data Ingestion / Upload Boundary
Uploadpage.js represents a UI-level upload or data-import capability, while convert.js is the repository’s standalone conversion-related script. These are distinct from the canonical production data path, which remains public/data.json.
Relevant paths: src/components/Uploadpage.js, convert.js, public/data.json.
Main entry points: layout.js Root layout · profilebadge/page.js Profile badge page · app/page.js Leaderboard page · data.json Leaderboard data
Components 15
Next.js App
- Next.js runtime · App Router application served locally on port 3000.
package.json - Root layout · Establishes shared document structure and global styling.
src/app/layout.js - Global styles
src/app/globals.css
Leaderboard
- Leaderboard page · Root route coordinating leaderboard state and presentation.
src/app/page.js - Table shell
src/components/Table.Index.js - Table body · Iterates participant records into ranked rows.
src/components/TableBody.js - Participant row
src/components/TableRow.js - Progress visualizer · Renders numeric Study Jam progress as a graphical indicator.
src/components/Speedometer.js
Badge Flow
- Profile badge page · Route-level surface for participant badge generation or viewing.
src/app/profilebadge/page.js - Badge renderer
src/components/BadgeComponent.js - Badge download · Exports or downloads the rendered badge.
src/components/DownloadBadge.js
Content Pipeline
- Leaderboard data · Canonical versioned participant dataset packaged with the application.
public/data.json - Upload/import UI · Optional UI-level data import capability outside the canonical data path.
src/components/Uploadpage.js - CSV converter · Offline conversion step that produces replacement leaderboard JSON.
convert.js - Update instructions · Documents the offline CSV-to-JSON content update workflow.
README.md
Connections 15
- Next.js runtime → Root layout: boots
- Root layout → Global styles: loads
- Root layout → Leaderboard page: hosts /
- Root layout → Profile badge page: hosts /profilebadge
- Leaderboard data → Leaderboard page: participant records
- Leaderboard page → Table shell: renders
- Table shell → Table body: contains
- Table body → Participant row: maps records to
- Participant row → Progress visualizer: shows progress with
- Profile badge page → Badge renderer: renders
- Profile badge page → Badge download: enables export
- Badge download → Badge renderer: downloads
- CSV converter → Leaderboard data: replaces offline
- Upload/import UI → Leaderboard data: imports toward · Distinct from the canonical production update workflow.
- Update instructions → CSV converter: documents