correction: It's a cool exercise if you write it yourself and not use GPT
well, hopefully the author did learn something or at least enjoyed the process :)
(the code looks like a very junior or a non-dev wrote it tbh).