To install a local development version of the GCN web site on your own computer, skip ahead to the Quick Start section below.
Contributing to General Coordinates Network
Do you have an idea to make GCN better, or do you have a bug to report? We'd love to hear from you! GCN (this site) is an open source project on GitHub. Help us by reporting feature requests and bugs in our GitHub issue tracker.
Or, if you feel like rolling your sleeves up, propose a code change by forking the project and submitting a GitHub pull request. Don't know where to start? Look for issues in GitHub that are labelled good first issue.
Here are some more specific ways that you can help.
-
Write documentation. The best and easiest way to help is to contribute text or typographical corrections, especially in the Documentation section (the app/routes/docs directory in GitHub) and Missions section (the app/routes/missions directory in GitHub). Look for GitHub issues with the label content.
Most of the written content on this site is formatted in Markdown, an easy to use markup language. To learn Markdown, read the GitHub Flavored Markdown guide.
In general, written content should follow the American Astronomical Society style guide and use SI unit abbreviations.
-
Improve design and accessibility. We are constantly seeking to improve the GCN user experience. Look for issues in GitHub that are marked frontend.
We use the US Web Design System, an open source design language and front end framework that is common to many Federal agencies. US Web Design System components for React are provided by react-uswds.
-
Add new features to the web site. We have lots of ideas for new features, visualizations, and ways to interact with GCN data. We bet you have lots of ideas too! Look for issues in GitHub that are marked frontend or backend.
GCN is built in Remix, a full stack web framework built on React and written in TypeScript (JavaScript with type annotations).
Quick Start
Here are instructions for getting the GCN site set up and running on your own computer for local development.
Set up Node.js on your computer
Make sure that Node.js and NPM are installed on your computer. There are several options to install Node.js and NPM. Pick one of the following:
- Download and run the Node.js installer for your operating system.
- Install and use the Node Version Manager, nvm.
- Install using a package manager.
Clone and configure the project
Clone the Git repository onto your computer, install all dependencies, and install the pre-commit hooks by running these commands:
git clone https://github.com/nasa-gcn/gcn.nasa.gov cd gcn.nasa.gov npm install
Write configuration file
Create a file called
.env
in the root directory of the repository with the following contents to define the configuration of your local development GCN server:# (Required) Signing key for session cookies. # Fill in with a long, random string. SESSION_SECRET=fill-me-in # (Optional) OpenID Connect identity provider configuration for Cognito. # If omitted, then we will use a built-in sandbox identity provider. # COGNITO_USER_POOL_ID=fill-me-in # OIDC_CLIENT_ID=fill-me-in # OIDC_CLIENT_SECRET=fill-me-in # (Optional) Google ReCAPTCHA configuration. # For parts of the site that require authentication, # these lines must be uncommented and filled in. # RECAPTCHA_SITE_KEY=fill-me-in # RECAPTCHA_SECRET_KEY=fill-me-in # (Optional) URL origin to be used for external redirects, email From # addresses, and so on. Leave this unset for local development so that it # defaults to http://localhost:3333. # ORIGIN=https://gcn.nasa.gov # (Optional) Feature flags turn on parts of the web site that are under # development. On the production web site (https://gcn.nasa.gov), all # feature flags are disabled by default. Turn feature flags for local # development by adding them to this comma-separated list. # GCN_FEATURES=ANTIGRAVITY,TIME_TRAVEL,PYROKINESIS
Start development server
Start the local development server by running the following command:
npm run dev
Open a web browser and navigate to http://localhost:3333 to see the local site live.