Introduction
How It Works
Features
Preview
Tech Stack
Getting Started
Issues
License
Contact
CF Helper is a web application designed to simplify the process of finding and understanding solutions to Codeforces problems. Built using Next.js, it leverages Gemini API for providing detailed explanations and Cheerio for web scraping solutions from the web.
This project is open for contributions during Hacktoberfest 2024! Whether you're new to open source or an experienced developer, we welcome all contributions. 🎉
CF Helper works by allowing users to input specific criteria to find solutions for Codeforces problems. Here's how the process flows:
-
Input Criteria:
- Contest ID: Specify the contest id (e.g., 1234), visible in the url of contest.
- Problem Number: Select the question by letter (e.g., A, B, C, etc.).
- Preferred Language: Supports a wide range of programming languages (C++, Python, Java, etc.).
- Preferred Rating: Choose a rating level (Newbie, Pupil, Expert, etc.) whose solution you wish to view.
-
Web Scraping: Once you've entered the criteria, CF Helper uses Cheerio to scrape the web and fetch the exact solution that meets your preferences.
-
Solution Explanation: After fetching the solution, CF Helper integrates with the Gemini API to provide a detailed, step-by-step explanation of the solution, if requested by the user.
-
Results: You get the solution and the explanation delivered right to your screen, helping you understand the approach clearly and effectively.
- Custom Problem Search: Enter the contest ID, problem number, language, and rating level to get the exact solution you're looking for.
- Web Scraping: Automatically fetches Codeforces problem solutions using Cheerio.
- Solution Explanation: Provides detailed explanations via the Gemini API, helping you understand the logic behind the solution.
- Multi-language Support: Find solutions in your preferred programming language.
- User-friendly Interface: Easily navigate through the solutions and explanations with an intuitive UI.
- Frontend: Next.js
- Backend: Gemini API
- Web Scraping: Cheerio
- Deployment: Cf-helper
To run this project, you'll need a Gemini API key. Follow the instructions below to generate your API key:
- Go to Gemini Website: Click here Gemini.
- Generate an API Key: Read the steps given on this website to generate an API key for generating gemini responses.
Note
You can use your API key for testing and running your application locally. However, ensure to revert your API key in the .env.sample
file back to "your_gemini_api_key" before pushing your changes.
Please remember that your Gemini API key is personal and should not be shared or exposed in your codebase.
- Fork the repository: Click the "Fork" button at the top of this page.
- Clone your fork:
git clone https://github.com/your-username/cf_helper.git
- Install dependencies:
npm install
- Create a .env file in the root directory of the project and add your Gemini API key:
YOUR_API_KEY=your_api_key_here
- Run the project locally:
The app will be available at http://localhost:3000.
npm run dev
Check out the Contributing Guide for more information.
Feel free to submit issues and feature requests here.
This project is licensed under the MIT License. See the LICENSE file for more information.
If you have any questions or need further assistance, feel free to open an issue or contact the maintainers.
Looking forward to your contributions! Let's make CF Helper better together this Hacktoberfest! 🌟