2023-10-13 11:07:07 -04:00
2023-09-28 17:28:27 -04:00
2023-10-03 07:52:20 -07:00
2023-09-15 11:19:14 -04:00
2023-10-13 11:06:52 -04:00
2023-09-21 14:48:10 -07:00
2023-08-29 14:54:30 -07:00
2023-10-13 11:07:07 -04:00
2023-10-03 08:00:59 -07:00
2023-08-29 14:54:30 -07:00
2023-08-29 14:54:30 -07:00
2023-09-18 13:24:15 -04:00
2023-10-06 21:46:29 +00:00
2023-10-06 21:46:29 +00:00
2023-09-29 10:36:39 -04:00
2023-08-29 14:54:30 -07:00
2023-08-29 13:12:18 -07:00
2023-08-29 16:21:18 -07:00

US Notify API

This project is the core of Notify. It's cloned from the brilliant work of the team at GOV.UK Notify, cheers!

This repo contains:

  • A public-facing REST API for Notify, which teams can integrate with using API clients built by UK
  • An internal-only REST API built using Flask to manage services, users, templates, etc., which the admin UI talks to)
  • Asynchronous workers built using Celery to put things on queues and read them off to be processed, sent to providers, updated, etc.

Our other repositories are:

Local setup

Common steps

On MacOS, using Homebrew for package management is highly recommended. This helps avoid some known installation issues.

  1. Install pre-requisites for setup:

    • jq: brew install jq
    • terraform: brew install terraform or brew install tfenv and use tfenv to install terraform ~> 1.4.0
    • cf-cli@8: brew install cloudfoundry/tap/cf-cli@8
    • postgresql: brew install postgresql@15 (Homebrew requires a version pin, but any recent version will work)
    • redis: brew install redis
    • pyenv: brew install pyenv
    • poetry: brew install poetry
  2. Log into cloud.gov: cf login -a api.fr.cloud.gov --sso

  3. Ensure you have access to the notify-local-dev and notify-staging spaces in cloud.gov

  4. Run the development terraform with:

     ```
     $ cd terraform/development
     $ ./run.sh
     ```
    
  5. If you want to send data to New Relic from your local develpment environment, set NEW_RELIC_LICENSE_KEY within .env

  6. Start Postgres && Redis

      ```
      brew services start postgresql@15
      brew services start redis
      ```
    
  7. Install

  8. Run the project setup

    make bootstrap

  9. Run the web server and background workers

    make run-procfile

  10. Or run them individually:

    • Run Flask (web server)

      make run-flask

    • Run Celery (background worker)

      make run-celery

Known installation issues

On M1 Macs, if you get a fatal error: 'Python.h' file not found message, try a different method of installing Python. Installation via pyenv is known to work.

A direct installation of PostgreSQL will not put the createdb command on your $PATH. It can be added there in your shell startup script, or a Homebrew-managed installation of PostgreSQL will take care of it.

Documentation

License && public domain

Work through commit e604385 is licensed by the UK government under the MIT license. Work after that commit is in the worldwide public domain. See LICENSE.md for more information.

Contributing

As stated in CONTRIBUTING.md, 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.

Description
The API powering Notify.gov
Readme 55 MiB
Languages
Python 98.5%
HCL 0.6%
Jinja 0.5%
Shell 0.3%
Makefile 0.1%