Open-source project
krahets/hello-algo avatar
krahets/hello-algo

Hello Algo: five MkDocs builds, one non-commercial licence, and code in a dozen languages

GitHub describes it as 《Hello 算法》:动画图解、一键运行的数据结构与算法教程。支持简中、繁中、English、日本語,提供 Python, Java, C++, C, C , JS, Go, Swift, Rust, Ruby, Kotlin, TS, Dart 等代码实现. The repository metadata lists Java as its primary language. The metadata lists the NOASSERTION license. This article stays within the project description and details documented in the GitHub repository README.

130,534 stars15,511 forksJavaNOASSERTION

At a glance

What is it?
Hello Algo is an open source, free, beginner-oriented data structures and algorithms tutorial with animated diagrams and runnable code. What an engineer should know before using it is that the licence is non-commercial and covers the code as well as the text, that the site is five separate MkDocs builds, and that the language count is maintained in two places that disagree.
Who is it for?
Use Hello Algo as a reading and reference text if you read Chinese, or as one of five parallel editions if you follow a link to a translated build, and treat the code as teaching material you reimplement rather than lift. Do not copy an implementation into a commercial product without reading the licence terms yourself, because the texts, code, images, photos and videos are all under CC BY-NC-SA 4.0.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 43 days ago.
What is it written in?
Mainly Java, according to GitHub's language statistics.

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

Editorial analysis

The book is Chinese first, and the other editions are separate builds

The repository is one book in five languages, and the default is Simplified Chinese. The README offers a language bar that starts with 简体中文 and then links 繁體中文, English, 日本語 and Русский, and the tree carries docs/ alongside zh-hant/, en/, ja/ and ru/, each with its own mkdocs.yml. The container build proves they are independent: mkdocs build runs once for the root configuration and then again for each language, five invocations in total, each after copying that language's docs directory and its own config. That structure is what makes the project practical, since you can host only the edition you need, and it is also what makes corrections expensive. A fix to an explanation has to be made in the Chinese source and in each translation that has already caught up, and nothing in the build fails when a translation lags.

CC BY-NC-SA 4.0 covers the code, and the metadata names no licence

The licensing statement is short and unusually broad. The texts, code, images, photos and videos in the repository are licensed under CC BY-NC-SA 4.0, which is a Creative Commons attribution licence with a non-commercial condition and a share-alike requirement. Two consequences follow, and neither is about the prose. First, the code is under the same terms as the diagrams, so a data structure or algorithm implementation taken from codes/ carries a non-commercial restriction and an obligation to license derivatives the same way. Second, the repository's licence metadata reports NOASSERTION rather than a recognised identifier, so a scanner that reads metadata will record nothing while a human reading the README section gets a different answer. If you intend to reuse an implementation, read the actual terms yourself and decide whether your use is commercial.

Twelve languages in the contribution guide, thirteen in the description

The project's own two statements about language coverage do not match. The repository description lists Python, Java, C++, C, C#, JS, Go, Swift, Rust, Ruby, Kotlin, TS and Dart, which is thirteen names. The contribution section says code translation is welcome and that twelve programming languages are already supported, naming Python, Java, C++, Go and JavaScript among them. Nobody is wrong about the directory tree: codes/ is where every implementation lives, and the GitHub language statistic that reports Java as the primary language is simply counting the largest implementation directory. The useful takeaway for a reader is that the count is maintained in more than one place and is not authoritative in either, so if a language matters to you, look for its directory under codes/ rather than trusting the number. It also explains the third contribution category, which is code translation into a language that is not there yet.

mkdocs-material is pinned exactly, mkdocs-glightbox is not

The Dockerfile is where the site actually gets built, and it is a plain Alpine Python image doing a static build.

dockerfile
FROM python:3.10.0-alpine

# Official PyPI is preferred when reachable.
ENV PIP_INDEX_URL=https://pypi.org/simple

# Use the mirror when official PyPI is unreachable.
# ENV PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple

RUN pip install --upgrade pip
RUN pip install mkdocs-material==9.5.5 mkdocs-glightbox

The theme is pinned to 9.5.5 while the glightbox plugin beside it floats, so the build is not reproducible in the strict sense: a new plugin release changes the output of an otherwise identical build. Two other details are worth knowing. The base image is a specific early patch of Python 3.10 on Alpine, and the index URL is baked in with a commented Tsinghua mirror for networks where PyPI is unreachable, which you enable by editing the line rather than by a build argument.

The container serves the built site with python -m http.server

The last lines of the Dockerfile decide what kind of server you get.

dockerfile
WORKDIR /hello-algo/site
EXPOSE 8000
CMD ["python", "-m", "http.server", "8000"]

That is the standard library's static file server, with no configuration, no compression settings and no routing layer. It is a sensible choice for a documentation site and it sets a clear limit: anything that needs to be generated per request, or that depends on a service worker or a server-side include, is not part of this image. The five MkDocs builds run before that, into the site directory, so the content is baked in at image build time. For a deployment that means the artefact is the image, and updating the book means rebuilding it, not editing a mounted directory.

docker-compose.yml bakes the content in and publishes 8000 on the host

The compose file is seven lines and shows the same design decision in miniature.

yaml
version: '3'
services:
  hello-algo:
    build: .
    image: hello-algo
    container_name: hello-algo
    ports:
      - "8000:8000"

There is no volume, so nothing can be overridden from the host, and build: . means the content is compiled into the image on the first run rather than mounted. The container name is fixed as hello-algo, so two instances on one machine collide on the name, and the port mapping uses the same number on both sides, so a second copy needs a different host port. The version key at the top is the older compose schema and is ignored by current Compose implementations, which is harmless but is a sign of how long this file has been carried forward.

Releases are sparse, so a tag lags the branch by months

The release history is three entries: 1.1.0 on 2024-04-14, 1.2.0 on 2024-12-06 and 1.3.0 on 2026-01-01. The last push was on 2026-08-17 and the repository is not archived, so work continued after the newest tag by roughly eight months. For most projects that gap is a versioning annoyance; for a book it changes what you read. If you clone the default branch you get content that no release describes, and if you pin 1.3.0 you get the site as it was built in January, including whatever the translations had reached by then. The project is alive and asking for contributions, and the honest way to describe the maintenance model is that the book moves continuously while the versions are occasional.

Questions go to Issues, WeChat, or a giscus comment box

The community channels are stated plainly in the contribution section. Corrections are invited for grammar errors, missing content, ambiguous wording, invalid links and code bugs, code translation into additional languages is invited, and translation review is invited, since keeping several editions in step is the part that needs help. For contact the project asks for a GitHub Issue or a WeChat account named krahets-jyd, and the README asks readers to raise questions in the comment area, which is wired through giscus.json, meaning comments are backed by GitHub Discussions rather than a separate comment database. The endorsements on the cover come from Deng Junhui, a professor in the computer science department at Tsinghua University, and Li Mu, a senior principal scientist at Amazon. Those are arguments about pedagogy, and they say nothing about the code, which the licence already restricts.

Editorial conclusion

Use Hello Algo as a reading and reference text if you read Chinese, or as one of five parallel editions if you follow a link to a translated build, and treat the code as teaching material you reimplement rather than lift. Do not copy an implementation into a commercial product without reading the licence terms yourself, because the texts, code, images, photos and videos are all under CC BY-NC-SA 4.0. Before you rely on a specific edition, check whether you are reading main or the 1.3.0 tag dated 2026-01-01, since the last push was on 2026-08-17 and the translations are built from separate MkDocs configurations that can drift apart.

Frequently asked questions

What is Hello Algo and which languages does the code cover?

It is an open source, free and beginner-oriented tutorial on data structures and algorithms, built around animated diagrams and code you can run. The contribution page says twelve programming languages are already supported, while the repository description names Python, Java, C++, C, C#, JS, Go, Swift, Rust, Ruby, Kotlin, TS and Dart, and the implementations live under the codes/ directory.

Can I use Hello Algo code in a commercial project?

The README states that the texts, code, images, photos and videos in the repository are licensed under CC BY-NC-SA 4.0, which carries a non-commercial condition and a share-alike requirement, and the code is inside that scope rather than outside it. The repository's licence metadata reports NOASSERTION, so a tool reading metadata will not tell you any of this; read the terms and decide for yourself.

How do I run the Hello Algo site locally?

The site is a static MkDocs build, and the repository ships a Dockerfile with a matching docker-compose.yml that publishes 8000 on the host. The image builds the root documentation and then zh-hant, en, ja and ru from their own mkdocs.yml files, and finally serves the result with the standard library's http.server on port 8000.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
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/krahets-hello-algo.svg)](https://hysenlabs.com/projects/krahets-hello-algo)