Prequisites:
- Node.js at version 12.x
- Yarn to install dependencies
- Serverless CLI
- A MySQL database running with a dummy database created
- For deploying you'll need to set up an Aurora instance yourself (I haven't figured out how to provision this as a Serverless resource)
- A Twilio account, with a programmable SMS number set up
Setting up:
- Clone this repo:
git clone [email protected]:jodyheavener/pals.git
- Install dependencies:
yarn install
- Remove the
-dist
from both secrets files. Updatesecrets.dev.json
for local development, andsecrets.staging.json
for when you want to deploy
Now you can run:
- Run locally / offline:
sls offline start --skipCacheInvalidation --printOutput
- Deploy everything to AWS staging:
sls deploy --stage staging -v
- Run a function locally:
sls invoke local -f FUNCTION_NAME
- Run a function on staging:
sls invoke -f FUNCTION_NAME --stage staging
Reference config/functions.yml
to see available functions. You can also import insomnia.json
into Insomnia if you'd like to test requests.
This was fun, but it could be vastly improved in so many ways...
- Clean up Typescript! There are lots of
// @ts-ignore
, andany
types - Add some sort of throttling for messages
- Add ability to report Pal
- Add ability to access menu while waiting for connection
- Add ability to infer initial language and set additional languages, pair with someone who speaks your language
- When you end a chat with your Pal it should never rematch with them