Giter Club home page Giter Club logo

endurance's Introduction

Endurance

Endurance is a little sideproject I hacked together in a weekend as a personal tool to interact with the SportCity (aka Electrolyte) API. It is designed to monitor and notify users when a spot in a previously fully booked class becomes available. This is particularly useful for anyone wanting to participate in a class without the need to constantly check the SportCity app.

A live version of this project can be found at: https://endurance.schattgen.dev

Screenshots

Venue picker Class picker Set notifier

Project Structure

The project is divided into two main parts:

  • Backend: Built with .NET, the backend serves as gateway for the SportCity API, a watcher for fully booked classes and sending the notifications.
  • Frontend: A website built with Vite, React, TypeScript and Shadcn. The frontend provides an interface to communicate with the backend, allowing the users to save watchers for their preferred classes at their venue.

Getting Started

Prerequisites

  • .NET 8.0
  • Node.js and npm
  • MySQL (Dockerfile included)
  • Docker (optional)

Configuration

  • Backend Configuration: Adjust the appsettings.json or use environment variables to set up database connections and SMTP settings. An example appsettings.json is included.

    {
     "Settings": {
         "ConnectionStrings": {
             "MySql": "{MySQL ConnectionString}"
         },
         "Smtp": {
             "Server": "{SMTP host}",
             "Port": {SMTP port},
             "From": "{From email address}",
             "Username": "{SMTP username}",
             "Password": "{SMTP password}"
         }
     }
    }
    
  • Frontend Configuration: Configure the VITE_API_BASEURL environment variable in .env pointing to the backend. An example .env file is included.

Setting up locally

  1. Clone the Repository

    git clone https://github.com/michaelschattgen/Endurance.git
    cd Endurance
    
  2. Backend Setup

    • Navigate to the backend directory:
      cd dotnet
      
    • Restore dependencies and build the project:
      dotnet restore
      dotnet build
      
  3. Frontend Setup

    • Navigate to the frontend directory:
      cd ../frontend
      
    • Install dependencies:
      npm install
      
    • Start the development server:
      npm run dev
      

Running with Docker

  • Use Docker to set up the MySQL database. Here's a basic Docker command to get MySQL running:
    docker run --name mysql -e MYSQL_ROOT_PASSWORD=yourpassword -d mysql:latest
    Make sure to adjust the appsettings.json in the dotnet folder accordingly to make use of the newly created MySQL database. The schema for this project can be found here.

License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.

endurance's People

Contributors

michaelschattgen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.