Chatter is a statically generated comment engine for embedding on any website. Being statically generated means no database is needed, which makes it very lightweight.
Running on AWS lambda makes it incredibly cost effective for small sites, and leaning on Zappa makes management simple.
See an example
New comments are submitted to an API endpoint running inside AWS Lambda, which writes the comment to an S3 bucket. A second lambda function will then build a json index of the comments, which is what will be read by the user's browser.
At the moment it's up to you to submit and render comments, but there's some example code on the gh-pages branch.
You must set up an AWS credentials file.
Install the dependencies using pipenv
$ pipenv install
Go inside the virtualenv pipenv created so Zappa recognises it as a venv
$ source $(pipenv --venv)/bin/activate
- Change the bucket in the top of chatter.py. This is where we'll store comments and indexes.
- Change
arn
inzappa_settings.json
to match the input bucket so zappa can register an event handler. - Change
s3_bucket
inzappa_settings.json
. This is where zappa will build the packages for lambda. - Add the url of the websites you're going to be creating new comments on to the
CORS
call underapp = Flask(__name__)
so we can set HTTP headers appropriately
$ zappa deploy dev