A file resurfacer. Receive emails on notes you've written, quotes you've kept, and memories you've made.
- Setup AWS credentials on computer
- Install Serverless
- You're gonna need a
credentials.jsonand anaws.jsonfile in the root directory.
- The
credentials.jsonfile will have the Google OAuth credentials which you download from them. - Additionally make sure you have the proper
redirect_urisset incredentials.json. This would probably meanlocalhost:3000/dev/processfor development andhttp://insert-lambda-url/dev/processfor a deployed app. - The
aws.jsonfile will contain:
{
"email": "hello@hello.com", // your email
"userId": 1234567890, // your AWS user id
"bucket": "bucket-name", // the name of the S3 bucket
"file_name": "google-stuff.json" // the file within your S3 to fetch
}
- Once you have the static files set up in root, you're going to need to authorize for the first time. Run the app in development with
sls offlineand go to the/authorizeendpoint and authorize your Google account through the link provided. - Once you've provided permissions, the app will hit the
/processendpoint with your credentials and save them to the S3 bucket you provided inaws.json. - If everything goes well, you can deploy with
sls deployand scheduling would work out of the box (default:1 day) and you should begin to receive emails!
---to be finished---
- Node.js Typescript Serverless lambda
- Google OAuth and Drive APIs
- AWS SES and S3
- Mustache templating
- Remove callbacks
- Integrate environment variables
- Tighten AWS policies
- Simplify document preview fetching
- Update
authorizefunction - Email authorization link