- Star this repo 😁
- Place the code below in you repo and replace username with your own.

It is recommended to self-host the project for better reliability.
Here are the different types of cards you can generate:
| Card Name | Endpoint | Description | Card |
|---|---|---|---|
Card |
/api/card |
General profile stats card | |
Game Card |
/api/game |
Shows stats for a specific game mode (requires gameMode) |
⚠️ Important: Make sure to include?before your first parameter, or your options won’t be applied.
Example: https://chess-stats-card.vercel.app/api/card?user=username
The user field is the only required option for all cards. All other fields are optional. To add additional field add &[parameter] to the link.
| Parameter | Type | Description | Example |
|---|---|---|---|
user |
string |
Your Chess.com username | magnuscarlsen |
theme |
string |
Card theme – available themes: light, dark, midnight, etc... | theme=ocean_dark |
width |
float |
Width of the card | width=420 |
height |
float |
Height of the card | height=200 |
avatar |
boolean |
Toggle profile picture from Chess.com. true by default |
avatar=false |
textColor |
string |
HEX or named color for body text | textColor=#ffffff |
titleColor |
string |
HEX or named color for the title | titleColor=#00ff00 |
borderColor |
string |
HEX or named color for the border | borderColor=#000000 |
bgColor |
string |
HEX or named color for the card background | bgColor=#1a1a1a |
Note: If you provide
textColor,titleColor,borderColor, orbgColor, they will override the colors set by the selectedtheme.
| Parameter | Type | Description | Example |
|---|---|---|---|
gameMode |
string |
Game mode to show stats for (required for gamecard) |
gameMode=chess_blitz |
Valid
gameModevalues:chess_rapid,chess_blitz,chess_bullet,chess960_dailyandchess_daily.
All cards themes are set to default by default. Here are a few themes that you can do.
All themes
Contributions are welcome! Feel free to open an issue or submit a pull request if you have a way to improve this project.
Make sure your request is meaningful and you have tested the app locally before submitting a pull request.
If you like this project, give it a ⭐ and share it with friends!