Rsvper facilitates makeing and collecting RSVPs via text messages and (in the future) phone calls.
brew install awscli
pip install --user aws-sam-cli
npm install -g --upgrade aws-sam-local
npm install
-
git clone
repo -
cd
into repo and runnpm install
-
serverless sam export --output ./template.yml
to create a sam template.
-
sam local start-api
to start local instance of API Gateway. Note: your lambda logs will appear here. This should start the API Gateway on port 3000 - Run
ssh -R rsvper.serveo.net:80:localhost:3000 serveo.net
- What to restart after updating specific sections:
- Update lambda function -> Run
make build
Don't restart sam-local because it uses "hot reloading" (so, files are updated without losing the app's state). - Update secrets -> (Make sure to encrypt/decrypt as needed) Run
serverless sam export --output ./template.yml
& Restartsam local start-api
- Update serverless configs -> Restart
sam local start-api
- Update lambda function -> Run
- For testing:
- Function Integration Test ->
- add google api creds to the
Makefile
- run
make test
- replace
<insert google api creds>
with creds from another developer (Correction for now you will have toexport
those creds (gotten from a developer) into your env variables)
- add google api creds to the
- (Mock) Deployment ->
-
serverless deploy --nodeploy
to regernate the rsvper.zip that sam-local uses.
-
- Local End-to-End Test ->
- run
sam local start-api
- run
ssh -R rsvper.serveo.net:80:localhost:3000 serveo.net
- you shouldn't have to update the webhook url as the subdomain used by serveo.net will always be the same, but if you do need to: Copy & paste the
https://<forwarding-url>/bot
(forwarding-url printed on the terminal) into the dialogflow fulfillment webhook -- Remember to press theSave
button at the bottom of the page - import and run
POST Fulfillment Request for RSVP...
from the postman collection indocs/
- run
- Function Integration Test ->
-
make build
to build the binaries for deployment - decrypted the secrets file for the given env (i.e.
secrets.demo.yml
,secrets.staging.yml
,secrets.prod.yml
) -
serverless deploy --stage <env name>
(make sure you have the correct default creds in your~/.aws/credentials
)-
<env name>
=demo
,staging
, orprod
-
- to completely redeploy the entire stack and not just update the lambda function code:
- delete the cloud formation stack (you may have to delete the s3 bucket first)
serverless deploy
-
Export as Zip
fromRsvper-staging
-
Restore from Zip
inRsvper
- Update the
Rsvper
Fulfillment Webhook Url to the apporiate one for Prod - Save the exported version with the date (still have to decide on where to store it)
- Encrypt creds:
serverless encrypt --stage <env name> --password <password>
- Decrypt creds:
serverless decrypt --stage <env name> --password <password>
- if you need to switch to
ngrok
insteady ofserveo.net
:brew install ngrok
ngrok http 3000
- update the dialogflow webhook url with the newly generated ngrok forwarding url
- to change the function name: update the folder name, the names in serverless.yml (3 places), and Makefile (2 places)
- Dockerize app
- Add all 330 invite codes to the
rsvper.invitecode
(look into automated ways) - rn, typing in0001
, instead of1
will result in an error. Maybe look into slotfilling to solve this issue? - When default fallback intent is triggered, send alert and/or log in google sheet
- Build out invite code triggered conversation flow
- Add end of conversation message (after they've rsvp'ed to all the events they've been invited to)
- Limit the number of times the default intent asks users to repeat
- Allow users to skip specific rsvps
- Allow users to update specific even rsvps (instead of going through the welcome flow)
- Allow users to reset their conversation (by deleting all their contexts)
- if you need to match the entire training phrase, you'll have to put ALL the full matching phrases in training - e.g. when you expect the user to only enter a number, you have to add ALL the numbers, just typing in
1
,6
,9
,10
won't give you all the numbers, it won't even give you 1-10. You have to explicitly list all the numbers - both contexts & events are used to determine what is the next intent
- (informal) where the family is from
- string
- col A
- (informal) name used by Rajeshri
- string
- col B
- name displayed on invite
- string
- col C
- unique code to distinguish invited families
- number
- col D
- number of people invited to the vidhi on the invitation card (
ALL
means unlimited,NULL
means no value yet) - string/number
- col E
- latest number rsvp'd by the invited family for the vidhi (
NULL
means no value yet) - strin/number
- col F
- number of people invited to the garba on the invitation card (
ALL
means unlimited,NULL
means no value yet) - string/number
- col G
- latest number rsvp'd by the invited family for the garba (
NULL
means no value yet) - string/number
- col H
- number of people invited to the wedding on the invitation card (
ALL
means unlimited,NULL
means no value yet) - string/number
- col I
- latest number rsvp'd by the invited family for the wedding (
NULL
means no value yet) - string/number
- col J
** Note needed to add NULL
to number columns because the golang google sheets lib automatically omits empty values **
- used to connect the event to the invited family
- number
- col A
- phone number used to make the rsvp update
- string
- col B
- vidhi, garba, or wedding
- string (enum)
- col C
- number of invitees atting the event
- number
- col D
- time this rsvp update was made
- number
- col E