ihsanmohamad / bromb-endpoint

Home Page:https://github.com/samuelstroschein/bromb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bromb-endpoint

The self-hostable endpoint for the bromb feedback widget. The repository is build to be

  • one click deployable via deno deploy
  • write own integrations
  • adjust the submission categories
  • updatable by pulling from the upstream

Getting Started

1. Fork this repository

Fork this repository to adjust the widgetConfig, write and use integrations and deploy your endpoint. On top of that, you can constantly update your endpoint by fetching from the upstream.

2. Run locally

  1. Install deno https://deno.land/#installation
  2. run deno run --allow-net --allow-env --allow-read mod.ts
  3. open http://localhost:7600

Try out the widget. Each submission should appear in the terminal since the endpoint is using the consoleLog integration by default.

3. Deploy

  1. Click the button image button
  2. Click deploy
  3. Change <YOUR GITHUB USERNAME> in the url to yours
  4. Link your github repo by copy and pasting this link https://github.com/<YOUR GITHUB USERNAME>/bromb-endpoint/blob/main/mod.ts

4. Configure your integration

Simply change the INTEGRATION_FILE_NAME to the integration you want to use. Most integrations will make use of additional env variables that you have to define as specified at the top of the integration file.

5. Embed the bromb widget and point to your endpoint

<head>
  <script 
    async 
    defer 
    src="https://cdn.jsdelivr.net/gh/samuelstroschein/bromb/packages/web/dist/widget.js"
    data-theme="light"
    data-custom-endpoint="<YOUR ENDPOINT LINK>"
  ></script>
</head>
  

Config

You can adjust the widgetConfig.json file in your fork as you wish.

Trigger the widget

Simply create an anchor in your html with a trigger link with a configs organizationName and projectName:

  <a href="https://submission.bromb.co/exampleOrganization/exampleProject">Give feedback</a>

About

https://github.com/samuelstroschein/bromb

License:Apache License 2.0


Languages

Language:TypeScript 80.2%Language:HTML 17.9%Language:Shell 2.0%