5 Outstanding Open-Source Projects Which Have Just One Source File

Amazing ideas but just as one file

Shalitha Suranga
Oct 29, 2020 · 3 min read
Photo by Arnold Francisca on Unsplash

Programmers write code in different ways according to their preference and type of the particular project. If a software project is quite large and growing, we usually decompose the whole thing into several files to achieve maintainability. However, programmers often turn awesome ideas into single-file open-source projects amazingly. I found the following projects from Github and I used several things in my projects too. These projects have just one file that contains the main source code.


Electronjs is a very popular choice for cross-platform application development using web technologies. But, every application that was built using Electronjs becomes heavier because the application consists of Node runtime and Chromium browser. On the other hand, the Webview project re-uses the existing web browser library of each operating system and also creates a bi-directional communication channel between the front-end and the back-end to create light-weight cross-platform apps with zero dependencies. Webview has nicely organized platform-specific code in a single C++ header file.

JSON Parser C++

JavaScript has first-class support for JSON data. But, according to the JSON specification, the concept of JSON is to become language-independent. Therefore, all most all languages have external or internal libraries for JSON parsing and serialization. Similarly, this header-only project is a library for JSON data manipulation in C++. Importantly, it is having a very good developer-friendly syntax for creating and updating JSON objects.


As everybody knows, Docker is a full-featured application containerization platform that offers operating system level virtualization by creating isolated components called “containers”. Someone implemented the basic functionality of Docker using around a hundred lines of Bash by mainly using btrfs command and a set of administrator utility commands.


Sometimes, we implement command-line tools using Nodejs. If our solution has a few commands and options we can easily implement everything ourselves. But, if there are a lot of commands and options in the command-line tool we have to find a library for handling commands and options. commander.js is a great library for Nodejs to implement command-line tools. This library is implemented in a single JavaScript file.


React is a very popular and efficient library for building highly dynamic user interfaces by following component-based structure. o is an experimental project that consists of minimal features of the React library. However, it has many basic features of React such as JSX-like template support and hooks.

The Startup

Get smarter at building your thing. Join The Startup’s +787K followers.

Sign up for Top 10 Stories

By The Startup

Get smarter at building your thing. Subscribe to receive The Startup's top 10 most read stories — delivered straight into your inbox, once a week. Take a look.

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Shalitha Suranga

Written by

Programmer | Author of Neutralinojs and Jerverless | Technical Writer

The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +787K followers.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium