The focal point for an 18F/TTS project with the United States Forest Service on their Grants & Agreements program.
18F is partnering with the United States Forest Service on a project focused on their Grants & Agreements program. This repo contains documentation describing the project. To learn about the project, what it can do, and why it's important, head to our project wiki.
18F had been working with Forest Service to prepare this project to be ready for a vendor to begin product development. We focused on user research, experimentation and prototyping to de-risk core functionality, rather than developing the solution following the Product Roadmap.
We are pausing this prototyping work to get alignment across Forest Service on:
The present prototyping team is being re-assigned and a reconfigured team will work on these alignment issues. This README describes how to work with the prototype application that we developed. See the page on Platform and Technologies for more on how the production application will run.
First, ensure Docker Desktop is installed.
docker compose up
. Then shut them down with ctrl+C.docker compose up -d
.docker compose exec postgres psql -U postgres
. Then, once inside, run CREATE DATABASE nrm_dev;
. Exit the container.docker-compose run api npm run test
while the containers are running, or exec
instead of run
if they're not running.frontend
and run ng test
(to watch files) or npm run test
(for a one-time run). (TODO: Need to add Chromium to web
in docker-compose.yml
.)Visit the Angular app at http://localhost:4200, and the API at http://localhost:3000. (Ports are in the docker-compose.yml file in the project root.)
To do.
/api
directory with cd /api
.npm install
.npx tsc
. The JavaScript in src
will be bundled to bin/index.js
npm run serve
.Ensure you have AWS Credentials set up:
~/.aws/credentials
. Use the format in the Claudia tutorial.--role {lambda_basic_execution Role ARN}
flag to claudia commands, as well as a AWS_PROFILE=claudia
env var before claudia invocations.npm run update
. This will recompile the code to bin/index.js
, and push it and its Lambda handler to the sandbox Lambda.Run the following:
$ pushd api && DATABASE_URL=postgres://empty npm run update && popd
Ensure you have the AWS CLI (awscli
) installed. Then run:
$ pushd frontend \
&& ng build --configuration=sandbox \
&& aws s3 sync dist/frontend/ s3://gov.usda.fs.nrm.ga \
&& popd
We use husky to manage git hooks.
To opt-in to using the hooks, run either:
npx husky install
or
git config --add core.hooksPath .husky
Test that the setup worked by creating a commit—you should see, at minimum, prettier
checks being run on TypeScript files.