Skip to content

kaushik-rishi/rocketcp

Repository files navigation

Rocket Competitive Programming

A command-line client for parsing and making folders and files for test cases using the competitive companion extension and testing the solution. Building this with an 🎯 aim of making Competitive Programming More Productive


Tech Stack:

  • In the current version

NodeJS

JavaScript

  • Used for the previous releases

Make-File

E JS

Shell

Usage


Join the discord server if you:

  • have queries related to the development of the project
  • want to contribute to the project
  • need help in getting the tool up and running

Checklist:

  • Parse the post request data from the extension
  • Create files for the problems received
  • Change the file creation into folder creation
  • Make a template directory and copy the template
    • Template Checklist:
      • add the problem metadata on the top of the problem file
      • add only the metadata if the template not found
  • Create make a file for each folder
    • Makefile Checklist:
      • run the program against the test cases
      • show the difference in a user-readable format (chalk for node js coloring/ bash based coloring)
      • Can we have a Makefile in a directory and then use that makefile for all the subfolders [ may be have smaller make files in each sub dir ] - Aim: memory-efficient
  • Config files storing user preferences
  • Ship a binary instead of running the commands using node js. Refer cftool for example (or at least a npm package that can be installed globally)

Things to figure out (way above my head as of now):

  • Running the js script from inside the problem directory
    • Maybe use a hashbang #/usr/bin/env node and link the file to bin using ln
  • Making an npm package that can be installed globally ??
  • Make an extension like competitive companion for CodeChef and code forces
  • Submit the problem to cf from the cli.
    • Network checklist:
      • Check and understand the csrf token stuff
        • Figured out doing this using python request.sessions
      • Deep dive into the network tab
  • If it is that the extension is developed incorporate usage of advanced DOM manipulations and web scraping and parsing and extend the extension to many other sites

Dependencies:

    Aim to use the least dependencies and Especially not use a web framework and build the application using vanilla node js
  • argparse - parse the options provided to the CLI tool
  • mkdirp - Will rewrite after studying more about path library and separators and POSIX and NON POSIX URL Like paths
  • shelljs - For the executor script
  • ejs - For creating make files based on the file name
  • fast-diff - Providing interactive difference
  • find-free-port - Checks if a current port is free or not

Styling Dependencies

  • chalk - For colored terminal printing as this is a CLI tool.
  • ora - For spinner

Development Dependencies

  • husky - for git precommit hooks
  • husky-talisman - for security purposes
  • prettier - used to format the code in the pre commit hook
  • jest - for writing unit tests
  • nodemon - running the server while development

Small note to contributors:

  • Do not involve complexities like using environment variables at the start
  • Think of cross platforms later
  • Make a working version and then focus on refactoring and abstraction

Technical details used:

  • PORT for listening to post requests from the extension: 10045 We have a list of possible ports and the application check's which port is free and chooses the port accordingly

For Developers and Open source contributor's


  • The issue and PR's have linked templates, when you go ahead and create an issue or a PR please follow the template so that it will be easy for the maintainers to review your pull request or validate your issue
  • The project maintainer(s) will let you know if there is any merge conflict and then it's your job to resolve the merge conflict by taking the help of the mentor.

Contributors:

Credits goes to these people: ✨

About

🎯 Competitive Programming should be productive.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published