i came from Javascript and Kotlin and my path thru was to first see the t2i framework. here's an example of one using t2i. https://perchance.org/moonstones-wonderland i just made the tiniest edit to a t2i one like this to get my feet wet.
Then the next step seemed to be definitely to get it under finer control, which you will also want, than t2i. for that there is https://perchance.org/text-to-image-plugin and nearly any example that links off it is something good to look at and start with. My next step was to make all the inputs in my own HTML.
From there you can actually do nearly anything you want with JS. I personally had expected to stay away from Perchance Script as a snobby elitist, but, over the time of getting to that point had come to see some of it's power and ease of which variables can be lists and allow variation within single variables. I now find the ideal a happy medium of both Perchance and JS synergizing together.
https://perchance.org/beautiful-people here is my current generator and where I, eventually, for maximum control, create all my images programatically which, at minimum, is: if your import is image = {import:text-to-image-plugin}
, would allow you to call function 'image' and pass it an object with at least a 'prompt' in it, like: image({prompt:'meow'}).evaluateItem
I basically forged my own way in the dark not knowing any of that. Now, knowing about the programmatic way, that is where I am focusing as it is highest potential and also where I would point you.
Also to take it slow with Perchance script and not write it off as worse than Javascript. It specifically is nice when you want to have variation in a variable, as I do in my prompts in beautiful people, and can fit seamlessly with javascript as a symbiotic friend. Everything helps if you believe it does.
And that's my intro. hope you make beautiful things :)