<commit_before># MyResponder

An opensource PHP project to help dispatch local **guards** in gated
communities by SMS to a **home owner**'s address.

There are three parties involved in this system:

1. Guard (also known as "first responder")
2. Home owner
3. Management

Management's task is to approve by "arming" who can raise alerts and who can receive them.

Other features:

* Every alert or incident is recorded in one JSON file. Logging incidents gives you the metrics to improve!
* Optional ability to time track guards, providing the "clock out"

## Setup

`envfile` needs to be populated:

	HOST=myresponder.local
	M_USER=duroa
	M_PASS=<PASSWORD>
	M_EMAIL=<EMAIL>
	SMS_URL=https://rest.nexmo.com/sms/json?api_key=6bfec75d&api_secret=SECRET
	TZ=Asia/Singapore
	# M_EMAIL needs to be verfied!
	AWS_ACCESS_KEY_ID=<KEY>
	AWS_SECRET_ACCESS_KEY=SECRET
	REGION=us-west-2

Then you need to link to the container and do a transparent proxy like so:

	myresponder.local:80 {
		tls off
		proxy / myresponder:80 {
			transparent
		}
		log stdout
		errors stdout
	}
	d.myresponder.local:80 {
		tls off
		proxy / myresponder:80 {
			transparent
		}
		log stdout
		errors stdout
	}
	m.myresponder.local:80 {<commit_msg>Oops hide secret<commit_after># MyResponder

An opensource PHP project to help dispatch local **guards** in gated
communities by SMS to a **home owner**'s address.

There are three parties involved in this system:

1. Guard (also known as "first responder")
2. Home owner
3. Management

Management's task is to approve by "arming" who can raise alerts and who can receive them.

Other features:

* Every alert or incident is recorded in one JSON file. Logging incidents gives you the metrics to improve!
* Optional ability to time track guards, providing the "clock out"

## Setup

`envfile` needs to be populated:

	HOST=myresponder.local
	M_USER=duroa
	M_PASS=<PASSWORD>
	M_EMAIL=<EMAIL>
	SMS_URL=https://rest.nexmo.com/sms/json?api_key=6bfec75d&api_secret=SECRET
	TZ=Asia/Singapore
	# M_EMAIL needs to be verfied!
	AWS_ACCESS_KEY_ID=<KEY>
	AWS_SECRET_ACCESS_KEY=SECRET
	REGION=us-west-2

Then you need to link to the container and do a transparent proxy like so:

	myresponder.local:80 {
		tls off
		proxy / myresponder:80 {
			transparent
		}
		log stdout
		errors stdout
	}
	d.myresponder.local:80 {
		tls off
		proxy / myresponder:80 {
			transparent
		}
		log stdout
		errors stdout
	}
	m.myresponder.local:80 {
{'fraction_non_alphanumeric': 0.07644882860665844, 'fraction_numerical': 0.013974517057131115, 'mean_word_length': 4.211991434689508, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1284471', 'n_tokens_mistral': 902, 'n_tokens_neox': 841, 'n_words': 288}