GithubHelp home page GithubHelp logo

edujanicas / codehook Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 1.71 MB

A webhook deployer, getting a little help from natural language

Home Page: https://codehook.ai

License: MIT License

Python 49.83% TypeScript 44.15% CSS 0.34% JavaScript 5.68%
api-gateway aws aws-lambda cloud deployment event-driven gpt llm python serverless stripe testing typer webhook

codehook's People

Contributors

edujanicas avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

canerberk

codehook's Issues

Handle Delete REST API call TooManyRequests Gracefully

Describe the bug
When calling DeleteRestAPI, codehook consistently gets
An error occurred (TooManyRequestsException) when calling the DeleteRestApi operation (reached max retries: 4): Too Many Requests back

To Reproduce
Create 2 codehook functions and try to delete --all

Expected behavior
Gracefully retry the deletion 30 seconds after (AWS throttles to 1 requests every 30 seconds)

Create deployer

CLI tool
Takes lambda function
Deploys behind API Gateway
Return URL

Add support for additional sources

Is your feature request related to a problem? Please describe.
Currently codehook only supports Stripe webhook events. Ideally we want to launch with support for 3 popular different sources.

Describe the solution you'd like
Under codehook/skeletons lies the handler for different types of event sources. Under codehook/sources/ lives the deployer for each to create a webhook endpoint in each. Add support for Shopify and Slack, as a starter.

Describe alternatives you've considered
https://webhooks.fyi/docs/webhook-directory

Create deployment packages that include dependencies

Is your feature request related to a problem? Please describe.
Currently, the function being deployed only supports the standard library. Support for extra libraries requires separate Lambda Layers to be deployed.

Describe the solution you'd like
Include all .requirements.txt dependencies in the .zip deployment package generated by the Lambda module.
https://docs.aws.amazon.com/lambda/latest/dg/python-package.html#python-package-create-dependencies

Describe alternatives you've considered
Deploying the function as a container image. Although eventually this might be useful to support additional providers, I believe at the moment it is an overkill.

Generate function code based on command

Is your feature request related to a problem? Please describe.
Generic boilerplates are no longer needed when an LLM can get pretty close to the logic you ask it to do. What if we can bootstrap something really close to the whole webhook logic?

Describe the solution you'd like
Make use of OpenAI's ChatCompletions to generate Python code that gets fed into the webhook handler
https://platform.openai.com/docs/quickstart?context=python

Describe alternatives you've considered
Just generate code vs generate and deploy. Ideally the latter

Add a complete list of Stripe events

Is your feature request related to a problem? Please describe.
Currently codehook handlers will subscribe to all Stripe events. To avoid noise, handlers need to be able to only select a subset

Describe the solution you'd like
Use the Events enum to list all different event types

Improve test coverage

Is your feature request related to a problem? Please describe.
We only have one test at the moment. We need much higher test coverage.

Describe the solution you'd like
Improve test coverage to test each command independently, alongside error cases

Setup CI/CD pipeline

Is your feature request related to a problem? Please describe.
Currently we need to manually lint and test the repo before each commit. Ideally, this will all be done automatically.

Describe the solution you'd like
GitHub actions pipeline to lint and test each commit, test PRs extensively, and publish releases.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.