/gamma

**ARCHIVED**: Prototype web editor for GitHub Gists.

Primary LanguageTypeScriptMIT LicenseMIT

gamma

Overview

Project Goals

  • Build an alternative UI for working with GitHub Gists
  • Great developer experience
  • experiment with monorepo structure to understand tradeoffs (blog post coming soon)

Application Features

  • View, edit and create gists
  • Leverages the fantastic monaco-editor library for:
    • IntelliSense
    • familar keyboard shortcuts (similar to VSCode)
    • highly extensible

Developer Features

  • automatic preview deployments for pull requests
  • minimal set of Cypress e2e tests
  • CI & CD workflows using CircleCI, GitHub and DockerHub

Repo Structure

gamma is structured as a monorepo for convenience and uses yarn workspaces to improve developer experience.

Important directories:

  • packages/api: Source code for the application server and GraphQL data layer
  • packages/web: Source code for the React UI and rendering service
  • packages/gamma-core: A fork of the project razzle
  • packages/babel-preset-gamma: Babel preset used with gamma-core package for building web
  • packages/shared: Contains shared code that can be used across packages.

CI/CD Scripts for use with CircleCI:

  • deploy-pr.sh: Bash script used to automatically create preview deployments for pull requests
  • sendurl.sh: Bash script which posts preview deployment metadata to a GitHub app
  • update.sh: Bash script to dynamically inject an environment variable into a Dockerfile 'template'

Important Scripts

The following are a few scripts in various packages that are useful when developing:

Generate fresh TypeScript types after updating the GraphQL schema:

  • yarn workspace web codegen: Examines the GraphQL service running on port 4000 and generates schema.json.
  • yarn workspace web types: Call this script AFTER codegen to generate TypeScript types from the json schema.

Screenshots

home

auth

authenticated

example1

example1

example1

new_file

example1

Known Issues

Due to time constraints and project goals, there are a number of known issues and known limitations with regard to functionality/features.

  • View/edit own gists
    • search, starring, commenting, custom pagination not yet supported
  • 'public' is the default setting for new gists
  • indication of gist public/private status not implemented
  • Front-end authentication mechanism breaks current user session on refresh
  • Typings and lint workers currently disabled

Ackowledgements

Notes

Below are links to various documents created during development that may be useful to others. Please note that these documents were created for personal use and are unfinished/unedited.