A dynamic, animated leaderboard for tracking participant scores from Google Sheets data. Built with Next.js and featuring a beautiful podium design with counting animations.
- Real-time Data: Fetches participant scores from Google Sheets
- Animated Podium: Gold, silver, bronze podium for top 3 participants
- Counting Animation: Points animate from 0 to final value
- Node.js 18+ installed on your system
- A Google Sheets document with participant data like this format
-
Clone the repository
git clone <repository-url> cd itc-leaderboard
-
Install dependencies
npm install
-
Configure Google Sheets
- Ensure your Google Sheet is published to the web
- Update the CSV URL in
src/app/api/leaderboard/route.js - Your sheet should have columns:
Name,Total Points
-
Start the development server
npm run dev
-
Open your browser
- Navigate to
http://localhost:3000 - Your leaderboard should be running!
- Navigate to
Your Google Sheets document should have the following structure:
| No | Name | Lesson 1 | Lesson 2 | ... | Total Points |
|---|---|---|---|---|---|
| 1 | Alice | 10 | 15 | ... | 85 |
| 2 | Bob | 8 | 12 | ... | 72 |
| 3 | Charlie | 12 | 18 | ... | 95 |
Important columns:
Name: Participant's nameTotal Points: Final score for ranking
The leaderboard automatically fetches data from your Google Sheets. To update scores:
- Edit your Google Sheet with new scores
- Refresh the leaderboard - data updates automatically on page load
- No code changes needed - the app will sort participants by points
The app uses a custom color palette defined in src/app/globals.css:
:root {
--color-dark: #131313;
--color-red-primary: #d01921;
--color-red-accent: #ff002a;
--color-light-gray: #ededed;
--color-cream: #faf9f5;
}To change colors:
- Update the CSS variables in
globals.css - Colors will automatically apply throughout the app
Animation timings can be adjusted in src/app/page.js:
- Counting speed: Change
durationinuseCountUphook - Entrance delays: Modify
delayprops in components - Animation types: Edit CSS classes in
globals.css
Current fonts:
- Headings: League Spartan
- Body text: Glacial Indifference
To change fonts:
- Update Google Fonts imports in
globals.css - Modify CSS variables for
--font-headingand--font-body
Simply add new rows to your Google Sheets:
- Add participant name in the
Namecolumn - Add their total points in the
Total Pointscolumn - The leaderboard will automatically include them
- Push your code to GitHub
- Connect your repository to Vercel
- Deploy automatically
npm run build
npm startitc-leaderboard/
├── src/
│ ├── app/
│ │ ├── api/
│ │ │ └── leaderboard/
│ │ │ └── route.js # Google Sheets API
│ │ ├── globals.css # Styles & animations
│ │ ├── layout.js # App layout
│ │ └── page.js # Main leaderboard
├── public/
│ └── sim-itc-logo.png # Club logo
├── package.json
└── README.md
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Built with ❤️ for SIM ITC Club