A free, open-source web application that generates dynamic, shareable SVG stats cards for any robocontest.uz user profile. Perfect for showcasing your competitive programming stats on your GitHub profile or personal website.
(Live example for the user 'nesamandar')
- Dynamic Data: Stats are scraped in real-time and are always up-to-date.
- Customizable: Simply change the
usernameparameter to generate a card for any user. - SVG Format: Crisp, scalable vector images that look great on any web.
- Dark Mode: A sleek, modern design inspired by GitHub's dark theme.
- Free & Serverless: Deployed on Vercel's Hobby plan at no cost.
It's incredibly simple to get your own stats card.
-
Visit the website: robocontest-badge-generator-five.vercel.app
-
Enter Your Username: Type your
robocontest.uzusername into the input field. -
Copy the Code: Click the "Copy" button to copy the generated markdown code.
-
Paste It: Paste the code into your GitHub profile's
README.mdfile.
This project is a complete web application built with a modern, serverless architecture.
-
Frontend:
- Built with plain HTML, CSS, and JavaScript for a lightweight and fast user experience.
- Features a responsive design with an automatic dark/light mode toggle that respects user system preferences.
-
Backend (Serverless Function):
- A single Python serverless function hosted on Vercel.
- Web Scraping: Uses the
requestsandBeautifulSoup4libraries to fetch and parse therobocontest.uzprofile page in real-time. - Dynamic SVG Generation: The Python function generates a custom SVG image as a string, dynamically embedding the scraped stats and calculating the progress bar percentage. This SVG is then sent directly to the browser.
-
Deployment:
- Vercel: The entire project (both frontend and backend) is deployed on Vercel.
- Continuous Deployment (CI/CD): Vercel is linked to this GitHub repository. Any push to the
mainbranch automatically triggers a new deployment, ensuring the live application is always running the latest version of the code.
To run this project on your local machine:
-
Clone the repository:
git clone https://github.com/ssspplash6/robocontest-badge-generator.git cd robocontest-badge-generator -
Install dependencies: Make sure you have Python 3.9+ installed.
pip install -r requirements.txt
-
Install the Vercel CLI:
npm install -g vercel
-
Run the development server: This command simulates the Vercel environment perfectly.
vercel dev
The application will be available at
http://localhost:3000.
This project is open-source and available under the MIT License.