Open-source project
Chalarangelo/30-seconds-of-code avatar
Chalarangelo/30-seconds-of-code

30 seconds of code: a JavaScript snippet library that reads like a reference, not a tutorial

GitHub describes it as Coding articles to level up your development skills. The repository metadata lists JavaScript as its primary language. The metadata lists the CC-BY-4.0 license. This article stays within the project description and details documented in the GitHub repository README.

129,522 stars12,520 forksJavaScriptCC-BY-4.0

At a glance

What is it?
A repository of short, copy-pasteable JavaScript articles with a CC-BY-4.0 license and a static website. It is a reference for experienced developers, not a learning path for beginners.
Who is it for?
Adopt 30 seconds of code if you are an experienced JavaScript developer who wants a searchable, copy-pasteable reference for common tasks and does not mind the CC-BY-4.0 attribution requirement. Do not use it if you need a structured tutorial, a venue for community-contributed content, or a dependency you can install.
Can I use it commercially?
Yes, with credit. CC-BY-4.0 allows commercial use as long as you credit the authors and indicate what you changed. It is written for creative content, so check how it applies to any code.
Is it still maintained?
Yes. The repository last received commits 2 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 November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • Chalarangelo/30-seconds-of-code129,522 ★ · +814
Star history
Repository2026-08-132026-11-15
Chalarangelo/30-seconds-of-code128.7k129.5k

814 Stars in the last 94 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What this repository actually is

The repository is a source of truth for the website. The website is built with Astro and hosted on Netlify, according to the README credits. The repository itself contains the articles and collections. You browse them by name, tags, language, or description. Each article is a card that you click to see the full content. This structure means the repository is more like a database of knowledge than a typical open source project. You do not fork it to add features. You use it as a reference.

How the content is organized and searched

The README directs you to the website for viewing all articles, and to specific search pages for snippets and collections. You can search by name, tags, language, or description. This is a key feature: the content is tagged and categorized, which makes it possible to find a snippet for a specific problem. The website has a paginated list of articles and collections. The repository itself, based on the file structure implied by the README, likely contains markdown or similar files for each snippet. The search functionality is on the website, not in the repository. If you clone the repository, you get raw content files, not a search interface. This is a limitation for local use.

Running it locally: what you can and cannot do

The README does not provide any installation or build instructions. The website is powered by Astro and Netlify, and package.json defines scripts for it: dev runs bin/prepare dev --fast-highlight and then astro dev --port 8000, and build runs bin/prepare full and then astro build. You can also browse the website or read the raw files in the repository. If you clone the repository, you can read the article files directly, but you will not have the search interface. The repository is a content source, not a distributable application. The release versions, like v14.0.0 named 'dimensional debugger', suggest that the repository is versioned.

Licensing: attribution required, but with limits

All code snippets are licensed under CC-BY-4.0, unless explicitly stated otherwise. The README also states that any other material, including text content, images, the website source code, logos, names, and trademarks, are not to be used without explicit consent of the owner. This is a critical distinction. You can reuse the code snippets with attribution, but you cannot reuse the surrounding text or the website design without permission. The license is permissive for code, but restrictive for the rest. This dual licensing is common for content sites, but it means you cannot simply copy an entire article and republish it. You must give credit to the original author. For a developer who wants to copy a single function, this is fine. For someone who wants to build a similar website, it is not.

The contribution model: a closed archive

The README is explicit: 'New content contributions are not accepted at this time.' You can report problems or suggest improvements by opening an issue, but you cannot add new snippets. This is a major difference from most open source projects. The repository is not a community project. It is maintained by one named maintainer, Angelos Chalaris. The last push was on 2026-10-26, the newest release, v14.0.0, dates from May 2025, and the three most recent releases fall between August 2024 and May 2025, so new content comes from the maintainer only. This means the content may not cover newer JavaScript features or emerging best practices. If you rely on this repository as your primary reference, you may miss out on developments that the maintainer has not added. The closed contribution model also means there is no way to request a specific snippet and have it added, unless you open an issue and the maintainer decides to act.

A genuine limitation: snippets are not tested or vetted

The README does not mention any testing, code review, or verification process for the snippets. The repository is a collection of articles, not a tested library. This means you cannot assume that every snippet is bug-free or follows best practices. For a production codebase, you would need to test each snippet yourself. This is a real risk. A snippet might work in one browser or Node.js version but not another. The documentation does not state browser compatibility or Node.js version requirements. This is a significant limitation for a reference that is supposed to 'level up your development skills.' You should treat each snippet as a starting point, not a final answer.

An alternative: MDN Web Docs for JavaScript

If you need a JavaScript reference, MDN Web Docs is a direct alternative. MDN provides detailed documentation for JavaScript built-in objects, functions, and language constructs. The difference in approach is significant: MDN is a comprehensive, community-maintained reference with browser compatibility tables, formal specifications, and examples that are tested by the community. 30 seconds of code offers short, opinionated snippets that are easier to copy, but MDN gives you the underlying mechanics and edge cases. For a developer who needs to understand why a function works, MDN is better. For a developer who just wants a quick recipe, 30 seconds of code is faster. But MDN is a wiki, so it is constantly updated, while 30 seconds of code is a closed archive. If you need authoritative, up-to-date information, MDN is the safer choice.

Maintenance and upgrade cost

The repository is maintained by the author, with the last push on 2026-10-26 and the newest release in May 2025. The maintenance cost for you as a user is low: you do not need to update anything because you are not installing a package. You just visit the website or read the files. The upgrade cost is also low, because there is no dependency to upgrade. However, the content can become stale. The last release was in May 2025, but that does not guarantee that all snippets are current. The license requires attribution, which is a legal obligation, not a technical one. You should keep a record of which snippets you use and where they came from, to comply with CC-BY-4.0. Reading the content needs no dependencies, because the npm packages in package.json are devDependencies for building the website. Forking the site is limited by the README's rule that the website source code is not to be used without the owner's consent.

Editorial conclusion

Adopt 30 seconds of code if you are an experienced JavaScript developer who wants a searchable, copy-pasteable reference for common tasks and does not mind the CC-BY-4.0 attribution requirement. Do not use it if you need a structured tutorial, a venue for community-contributed content, or a dependency you can install. Before using any snippet, verify the code against your own environment and check the license terms for your specific use case, especially if you plan to redistribute the snippets. The repository is the content source for a website, not an installable library.

Frequently asked questions

Can I add my own snippet to 30 seconds of code?

Not at the moment. The README states that new content contributions are not accepted at this time, and that you can report problems with the website or suggest improvements by opening an issue.

What licence covers 30 seconds of code snippets?

All code snippets are licensed under the CC-BY-4.0 License unless explicitly stated otherwise. Any other material, including text content, images, the website source code, logos, names, and trademarks, are not to be used without the explicit consent of the owner, even though package.json records MIT.

How do I run the 30 seconds of code website locally?

It is an Astro project with a prepare step in front of it. Development runs bin/prepare dev --fast-highlight and then astro dev --port 8000, a production build runs bin/prepare full and then astro build, preview serves on port 9000, and the test script runs vitest.

How do I search 30 seconds of code for articles?

On the website, where you can search articles and collections by name, tags, language, or description, and browse all articles or the collections for each topic. The repository itself offers no search interface, so offline you would read the content directory directly.

What version is 30 seconds of code currently on?

The newest release tag is v14.0.0, dated 2025-05-07, while package.json still carries version 13.0.0, and the last push landed on 2026-10-26. The two version signals do not agree, so neither one alone tells you the state of the site.

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/chalarangelo-30-seconds-of-code.svg)](https://hysenlabs.com/projects/chalarangelo-30-seconds-of-code)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/chalarangelo-30-seconds-of-code.svg)](https://hysenlabs.com/projects/chalarangelo-30-seconds-of-code)

Was this useful?