Giter Site home page Giter Site logo

prathamesh-b / chesscom-profile-svg Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 40 KB

A service to generate SVG representations of chess.com profile data.

Home Page: https://chesscom-profile-svg.vercel.app

License: MIT License

JavaScript 67.82% HTML 32.18%
chess chess-stats chesscom dynamic readme readme-profile readme-stats vercel-deployment

chesscom-profile-svg's Introduction

Chess.com Profile SVG Generator

This project is a web service that dynamically generates SVG images displaying chess statistics for a given Chess.com user. Using data fetched from the Chess.com API, the service creates visually appealing, customizable SVG graphics that showcase a user's performance in different game modes such as Rapid, Bullet, and Blitz.

โœจ Features

  • Dynamic Data Fetching: Retrieves real-time chess statistics from the Chess.com API.
  • Customizable Themes: Supports different themes to customize the appearance of the SVG images.
  • Game Mode Statistics: Displays user ratings for Rapid, Bullet, and Blitz chess modes.
  • Error Handling: Gracefully handles errors such as missing usernames or users not found on Chess.com.
  • Disable Animations: Option to disable animations in the generated SVG.

๐Ÿ“ Usage

If you want to use this project on your GitHub profile, I recommend forking and deploying it to your own Vercel instance and using the project with your own URLs.

To deploy on Vercel, click the button below.

Deploy to Vercel

After deployment, access the service at http://your-vercel-url/stats?username={Chess.com Username} to get the SVG image.

๐Ÿ’ก Example

ChessStats

[![ChessStats](https://chesscom-profile-svg.vercel.app/stats?username={Chess.com_Username}&theme={Theme}&borderRadius={Radius}](https://chesscom-profile-svg.vercel.app/stats?username=PrathamRex)

or

<img src="https://chesscom-profile-svg.vercel.app/stats?username={Chess.com_Username}&theme={Theme}&borderRadius={Radius}" alt="ChessStats"/>

๐Ÿ›ฃ๏ธ Endpoints

  • /stats?username={Chess.com Username}: Fetches and generates an SVG image for the specified Chess.com user.

๐Ÿ› ๏ธ Parameters

Parameter Description Example
username The Chess.com username for which you want statistics. username=viditchess
theme (Optional) The theme for the SVG image. Defaults to default. theme=dark
borderRadius (Optional) The border radius (in pixels) for the SVG image. Defaults to 10. borderRadius=8
disableAnimations (Optional) Disable animations in the SVG image. Set to true to disable. disableAnimations=true

Example:

/stats?username=viditchess&theme=dark&borderRadius=8&disableAnimations=true

๐ŸŽจ Themes

Use ?theme=THEME_NAME parameter.

default default light light
graywhite graywhite dark dark

If you'd like to add more themes, you can edit the themes.js file here.

๐Ÿค Contributing

Contributions are welcome! Please open an issue or submit a pull request.

๐ŸŒŸ Support

If you like this project, give it a โญ

GitHub stars

โš–๏ธ License

This project is licensed under the MIT License.

chesscom-profile-svg's People

Contributors

prathamesh-b avatar

Stargazers

 avatar  avatar  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.