[Devember 2021] What to cook


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.

Technical design
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.
The routes:

/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.

So, I’ve been working on this on and of since the beginning of December. I’m very new to javascript but feel I start getting the hang of it quite fast, especially with Express. This has been a positive factor for me, since I’ve been afraid that pythons builtins and readability would have made me to comfortable.
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?


I always spell it the 1st way, 'coz that’s the way is sounds…

But, a kwick cheque with google says: ‘recipe’… go figure.

So, now you’ve helped me learn how to spell recipe correctly in the future:

Re - Cipe = “RE:” + “S” + “Eye” + “P”

<RE: guarding… & Sounds like Sight, but with a Pee>

I have lysdexia

Thanks for that. :slight_smile:

Good luck with your project

:+1: _up: