Library / SDK
LeeJim/HowToCookOnMiniprogram avatar
LeeJim/HowToCookOnMiniprogram

HowToCookOnMiniprogram: a cooking guide rebuilt as a WeChat mini program

程序员做菜指南 for Miniprogram,将程序员精神贯彻到底

755 stars73 forksJavaScriptMIT

At a glance

What is it?
HowToCookOnMiniprogram takes the recipes from the HowToCook project and ships them as a WeChat mini program with cloud functions, an embedded step timer and a shopping module. The interesting engineering is the data pipeline that parses Markdown recipes into mini program content and uploads the images.
Who is it for?
Adopt this repository if you want to study a complete WeChat mini program with cloud development, a Markdown-to-mini-program content pipeline and image upload automation, since the script directory shows the whole flow and the config file is a working example. Do not adopt it as a recipe application to run today, because the last tagged release is 1.3.0 from 2022-10-30 and the last push was on 2026-06-03, and the WeChat secret and cloud environment have to be your own.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 145 days ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 25, 2026, and from our analysis. They are not legal advice.

Editorial analysis

A mini program port of an existing recipe repository

HowToCookOnMiniprogram is the mini program version of the programmers cooking guide, and it is explicit that the inspiration and the data come from the HowToCook project. The original repository is present in the tree as a HowToCook directory, which is consistent with the .gitmodules entry in the top level listing, so the recipes are pulled in as a submodule rather than copied.

The premise is a joke taken seriously. The original guide is a set of recipes written by programmers for other programmers, and this project ports that content into a WeChat mini program so it can be opened on a phone. The repository description says the programmers spirit is carried through to the end.

The structure of the tree tells you the whole architecture. There is a miniprogram directory holding the mini program source, a cloudfunctions directory holding the cloud development source, and a cloudfunctionTemplate directory that is a template for adding a new cloud function. A script directory holds the data parsing code, and there are data.json and classified-ingredients.json at the root, which are the generated outputs.

Two more root files are worth noticing. The classified-ingredients.json and classified-ingredients.txt pair suggests the recipes are indexed by ingredient, so the mini program can answer what to cook with what you have, which is the one feature that makes a recipe app useful beyond a list of pages. And retry.json suggests the script can resume or retry failed uploads.

The project is MIT licensed according to the listing, the default branch is main, and the release history shows 1.1.2 in May 2022, 1.2.1 in October 2022 and 1.3.0 on 2022-10-30.

The Markdown parsing script, and the credentials it needs

The content pipeline is the part worth understanding. The script that parses the Markdown recipes is at script/index.js, and the command that runs it is npm run gen-data, which the package manifest confirms maps to node script/index.js.

Because the mini program API is used to upload the images, the script needs credentials, and the documentation is specific about that. You have to create a config.js in the root directory providing this configuration:

js
module.exports = {
  appid: 'wx01462be634a0d447', // appid
  secret: '', // 小程序 secret;在微信公众平台获取
  cloudEnvId: '' // 云开发环境
}

The appid value is given as an example, while the secret and the cloud environment id are left empty for you to fill in from the WeChat public platform. That file is not in the repository, which is the right call for a file holding a secret, and the .gitignore is there to keep it out of commits.

The dependencies tell you what the script does. The glob package finds the Markdown files, marked parses them, and magic-string rewrites the parsed output. The dev dependencies are the interesting half: axios for the HTTP calls, cos-nodejs-sdk-v5 for Tencent Cloud object storage, md5 and md5-file for content hashing, form-data for uploads, cli-progress for progress bars, and commonmark for a second Markdown implementation.

The two Markdown parsers and the hashing libraries together suggest the script renders the recipes to HTML, hashes each output to decide whether the cloud copy is already up to date, and skips the upload when it is not. That is a build cache, and it is why retry.json exists.

Getting the project running in the WeChat developer tool

The contributing section gives the startup sequence in three steps, and it depends on the WeChat developer tool rather than a plain npm workflow.

The steps are to change into the miniprogram directory, run npm install there, and then, in the developer tool, you use the menu option to build npm. That step exists because the mini program developer tool handles npm packages differently from a Node project: the packages have to be built into the mini program bundle rather than resolved at runtime, and the developer tool is what performs that build.

The three source locations are then mapped to their directories. The mini program source is in the miniprogram directory, the cloud development source is in the cloudfunctions directory, and the data parsing script is in the script directory.

So the build is a two-part thing. The front end and the cloud functions are built and previewed inside the WeChat developer tool, and the data is generated separately by the Node script before it is uploaded. A contributor therefore needs two environments: the WeChat developer tool for the mini program itself, and a Node environment with the right credentials for the data pipeline.

The mini program uses the TDesign Miniprogram component library, which the documentation links to the Tencent repository. That is the design system behind the screens, so anyone extending the interface would follow its conventions rather than inventing their own.

The feature set, and what is still unchecked

The feature list is where the project's personality shows. Each item is described in the README with a small screen image next to it, which is the presentation style of a Chinese mini program project.

The embedded timer is the standout. The documentation says some steps have a timing requirement, that the current implementation recognises the time, and that a timer can be embedded in the step. That is a genuinely useful detail for cooking on a phone, where reading a step and then finding a timer in another app is friction.

Visual categorisation is described as concise and attractive, and the favourites and likes feature exists so that frequently used recipes are quick to find again. Image preview and link jumping are supported, with the caveat stated plainly that external links currently only support copying the link address, which is a WeChat platform limitation rather than an omission.

The shopping module collects a set of common grocery mini programs and links to them directly, so you can buy the ingredients without leaving the app. A learning module was added in v0.5.0, and sending subscription messages came in v1.0.0, which is the WeChat mechanism for pushing notifications to a user who has opted in.

The v2.0.0 list shows the current state of the roadmap. Search support was added in v1.1.0, and moving from WeChat cloud storage to Tencent Cloud storage was done in v1.1.1. The one unchecked box is personal sharing, with the note that it may be restricted for personal mini programs, which is a platform policy rather than a missing feature. The checkbox style makes it clear this list is a live plan rather than a retrospective.

Where this project is the wrong tool

The first wrong case is a production recipe application. The releases stop at 1.3.0 on 2022-10-30 and the last push to the repository was on 2026-06-03, so the code is nearly four years past its last tagged version. A mini program depends on platform APIs, and WeChat changes them, so a mini program from 2022 running against 2026 platform behaviour is a thing to verify before you rely on it.

The second is a project that needs the recipes. The HowToCook directory is a submodule, and the recipes themselves live in the upstream project. This repository is a client, so if you want the recipe data you are depending on two repositories and on the submodule pointer staying valid.

The third is anything outside WeChat. The whole thing is built on the mini program platform, the cloud development environment, the subscription message model and the WeChat login, so none of it transfers to iOS, Android or the web without a rewrite. The component library is equally WeChat specific.

The fourth is a deployment without your own WeChat account. The config.js needs an appid, a secret obtained from the WeChat public platform, and a cloud environment id, and the script uses the cloud development API to upload the images. There is no demo mode and no way to run the data pipeline without those credentials, so evaluation requires signing up for a mini program account first.

Editorial conclusion

Adopt this repository if you want to study a complete WeChat mini program with cloud development, a Markdown-to-mini-program content pipeline and image upload automation, since the script directory shows the whole flow and the config file is a working example. Do not adopt it as a recipe application to run today, because the last tagged release is 1.3.0 from 2022-10-30 and the last push was on 2026-06-03, and the WeChat secret and cloud environment have to be your own. Before you run the data generation, create config.js in the repository root with your appid, secret and cloud environment id, and expect the script to need those credentials to upload images.

Frequently asked questions

What is HowToCookOnMiniprogram and where does the recipe data come from?

It is a WeChat mini program version of the programmers cooking guide, and the README states that the inspiration and the data come from the HowToCook project. The HowToCook directory in the tree is a git submodule, and the recipes are parsed from its Markdown files by a script.

How do I generate the data for HowToCookOnMiniprogram?

Run npm run gen-data, which the package manifest maps to node script/index.js. The script parses the Markdown recipes and uploads the images, which requires a config.js in the repository root with your appid, the mini program secret and your cloud environment id.

What does the WeChat mini program in HowToCookOnMiniprogram offer beyond a recipe list?

The features include an embedded step timer for steps that need timing, visual categorisation, favourites and likes, image preview and link jumping, a shopping module that links to grocery mini programs, a learning module and search. External links currently only support copying the address.

Is HowToCookOnMiniprogram still actively developed?

The last tagged release is 1.3.0 from 2022-10-30, and the last push to the repository was on 2026-06-03. The roadmap in the README still has an unchecked item for personal sharing, with a note that personal mini programs may not support it.

Official sources

  1. Issues
  2. LeeJim/HowToCookOnMiniprogram on GitHub
  3. License: MIT
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/leejim-howtocookonminiprogram.svg)](https://hysenlabs.com/projects/leejim-howtocookonminiprogram)

Was this useful?