Git Product home page Git Product logo

nehalist / hilde Goto Github PK

View Code? Open in Web Editor NEW
75.0 6.0 4.0 2.18 MB

Hilde is an open source match tracking tool for games like foosball, air hockey, chess and similar

Home Page: https://nehalist.io/hilde/

License: MIT License

JavaScript 1.02% TypeScript 97.43% CSS 0.10% Dockerfile 1.27% Shell 0.18%
nextjs t3-stack airhockey chess foosball matchmaking table-football tailwindcss typescript

hilde's Introduction

Hilde ๐Ÿ†

Build License Docker Pulls

You've got a foosball table or similar in your office and want to track your matches, player progress and compare yourself to your colleagues and see who's the best? You've come to the right place. Hilde is a match tracking app for games like foosball, table tennis, air hockey, etc. with achievements, elo ratings, statistics and more. Hilde is easy to setup and can be used by everyone.

A public demo is available at demo.hilde.gg.

Hilde

Table of Contents

  1. Features - Hilde's features
  2. Getting Started - How to get Hilde up and running
  3. Usage - Command line utilities and configuration variables
  4. Contributing - How to contribute
  5. License

โšก๏ธ Features

  • Simple, intuitive interface
  • Elo rating for each team
  • Seasons (managable via admin interface)
  • Detailed team statistics (winstreaks, winrate, elo history chart, ...)
  • Achievements (e.g. "Win 100 Matches", "Win 10 Matches in a row", ...)
  • Compare teams against each other
  • Teams of any size, simply separated by a comma in the team name
  • Light/Dark theme
  • Match comments
  • Leaderboards
  • Optional: Deployable for free with Vercel & Planetscale
  • Optional: Fully dockerized

โญ Getting Started

Hilde can be installed in a few minutes, either by deploying it to Vercel, using Docker or setting it up manually.

Requirements:

  • Node 14
  • MySQL (5.7+)

Keep in mind that after installing you need to add a season via the admin ui (/admin) using the password from the environment variable (ADMIN_PASSWORD).

Free hosting with Vercel & Planetscale

Hilde is designed in a way that it could easily be hosted for free, using Vercel for hosting and Planetscale for the database.

Deploy with Vercel

Docker Compose

Example docker-compose.yml:

version: '3'

services:
  hilde:
    depends_on:
      - database
    networks:
      - internal
    image: nehalist/hilde
    ports:
      - '127.0.0.1:3000:3000'
    environment:
      - DATABASE_URL=mysql://root:hildepw@database:3306/hilde
      - ADMIN_PASSWORD=v3rys3cr3tp4ssw0rd

  database:
    networks:
      - internal
    image: mysql:8.0
    environment:
      - MYSQL_DATABASE=hilde
      - MYSQL_ROOT_PASSWORD=hildepw
    volumes:
      - db:/var/lib/mysql

volumes:
  db:

networks:
  internal:

After running docker-compose up -d Hilde is running on localhost:3000.

Manually (for development)

  1. Clone/fork the repository
  2. Run npm ci to install dependencies
  3. Run docker-compose up -d in order to start the database container (or adjust the .env file to use a different db)
  4. Run npm run dev to start the development server
  5. Add awesome features.

Docker

The official Docker image of Hilde is available on Docker Hub. Run it locally via:

  1. Run docker run -p 127.0.0.1:3000:3000 -e DATABASE_URL=mysql://<user>:<password>@<host>:<port>/<db> nehalist/hilde
  2. Open http://localhost:3000
  3. Done.

โš™๏ธ Usage

Administration

Hilde provides an admin ui at /admin which can be used to manage seasons.

Commands

Hilde provides a set of utility terminal commands:

Command Description
npm run dev Starts the development server
npm run build Builds the app
npm run start Starts the production server
npm run lint Lints files
npm run migrate Executes Prisma migrations

Configuration

Hilde can be configured via environment variables in the .env file.

Variable Description Default
ADMIN_PASSWORD Administration password h1ldeb3steV3r
NEXTAUTH_SECRET Token secret +Zrk5zW6fgog5k0LbN4bxL1YXKIhvb65Yln5ZKf+g3o=
NEXTAUTH_URL Deployed URL of Hilde http://localhost:3000
DATABASE_URL Database connection string mysql://root:hildepw@localhost:3309/hilde

๐Ÿ‘ Contributing

Hilde was created for fun and to play around with technologies I don't use on a daily basis in my office job, hence can be improved by many ways.

It's built on:

PRs are highly appreciated ๐Ÿฅณ

If you like Hilde, please consider starring the repository. Thanks!

License

Developed by nehalist.io. Licensed under the MIT License.

hilde's People

Contributors

danleeb avatar karlkowald avatar nehalist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hilde's Issues

Teams

Example: https://demo.hilde.gg/teams

  • Add teams page content (table of all teams, team size selector)
  • Add teams entity meta data:
rating                   Float    @default(0)
achievementPoints        Int      @default(0)
totalMatches             Int      @default(0)
totalWins                Int      @default(0)
totalLosses              Int      @default(0)
totalWinRate             Float    @default(0)
totalScore               Int      @default(0)
totalAvgScore            Float    @default(0)
totalHighestRating       Float    @default(0)
totalLowestRating        Float    @default(0)
totalHighestWinStreak    Int      @default(0)
totalHighestLosingStreak Int      @default(0)
dailyMatches             Int      @default(0)
dailyWins                Int      @default(0)
dailyLosses              Int      @default(0)
dailyWinRate             Float    @default(0)
dailyScore               Int      @default(0)
dailyAvgScore            Float    @default(0)
currentWinStreak         Int      @default(0)
currentLosingStreak      Int      @default(0)
  • Team seed (with fakerjs)

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.