Skip to content

Karllouise-code/personal-strava-runs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Strava Activity Visualizer

A modern web application to visualize and analyze Strava activity data, built with Vue 3, Vite, and Tailwind CSS. This project fetches running and walking activities from the Strava API, caches them in Firebase Firestore, and provides an interactive dashboard to explore recent activities, stats, weekly progress, and customizable goals.

๐Ÿš€ Live Demo | ๐Ÿƒโ€โ™‚๏ธ My Strava Profile

โœจ Features

๐Ÿ“Š Activity Dashboard

  • View recent running and walking activities in a sortable table
  • Filter by date, name, and activity type (runs or walks)
  • Responsive design optimized for desktop and mobile

๐Ÿ“ˆ Stats Overview

  • Display total distance, average pace, and longest activity
  • Options to combine or separate run/walk data
  • Real-time calculations based on selected filters

๐Ÿ“‰ Weekly Progress Chart

  • Visualize weekly activity trends using custom chart components
  • Track performance over time with interactive charts

๐ŸŽฏ Goal Tracking

  • Overall Goals: Set distance goals (e.g., 500 km) with start date tracking
  • Weekly Goals: Set weekly distance targets (e.g., 38 km) and monitor progress
  • Toggle between combined (run + walk) or type-specific goals

๐ŸŽจ Modern UI/UX

  • Floating sidebar navigation with smooth scrolling
  • Glassmorphism design using Tailwind CSS
  • Responsive layout for all device sizes

โšก Performance

  • Real-time data fetching from Strava API
  • Firebase Firestore caching for improved performance
  • Optimized data loading and filtering

๐Ÿ› ๏ธ Technologies Used

Frontend

  • Vue 3 (Options API)
  • Vite (Build tool)
  • Tailwind CSS (Styling)

Backend

  • Node.js
  • Express.js

APIs & Services

  • Strava API (Activity data)
  • Firebase Firestore (Data caching)

Deployment

  • Netlify (Frontend)
  • Render (Backend)

๐Ÿ“‹ Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v16 or higher)
  • npm or yarn
  • A Strava account with API access
  • A Firebase project with Firestore enabled

๐Ÿš€ Setup

1. Clone the Repository

git clone https://github.com/your-username/strava-activity-visualizer.git
cd strava-activity-visualizer

2. Install Dependencies

npm install

3. Set Up Environment Variables

Frontend Environment Variables

Create a .env file in the root directory:

VITE_API_URL=http://localhost:3000/api/activities

Backend Environment Variables

Create a .env file in the backend directory:

STRAVA_CLIENT_ID=your_strava_client_id
STRAVA_CLIENT_SECRET=your_strava_client_secret
STRAVA_REFRESH_TOKEN=your_strava_refresh_token
FIREBASE_PROJECT_ID=your_firebase_project_id
FIREBASE_PRIVATE_KEY=your_firebase_private_key
FIREBASE_CLIENT_EMAIL=your_firebase_client_email

Getting API Credentials

  • Strava API: Get credentials from Strava API Settings
  • Firebase: Generate service account credentials from your Firebase project console

4. Run the Backend

cd backend
npm install
node server.cjs

5. Run the Frontend

In the root directory:

npm run dev

Open http://localhost:5173 in your browser.

๐ŸŒ Deployment

Frontend (Netlify)

  1. Push your code to a GitHub repository
  2. Connect the repository to Netlify
  3. Set build command: npm run build
  4. Set publish directory: dist
  5. Add environment variable: VITE_API_URL pointing to your backend

Backend (Render)

  1. Deploy the backend directory to Render as a Node.js service
  2. Set all required environment variables in Render's dashboard
  3. Configure start command: node server.cjs

๐ŸŽฎ Usage

Getting Started

  1. Authorize Strava: On first load, authorize the app to access your Strava data
  2. Explore Activities: Use tabs to view runs, walks, or combined data
  3. Apply Filters: Filter by name, date range, or number of activities
  4. Sort Data: Click column headers to sort by date, distance, time, or pace

Setting Goals

  1. Overall Goals: Navigate to the Overall Goals section and set your distance target
  2. Weekly Goals: Set weekly distance goals and track your progress
  3. Goal Types: Toggle between combined activities or specific activity types

Navigation

  • Use the floating sidebar (desktop) for quick navigation
  • Smooth scrolling between sections
  • Responsive design adapts to your device

๐Ÿ“ Project Structure

strava-activity-visualizer/
โ”œโ”€โ”€ backend/                    # Node.js/Express backend
โ”‚   โ”œโ”€โ”€ server.cjs              # API server for Strava and Firebase
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ src/                        # Vue 3 frontend
โ”‚   โ”œโ”€โ”€ components/             # Vue components
โ”‚   โ”‚   โ”œโ”€โ”€ WeeklyChart.vue     # Weekly progress chart
โ”‚   โ”‚   โ”œโ”€โ”€ Counter.vue         # Goal counter component
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ services/               # Service layer
โ”‚   โ”‚   โ”œโ”€โ”€ firebase.js         # Firebase configuration
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ App.vue                 # Main application component
โ”‚   โ”œโ”€โ”€ main.js                 # Application entry point
โ”‚   โ””โ”€โ”€ assets/                 # Static assets
โ”œโ”€โ”€ .env                        # Frontend environment variables
โ”œโ”€โ”€ vite.config.js              # Vite configuration
โ”œโ”€โ”€ package.json                # Dependencies and scripts
โ””โ”€โ”€ README.md                   # Project documentation

๐Ÿค Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow Vue 3 best practices
  • Use Tailwind CSS for styling
  • Write descriptive commit messages
  • Test your changes thoroughly

๐Ÿƒโ€โ™‚๏ธ About the Author

Karl Louise Rito

  • ๐ŸŒ Strava Profile
  • ๐Ÿ’ป Passionate about running and coding
  • ๐Ÿš€ Building tools to help athletes track their progress

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Strava for providing an excellent API
  • Vue.js community for amazing documentation
  • Firebase for reliable backend services
  • Tailwind CSS for beautiful, responsive design
  • All the runners and walkers who inspire us to keep moving! ๐Ÿƒโ€โ™€๏ธ๐Ÿšถโ€โ™‚๏ธ

โญ Star this repo if you find it helpful!

ยฉ 2025 Karl Louise Rito

Releases

No releases published

Packages

 
 
 

Contributors