How Shopify uses GitHub

Shopify keeps pushing eCommerce forward with help from GitHub tools.

About Shopify
Shopify is an eCommerce platform that allows people to start and grow their online businesses. The company hosts more than 2.5 million websites across 175 countries on its platform. Every 28 seconds, a person makes a new purchase from a small business hosted on Shopify.
Organization details:
- Industry: eCommerce
- Seats: 5,000+
- Location: Digital by design
Scale and Infrastructure
Supporting Shopify's massive commerce infrastructure requires significant development velocity. The company operates one of the biggest monolithic Ruby on Rails applications in the world, hosted in a single GitHub repository. The core application has more than 2.8 million lines of code and 500,000 commits, and continues to grow as new merchants launch their businesses daily.
"Deployment automation and DevOps is a superpower at Shopify," says Derek Watson, Director of Ecosystem Engineering. "This year, our production applications changed more than 50 times a day, and it's changing even faster now. GitHub helps us meet this demand."
Streamlining Development Workflows
GitHub serves as a one-stop shop for developers working in Shopify's bespoke environment. "We're operating at an unusually large scale and pace, so we take every opportunity we can to optimize our development process," Watson explains. "We've been able to streamline our workflows by automating them with GitHub or replace some of our custom-built applications with GitHub functionality."
Project Management with GitHub Issues
At the heart of many workflows are GitHub Issues and projects. Shopify chose Issues to replace third-party project management tools like Jira, Asana, and Zenhub.
"GitHub Issues with projects gives us a high-level overview so we can look at all our projects across the board, and triage priorities quickly," explains Lisa Vanderschuit, Engineering Program Manager, Office of the CTO. "Plus the Kanban flow is easy to follow and is already familiar to most developers."
Issues also ties into many of Shopify's internal systems. For example, the company integrates Issues with Slack, which enables Shopify to archive internal threads regarding their development process using a single Slack command. "Issues is great for recording ideas, decisions, and requests for comments, and other discussions so that we can mine them for insights later on," says Mark Côté, Senior Manager of Developer Infrastructure.
Automation with GitHub Actions
Automation plays a key role in executing the company's workflows. Shopify uses GitHub Actions to automate many development tasks including adding labels to Issues, assigning Issues to project boards, and documentation builds. Actions has enabled the company to consolidate third-party tools such as CircleCI and Travis into one seamless experience.
"We have mandated using GitHub Actions for any automation that updates our source code repositories," says Côté.
Security and Supply Chain
In addition to Actions, Shopify uses GitHub Advanced Security and Dependabot to automate security functions within the organization. Shopify uses a wide variety of open source packages, so the software supply chain is a primary concern.
"We need to be sure that the code we're pulling down from third-party open source contributors is safe, that it does what it's supposed to do, and that it's free from tampering," says Côté. "GitHub Advanced Security enables that."
Dependabot runs in the background and if it detects an insecure or out-of-date dependency, will generate an alert along with a recommended fix in a pull request. The user can then review and remediate the issue before merging any changes. This frees up developers to work on new features and helps to further secure code from attack.
Innersourcing Across Teams
Innersourcing is another vital part of the development process at Shopify. By opening its repositories to multiple different teams, the company can leverage the skills and expertise of each developer while also streamlining the development process.
"By default, everyone at Shopify with GitHub access can access our repos. All developers, project managers, and UX teams have read/write access to 99% of our repositories," explains Côté. "One out of three developers contributes to our core Rails monolith. There's no way this would work without using an innersource approach through GitHub."
Building the Future of eCommerce
Shopify continues to expand and develop new features to change the landscape of ecommerce. One of the company's latest product launches, Hydrogen and Oxygen, enables merchants to build custom, or "headless," storefronts and deploy them to the cloud directly using GitHub Actions.
By leveraging GitHub, the company gives its developers the tools to continue delivering a cutting-edge ecommerce experience for merchants of all kinds. "When developers sit down and open up their first PR, chances are they already know the workflow. Because of GitHub, they've already done it before; they don't need to learn something brand new," says Côté. "Anything that helps us scale and leverage existing knowledge allows us to concentrate on building amazing features for our clients."
