In 2017 I started a new project with a single goal: learn unit testing. Since then a lot of things have happened with react-content-loader (a React skeleton package) and it reached a status that I could never have imagined. It has had countless contributions, suggestions and discussions, and I’ve had the opportunity to interact with many awesome developers around the world.
Also, the open-source community - especially the React one - has taught me a couple of lessons that I’d like to share with present or future project maintainers.
The open-source potential
As the source code is available to any person in the world to check out, different perspectives and opinions come up, and that’s amazing. I have no idea how many times the codebase itself and the build script were rewritten from scratch in order to improve legibility, performance and/or compatibility. Also, contributions are not only about coding, but issues with documentation, bug reporting, doubts, and examples.These issues are also very important to build a successful project.
In one of these issues, I realized that sometimes a product needs support to make it more usable. So, I figured out a way to create another new tool which would help the main project; as a result, I came up with create-content-loader to introduce presets, add examples from the community, include documentation and third-party tutorials. From that moment on, the main project improved significantly and became much easier to use. Consequently, more developers can use the project and also contribute to it, creating a sub-community around it.
Focus on one problem and solve it
While the product is growing, it’s easy to lose sight of the original goal, which makes us add more and more features in the main project. Edge cases, bugs, alternatives, among others, might come up during the development process, so it’s essential to keep the scope defined (but not closed) to keep the purpose of the project clear.
Also, you should try to design APIs as generically as you can. You should try to solve the biggest part of the problem, not all specific cases - that’s why it’s also important to say no. Sometimes, a small problem may be solved with a workaround instead of being solved by publishing more extra code for everybody else.
Keep yourself up-to-date
Once I solved the main problem in my project, I was able to try so many things such as different builders, testing libraries, framework support and automatization of a few processes. Indeed, my open-source projects are my lab, where I’m able to implement, test and publish improvements which can be tested by many users and websites. Even when some of these changes introduce new bugs or break the whole project, I know that it’s part of the learning process, and the community is there helping with solutions.
Be welcoming, be kind, be responsible
Regardless if you’re a maintainer or a regular contributor of open-source projects, you’ve probably faced some situations where you don’t know how “open” that project really is. There are a lot of concerns, such as pull requests that are still waiting to be merged, missing documentation or contributing guide, or even a maintainer who doesn’t accept any suggestion.
A truly open-source project has its guides, and it welcomes suggestions and changes. Personally, I feel like such behavior and approach in leading a project have made me much better as a developer, thanks to many discussions and change requests. As a consequence, at some point, I realized that the project no longer belonged to me, but to the entire community as well.
Also, you need to be responsible. Every proposal, every push to the main branch and every new contributor added need to be done with certainty that no malicious script or bug is being introduced in the project.
The rewarding part
The benefits of having such a project on a GitHub profile are undeniable. Besides, a successful open-source project is the opportunity to show your hard and soft skills, since managing a project is not only pushing code to branches, but also organizing, prioritizing, describing, and planning features and bugs.
Success isn’t measured in GitHub stars but rather in complete user satisfaction. To be honest, I still don’t know if I’ve reached that, but I have no doubt that I’ve learned many lessons so far.