Skip to content

Joelheile/Runningfinder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Logo

Running Finder

An open-source platform connecting runners with local running clubs
Explore the docs Β»

View Demo Β· Report Bug Β· Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. ER Model
  4. Roadmap
  5. Static Code Analysis
  6. Contributing
  7. License
  8. Contact
  9. Acknowledgments

πŸš€ About The Project

Running Finder is a platform that helps runners discover and connect with running clubs and events in their area. The application displays running clubs and events on an interactive map, allowing users to filter by preferences like distance, weekday, or difficulty.

Key Features

  • Interactive Map: View running clubs and events plotted on Google Maps
  • Advanced Filtering: Find runs by distance, weekday, and difficulty level
  • Club Discovery: Browse and join local running clubs
  • Event Registration: Register for upcoming runs directly through the platform
  • Authentication: Sign in with GitHub or email to save preferences and manage registrations

Built With

🚦 Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • pnpm
    npm install -g pnpm
  • Postgres database (or use the provided Docker setup)

Installation

  1. Clone the repository

    git clone https://github.com/Joelheile/RunningFinder.git
    cd RunningFinder
  2. Install dependencies

    pnpm install
  3. Create a .env.local file based on .env.example and add your API keys

    cp .env.example .env.local
  4. Set up the database

    # For development with Docker
    sh docker_run.sh
    
    # Generate database schema
    pnpm dev:generate
    pnpm dev:push
    
    # Seed the database (optional)
    pnpm dev:seed
  5. Start the development server

    pnpm dev
  6. Access the API documentation at http://localhost:3000/docs

πŸ—‚οΈ Project Structure

runningfinder/
β”œβ”€β”€ src/                   # Source code
β”‚   β”œβ”€β”€ app/               # Next.js app router pages
β”‚   β”œβ”€β”€ components/        # React components
β”‚   β”œβ”€β”€ lib/               # Utilities, hooks, and business logic
β”‚   β”‚   β”œβ”€β”€ authentication/# Auth configuration
β”‚   β”‚   β”œβ”€β”€ db/            # Database schema and connections
β”‚   β”‚   └── types/         # TypeScript type definitions
β”œβ”€β”€ public/                # Static assets
β”œβ”€β”€ tests/                 # Test files
β”œβ”€β”€ drizzle/               # Database migrations
└── playwright-tests/      # End-to-end tests

πŸ§ͺ Testing

Run all tests with:

pnpm tests

Or run specific test suites:

# Unit tests
pnpm jest unit

# Integration tests
pnpm jest integration

# End-to-end tests
npx playwright test

πŸ›£οΈ Roadmap

  • Combine Google Maps marker dragging and place search
  • Enhance club dashboard with role-based permissions
    • Page editing
    • Membership management
    • Registration management
  • Support for additional sport types
  • Weather API integration for run forecasts
  • Strava API integration for syncing runs

See the open issues for a full list of proposed features and known issues.

🀝 Contributing

Contributions make the open-source community an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Don't forget to check our Contributing Guidelines.

πŸ“„ License

Distributed under the MIT License. See LICENSE for more information.

πŸ“ž Contact

Project Link: https://github.com/Joelheile/RunningFinder

Acknowledgments

(back to top)

Use cases

  • Runs
    • are displayed on interactive map
    • users can register for runs
    • runs can be filtered by distance, weekday and difficulty
  • Clubs
    • Dashboard: Get to know knew running clubs
    • Members: Join and leave clubs, view club details and runs
    • Admins: Add and manage club details and runs

Data Generation

The data in the database is user generated and not generated by the backend. For the first batch of data I used a custom scraper to scrape the data from a competitor. This way first users were more motivated to use the plattform and suggest own runs.

Roadmap

  • Setup database & API routes
  • Add club
  • Add recurring runs (on weekly basis)
  • Authentication (when adding a run or club, you'll be redirected to /api/auth/signin)
  • Displaying runs a user has liked on a own page
  • Combine Google Maps marker dragging and place search
  • Enhance club dashboard using roles
    • Page editing
    • Membership management
    • Registration management
  • Open plattform for other sport types
  • Implement weather API to forecast conditions for runs
  • Implement Strava API to sync runs

(back to top)

Architecture

flowchart TD
    %% Main Nodes
    Users(["πŸ‘₯ Users"]):::users --> AppRouting{{"πŸ”€ App Routing"}}:::routing

    %% Application Modules in a row
    AppRouting --> RunsModule & ClubsModule & MapModule

    subgraph ApplicationModules["Application Modules"]
        direction LR
        RunsModule["πŸƒ Runs Module"]:::module
        ClubsModule["πŸ‘₯ Clubs Module"]:::module
        MapModule["πŸ—ΊοΈ Map Module"]:::module
    end

    %% Application Layer below modules
    RunsModule & ClubsModule & MapModule --> ApplicationLayer
    ApplicationLayer["βš™οΈ Application Layer"]:::appLayer

    %% API Gateway and Database
    ApplicationLayer <--> APIGateway
    APIGateway["πŸ”Œ API Gateway"]:::apiGateway
    APIGateway <--> Database
    Database[("πŸ’Ύ Database")]:::database

    %% Advanced styling
    classDef users fill:#FF6B6B,stroke:#333,stroke-width:2px,color:white,font-weight:bold,border-radius:8px
    classDef routing fill:#4ECDC4,stroke:#333,stroke-width:2px,color:white,font-weight:bold
    classDef module fill:#48BFE3,stroke:#333,stroke-width:2px,color:white,font-weight:bold,border-radius:4px
    classDef appLayer fill:#56CFE1,stroke:#333,stroke-width:2px,color:white,font-weight:bold,border-radius:4px
    classDef apiGateway fill:#5E60CE,stroke:#333,stroke-width:2px,color:white,font-weight:bold,border-radius:4px
    classDef database fill:#7400B8,stroke:#333,stroke-width:2px,color:white,font-weight:bold

    %% Apply classes
    class Users users
    class AppRouting routing
    class RunsModule,ClubsModule,MapModule module
    class ApplicationLayer appLayer
    class APIGateway apiGateway
    class Database database

    %% Style the Application Modules subgraph
    style ApplicationModules fill:#FFFDD0,stroke:#CBD5E0,stroke-width:2px,color:#2D3748,font-weight:bold
Loading

Static Code Analysis

I use ESLint for static code analysis. Mostly running it before pulling my branch, it has helped me to catch bugs and errors before they get merged into the main branch. It is also a great tool to stay consistent. For example having a consistent Image tag and not switching.

You can run it using:

pnpm run lint

I hope you liked the project :)

About

Running Finder / Clubhub

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Languages