Skip to content

Thiebauts/triathlon-vast-dashboard

Repository files navigation

Triathlon Väst Dashboard

TypeScript Next.js React Tailwind CSS Status

Club results dashboard for Triathlon Väst — explore competition history, athlete rankings, and participation trends across 6 sports from 2021 to 2025.

Overview

An internal analytics dashboard for Triathlon Väst members. It aggregates CSV result files from club competitions (triathlon, duathlon, swimming, cycling, running, swimrun) spanning 2021–2025 and makes them searchable and visual. Athletes can look up their personal results, track rankings over time, and compare against the full field.

The dataset currently covers 25 competitions across 6 sports (triathlon, duathlon, swimming, cycling, running, swimrun) from 2021–2025, including 1 swimrun event added in 2025.

Screenshots

Event Results

Browse all competition results filtered by sport, year, and category. Each entry shows overall and class rankings, total time, and individual segment splits.

Event Results tab

Athlete Profiles

Individual athlete pages showing competition history, accumulated points, overall club rank, and performance trends across seasons and disciplines.

Athlete Profiles tab

Club Rankings

Annual leaderboards for men and women, based on a points system that rewards consistent participation — 1st place earns 40 pts, 2nd 35 pts, 3rd 30 pts, and so on.

Club Rankings tab

Highlights

Features

  • Overview tab: Season-level participation trends and summary stats
  • Results tab: Filter and browse all competition results by sport, year, and category
  • Athletes tab: Individual athlete profiles with full result history and segment breakdowns
  • Rankings tab: Club-wide leaderboard based on aggregated points across events
  • Bilingual UI: Swedish / English toggle throughout

Tech Stack

Tool Version
Next.js 16.1
React 19.2
Recharts 3.8
PapaParse 5.5
Tailwind CSS 4.x
Playwright 1.58

Getting Started

Prerequisites

  • Node.js 20+

Installation

git clone https://github.com/Thiebauts/triathlon-vast-dashboard.git
cd triathlon-vast-dashboard
npm install

Quick Start

npm run dev
# Open http://localhost:3000

Project Structure

triathlon-vast-dashboard/
├── CLAUDE.md                    # AI assistant context
├── README.md
├── package.json
├── next.config.ts
├── test-dashboard.mjs           # Smoke test script (Playwright)
├── data/                        # CSV result files (inputs, not edited manually)
│   └── processed_<sport>_results_<date>.csv
├── public/                      # Static assets (logo, favicon)
└── src/
    ├── app/                     # Next.js App Router
    │   ├── layout.tsx
    │   ├── page.tsx
    │   ├── globals.css
    │   └── favicon.ico
    ├── components/
    │   ├── Dashboard.tsx        # Main shell with tab navigation
    │   ├── Header.tsx
    │   ├── LanguageProvider.tsx
    │   ├── charts/
    │   │   ├── AthleteCharts.tsx
    │   │   └── ParticipationChart.tsx
    │   └── tabs/
    │       ├── OverviewTab.tsx
    │       ├── ResultsTab.tsx
    │       ├── AthletesTab.tsx
    │       └── RankingsTab.tsx
    └── lib/
        ├── loader.ts            # Server-side CSV parsing (PapaParse)
        ├── data.ts              # Query helpers over parsed data
        ├── types.ts             # Shared TypeScript types
        └── translations.ts      # EN/SV string catalogue

Data Entry Rules (NyTaTime)

When exporting results from NyTaTime, follow these rules to keep the data consistent:

Names

  • Always use full first name and surname — no nicknames (e.g., "Tobias Olsson", not "Tobbe")
  • Use proper capitalization for both first and last name (e.g., "Daniel Sastre", not "Daniel sastre")
  • Keep surname particles lowercase: "van", "du", "de" (e.g., "Stijn van Weegberg")
  • Use the same spelling consistently across seasons — check previous files if unsure

Class (gender)

  • Only two values allowed: Herr or Dam
  • Do not use: Herrar, Damer, Man, Male, Female

Club

  • Only two values allowed: TriVäst or Gäst
  • Do not use: Triväst, Triathlon Väst, Ej medlem, -

Times

  • If a split time was not captured, leave the field empty — do not enter 0 or a negative value

Rankings

  • Overall_Rank must be sequential starting from 1
  • Class_Rank must be sequential within each class (Herr and Dam ranked separately)

Status

  • Only two values: ok or dnf

General

  • No trailing whitespace in any field
  • File encoding: UTF-8
  • One empty line at end of file maximum

Contributing

Have ideas for new features, spotted a bug, or want to fix something yourself?

  • Email: Send feedback or suggestions to [email protected] with the subject prefix [triathlon-vast-dashboard]
  • GitHub: If you're familiar with code, open an issue or submit a pull request — all contributions are welcome and will be reviewed

Deployment

Deployed on Vercel. Push to main triggers an automatic production deploy. CSV data files are bundled at build time — update data/ and redeploy to refresh results.

License

© Triathlon Väst. All rights reserved. Private internal tool — not for redistribution.

Releases

No releases published

Packages

 
 
 

Contributors