Built for fun and game activities! you can submit scores of players, create a new game, and refresh to see who is on top of the leaderboard. It was built with JavaScript, HTML, and CSS. Thanks to the central LeaderBoard API service all data is preserved

Overview

LeaderBoard

The leaderboard website displays scores submitted by different players. It also allows you to submit your score.

Mini Presentation

LeaderBoard

Additional description about the project and its features.

Built With

  • Major languages (HTML, CSS, JavaScript)

  • Frameworks

     - Bootstrap css framework
  • Technologies used

    - Webpack(Code Bundlng)
    - Git(version control)
    - ESLint(JavaScript linting)
    - WebHint(linting tool)
    - Stylelint(style linting)
    - Jest(project testing)

Live Demo

Live Demo Link

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

  • A text editor(preferably Visual Studio Code)

Install

Usage

Clone this repository

$ https://github.com/clintonjosephs/LeaderBoard.git
$ cd LEADERBOARD

Run project

$ npm install
$ npm test
$ npm build
$ npm run start # this will make webpack watching for your changes in code

Open page in browser

$ open dist/index.html

Interaction with the Leaderboard API

  • Each new game is created with the POST method using
        { 
            "name": "My cool new game" 
        }

This request returns a result that holds the unique ID for that game:

  {
    "result": "Game with ID: Zl4d7IVkemOTTVg2fUdz added."
  }

This gameID is saved in the localStorage automatically

The two allowed actions are posting and getting of the scores

  • The POST request creates a new Leaderboard score for the given game sending user and score as parameters like this:

    Endpoint

    https://us-central1-js-capstone-backend.cloudfunctions.net/api/games/:id/scores/

    body parameters

    { 
        "user": "John Doe",
        "score": 42
    }

    and it returns

    {
        "result""Leaderboard score created correctly."
    }
  • The GET request returns data in JSON format like this:

    Endpoint

    https://us-central1-js-capstone-backend.cloudfunctions.net/api/games/:id/scores/

    It returns

    {
      "result": [
          {
              "user": "John Doe",
              "score": 42
          },
          {
              "user": "Peter Parker",
              "score": 35
          },
          {
              "user": "Wonder Woman",
              "score": 50
          }
      ]
    }

Authors

👤 Clinton Mbonu

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

📝 License

This project is MIT licensed.

Comments
  • Add form validation

    Add form validation

    Hi @clintonjosephs,

    I visited your page and generally speaking, your work looks good in every aspect :clap: However, I believe it will be :cool: to additionally implement client-side form validation to your project. I will keep your data consistent, and also serve as an additional barrier against malicious users. Please use this Link, it's a reminder on how to implement the aforementioned feature.

    Happy coding :rocket:

    opened by Sboursen 1
  • Improve loading indicator to follow the overall design

    Improve loading indicator to follow the overall design

    The project is implemented very neatly. All components follow the same design except the loading indicator.

    image

    Would be nice if you can design this also in such way it follow the overall design of the project.

    opened by ahangarha 1
  • Mention MIT license rather All Rights Reserved

    Mention MIT license rather All Rights Reserved

    I just noticed you added a copyright notice below the page and mentioned "All Rights Reserved". Since the project is under MIT license and is a Free/Libre and Open Source software, I suggest to mention this. Of course your are the copyright holder but your are giving certain freedom to the user as per MIT license.

    It is also more cool :wink:

    opened by ahangarha 1
  • Morning Session

    Morning Session

    Great work with your project! Your code looks clean, it's very readable and it's working perfectly!

    Here are some suggestions that could make your code even better!:

    • In your comments, there are some typos that could be easily fixed.
    • Since you're already adding such amazing extra features, we think it would be great to make the leaderboard automatically refresh once a score it's been added.
    • Consider hiding the vertical scrollbar from the leaderboard when its size is not really big enough to expand the viewport.
    • Whenever a user tries to refresh the leaderboard when this is empty, it would be great to display a message different from the default one (since it's not really retrieving any content).

    Congratulations on your project! Keep it going. ❤️

    opened by orozCoding 1
  • LeaderBoard project

    LeaderBoard project

    Had fun developing the leader board project using git-flow.

    • Practiced JEST
    • Used Bootstrap CSS framework
    • Practiced giving code review
    • Added some cool features of my own.
    opened by clintonjosephs 0
  • Leaderboard final styling

    Leaderboard final styling

    Hello 😄 ,

    Today, I was able to achieve the final styling of the leaderboard project, updated my readme file with a gif presentation of the project, and did a few code refactoring.

    Thank you for reviewing my code.

    opened by clintonjosephs 0
  • LeaderBoard - Hit api

    LeaderBoard - Hit api

    Hello 😄 ,

    Today I achieved task two on the leader board project, which was to consume and read data from the API provided. Kindly see below a succinct work-through of what I achieved:

    • Loading overlay to get uploaded scores on the first run for existing users
    • New users can create a new game with the name of choice by using the API.
    • Implemented the "Refresh" button (receiving data from the API and parsing the JSON).
    • Implemented the form "Submit" button (sending data to the API).
    • Used async and await JavaScript features to consume the API.
    • Implemented some styling
    • Used ES6 standards and arrow functions
    • Ensured no linter errors

    Thank you in advance for reviewing my project.

    opened by clintonjosephs 0
  • LeaderBoard - Part 1

    LeaderBoard - Part 1

    ##LeaderBoard

    Hello 😊 , I hope this PR for the leaderboard website meets you well, this website displays scores submitted by different players and also allows you to submit your score. All data is preserved thanks to the external Leaderboard API service.

    Please find below a few things that were achieved in the skeleton branch

    • ✅ Added Linters
    • ✅ Configured Webpack
    • ✅ Configured JEST
    • ✅ Setup MVC approach for the pages
    • ✅ Created HTML design and distributed to different views (.js) files for dynamic loading
    • ✅ Styled design a bit
    • ✅ Added image using Webpack
    • ✅ Setup and Updated readme file

    Thank you for making out time to review this PR 😄

    opened by clintonjosephs 0
  • Leader Board - Project Setup

    Leader Board - Project Setup

    ##LeaderBoard

    Hello 😊 , I hope this PR for the leaderboard website meets you well, this website displays scores submitted by different players and also allows you to submit your score. All data is preserved thanks to the external Leaderboard API service.

    Please find below a few things that were achieved in the skeleton branch

    • ✅ Added Linters
    • ✅ Configured Webpack
    • ✅ Configured JEST
    • ✅ Setup MVC approach for the pages
    • ✅ Created HTML design and distributed to different views (.js) files for dynamic loading
    • ✅ Styled design a bit
    • ✅ Added image using Webpack
    • ✅ Setup and Updated readme file

    Thank you for making out time to review this PR 😄

    opened by clintonjosephs 0
  • Peer to Peer: Module 2 Block 5 Day 4

    Peer to Peer: Module 2 Block 5 Day 4

    Hey Clinton 👋

    I have seen your project 👀 You have done a great job 👏

    Following best practices of HTML/CSS ✔️ Following best practices of JavaScript ✔️ Following KISS, DRY, YAGNI completely. ✔️

    Review Changes ♻️

    • You should make your design of leaderboard items like the below image. https://res.cloudinary.com/movespring/image/upload/v1618265767/blog/leaderboard_desktop_2b2f45c10d.jpg

    [OPTIONAL] - You can make a leaderboard for multiple games. Means it should take multiple games shown on Leaderboard.

    opened by HAMMAS-SALEEM 0
Owner
Clinton Mbonu
Full-stack developer, Co-founder, Entrepreneur. Languages: PHP, JavaScript, React & Redux. Frameworks: Ionic, Angular, Bootstrap. Looking for my next job
Clinton Mbonu
The leaderboard website displays scores submitted by different players. It also allows you to submit your score. All data is preserved thanks to the external Leaderboard API service. Build with Html, CSS, JS, API, and Webpack.

The leaderboard website displays scores submitted by different players. It also allows you to submit your score. All data is preserved thanks to the external Leaderboard API service. Build with Html, CSS, JS, API, and Webpack.

Kyrillos Hany 9 Mar 11, 2022
The leaderboard website displays scores submitted by different players. It also allows you to submit your score. All data is preserved thanks to the external Leaderboard API service.

Leaderboard The leaderboard website displays scores submitted by different players. It also allows you to submit your score. All data is preserved tha

Jihane Haddad 5 Feb 10, 2022
The leaderboard website displays scores submitted by different players. It also allows you to submit your score. All data is preserved thanks to the external Leaderboard API service.

Leaderboard The leaderboard website displays scores submitted by different players. It also allows you to submit your score. All data is preserved tha

Regiss Mukubiza 2 Apr 8, 2022
The leaderboard website displays scores submitted by different players. It also allows you to submit your score. All data is preserved thanks to the external Leaderboard API service.

Leaderboard- DESCRIPTION The leaderboard website displays scores submitted by different players. It also allows you to submit your score. All data is

Andres Garzon 2 Jun 16, 2022
The leaderboard website displays scores submitted by different players. It also allows you to submit your score. All data is preserved thanks to the external Leaderboard API service.

Leaderboard ?? Table of Contents ?? About the Project ?? Built With Tech Stack Key Features ?? Live Demo ?? Getting Started Setup Prerequisites Instal

Ritika Rawat 4 Mar 20, 2023
This website displays scores submitted by different players. It also allows you to submit your score. All data is preserved thanks to the external Leaderboard API service. Built with Webpack and ES6

Leaderboard This website displays scores submitted by different players. It also allows you to submit your score. All data is preserved thanks to the

Sanja Mandic 9 Sep 30, 2022
The leaderboard website displays scores submitted by different players. It also allows you to submit your score. All data is preserved thanks to the external API.

Leaderboard The leaderboard website displays scores submitted by different players. It also allows you to submit your score. All data is preserved tha

null 5 Mar 5, 2022
The Leaderboard App displays scores submitted by different players, allows you to submit your score and all data is preserved in the Leaderboard API service.

Leaderboard The Leaderboard App displays scores submitted by different players, allows you to submit your score and all data is preserved in the Leade

Jonathan Kayizzi 6 Nov 9, 2022
Leaderboard is a simple app that allows players to add their scores and see other players' scores, using Leaderboard API, JavaScript, HTML, and CSS.

Leaderboard: setup project description: A Leaderboard app that allows players to add their score, and see other player scores. in this project: Set up

Toussaint Saraza 7 Jun 20, 2022
A leaderboard website which displays scores submitted by different players. It also allows you to submit your score. All data is preserved in the external game API.

Leaderboard LeaderBoard Built With HTML JavaScript CSS webpack Getting Started clone this repository. $ cd Leaderboard. $ npm run build . $ npm start

ahmednazirmusah 3 Oct 13, 2022
Erick Hans 5 Oct 26, 2022
A leaderboard created using Leaderboard API service, Webpack, and Gitflow. The user can add a new score and refresh to see his ranking in the leaderboard.

Leaderboard A leaderboard created using Leaderboard API service, webpack, and gitflow. The user can add a new score and refresh to see his ranking in

ABDUL ALI 13 Dec 26, 2022
A leaderboard website that displays scores submitted by different players. It was developed with Javascript, HTML, CSS and the Leaderboard API service was consumed.

LeaderBoard App Description The leaderboard website displays scores submitted by different players. It also allows you to submit your score. All data

Bright Kweku Ahiadeke 6 Jul 25, 2022
The leaderboard website displays scores submitted by different players. It also allows you to submit your score. Built with HTML, CSS, JavaScript with APIs

LeaderBoard The leaderboard website displays scores submitted by different players. It also allows you to submit your score. Built With Html,JS,CSS We

Promise Okechukwu 10 Nov 1, 2022
The leaderboard website displays scores submitted by different players. It also allows you to submit your score. I created this project using ES6 concepts. I connected to the Leadboard API service

Leaderboard App The leaderboard website displays scores submitted by different players. It also allows you to submit your score I created this project

Kwasi Antwi Baayeh 5 Dec 21, 2022
This project is built with JavaScript, Webpack, HTML & CSS, Leaderboard api. When user clicks on Refresh button it hits the api and responds with the data, The user can also post data to the api

leaderboad Description the project. this project is about the leaderboad i did during Microverse to build a website for adding Data to the API and fet

Emmanuel Moombe 4 May 30, 2022
This application displays scores submitted by different players from an API service. It also allows a user to submit his/her score while saving the data on the API.

Leaderboard This application displays scores submitted by different players from an API service. It also allows a user to submit his/her score while p

Felix Ouma 8 Jul 15, 2022