আপনার ওপেন সোর্স প্রজেক্ট কীভাবে সেটআপ করবেন
এই অধ্যায়ের বিষয়বস্তু আপাতত মূল ইংরেজিতেই রয়েছে এবং এর বাংলা অনুবাদ চলমান। ততদিন পর্যন্ত আপনি চাইলে আমাদের ওয়েবসাইটে গিয়ে পড়তে পারেন।
There are many things to consider when starting an open source project. In this portion of the course, we will walk through the key components every project needs to succeed.
Detailed README
A README file contains an introduction to your open source project. A good README should be clear, concise, up-to-date, and detailed. This file is located in your root directory and serves as the first impression for your contributors.
Here are some things to include in your README:
- project title and summary
- brief instructions on how to set up the project
- images of the app and code examples
- tech and tools used in the project
- link to the contributing guidelines
- link to the code of conduct
- link to the open source license
- link to community Discord, Slack group, or GitHub Discussions
A README file is written in a markup language called Markdown, a popular language used in open source documentation like READMEs.
Here are a few examples of good READMEs:
Installation Guide
This guide should include instructions for the following:
- forking the repository
- cloning the repository
- installing the dependencies
- setting up the environment variables
- setting up the database, if applicable
- running the project locally
- setting up Docker containers, if applicable
The best way to test your guide is by setting up the project locally using your own instructions. If you encounter issues getting your project to work, you will discover them quickly and can update the documentation to add or clarify any missing pieces.
The installation guide is best placed at the top of your project's README file, as it is the most accessible file for your contributors.
Another good place would be in the CONTRIBUTING file. Besides providing guidelines about contributing to your project, this file can include installation setup, testing, linting, workflows, etc. You can place the installation instructions towards the top or bottom of your CONTRIBUTING file. You can take a look at OpenSauced Contributing Guidelines as an inspiration.
If your project is on the larger side, consider having a separate documentation site and dedicating a section for installation there. You can use documentation site generators like Docusaurus, Starlight, or docsify.
Open Source Software License
You need to know that an open source project without a license is not available for anyone to use or distribute. Take a look at these explanations on The Legal Side of Open Source from Open Source Guides:
Making your GitHub project public is not the same as licensing your project. Public projects are covered by GitHub’s Terms of Service, which allows others to view and fork your project, but your work otherwise comes with no permissions.
If you want others to use, distribute, modify, or contribute back to your project, you need to include an open source license. For example, someone cannot legally use any part of your GitHub project in their code, even if it’s public, unless you explicitly give them the right to do so.
So, every open source project must have a license written in a LICENSE file to grant further rights to other users. This file is typically located in the root directory for easy access for everyone.
Choosing a License
An open source software license is a legally binding agreement between the software creator and the end users. It dictates how others can use, modify, or distribute your software.
Some licenses are more restrictive, like the GNU GPL (General Public License), while others are less restrictive, like the MIT license. Here are a few examples of licenses for OpenSauced projects:
To better understand which license would work best for your project, please look at these helpful resources:
For a complete list of Open Source Initiative (OSI) approved licenses, please check out their list.
Code of Conduct
A code of conduct is an established set of rules and behaviors that all open source participants agree to abide by. This document helps to ensure a healthy and inclusive environment for everyone involved with the project.
This set of rules and expectations should go inside a CODE_OF_CONDUCT file in the root directory of your project. Codes of conduct are generally divided into three main categories: pledge, standards, and enforcement.
Most open source maintainers will not write their code of conduct from scratch. Instead, they will add one using a template provided by GitHub or copy and adapt from other codes of conduct and provide attribution.
Project Pledge
The opening pledge is a statement of the type of environment that the project wants to create. Here is an excerpt from the OpenSauced Code of Conduct:
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.