18F is collaborating with SAMHSA to develop a new experience for finding treatment. This repository contains the development for the front-end application of that experience.
master
is our primary and stable development branch which is available at https://findtreatment.gov
If you'd like to provide feedback or comments on the website please use this google form.
If you'd like to report a bug or technical issue with the website, please feel free to submit an issue here. We'll do our best to respond.
This is a React application with staging, preview, and production instances served as static sites via Federalist. We're using CircleCI to power our continuous integration pipeline.
Federalist automatically builds and deploys the application for every push to the master
branch or submitted pull request.
This application relies on data provided by the SAMHSA Treatment Locator backend (https://findtreatment.samhsa.gov). We're not currently providing an alternative source of data in this repository or elsewhere. While you can install and run this prototype locally, you will be unable to query data and receive results via the search interface.
First you'll need to get the code onto your computer. The easiest way is to clone it with git. If you're not familiar with git, a tool like Github Desktop can help make the experience easier.
Most people will use the HTTPS link, but if you're a project contributor and you have your SSH keys configured, you'll clone from the SSH link. You can find the link by clicking the green "Clone or download" button above the file listing on this page.
The link is https://github.com/18F/samhsa-prototype.git
If you're familiar with git and want to work from the command line, you may run:
git clone https://github.com/18F/samhsa-prototype.git
If you can't use git for some reason, you may also download the most recent code as a ZIP file.
Once you've checked out or otherwise retrieved the code, follow these steps to install the required dependencies, and start a development server in your local environment.
Run the following command from within the directory where this file, README.md
, is located.
npm run dev
Navigate to http://localhost:3000/
.
The app will automatically reload if you change any of the source files.
The tests in src/integration/integration.test.js
hit the actual api endpoint and are rather resource intensive so they are not included in the suite of tests to run automatically on every build. They exist to make sure that api responses are consistent across endpoints. When running these tests, the desired endpoint should be specified with an environment variable, Ex:
INT_TEST_ENDPOINT=PROD npm run test:int
Acceptable values for INT_TEST_ENDPOINT
are:
Value | Endpoint | Is Default |
---|---|---|
LOCAL |
http://localhost:9011/locator/listing | X |
DEV |
https://kqszbed8ck.execute-api.us-east-1.amazonaws.com/prod/listing2 | |
PROD |
https://findtreatment.samhsa.gov/locator/listing |
Though we're not actively soliciting contributions, we'll make our best effort to collaborate. That said, we cannot make any promises about having time to review, comment on, or accept pull requests.
Pull requests should be made into the master
branch. Be sure to check out
our contributing guide.
This project is in the worldwide public domain. As stated in CONTRIBUTING:
This project is 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.