Sourcegraph DocsSourcegraph Docs
  • Code Intelligence

    • Cody
    • Code Search
  • Code Management

    • Batch Changes
    • Code Navigation
    • Code Monitoring
    • Code Ownership
    • Code Insights
    • Notebooks
  • Platform

    • Sourcegraph Admin
    • Sourcegraph Cloud
    • Integrations
    • Development
  • CLI & API

    • Sourcegraph CLI
    • Sourcegraph GraphQL API
    • Sourcegraph Stream API
  • Help & Support

    • SLAs & Premium Support
    • Tutorials
    • Sourcegraph Accounts
    • Changelog
  1. Docs
  2. dev
  3. contributing
  4. frontend_contribution

Frontend contribution guidelines

To work on most frontend issues, it is necessary to run three applications locally:

  1. The web app in the client/web directory.
  2. Storybook (client/storybook)
  3. The browser extension (client/browser)

Project Setup

  1. Clone the repo: git clone https://github.com/sourcegraph/sourcegraph/.
  2. Make sure your node environment is running version 16.x.x.
  3. Go through the local development section here.

CI checks to run locally

  1. Typescript checks.

    # Generate Typescript types
    pnpm generate
     
    # Verify Typescript build
    pnpm build-ts
  2. Linters.

    pnpm lint:js:all
    pnpm lint:css:all
    pnpm lint:graphql
    pnpm format:check
  3. Unit tests

    # Run unit tests
    pnpm test
  4. Integration tests

    # Prepare web application for integration tests
    DISABLE_TYPECHECKING=true pnpm run build-web
    # Run integration tests
    pnpm test-integration

Relevant development docs

Getting applications up and running

  • Developing the Sourcegraph web app
  • Table of contents related to the web app
  • Configuring backend services locally is not required for most frontend issues. However, a guide on how to do this can be found here.

How to style UI

  • Guidelines
  • Wildcard Component Library

Client packages overview

On this page

  1. Frontend contribution guidelines

    1. Project Setup
    1. CI checks to run locally
    1. Relevant development docs