KAHIBARO
Discord Login Register

Contributing to Open Source

Why Open Source Matters for Backend Developers

Open source is one of the best ways to grow from “I followed a tutorial” to “I can build and maintain real software.” For backend developers, it gives you:

You do not have to be an expert to contribute. Many valuable contributions are small, focused, and done by beginners.

This chapter explains how to get from zero to your first and then your first few open source contributions, with concrete backend-focused examples.

Myths About Open Source

Before you start, it helps to remove a few common false beliefs.

Important: You do not need to be an expert, a “famous” programmer, or a library author to contribute to open source.

Some common myths:

MythReality
“I must write a big feature to contribute.”Tiny fixes, docs, examples, tests, and typo corrections are all real contributions.
“Maintainers will be annoyed by beginners.”Most projects welcome help, especially with documentation, tests, and bug triage.
“I need to understand the whole codebase first.”You only need to understand the small part you are touching. Understanding grows over time.
“I must use Git perfectly.”You only need the basics: clone, branch, commit, push, open PR. You will learn the rest while contributing.

Choosing the Right Project

Picking a suitable project makes the difference between a frustrating experience and a great one.

Start with Your Tech Stack

You are learning backend development, so focus on projects that match what you are using:

Examples:

If you are already using a library in your learning projects, that is an excellent candidate. You know its basic behavior and docs needs.

Signs of a Beginner-Friendly Project

Look for these signals in a GitHub / GitLab repository:

SignalWhat to look for
LicenseA clear open source license, usually a LICENSE file.
ActivityRecent commits in the last 1–2 months. Open and closed pull requests.
Contribution guideA CONTRIBUTING.md file. It explains how to contribute.
Code of conductA CODE_OF_CONDUCT.md file. It shows basic community rules.
Beginner tagsIssues labeled good first issue, beginner, help wanted, or similar.
DocsA README.md that explains setup and development.

If a repo has no license, you must assume you cannot legally use or modify the code.

Rule: Only contribute to repos that clearly state an open source license.

Start Small and Familiar

Good starting points:

Avoid at the beginning:

Types of Contributions You Can Make

You do not have to jump directly into implementing complex backend features. There are many ways to help.

Documentation Improvements

Documentation is often the easiest and most valuable entry point.

Examples you can contribute:

For instance, in a FastAPI extension library, you might add:

Examples and Tutorials

As a beginner, you remember what was confusing. That is very valuable.

Examples you can add:

Often docs have a “Examples” or “Recipes” section. You can add a new page or expand an existing one with code you have already built in your practice projects.

Bug Reports and Reproduction

Good bug reports are a form of contribution.

A useful bug report often includes:

For a backend example, you might report:

Small Code Fixes

Once you are comfortable reading a bit of code, you can:

Examples:

Tests and Test Improvements

Tests are crucial in backend systems and often underdeveloped.

You can:

Example:

Tooling and Quality Improvements

Many projects appreciate help with:

Start small to avoid breaking workflows.

Understanding the Project

Before touching code, invest a bit of time understanding how the project is structured.

Read the README and CONTRIBUTING

Look for:

If there is a CONTRIBUTING.md file, follow it literally. Many maintainers reject PRs that ignore it.

Rule: Always read and follow CONTRIBUTING.md before sending your first pull request.

Explore the Code Structure

Look at top-level folders:

FolderTypical contents in backend-related repos
src/ or package nameMain Python code: modules, business logic, integrations.
tests/Unit, integration, and API tests.
docs/Documentation source: Markdown, Sphinx, MkDocs files.
examples/Small runnable examples using the library.
docker/ or compose/Dockerfiles, docker-compose configurations.
alembic/ or migrations/Database migrations if it is a web app or ORM.

For example, in a typical FastAPI project:

You do not need to read everything. Scan until you find the part relevant to your issue.

Run the Project or Tests Locally

Before changing code, make sure you can:

If tests do not pass on a fresh clone, check:

For complex apps, Docker Compose is common:

bash
docker compose up -d
pytest

Finding Good First Issues

Most projects label beginner-friendly tasks.

Using GitHub Issue Labels

Filter issues by common labels:

In GitHub, you can use the search bar like:

Example backend-related beginner issues:

Ask Before You Start

Many projects expect you to comment on an issue before working on it, especially if it is older.

A simple comment:

text
Hi, I am new to this project and would like to work on this issue. Is it still available?

Wait for a response. This:

If the issue is very old and there is no response after some time, you can still try, but be prepared that the maintainers may have moved on.

Working with Git for Contributions

You already know Git basics from earlier chapters. Here is how to apply them specifically to open source.

Fork, Then Clone

For most GitHub projects:

  1. Click “Fork” in the repository on GitHub.
  2. Clone your fork:
bash
git clone https://github.com/your-username/project-name.git
cd project-name
  1. Add the original repo as upstream:
bash
git remote add upstream https://github.com/original-owner/project-name.git

Now you can pull updates from the original:

bash
git fetch upstream
git checkout main
git merge upstream/main

Create a Branch per Contribution

Work on a separate branch for each issue or feature:

bash
git checkout -b fix-pagination-links

Some projects like branches to reference issue numbers:

bash
git checkout -b docs-jwt-refresh-#1234

Keep branches small and focused. One PR per logical change is easier to review.

Make Small, Clear Commits

Each commit should represent a small logical change.

Examples of helpful commit messages:

Avoid vague messages like fix, changes, or stuff.

Run Tests and Linters Before Pushing

Maintain the project’s quality checks:

bash
pytest
ruff check .
black .

Or whatever is described in CONTRIBUTING.md.

If tests fail, fix them first. Sending a PR with failing tests is usually not welcomed unless your PR is specifically about a failing test and you mention that clearly.

Making Your First Pull Request

Once your change is ready and tested, you can propose it for inclusion.

Push Your Branch

Push the branch to your fork:

bash
git push origin fix-pagination-links

GitHub will show you a link to open a pull request.

Write a Clear PR Description

Your PR description should explain:

Template example:

text
## Summary
Fixes pagination links in the API docs so that the `next` and `previous` URLs use the correct `page` parameter.
## Changes
- Updated `generate_pagination_links` to use `page + 1` and `page - 1` correctly.
- Added tests for `page=1` and `page=last_page` cases.
- Updated documentation example to show correct links.
## Testing
- `pytest tests/test_pagination.py` (passes)

If your PR fixes a specific issue, link it:

text
Fixes #1234.

GitHub will then automatically close the issue if the PR is merged.

Be Polite and Open to Feedback

Maintainers review your PR voluntarily. They may:

Treat their review like free mentoring. Ask clarifying questions when needed.

Example response to review:

text
Thanks for the feedback! I updated the variable names and added the extra test you suggested. Please take another look.

Common Contribution Patterns for Backend Projects

Here are some realistic backend-specific contribution ideas you can look for.

Improving Error Messages

Many backend libraries have cryptic errors.

Examples you can implement:

Changes often involve:

Adding a Simple Endpoint Example

In a backend framework or plugin repo, you might add:

Example FastAPI snippet that you could contribute to a docs section:

python
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
    name: str
    price: float
@app.post("/items/")
async def create_item(item: Item):
    return {"id": 1, **item.dict()}

This kind of example helps new users understand how to use the library.

Improving Database Documentation

Database integrations often confuse beginners. You can improve docs by:

Example documentation snippet you might add:

yaml
version: "3.9"
services:
  db:
    image: postgres:16
    environment:
      POSTGRES_USER: app
      POSTGRES_PASSWORD: secret
      POSTGRES_DB: app_db
    ports:
      - "5432:5432"

And a Python connection example:

python
DATABASE_URL = "postgresql+psycopg://app:secret@localhost:5432/app_db"

Adding Tests for Critical Backend Behaviors

Backend libraries often lack tests in these areas:

You can write tests that:

Building a Visible Open Source Profile

Your contributions can help your career if others can see and understand them.

Organize Your GitHub Profile

You do not need to be perfect, but a few things help:

Make Contributions Discoverable

When you apply for backend roles, you can mention:

In your CV or portfolio, link to:

Example entry:

ProjectTypeContribution
FastAPI Extension XOpen sourceAdded Redis-backed session example, improved docs for JWT usage, and wrote tests for session expiration.

Staying Involved and Growing

Your first contribution is the start, not the end.

Follow Project Activity

You can:

Over time you learn:

Move from “User” to “Contributor” to “Maintainer”

A rough path you can follow:

  1. User
    • Use the library in your personal projects.
    • Report bugs, ask questions.
  2. Occasional contributor
    • Fix a few issues.
    • Improve docs and tests.
    • Implement small features.
  3. Regular contributor
    • Help triage issues (label them, ask for more info).
    • Review small PRs from others if the maintainers allow it.
    • Help answer questions in discussions.
  4. Potential maintainer
    • Consistently contribute high-quality changes.
    • Understand the codebase, tests, and release process.
    • Sometimes maintainers invite such people to join the team.

You do not have to aim for maintainer status. Even a handful of helpful contributions can significantly improve your skills and resume.

Practical Step-by-Step Plan

Here is a simple sequence you can follow to get from zero to your first contributions.

Step 1: Pick One Library You Already Use

Examples:

Visit its GitHub repo.

Step 2: Read README, CONTRIBUTING, and Open Issues

Pick one small issue that you understand.

Step 3: Fork, Clone, and Run Tests

Step 4: Comment on the Issue

Post a short comment:

text
Hi, I am learning backend development and would like to work on this issue. Is it still open?

Wait for confirmation if the project is active.

Step 5: Implement a Small, Focused Change

Step 6: Open a PR and Respond to Feedback

Step 7: Reflect and Repeat

After your PR is merged or closed:

Over time, you will gain:

Contributing to open source is one of the most effective ways to grow as a backend developer. Start small, be consistent, and treat every review as a free lesson from someone more experienced.

Views: 9

Comments

Please login to add a comment.

Don't have an account? Register now!