Skip to content

Commit 36293a1

Browse files
committed
Readme updates from merging 'main' into dev
2 parents 00039a8 + a469507 commit 36293a1

1 file changed

Lines changed: 148 additions & 16 deletions

File tree

README.md

Lines changed: 148 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,162 @@
1-
# Srt
1+
# Overview
2+
The SRT UI is a Javascript web application built using Angular (v. 15) which along with the [SRT API](https://github.com/GSA/srt-api) deliver the [Solicitation Review Tool](https://srt.app.cloud.gov/auth) for viewing Section 508 compliance predictions for Information and Communication Technology (ICT) solicitations submitted from agencies around the federal government. To facilitate development and testing in addition to production deployment, a total of three instances of this client application run on cloud.gov - development, staging and production.
23

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.0.0-rc.4.
4+
SRT UI is now deployed to cloud.gov using a Docker image and security updates for all Node modules and software components are managed with yarn and SNYK. This application accesses ICT solicitation data that is housed in a PostgreSQL database on cloud.gov and is updated on a daily basis through a cron job that runs the [SRT FBO Scraper](https://github.com/GSA/srt-fbo-scraper) to pull all of the latest solicitations from SAM.GOV.
45

5-
Release notes are available in the [release-notes.md](release-notes.md) file.
6+
# Developer Requirements
7+
## Software Components and Tools
8+
The following is a summary of the software and tools that are needed for development of this project:
9+
* Operating system - Linux, Ubuntu, Mac OS, Windows
10+
* IDE - Visual Studio Code, etc.
11+
* Angular
12+
* Docker
13+
* PostGreSQL
14+
* SNYK
15+
* Node
16+
* Yarn
17+
## Systems Access
18+
Access to the following platforms will also be required for development:
19+
* Cloud.gov
20+
* SAM.gov
21+
* MAX.gov
22+
* Docker
23+
* SNYK
24+
* GitHub - GSA team
25+
# Setup and Deployment
26+
## Getting Started
27+
### Download SRT Source Code
28+
For both Mac and Ubuntu:
29+
* In the command line, navigate to the desired folder to clone the srt-ui project.
30+
* Then execute the following command:
31+
```
32+
git clone https://github.com/GSA/srt-ui.git
33+
cd srt-ui
34+
git checkout dev
35+
```
36+
## Installation
37+
### Install Node Package Manager (npm)
38+
Mac:
39+
```
40+
brew install npm
41+
```
42+
Ubuntu:
43+
```
44+
sudo apt-get install -y nodejs npm
45+
sudo npm install npm@latest -g
46+
```
47+
### Install Angular
48+
The following command will install the Angular CLI globally:
49+
```
50+
npm install -g @angular/cli
51+
```
652

7-
## Development server
53+
To update the CLI to the latest version:
54+
```
55+
npm install -g @angular/cli@latest
56+
```
57+
For more detailed instructions on setting up your local environment with Angular, go here: <https://angular.io/guide/setup-local>.
58+
### Install Docker
59+
Install the Docker engine for various platforms by referring to the documentation here: <https://docs.docker.com/engine/install/>
60+
### Install PostgreSQL
61+
Mac:
62+
```
63+
brew install postgresql
64+
```
865

9-
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
66+
Ubuntu:
67+
```
68+
sudo apt install postgresql-client libpq-dev postgresql-server-dev pgadmin
69+
```
70+
### Install SNYK
71+
* During this installation you will be redirected to the SNYK website.
72+
* Complete your authentication at SNYK before proceeding to the next step.
73+
```
74+
echo "Installing snyk..."
75+
npm install snyk -g
1076
11-
## Code scaffolding
1277
13-
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class/module`.
78+
echo "Authenticating snyk..."
79+
snyk auth
80+
```
81+
### Install Node Version Manager (nvm)
82+
Mac:
83+
```
84+
brew install nvm
1485
15-
## Build
86+
mkdir ~/.nvm
87+
88+
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bash_profile
89+
echo '[ -s "/usr/local/opt/nvm/nvm.sh" ] && \. "/usr/local/opt/nvm/nvm.sh"' >> ~/.bash_profile
90+
echo '[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && \. "/usr/local/opt/nvm/etc/bash_completion"' >> ~/.bash_profile
91+
92+
source ~/.bash_profile
93+
```
94+
Ubuntu:
95+
```
96+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
97+
98+
source ~/.bashrc
99+
```
100+
### Install Yarn
101+
For the most up-to-date information on installing yarn on your system, go to this website: <https://yarnpkg.com/getting-started/install>.
102+
103+
Note: npm is no longer the recommended way to install yarn.
104+
105+
### Install Node Modules with YARN
106+
In the project directory run:
107+
```
108+
yarn
109+
```
110+
111+
## Running the Project
112+
* Run `yarn dev` to start the SRT client locally.
113+
* Then open a browser to this URL: <http://localhost:4200/>.
114+
* Run `yarn build-<env>` to build the project. (Not needed for deployment)
115+
116+
## Deployment
117+
### Build the Docker Image
118+
#### Development
119+
```
120+
docker build . -t <docker_username>/srt-ui:<release_version>-dev --build-arg environment=dev
121+
```
122+
#### Staging
123+
```
124+
docker build . -t <docker_username>/srt-ui:<release_version>-staging --build-arg environment=staging
125+
```
126+
#### Production
127+
```
128+
docker build . -t <docker_username>/srt-ui:<release_version>-prod --build-arg environment=prod
129+
```
130+
### Push to Docker
131+
#### Development
132+
```
133+
sudo docker push <docker_username>/srt-ui:<release_version>-dev
134+
```
135+
#### Staging
136+
```
137+
sudo docker push <docker_username>/srt-ui:<release_version>-staging
138+
```
139+
#### Production
140+
```
141+
sudo docker push <docker_username>/srt-ui:<release_version>-prod
142+
```
143+
### Deploy to Cloud.gov
144+
#### Development
145+
```
146+
cf push srt-ui-dev -f cf/manifest.dev.yml --docker-image <docker_username>/srt-ui:<release_version>-dev
147+
```
148+
#### Staging
149+
```
150+
cf push srt-ui-staging -f cf/manifest.staging.yml --docker-image <docker_username>/srt-ui:<release_version>-staging
151+
```
152+
#### Production
153+
```
154+
cf push srt-ui-prod -f cf/manifest.prod.yml --docker-image <docker_username>/srt-ui:<release_version>-prod
155+
```
16156

17-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
18157

19-
## Running unit tests
20158

21-
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
22159

23-
## Running end-to-end tests
24160

25-
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
26-
Before running the tests make sure you are serving the app via `ng serve`.
27161

28-
## Further help
29162

30-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

0 commit comments

Comments
 (0)