DEV Community

Cover image for How to write a perfect README for your GitHub project
Marc Seitz
Marc Seitz

Posted on

How to write a perfect README for your GitHub project

What you will find in this article?

You've probably stumbled upon many GitHub repositories, each with their own unique README page. Have you ever wondered what makes a good README? The kind that stands out, draws you in, and most importantly, helps you understand the project?

In this article, we'll show you how to craft the perfect GitHub README page.

TL;DR: You can just copy my README here

Reading Cat

Papermark - the open-source alternative to DocSend.

Before we begin, let me introduce you to Papermark. It's an open-source alternative to DocSend that helps you manage secure document sharing, including real-time analytics. It's all open-source!

I would be absolutely thrilled if you could give us a star! Don't forget to share your thoughts in the comments section ❤️
https://github.com/mfts/papermark

Papermark App

Laying the groundwork

Alright, now let's get our hands dirty. We're going to guide you through the key components of a perfect README and how to craft each section.

Set up your markdown environment

First off, you need to set up an environment to write your README. All GitHub READMEs are written in Markdown, a lightweight and easy-to-use syntax for styling your writing. If you're not familiar with Markdown, don't worry. It's as easy as pie to pick up.

I usually write my README alongside the project code, but you can also create a separate README file. It's up to you. Just make sure you have a README.md file in your project root directory.

I use Visual Studio Code as my code editor and there's a handy extension called Markdown All in One that lets you preview your Markdown as you type. It's a great way to see how your README will look on GitHub.

Starting with a bang: The project title and description

Every README should start with a clear, compelling title followed by a brief project description. This is the first thing people see when they land on your repo, so make sure it's engaging and descriptive.

Here's an example:

# Papermark

Papermark is an open-source document sharing alternative to DocSend with built-in analytics.
Enter fullscreen mode Exit fullscreen mode

The all-important 'how-to': Installation and usage

This is the meat and potatoes of your README. You need to guide your users on how to install and use your project. Be clear, precise, and if necessary, provide examples.

Here's an example:

## Installation

First, clone this repository:

<!-- start:code block -->
# Clone this repository
git clone https://github.com/mfts/papermark.git
cd papermark

# Install dependencies
npm install

# Copy the example .env file
cp .env.example .env

# Initialize the database
npx prisma generate
npx prisma db push

# Run the app
npm run dev

# Open http://localhost:3000 in your browser
open http://localhost:3000
<!-- end:code block -->
Enter fullscreen mode Exit fullscreen mode

Demo: Show, don't just tell

A picture is worth a thousand words, and a GIF is worth even more. Use screenshots or GIFs to show off your project's features. This makes it easier for users to understand what your project does.

Demo GIF

Contribute: Encourage collaboration

Open-source is all about community. Don't forget to include a section encouraging others to contribute. Outline the steps to contribute, and link to your project's CONTRIBUTING.md file if it has one.

Here's a simple example:

## Contributing

Papermark is an open-source project and we welcome contributions from the community.

If you'd like to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.
Enter fullscreen mode Exit fullscreen mode

Bonus: Show Off Badges and Contributors

Badges are a great way to show off your project's stats. You can add badges for things like the number of stars, forks, and contributors. You can also add badges for CI/CD, code coverage, and more. You can find all badges on shields.io.

<div align="center">
  <a href="https://github.com/mfts/papermark/stargazers"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/mfts/papermark"></a>
  <a href="https://twitter.com/mfts0"><img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/mfts0"></a>
  <a href="https://github.com/mfts/papermark/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/badge/license-AGPLv3-purple"></a>
</div>
Enter fullscreen mode Exit fullscreen mode

Badges

You can also add a list of contributors to your README. This is a great way to show your appreciation for the people who have contributed to your project. Head over to contrib.rocks to generate a list of contributors for your project.

### Our Contributors ✨

<a href="https://github.com/mfts/papermark/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=mfts/papermark" />
</a>
Enter fullscreen mode Exit fullscreen mode

Contributors

Conclusion

There you have it! Crafting the perfect README is a mix of clear communication, good organization, and a sprinkle of pizzazz. It's an art form in itself, and with a little practice, you'll be creating READMEs that are not only informative but also engaging.

I'm Marc, an open-source enthusiast and the proud maintainer of Papermark. Happy README crafting!

Help me out!

If you found this article helpful and got to understand README a bit better, I would be extremely glad if you could give us a star! And don't forget to share your thoughts in the comments ❤️

https://github.com/mfts/papermark

cat support

Top comments (15)

Collapse
 
elijahtrillionz profile image
Elijah Trillionz

Really nice, clear article.
It is unfortunate that not all ReadMes are as clear as they should. This is a really good article for any open-source developer to familiarize with.
Thanks for sharing

Collapse
 
mfts profile image
Marc Seitz

Thank you Elijah 🙌 This README is most suited for an "application" type project. There are so many other projects like libraries, packages, non-code projects that require some different README content.

Collapse
 
elijahtrillionz profile image
Elijah Trillionz

Most def, but this is like a foundation for all to me.
My library actually includes most of the things you mentioned here and many other principles.

Thread Thread
 
mfts profile image
Marc Seitz

That's fantastic 🤩

Collapse
 
sumitsaurabh927 profile image
Sumit Saurabh

Very well-written article Marc.

Does one thing and does it well. Loved reading it!

Collapse
 
mfts profile image
Marc Seitz

Thanks Sumit! Sometimes simple way is the best way

Collapse
 
sumitsaurabh927 profile image
Sumit Saurabh

'The ultimate sophistication' for a reason!

Collapse
 
derlin profile image
Lucy Linder

I find a TOC (table of content) very useful as well.

A good tool is bitdowntoc

Collapse
 
mfts profile image
Marc Seitz

Yes absolutely. Table of contents are underrated. Even though GitHub auto-generates it based on the headers, I never open them. When they are embedded in the README it's 100x more useful.

Collapse
 
kurealnum profile image
Oscar

Definitely going back and rewriting some of my README's now! This is really slick.

Collapse
 
mfts profile image
Marc Seitz

Thank you Oscar! Definitely let me know how it turns out. I'm always interested to learn from others

Collapse
 
shnai0 profile image
Iuliia Shnai

Need to update mine now

Collapse
 
mfts profile image
Marc Seitz

Go Go Go! It's never been easier. Also check out readme.so

Collapse
 
subhmsft profile image
Subhasish G

Excellent post. Loved the concept of gifs. Need to tinker with a few README pages that I have in my own repos; need some improvement.

Collapse
 
mfts profile image
Marc Seitz

Oh gifs in the README are a gamechanger. Makes it really interactive and catchy for people to understand the most valuable aspect of your project.