Here is a question: which options do we have for designing (an architecture of) an application which shows a list of strings in console gui, allows to edit strings in an edit field that appears next to a list, and shows logs, and which design would you choose?
Let's play a game: there are some variations of console list application architecture listed in this article. If you come up with some new architecture, which is not listed in here, then I owe you an imaginary glass of beer. And if it is listed in the article, then you owe me one.
You have at your disposal functions that draw strings, rectangles and grids on the screen in console: https://gist.github.com/shiraeeshi/70e447fbbb5ae9a6ba1bf1c0c9bdd2cf Also the function to register key button press events is given: https://gist.github.com/shiraeeshi/6aa2055d840297b1d55fac2e11b72e12
You can copy-paste the above code into your project. Also you would need to add this dependency to the project: - ansi-terminal >= 0.10.3
Don't worry about adjusting the width of a list to the length of strings, you can use fixed width. Also don't worry about the height of a list or the height of the logs container, let's show 5 items in a list and you can use fixed height.
You can use a library or you can reinvent what the library does, it's up to you.
The idea of the game is that you put this article aside and start writing your version of console strings list, and after you finished that, come back to the article.
Good luck!