Show HN: Recipe search engine, built in vanilla PHP (recipehunt.app)
2) Problem = Every recipe site is bloated(e.g. full of ads, long backstory). I just want to see 3 things: Picture, Ingredients, Directions.
3) Solution = Built a simple Recipe Search Engine that gives you only those 3 things.
4) Tech Stack = Vanilla HTML, CSS, Javascript, PHP, SQL (some JQuery). Frameworks are too complicated for me, so I just wanted to build with what I know.
5) Design
-Main Feed = Similar to Instagram Explore (Square Shaped Thumbnails).
-Categories = Filter by "Country" or "Dish Type".
-Search Bar = Quickly go directly to a Recipe or Category.
-Recipe Page = Gives you only 1 Picture + Ingredients + Directions + Comments. Separated by tabs (I don't like scrolling).
-Paywall(for Spam) = I put up a paywall to prevent spamming (Stripe).
6) Content(Recipes) = I manually put in some initial recipes (posted a few for each Country/Dish Type). Challenge is to fill the site with enough recipes to make it useful. May look into Recipe API's and make sure I'm not violating any terms (give source credit in recipe page).
7) Conclusion = Just wanted to share this because I think it will solve my own problem (making it less painful to search recipes). Still a work in progress, but hopefully it may be useful to someone else as well.
Will happily welcome any feedback! Thanks!
-nsemikey
62 comments
[ 1.6 ms ] story [ 116 ms ] threadQuick question. What do you use Stripe for?
And if I may, I would move this stripe <script> tag to the bottom of <body>. Should speed up DOM loading: https://i.imgur.com/0X93EHy.png
For your question, if you register an account, you can't post a recipe unless you upgrade to a premium account. I'm not expecting anyone to actually pay for this feature, I just put it up to prevent anyone from spamming images. Every user is able to comment on recipe pages though.
On integrating with recipe APIs, you can scrape recipe structured metadata. Most web sites use the google structured data, you can query for a script tag with type ld+json and find the structured data. See more information here: https://developers.google.com/search/docs/advanced/structure...
However you should be careful not to copy the blog text or the _images_ from a recipe website, because those require you to get permission from the author for resharing.
We have it as a backlog item to take pictures of all the recipes as made in our kitchen, we just haven't gotten around to making a good lighting set up.
Demo (client only): https://josh18.github.io/hitpoints/recipes Source: https://github.com/josh18/hitpoints
Goals are a little bit different though, designed to be a personal catalog.
https://recipehunt.app/forgotpw and https://recipehunt.app/forgotpw2
Yes, I know "long stories about last year's vacation where we ate such and such" get a lot of universal, justifiable hate. Everyone detests scrolling through "recipes" laden with ads and useless copy and photos.
But, to me, these kinds of database sites lose two important elements: the source of the recipe, and useful comments, from both the author and the readers.
Perhaps it's because I cook a lot, but I can't imagine just Googling "pasta carbonara" and following the first hit (pretending it was nicely formatted without ads). 90% of recipes online are seriously mediocre. For me, either I already know and trust the author (Serious Eats, many New York Times authors, etc), or I need to do a bit of work to decide whether they are the real deal.
(As an aside, I think that this is the source of the long-winded stories. Back in the day, when it wasn't so bad, I followed a handful of recipe bloggers and got to know and trust their recipes through their blogs. It seems so crap now because (1) they've so much longer, and (2) when we land on the top search of someone we don't know, it just seems like useless noise.)
For the second point, if you look at, say, a New York Times recipe, there's usually one, maybe two paragraphs of context about the dish itself (not stories of vacations). It's useful stuff. It tells you what you can substitute, it tells you the way this is and isn't authentic, it gives you hints on the tricky parts. And then the comments at the bottom will do all that and more, pointing out the recipe's flaws and improvements.
Where a database can come in useful for me is after I've fully vetted and digested the recipe, I'll add it to my own. But using a database to find a recipe has never been interesting to me, personally.
And add steps in a visual + text format like KptnCook.
I've built a few toy apps like everyone else and found the same feeling when it was just a CRUD listing app of recipes that I could search. What I found was an interesting take and one I'm wanting to take further is I want not recommendations on recipes but _almost_ generation of recipes. So when I search "Chile Colorado" it returns a specific recipe that I created but for each "step" it "links" to relations/more info/etc.
Example:
Ingredients:
- 1lb beef <this is the recipe itself either from a source or you put it in>
- ....Do you think that caries the context enough? Or do you think that you would just much rather have a list of vetted + manually entered ones?
https://play.google.com/store/apps/details?id=com.santurceso...
100% reads, no writes / no administration / no headaches.
Some ideas to consider, based on my experience building my own Hugo-based static recipe site:
* Make sure your navigation is consistent. The left filter links and the about/contact links are missing on many pages. A breadcrumb would help as well.
* The horizontal tabs on the recipe pages aren't really useful, I'd display all content at once. No need to force the users to click several times. Even on smaller viewports it's easier to just scroll.
This is a common misunderstanding. Giving credit does not grant the right to copy protected works.
In terms of copyright for a recipe site -- you can't copyright an ingredient list, and you can't copyright a process, but the language in the directions can be protected. For example, this (https://recipehunt.app/kimchi-recipe-1224) seems to be in violation of copyright. However, if the directions were re-written in original language, it would be fine.
How did you approach the user management?
Nb, I love your approach to the site - its function drives its form. There's no flashing lights, ads, cookie banners, anything annoying. It's just pure content, and that's what I'm craving on the internet lately.
So I just used basic PHP to build each feature one by one. I wrote out the user flow: Register > Login > Post Recipe > View Feed > View Recipe > Search. Then just tackled them one day at a time. When I looked at existing user authentication systems, there were so many features/options that my head spun. Maybe Im naiive, but I didnt think I needed all of them. I just wanted to put an email + pw + username in a database. Then send an email(with randomly generated code) to activate the account. Then made a Login page with simple sql query to validate email + pw was correct. It seems too simple to work, but if there's any problems Ill just deal with it later. Im actually thinking of removing pw altogether and just going with magiclink.
Basically, what Im trying to say is, just make it the way it makes sense in your mind, in the simplest way. Otherwise, youll be waiting forever before you build something real. Just like everything else in life, things are overcomplicated. Were just making websites arent we? Whether its PHP or Ruby or JS or xyz framework, it all just spits out html. Hope this helps!