CP Book Tracker is a Single Page Application (SPA) built for tracking progress on the Competitive Programming Book written by Felix Halim.
As an enthusiast of competitive programming, I was looking for some incentive to progress on the CP Book. Since the uHunt webpage provides a compact interface for that book's problems, I decided to create a more visual and intuitive version of that, using Node.js, Angular and TypeScript to deepen into web application development.
As for now, the CP Book Tracker application has a live demo deployed using the Netlify service. However, it can be built and run locally, see details below.
If you just want to use the application, you can use the live version.
Otherwise, you can either run it locally or build it for production. Follow the steps to clone the repository and install its dependencies:
- Open a terminal.
- If you don't have Node.js installed on your machine, install it using
sudo apt-get install -y nodejs
, if you use a Debian/Ubuntu-based distro. For other options, check https://nodejs.org/en/download and https://nodejs.org/en/download/package-manager - Clone this repository using
git clone https://github.com/xIvqn/cp-book-tracker.git
. - Go to the angular project folder using
cd cp-book-tracker/
. - Initialize the node project using
npm i
. - Install Angular CLI globally using
npm i -g @angular/cli
.
Now with everything set up, you might want to run the development server or build the application for production and then deploy it.
With the development server, the application will be reloaded with any changes you make to its source files. Follow the steps for running it:
- In a terminal, while on the Angular project folder, run the server with
ng serve
. - Now you've got the Angular application running on https://localhost:4200.
Once you have the project built, you can now deploy it. Follow the steps for building it:
- In a terminal, while on the Angular project folder, run the server with
ng build
. - The build artifacts will be stored in the
dist/
directory.
Since version 1.1.0, you can now run the CP Book Tracker app as a desktop application. You can find it in releases, under the assets section of the desired version.
For using them, you just have to download the desired binaries and run the executable.
Once you have the repository cloned and the project initialized (see installation section for further instructions), you just need to run npm run package:[platform]
in a terminal while on the project directory replacing [platform]
with the desired platform to build the binaries for it. This argument can be one of the following:
- For Linux distros use
package:linux
. - For Windows use
package:win
. - For MacOS (Darwin) use
package:osx
.
- Shows problems from the Competitive Programming book.
- Switch within the first 3 editions of the book.
- User tracking on onlinejudge website.
- Indicators on starred problems.
- Visual feedback on solved problems.
- Top 3 verdicts display for each problem.
- Quick Submit, uDebug and PDF download buttons for each problem.
- Solved and total problems counter for chapters and sections.
- Visual feedback on completed chapters and sections.
- Collapsing containers for chapters.
Right after opening the web application, you can check the chapters of the 3rd edition of the book. On the navigation bar, you can switch editions with the dropdown or search for a specific user. Also, you can extend a chapter to see its sections, problem sets and individual problems.
Chapters and sections have an indicator of how many problems have been solved in each category. On the other hand, problems are highlighted with different colors, depending on their state:
- Yellow problems are starred ( * ) in the Competitive Programming book, indicating they are strongly recommended to be solved.
- Green problems are already solved by the user.
- Grey problems have neither been solved, nor starred.
To highlight the solved problems in green, you must check for a valid username of the onlinejudge website. You can input your username in its field, on the top bar. After that, you will have your solved problems highlighted in green.
Also, each problem card has the DACU, which indicates the Different ACcepted Users for that problem, and the rates for the most indicative verdicts:
- ACs indicates the number of ACcepted solutions.
- WAs indicates the number of Wrong Answers submitted.
- TLEs indicates the number of submissions with the Time Limit Exceeded.
Planned to do.
Work in progress. More information will be added soon to this section.
Thanks to Felix Halim for writing all 4 editions of the Competitive Programming book, and both uHunt website and uHunt API.
Also, thanks to uDebug for being such a useful website.
Currently, I, xIvqn, am the only collaborator on the project.
If you want to contribute, feel free to leave a pull request from your fork, or either leave an issue if you find one! If you need more information about it, check the How to Contribute section.
Licensed under the GNU General Public License v3.0.