• This repository has been archived on 06/Aug/2021
  • Stars
    star
    410
  • Rank 105,468 (Top 3 %)
  • Language
    TypeScript
  • License
    Other
  • Created over 8 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

DEPRECATED 🛑- Federal Source Code policy implementation.

DEPRECATED

This project repo is no longer being maintained. The front end of code.gov is now located at code-gov-front-end.

Code.gov - Unlocking the potential of the Federal Government’s software.

Build Status Code Climate Test Coverage

Introduction

Code.gov is a website promoting good practices in code development, collaboration, and reuse across the U.S. Government. Code.gov will provide tools and guidance to help agencies implement the Federal Source Code Policy. It will include an inventory of the government's custom code to promote reuse between agencies and will provide tools to help government and the public collaborate on open source projects.

To learn more about the project, check out this blog post.

Code.gov is an open source project, so we invite your contributions, be it in the form of code, design, or ideas.

Requirements

The development of code.gov is guided by the requirements set forth in Section 7.2 (Code Inventories and Discovery), Section 7.3 (Code.gov), and Section 7.6 (Agency Policy) of the Federal Source Code Policy. Namely:

  • "Within 90 days of the publication date of this policy, the Administration will launch https://www.code.gov, an online collection of tools, best practices, and schemas to help agencies implement this policy.";

  • "Within 90 days of the publication date of this policy, each agency’s CIO—in consultation with the agency’s CAO—shall develop an agency-wide policy that addresses the requirements of this [document.]"; and

  • "Within 120 days of the publication date of this policy, each agency must update—and thereafter keep up to date—its inventory of agency information resources to include an enterprise code inventory that lists custom-developed code for or by the agency after the publication of this policy."

Configuration

For documentation on how to configure code-gov-web, go here.

Contributing

Here’s how you can help contribute to code.gov:

Questions?

If you have questions, please feel free to open an issue here: https://github.com/presidential-innovation-fellows/code-gov-web/issues or send us an email at [[email protected]].

Getting Started

After you have cloned this repo, you can use npm install to install all of the project’s dependencies.

You can then run the server using npm start.

By default, the development server will listen on http://localhost:2700/. You can change the default port by setting the PORT environment variable before starting the server (for example, PORT=3000 npm start).

Testing

Unit tests

This app uses Karma + Jasmine to handle unit testing. Run npm test to execute tests. To add tests, simply create a file with .spec.ts as the extension and your tests will be included.

End-to-end tests

End-to-end testing is done with Protractor and tests are written in Jasmine with the Protractor API used to locate elements and interact with the page. Running e2e tests requires the following steps:

  • Run npm start to start the application.
  • In a second terminal window, run npm run webdriver:start to start the selenium server used to run the tests. This step must be done before the next step.
  • In a third terminal window, run npm run e2e. The Chrome browser will be launched to run the tests and the test results will be displayed in this window.

End-to-end tests need to be written in a file with an .e2e.ts extension.

Deployment

This app uses the github-deploy package for handling deployment. To configure deployment, customize the config/github-deploy and webpack.github-deploy files to match your settings. When ready to deploy, run npm run federalist-deploy:dev or npm run federalist-deploy:prod, depending on your intended destination.

If you are deploying from a fork, you will have to set the GIT_REMOTE_NAME environmental variable, like GIT_REMOTE_NAME="upstream" npm run federalist-deploy.

Deploying Arbitrary Branch

If you'd like to deploy an arbitrary branch, set the GIT_BRANCH_NAME environmental variable. For example the following code will deploy the current branch to https://federalist-proxy.app.cloud.gov/preview/gsa/code-gov-web/federalist-demo/#/

GIT_BRANCH_NAME="federalist-demo" npm run federalist-deploy

Specifying API URL

The app uses the production API by default. To use the staging API, set an API_URL environmental variable for the npm process. Here's two examples:

API_URL=stag npm run start
API_URL=staging npm run start
API_URL='https://code-api-staging.app.cloud.gov/api/' npm run start
API_URL=staging GIT_REMOTE_NAME=upstream npm run federalist-deploy:dev

Specifying an API Key

The app uses the API key provided in the code-gov-config.json by default. If you want to override that, specify an CODE_GOV_API_KEY environmental variable. Here's an example:

CODE_GOV_API_KEY=l87sfdi7ybc2bic7bai8cb2i176c3b872tb3 npm run server

Deployment Problems

When pushing to staging or dev branches, you might run into an occasional error warning that the branch you're pushing to already exists. If you see this, you need to clear the cache in the gh-pages module using this command: rm -rf node_modules/gh-pages/.cache

Generating License Data

To update the dependency_licenses.json file, run npm run licenses.

File Structure

The directories in src/app are organized around the pillars of Angular, along with several additional custom file types. When creating new files, be sure to add your file and any necessary templates, styles, and tests to a directory dedicated to your new file in the appropriate place.

For the most part, components are organized based on the navigation structure of the app. For example, you can find Policy Guide content in src/app/components/policy-guide.

Component Structure

Most Components have a style, template, and component file. Template files are composed of HTML with Angular syntax for inserting content and view conditionals. Styles are encapsulated by default unless the Component has ViewEncapsulation disabled, so global class names are generally not an issue.

Style Guide

This app follows the official Angular Style Guide. Please ensure you follow the naming conventions defined in this guide.

Vocabulary

We sometimes use the word entities. It basically means something that has repositories. Agencies are types of entities.

License

As stated in CONTRIBUTING:

[..] this project is in the worldwide public domain (in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication).

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

This repo is built on top of the Angular2 Webpack Starter from Angular Class and includes the original [MIT License](/AngularClass License.txt). Should you choose to use this repo for your own purposes, be sure to retain the MIT license that comes with it.

For a detailed list of licenses from each of the node_modules, view the Dependency Licenses file.

More Repositories

1

data

Assorted data from the General Services Administration.
HTML
2,097
star
2

datagov-wptheme

Data.gov WordPress Theme (obsolete)
JavaScript
1,892
star
3

data.gov

Main repository for the data.gov service
Shell
411
star
4

https

The HTTPS-Only Standard for federal domains (M-15-13), and implementation guidance.
Python
241
star
5

govt-urls

Most government websites end in .gov or .mil, but many do not. This repo contains USA.gov's list of public government domains and URLs that don't end in .gov or .mil.
213
star
6

fedramp-automation

FedRAMP Automation
TypeScript
211
star
7

digitalgov.gov

Digital.gov — Helping the government community deliver better digital services.
HTML
194
star
8

pdf-filler

PDF Filler is a RESTful service (API) to aid in the completion of existing PDF-based forms and empowers web developers to use browser-based forms and modern web standards to facilitate the collection of information.
JavaScript
170
star
9

plainlanguage.gov

A resource to help federal employees write in plain language and comply with the Plain Writing Act of 2010
SCSS
144
star
10

project-open-data-dashboard

Project Open Data Dashboard
PHP
137
star
11

code-gov

An informative repo for all Code.gov repos
132
star
12

accessibility-for-teams

A ‘quick-start’ guide for embedding accessibility and inclusive design practices into your team’s workflow
JavaScript
91
star
13

openacr

OpenACR is a digital native Accessibility Conformance Report (ACR). The initial development is based on Section 508 requirements. The main goal is to be able to compare the accessibility claims of digital products and services. A structured, self-validated, machine-readable documentation will provide for this.
JavaScript
82
star
14

piv-guides

This is the old location for the PIV Playbook. New location below.
JavaScript
66
star
15

search-gov

Source code for the GSA's Search.gov search engine
Ruby
63
star
16

modernization

Report to the President on IT Modernization
CSS
61
star
17

slash-developer-pages

A lightweight listing of /developer pages in government, including embed-ready html code and structured xml.
60
star
18

code-gov-api

API powering the code.gov source code harvester
JavaScript
52
star
19

sf-sandbox-post-copy

A framework for managing automation tasks that are fired upon sandbox refresh in Salesforce orgs.
Apex
52
star
20

AI-Assistant-Pilot

Inter-agency Federal AI Personal Assistant Pilot
46
star
21

touchpoints

Feedback platform for continuous improvement of systems, services, processes, and policy.
HTML
45
star
22

resources.data.gov

Resources for open data and enterprise data inventory management
SCSS
45
star
23

open-gsa-redesign

A fresh start for open.gsa.gov.
SCSS
44
star
24

fedramp-tailored

FedRAMP Tailored.
SCSS
43
star
25

punchcard

Repository of synonyms, protected words, stop words, and localizations
Ruby
41
star
26

code-gov-front-end

Front-end of code.gov
JavaScript
40
star
27

devsecops-example

Example implementation of the GSA DevSecOps Pipeline
HCL
38
star
28

cto-website

Tech at GSA website
JavaScript
36
star
29

federal-open-source-repos

Uses Javascript to query the Social Media Registry and GitHub APIs and list details about all federal open source code on GitHub
CoffeeScript
36
star
30

srt-fbo-scraper

Using machine learning to predict Federal IT procurement compliance with Section 508 Accessibility Standards
Python
35
star
31

DataBeam

Generic RESTful Interface for databases
PHP
35
star
32

ckanext-geodatagov

data.gov extension
XSLT
34
star
33

ficam-playbooks

The content on this repository was migrated to idmanagement.gov.
HTML
33
star
34

devsecops-cloud-custodian-rules

[WORK IN PROGRESS] A repo containing rule sets for cloud-custodian inside GSA AWS accounts. This repo does not contain cloud-custodian itself.
30
star
35

jobs_api

Allows you to tap into a list of current jobs openings with federal, state, and local government agencies. Jobs are searchable by keyword, location, agency, schedule, or any combination of these.
Ruby
30
star
36

asis

ASIS (Advanced Social Image Search) indexes Flickr and MRSS images and provides a search API across both indexes.
Ruby
30
star
37

Open-And-Structured-Content-Models

Open and structured content models drafted by a cross-agency working group.
CSS
29
star
38

Challenge_gov

Elixir
29
star
39

training-pathway-data-practitioner

Open source training material for the GSA Data Science Practitioner Learning Program
Jupyter Notebook
29
star
40

fpki-guides

This is the old location for the FPKI Playbook. New location below.
JavaScript
29
star
41

recalls_api

NOT SUPPORTED. Allows you to tap into a list of car, drug, food, and product safety recalls. Recalls are searchable by keyword, issuing agency, date, UPC code, vehicle-specific attributes, or any combination of these.
Ruby
29
star
42

catalog.data.gov

Development environment for catalog.data.gov
Python
28
star
43

sdg-indicators-usa

U.S. National Reporting Platform for the Sustainable Development Goals
JavaScript
28
star
44

uswds-sf-lightning-community

A Salesforce Lightning Community Theme and related components built upon US Web Design System
JavaScript
27
star
45

DevSecOps

Base infrastructure for future DevSecOps environment in AWS
26
star
46

ficam-arch

This is the old location for the FICAM Architecture. New location below.
JavaScript
26
star
47

federal-website-index

A project to build and maintain a comprehensive listing of the public websites of the U.S. federal government.
Python
25
star
48

idmanagement.gov

IDManagement.gov is a collaboration between GSA and the Federal CIO Council. It is managed by the Identity Assurance and Trusted Access Division in the GSA Office of Government-wide Policy.
JavaScript
25
star
49

ckanext-usmetadata

A CKAN extension for inventory.data.gov
Python
24
star
50

jenkins-shared-library-examples

Groovy
24
star
51

emerging-technology-atlas

Emerging Citizen Technology
CSS
23
star
52

piv-conformance

Tool to verify conformance to the PIV data model per most recent releases of FIPS 201 and associated publications
HTML
22
star
53

GitHub-Administration

GSA's administration and implementation of github.com/gsa
22
star
54

security-benchmarks

GSA Security Benchmarks and Tools
21
star
55

jenkins-deploy

deploy Jenkins to AWS with Terraform and Ansible
HCL
21
star
56

sam-design-system

TypeScript
21
star
57

ansible-os-win-2016

Ansible Roles for Windows Server 2016
21
star
58

ckanext-datagovtheme

Theme for Data Catalog
XSLT
20
star
59

gsa-doc-digital-signature

This tool is deprecated. Please follow these new procedures - https://playbooks.idmanagement.gov/signfedregister/
Java
20
star
60

catalog-app

Development environment for catalog.data.gov
Shell
19
star
61

IAE-Architecture

Repository for IAE architectural documents.
19
star
62

inventory-app

Docker image for ckan app powering inventory.data.gov
Python
18
star
63

usagov-benefits-eligibility

Benefits eligibility estimator tool for USAGov.
JavaScript
18
star
64

site-scanning-engine

The repository for the rearchitected site-scanning project, specifically the scanning engine itself.
TypeScript
18
star
65

ITDB-schema

IT Dashboard submissions schema, documentation and example files.
18
star
66

data-strategy

Federal data strategy website
HTML
18
star
67

citizenscience.gov

This is the new build of CitizenScience.gov using Jekyll on Federalist. Feel free to contribute or submit an issue!
HTML
17
star
68

digital-strategy

Machine-readable schema for describing action items within the president's digital strategy, and for reporting on its progress
17
star
69

digital-strategy-report-generator

Generates reports to describe agencies' progress in realizing the goals of the President's Digital Government Strategy
PHP
17
star
70

github-federal-stats

Bash scripts to generate metrics on U.S. Federal usage of GitHub using the GitHub APIs
HTML
16
star
71

SF-Event-Monitoring-Log-Retrieval

Python-based utility to fetch Salesforce Event Monitoring Logs and store them locally for consumption by log monitoring and analytics software.
Python
16
star
72

ngx-uswds

USWDS Components in Angular
TypeScript
16
star
73

EDX

GSA Enterprise Digital Experience (EDX)
JavaScript
16
star
74

AI_Grand_Challenge_For_Resiliency

AI Grand Challenge for Resiliency: Impact of U.S. Government Policy on COVID-19 using Natural Language Processing & Text Analytics
Python
16
star
75

Mobile-Code-Catalog

Source code from around, inside, and outside the federal government that can be helpful to federal agencies building mobile apps.
HTML
15
star
76

Open-Data-Collaboration-Sandbox

A sandbox for loose collaboration on assorted open data projects
CSS
15
star
77

cloudgov-demo-postgrest

Get a federally-compliant REST API for your CSV data on cloud.gov in about 60 seconds. ATO not included.
Shell
15
star
78

laptop-management

ALPHA/WIP for OSquery configuration for Mac and Linux Operating Systems
Shell
15
star
79

ckan-php-manager

A tool for managing a CKAN data catalog
PHP
15
star
80

innovation.gov

Deprecated - This project repo is no longer being maintained.
Ruby
14
star
81

i14y

Search engine for agencies' published content
Ruby
14
star
82

oscal-gen-tool

C#
14
star
83

threat-analysis

14
star
84

grace-inventory

Lambda function to create an inventory report of AWS services as an Excel spreadsheet in an S3 bucket. Includes Terraform code to deploy it.
Go
14
star
85

participation-playbook

US Public Participation Playbook
CSS
14
star
86

gsa-icam-card-builder

ICAM Test Card Signer and Data Populator
Java
14
star
87

fpkilint

Federal PKI, X.509 certificate linter
JavaScript
14
star
88

centers-of-excellence

All the excellent centers
HTML
14
star
89

Very-Simple-API

A barebones API
HTML
13
star
90

participate-nap4

Participate in the 4th U.S. National Action Plan for Open Government
13
star
91

ckan-php-client

A PHP client for the CKAN data catalog, used by https://github.com/GSA/ckan-php-manager
PHP
13
star
92

openacr-editor

With this tool, people can generate Accessibility Conformance Report in the OpenACR format.
Svelte
13
star
93

devsecops-ekk-stack

Terraform that builds an EKK logging stack
HCL
12
star
94

coe-industry-day

Information on the Phase II Industry Day for the Centers of Excellence at USDA.
12
star
95

recruiter

Embeddable forms to recruit research participants. Sends results to a Google Sheet, deployed via Google Tag Manager.
JavaScript
12
star
96

code-gov-style

Deprecated - Style for code.gov including buttons, banners, and cards
JavaScript
12
star
97

oscal-ssp-to-word

JavaScript
12
star
98

ansible-https-proxy

Ansible role to set up nginx as a secure proxy
11
star
99

10x

[Deprecated] Website for the Office of Investments in GSA’s Technology Transformation Service
JavaScript
11
star
100

site-scanning

The central repository for the Site Scanning program
11
star