Compartmentalize things so they all handle one thing individually and then you call those things from a main class is generally the way you’d do it.
Splitting things up will make your classes specific to a certain functionality and allow you to keep track of everything without individual files being thousands of lines, though sometimes they will end up that way anyway to achieve a single piece of functionality.
So for example you might have a service to call the api to get data, a service that exclusively posts to mastodon, etc.
You can write 500 lines of code to do something in your service and hide it away but then just call it like petInfoService.getPetInfo() from your main class and when you look at the flow it’ll make a lot more sense.
Any reason you chose typescript out of curiosity? Nothing wrong with it, just curious.
Feel free to post code if you need help. Just make sure whatever you’re posting or uploading to git doesn’t include any API keys.
What’s your background generally. Do you have a degree in something CS related?
I learned more in my first 6 months of hands on work than I did in all of my schooling. So if you have a cs degree and can learn enough of the basics and interview questions you’d probably be fine applying to jr dev positions whether your concentration is programming or other.
Really hard question to answer with that info though.