Skip to content

Commit

Permalink
Taro v1 feature branch (#881)
Browse files Browse the repository at this point in the history
* WIP

* move config validation into runtime

* support environment variable

* Set up `lambdas` context/controllers/tests boilerplate (#875)

* Set up boilerplate for lambdas model

* Add typespecs

* More improvements to validation

* Fix typespec

* Mix format

* Minor cleanup

* Set up boilerplate UI for lambda functions (#882)

* Set up boilerplate UI for lambdas

* Minor cleanup in .env.example

* Add lambda status toggle, better UX for missing api key

* More refactoring and testing

* Set up apis for deploying and invoking lambdas

* Add function to invoke lambda

* Small fix

* More methods for lambdas context

* DRY up some of the upload logic

* Handle zipping files with dependencies for lambda deployment (#886)

* Handle zipping files for lambda on client instead of server

* Add logging for debugging

* Try removing zip

* Add zip back

* Test updating gitattributes

* Try again

* Clean up for testing

* Notify active lambdas on webhook events

* Remove unused

* Revert zipper changes

* Show lambda status in overview, add ability to delete

* Comment for clarity

* Disable webhook events for the demo chat so only the lamba script is run

* Minor ux improvements

* More improvements and cleanup

* Set up flow for requesting access to alpha feature (#887)

* Set up potential flow for requesting access to new alpha feature

* Remove unused dep

* Minor improvement

* Fix lambda status after deployment

* Set up some more useful /api/users endpoints

* Remove console logs

* Remove unused dep

Co-authored-by: cheeseblubber <[email protected]>
  • Loading branch information
reichert621 and cheeseblubber authored Jun 22, 2021
1 parent a9100f7 commit f88b007
Show file tree
Hide file tree
Showing 60 changed files with 2,902 additions and 164 deletions.
11 changes: 9 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export REACT_APP_LOGROCKET_ID='xxxxxx/papercups'
export REACT_APP_STRIPE_PUBLIC_KEY=pk_test_xxxxx
export REACT_APP_FILE_UPLOADS_ENABLED=1

# set to localhost:3000 when developing
# Set to localhost:3000 when developing
export REACT_APP_URL='app.papercups.io'

# General
Expand All @@ -32,10 +32,17 @@ export BACKEND_URL='app.papercups.io'
export CUSTOMER_IO_SITE_ID='0000000000000000000'
export CUSTOMER_IO_API_KEY='xxxxxxxxxxxxx'

# AWS
export AWS_ACCESS_KEY_ID='xxxxxxxxxxxxxxxxxxxxxx'
export AWS_SECRET_ACCESS_KEY='xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

# Used for function role
export FUNCTION_ROLE=papercups-lambda-execution-role
export FUNCTION_BUCKET_NAME='SOME-S3-BUCKET-FOR-FUNCTIONS'
export AWS_ACCOUNT_ID=YOUR_AWS_ACCOUNT_ID

export BUCKET_NAME='SOME-S3-BUCKET'
export AWS_REGION='SOME-AWS-REGION'

# Require ssl for db (defaults to true)
# Require ssl for db (defaults to true)
export REQUIRE_DB_SSL=true
28 changes: 28 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text eol=lf

#
## These files are binary and should be left untouched
#

# (binary is a macro for -text -diff)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary
*.gz binary
*.zip binary
*.7z binary
*.ttf binary
*.eot binary
*.woff binary
*.pyc binary
*.pdf binary
*.ez binary
*.bz2 binary
*.swp binary
2 changes: 1 addition & 1 deletion .github/workflows/papercups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ jobs:
run: mix deps.get

- name: Run tests
run: mix test
run: mix test --exclude lambda_development
140 changes: 106 additions & 34 deletions assets/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"repository": "https://github.com/papercups-io/papercups",
"dependencies": {
"@papercups-io/chat-builder": "0.0.9",
"@papercups-io/chat-builder": "0.0.12",
"@papercups-io/chat-widget": "^1.1.10",
"@papercups-io/storytime": "^1.0.6",
"@sentry/react": "^5.20.1",
Expand All @@ -31,6 +31,8 @@
"antd": "^4.3.5",
"cpx": "^1.5.0",
"dayjs": "^1.9.1",
"jszip": "^3.6.0",
"jszip-utils": "^0.1.0",
"lodash": "^4.17.20",
"logrocket": "^1.0.10",
"mkdirp": "^1.0.4",
Expand Down Expand Up @@ -91,6 +93,7 @@
},
"proxy": "https://localhost:4000",
"devDependencies": {
"@types/jszip": "^3.4.1",
"husky": "^4.2.5",
"lint-staged": "^10.2.11",
"prettier": "^2.0.5"
Expand Down
Binary file added assets/public/deps.zip
Binary file not shown.
Loading

0 comments on commit f88b007

Please sign in to comment.