I’m developing a webapplication where users can enter ingredients and get suggested recipes.
I have a passion for cooking and loves to experiment with different ingredients too see what I come up with, but some days I only want something that tastes good or get help getting the inspiration.
I work in IT but programming is still only a hobby a side from “infrastructure-scripting” in the job… However in February next year I’ll get a new employment and it will be a switch from it-drift to full time programmer! I’m very exited about this and my devember-project will be a purse of gaining knowledge in areas this company works with.
My goto programming language has always been python and I love it… the thing is that this company does not use python much at all! Instead they work with java, c#, java/typescript and various web frameworks. That’s why I’ve choosen to go with a focus on java/typescript for building this application.
So, enough with the trivia!
This is the structure I decided to start with. The blue box on the left will be used for input of ingredients from the user and the orange will display matching recipes and contain buttons for filtering on different diets such as vegan or vegetarian.
I used the level1tech code and got two instances running debian 11. One is acting as “backend” and runs a database and a API. The other one is the “frontend” and serves the application trough a revese proxy.
I have built a very simple API with Express JS. Right now I can request ingredients and get them as a json response.
/api/ingredients -----> gets all ingredients /api/ingredients/:diet -----> gets all ingredients where diet is true
The data is stored in a regular sql-database.
I’m using React as this was a tip from one of my new colleagues at the new job.
As some of you probably can imagine, Ingredients and Recipes are separate components, but also the ingredient list, the requiments box and recipelist is their own component.
Some can talk to each other, baby talk. The next big step is to make them talk as needed.
Although I’m mostly following tutorials for the overall structure of the application, when I need to branch out from them, it find it enjoyable and it brings me back to very early memories of learning programming.
That’s it for this time. Next time I hope that I can share the code trough a git repo and maybe discuss the technical aspects a bit more in detail or something.
ps. I’m beginning to think I can’t spell recepie? or recipe?