How to Build Your Own Open Source Project

This ad is not shown to multipass and full ticket holders
JSNation US
JSNation US 2025
November 17 - 20, 2025
New York, US & Online
See JS stars in the US biggest planetarium
Learn More
In partnership with Focus Reactive
Upcoming event
JSNation US 2025
JSNation US 2025
November 17 - 20, 2025. New York, US & Online
Learn more
Bookmark
Rate this content

We all used open source projects every day such as npm packages, editors, web applications, and even operating systems... Have you ever thought of building one of your own? In this talk, I will share my journey building jest-preview, from when it was just a vague idea, to currently a well-adopted library to help frontend engineers write tests faster. I will share with you how to come up with an idea for a project to work on, what is the struggles you have to overcome as an author of an open source project, how to manage time efficiently, and how you get attention from engineers around the world.

This talk has been presented at React Advanced 2022, check out the latest edition of this React Conference.

FAQ

JestPreview is a library that provides a visual debugging experience when testing a front-end application. It allows you to render HTML on a real browser instead of just printing it out in the terminal, making it easier to debug and understand the UI during tests.

JestPreview was created to solve the problem of debugging long HTML outputs in the terminal during front-end testing. By rendering the HTML in a real browser, it provides a visual representation of the UI, making it easier to debug and write tests.

Using JestPreview allows you to debug failed tests more easily, see the actual UI during unit or integration tests, and write tests faster. It also helps to bridge the gap between unit, integration, and end-to-end tests.

Building an open source project can be difficult due to the need for deep understanding of frameworks, time management challenges, lack of initial support from the community, and the stress of being the sole maintainer. Financial sustainability can also be a concern.

To manage time effectively, it's important to have a plan and stick to it. Prioritize tasks, set achievable goals, and remember that a good plan today is better than a perfect plan tomorrow.

Contributing to open source projects can lead to increased knowledge, job opportunities, invitations to conferences and tech events, and the chance to connect with other great engineers and maintainers.

Start with a project that solves your own problems, begin with a simple MVP, find a co-maintainer, and don't aim for a stable v1 initially. Test and improve your project over time, seek feedback, and learn from existing software.

Documentation is crucial for open source projects as it helps users understand the problem the project solves, how to install and use it, and any caveats they might encounter. Good documentation ensures wider adoption and easier collaboration.

Share your open source project on social media platforms like Twitter, write blog posts about it, and present it at tech events. Engaging with the community helps in gaining visibility and support.

If you encounter issues, learn from other projects, read their source code, and seek help from the community. Use GitHub features like labels, milestones, and actions to manage issues efficiently and guide contributors in reproducing and resolving bugs.

Hung Nguyen
Hung Nguyen
16 min
24 Oct, 2022

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Hello my friend, in this talk, I wanna share with you how to build your own open source project. Building an open source software project can be challenging. I receive a lot of things randomly in a day, like thank you messages for making my life easier, which motivates me. To choose an open source project to work on, pick one you use every day. Your software is being used when people report issues and send pull requests.

1. Introduction to JestPreview

Short description:

Hello my friend, in this talk, I wanna share with you how to build your own open source project. Have you contributed to any open source projects? If not, I hope you will after my talk. I'm Hung, creator of JestPreview, a library that gives you a visual debugging experience when testing a front-end app. JestPreview allows you to render HTML on a real browser, making it easier to debug and fix bugs. It brings a lot of benefits, including faster test writing and the ability to see the UI while writing unit or integration tests. I'll show you a demo.

Hello my friend, did you enjoy Read Advanced so far? I love it, and in this talk, I wanna share with you how to build your own open source project. But first, let me ask you a question. Have you contributed to any open source projects? If yes, it's great. But if no, I hope you will after my talk.

Hello, my name is Hung, I'm a creator of JestPreview, a library that gives you a visual debugging experience when testing a front-end app. I'm also a co-member of BestOfJay.org, a website that helps you to follow the growth of JavaScript ecosystem. I'm also on Twitter, let's connect!

In this talk, I wanna share with you what is JestPreview and why build it, the struggle I have to overcome when build an open source software project, what did I receive from the community, and some tips if you want to build your own. First what is JestPreview and why build it? The problem is that if you are an engineer, and if you are a front-end engineer and you write test, you have to work with Node terminal a lot. If you encounter a bug, you have to look at the long HTML in the terminal and it's very hard for you to debug and fix this. You don't even know what your app look like when your test is running. Have you ever tried to click a button but there is no button, it's just a spinner is loading in your test? So I asked myself that question, if Jest can print out the HTML, can we render it on a real browser? And till now, the answer is yes we can. As you can see, this is a test case written in React Testing Library, the user interaction is controlled by user-event. And instead of using screen.debug, we use preview.debug to see the actual UI on our app in the browser. And whenever you hit save, the browser updates the UI almost immediately. It brings a lot of benefits. First one is you can debug a fail test much much easier. You can know what your apps look like. So you can very easily writing your next testing step. So you can run your test faster. And even though you are writing unit or integration test, you can still see the UI. So it tries to close the gap between unit test and integration test with end to end test. In my personal experience, I write 2 to 3 times faster thanks to JustPreview. I wanna show you some demo. As you can see This is a normal app that written in testing library. In the right side, you can see that this is a UI JustPreview shows you. Let me just command 1 step, and the test will re-run again. And you can see the count number decrease from 6 to 5. Let me just decrease it again. You can see it from 5, it's gonna turn to 4. And that's JustPreview.

2. Struggles and Rewards of Open Source

Short description:

Building an open source software project can be challenging. Understanding the framework in detail, finding answers to specific questions, and managing time effectively are some struggles. It's important to remember why you started the project and consider financial support options. Open source brings knowledge, opportunities, and connections with great engineers and authors of open source libraries.

And now I want to share some struggles I have to overcome when building an open source software project. First, it's difficult because when you use a framework and you do not need to understand it deeply, but when you build an open source software project, it's likely that you need to understand it in very, very detail. So sometimes you want to ask a question, but it's likely that you cannot find an answer on Google or Stackoverflow.

For example, this is how CDF module works, but when I build JustPreview to support CDF module, I have to dig into the source code of CDF module, and this is the code I have to work with, to make JustPreview work with CDF module. But it's a good chance for us to learn, because whenever we overcome a hard problem, we learn a lot.

Next is time. Open source software takes a lot of time, especially if you have a full time job, so you have to manage your time well, and my advice is always have a plan, and this is my favorite quote is a good plan today is better than a perfect plan tomorrow. Next, I also think that since it's an open source project, many people will come to help you but actually not true for a small open source project. You might be the only maintainer. Sometimes you just want to give up or archive the project. But that time, please remember why you start it in the first place. Success is financially. If you just do it for fun, it's ok. But if you are serious about working on open source, you may consider GitHub sponsors, Open Collective, or even some freemium model.

I want to share what I receive from doing open source. First is knowledge. A lot of knowledge. I know how Bundler works under the hood. I know how to process CSS in modern web applications. I have to read open source code a lot so my code reading and developing skills improve. I understand how the tool works under the hood. It makes me a better programmer. Next is opportunity. I receive a lot of opportunities from doing open source. My project, Jazz Preview, got nominated for the Most Exciting Use of Technology, React Open Source Awards in React Summit. It's just very exciting and I haven't ever think of that before. For jobs, I receive a lot of invitations to apply and it's just crazy because you do not need to find jobs but it will find you. And next is the conference and tech event, I have chance to join that. Next is I have a chance to chat with many great engineers, authors of open source software library that I use every day. Before doing open source, I have never thought that I can discuss technical with them.

3. Tips for Building an Open Source Project

Short description:

I receive a lot of things randomly in a day, like thank you messages for making my life easier, which motivates me. To choose an open source project to work on, pick one you use every day. Start simple with an MVP or proof of concept, and improve over time. Find a file maintainer for support and motivation. Don't start at v1, as it's an experimental phase. When using your project as a user, adjust and add features to improve usability. Seek feedback from friends and colleagues. Watch out for issues and discussions as your project gains attention.

But great that I met some of them in person. You might recognize some of them here. And next is that I receive a lot of things randomly in a day, that I receive something like thank you for making this, it makes my life so much easier. And that really motivates me to keep doing it. I never experienced that before when I'm just doing a 9-to-5 work job.

So how to do that? Now I want to share some tips to build your own open source project. First is, how to choose an open source project to work on? The answer is very easy, it should be a project you use every day. If you want to build your own open source project, your future project should solve your own problems. It's very difficult to contribute to a project that you don't have context, just pick one project that you use every day and contribute to it. And you know that, in a daily job, we spend a lot of time on a particular problem, and there's a high chance that other people have the same problem. So just open source it, and it does not need to be something very big.

Next start simple. No projects are complicated when it's work-related. Just start simple, just make a MVP or proof of concept first, and improve it over time, and it's okay if the code is not clean in the starting phase. And if you ever get lost, it's okay, that's a sign that you are going to learn a lot. Next is the file maintainer. You know, building an open source project is hard and stressful. So it would be so much easier for you to have someone to discuss technical and motivate you to continue the project. And do not start at v1, because a new project is full of proof-of-concept and experiments. v1, that means your software must be backward compatible, when you release a new version. And in semantic versions, the term in major version ratio is zero. It's for initial development. And anything may change, and the public API should not be considered stable. There, you can move fast. Next is that when you start a project to solve a particular issue, but when you use it as a normal user, you know if it's good enough, or if you need to adjust it or add more features to make it more usable. For example, when I build Jest preview, all I want is to preview the UI in Jest to Chrome, period. But the more I use it, the more features I add to make it easier to use, like auto-reload on save, proceed CSS, and image, and adding a new automatic mode, etc. Next, you have a project, but it can be subjective. Let ask your friends, your colleagues, and your network what project should change to be more usable. After a while, when your project gets more attention, watch out for the issue and discussion tab.

4. Guidelines for Open Source Success

Short description:

Your software is being used when people report issues and send pull requests. Guide people to categorize and find issues efficiently. Reproduction is crucial for bug fixing. GitHub offers features like labels, milestones, and GitHub actions. Learn from others, read source code. Write documentation to address different use cases. Share your project on Twitter, write blog posts, and contribute to Open Source.

And you know, your software is being used when people start to report issues and send I see it as magic how you just put something on GitHub and people from around the world come to you and find issues or send a pull request. And it's very important to guide people how to categorize and find issues efficiently. And reproduction is the most important one. Because without reproduction it's very difficult for maintainer to fix bugs. And there are many other features from GitHub to make you work with open source so much easier like labels, milestones, and GitHub actions.

Next advice is let's learn from other. There are famous quote like good artist copy great artist steal. So do not reinvent the wheel, there are much good software out there that already solve your problem, learn from them, read their source code to see how they do. Next, you should write documentation. It's very easy for you to use your own software, but people around the world have different and special use case, so that's why what's problem your projects trying to solve. Installation uses and some caveats they might encounter clearly in the document. If you prefer React, you can use DocuSource. If you prefer Vue, you can use Vitepress. Both of them help you to make documentation effortlessly.

And next, share it with the world. Shared it on Twitter, write some blog posts, and share your project in a take-event. And last but not least, contribute to Open Source today. I hope you will have a lot of fun and learn a ton doing open source software. So thanks for your attention. If you write, find and test, try just preview. And if you like it, please give it a star to support me. And the slides are available and open source at redadvance.hung.dev.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Debugging JS
React Summit 2023React Summit 2023
24 min
Debugging JS
Top Content
Watch video: Debugging JS
Debugging JavaScript is a crucial skill that is often overlooked in the industry. It is important to understand the problem, reproduce the issue, and identify the root cause. Having a variety of debugging tools and techniques, such as console methods and graphical debuggers, is beneficial. Replay is a time-traveling debugger for JavaScript that allows users to record and inspect bugs. It works with Redux, plain React, and even minified code with the help of source maps.
A Framework for Managing Technical Debt
TechLead Conference 2023TechLead Conference 2023
35 min
A Framework for Managing Technical Debt
Top ContentPremium
Today's Talk discusses the importance of managing technical debt through refactoring practices, prioritization, and planning. Successful refactoring requires establishing guidelines, maintaining an inventory, and implementing a process. Celebrating success and ensuring resilience are key to building a strong refactoring culture. Visibility, support, and transparent communication are crucial for addressing technical debt effectively. The team's responsibilities, operating style, and availability should be transparent to product managers.
Building a Voice-Enabled AI Assistant With Javascript
JSNation 2023JSNation 2023
21 min
Building a Voice-Enabled AI Assistant With Javascript
Top Content
This Talk discusses building a voice-activated AI assistant using web APIs and JavaScript. It covers using the Web Speech API for speech recognition and the speech synthesis API for text to speech. The speaker demonstrates how to communicate with the Open AI API and handle the response. The Talk also explores enabling speech recognition and addressing the user. The speaker concludes by mentioning the possibility of creating a product out of the project and using Tauri for native desktop-like experiences.
A Practical Guide for Migrating to Server Components
React Advanced 2023React Advanced 2023
28 min
A Practical Guide for Migrating to Server Components
Top Content
Watch video: A Practical Guide for Migrating to Server Components
React query version five is live and we'll be discussing the migration process to server components using Next.js and React Query. The process involves planning, preparing, and setting up server components, migrating pages, adding layouts, and moving components to the server. We'll also explore the benefits of server components such as reducing JavaScript shipping, enabling powerful caching, and leveraging the features of the app router. Additionally, we'll cover topics like handling authentication, rendering in server components, and the impact on server load and costs.
Power Fixing React Performance Woes
React Advanced 2023React Advanced 2023
22 min
Power Fixing React Performance Woes
Top Content
Watch video: Power Fixing React Performance Woes
This Talk discusses various strategies to improve React performance, including lazy loading iframes, analyzing and optimizing bundles, fixing barrel exports and tree shaking, removing dead code, and caching expensive computations. The speaker shares their experience in identifying and addressing performance issues in a real-world application. They also highlight the importance of regularly auditing webpack and bundle analyzers, using tools like Knip to find unused code, and contributing improvements to open source libraries.
Monolith to Micro-Frontends
React Advanced 2022React Advanced 2022
22 min
Monolith to Micro-Frontends
Top Content
Microfrontends are considered as a solution to the problems of exponential growth, code duplication, and unclear ownership in older applications. Transitioning from a monolith to microfrontends involves decoupling the system and exploring options like a modular monolith. Microfrontends enable independent deployments and runtime composition, but there is a discussion about the alternative of keeping an integrated application composed at runtime. Choosing a composition model and a router are crucial decisions in the technical plan. The Strangler pattern and the reverse Strangler pattern are used to gradually replace parts of the monolith with the new application.

Workshops on related topic

Building a Shopify App with React & Node
React Summit Remote Edition 2021React Summit Remote Edition 2021
87 min
Building a Shopify App with React & Node
Top Content
Workshop
Jennifer Gray
Hanna Chen
2 authors
Shopify merchants have a diverse set of needs, and developers have a unique opportunity to meet those needs building apps. Building an app can be tough work but Shopify has created a set of tools and resources to help you build out a seamless app experience as quickly as possible. Get hands on experience building an embedded Shopify app using the Shopify App CLI, Polaris and Shopify App Bridge.We’ll show you how to create an app that accesses information from a development store and can run in your local environment.
Build a chat room with Appwrite and React
JSNation 2022JSNation 2022
41 min
Build a chat room with Appwrite and React
Workshop
Wess Cope
Wess Cope
API's/Backends are difficult and we need websockets. You will be using VS Code as your editor, Parcel.js, Chakra-ui, React, React Icons, and Appwrite. By the end of this workshop, you will have the knowledge to build a real-time app using Appwrite and zero API development. Follow along and you'll have an awesome chat app to show off!
Hard GraphQL Problems at Shopify
GraphQL Galaxy 2021GraphQL Galaxy 2021
164 min
Hard GraphQL Problems at Shopify
Workshop
Rebecca Friedman
Jonathan Baker
Alex Ackerman
Théo Ben Hassen
 Greg MacWilliam
5 authors
At Shopify scale, we solve some pretty hard problems. In this workshop, five different speakers will outline some of the challenges we’ve faced, and how we’ve overcome them.

Table of contents:
1 - The infamous "N+1" problem: Jonathan Baker - Let's talk about what it is, why it is a problem, and how Shopify handles it at scale across several GraphQL APIs.
2 - Contextualizing GraphQL APIs: Alex Ackerman - How and why we decided to use directives. I’ll share what directives are, which directives are available out of the box, and how to create custom directives.
3 - Faster GraphQL queries for mobile clients: Theo Ben Hassen - As your mobile app grows, so will your GraphQL queries. In this talk, I will go over diverse strategies to make your queries faster and more effective.
4 - Building tomorrow’s product today: Greg MacWilliam - How Shopify adopts future features in today’s code.
5 - Managing large APIs effectively: Rebecca Friedman - We have thousands of developers at Shopify. Let’s take a look at how we’re ensuring the quality and consistency of our GraphQL APIs with so many contributors.
Build Modern Applications Using GraphQL and Javascript
Node Congress 2024Node Congress 2024
152 min
Build Modern Applications Using GraphQL and Javascript
Workshop
Emanuel Scirlet
Miguel Henriques
2 authors
Come and learn how you can supercharge your modern and secure applications using GraphQL and Javascript. In this workshop we will build a GraphQL API and we will demonstrate the benefits of the query language for APIs and what use cases that are fit for it. Basic Javascript knowledge required.
0 To Auth In An Hour For Your JavaScript App
JSNation 2023JSNation 2023
57 min
0 To Auth In An Hour For Your JavaScript App
WorkshopFree
Asaf Shen
Asaf Shen
Passwordless authentication may seem complex, but it is simple to add it to any app using the right tool.
We will enhance a full-stack JS application (Node.js backend + Vanilla JS frontend) to authenticate users with One Time Passwords (email) and OAuth, including:
- User authentication – Managing user interactions, returning session / refresh JWTs- Session management and validation – Storing the session securely for subsequent client requests, validating / refreshing sessions
At the end of the workshop, we will also touch on another approach to code authentication using frontend Descope Flows (drag-and-drop workflows), while keeping only session validation in the backend. With this, we will also show how easy it is to enable biometrics and other passwordless authentication methods.