{"id":18349155,"url":"https://github.com/fonoster/goodtok","last_synced_at":"2025-04-05T02:04:33.296Z","repository":{"id":197431965,"uuid":"698625089","full_name":"fonoster/goodtok","owner":"fonoster","description":"A better shopping experience 🤙","archived":false,"fork":false,"pushed_at":"2025-02-18T14:18:54.000Z","size":57320,"stargazers_count":89,"open_issues_count":6,"forks_count":12,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-29T01:13:36.430Z","etag":null,"topics":["customer-engagement","customer-experience","cx","fonoster","video","webrtc"],"latest_commit_sha":null,"homepage":"https://goodtok.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fonoster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["fonoster"]}},"created_at":"2023-09-30T13:27:07.000Z","updated_at":"2025-03-28T03:47:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"3a22ef3f-06c1-48f8-a1b9-485ae9c0dd6d","html_url":"https://github.com/fonoster/goodtok","commit_stats":{"total_commits":572,"total_committers":4,"mean_commits":143.0,"dds":0.05944055944055948,"last_synced_commit":"71f98f589424ef5bd04355a9916ac4da3815f2a2"},"previous_names":["psanders/goodtok","fonoster/goodtok"],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fonoster%2Fgoodtok","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fonoster%2Fgoodtok/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fonoster%2Fgoodtok/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fonoster%2Fgoodtok/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fonoster","download_url":"https://codeload.github.com/fonoster/goodtok/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247033764,"owners_count":20872525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["customer-engagement","customer-experience","cx","fonoster","video","webrtc"],"created_at":"2024-11-05T21:20:49.643Z","updated_at":"2025-04-05T02:04:28.286Z","avatar_url":"https://github.com/fonoster.png","language":"TypeScript","funding_links":["https://github.com/sponsors/fonoster","https://img.shields.io/static/v1?label=Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026link=https://github.com/sponsors/fonoster"],"categories":[],"sub_categories":[],"readme":"# Goodtok\n\n\u003cdiv align=\"center\"\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://goodtok.io\" target=\"_blank\" rel=\"noopener\"\u003e\n      \u003cimg src=\"https://github.com/fonoster/goodtok/blob/main/assets/repo-banner.png\" /\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003ca href=\"https://gitpod.io/#https://github.com/fonoster/goodtok\"\u003e \u003cimg src=\"https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod\" alt=\"Contribute with Gitpod\" /\u003e\n\u003c/a\u003e [![Sponsor this](https://img.shields.io/static/v1?label=Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026link=https://github.com/sponsors/fonoster)](https://github.com/sponsors/fonoster) [![Discord](https://img.shields.io/discord/1016419835455996076?color=5865F2\u0026label=Discord\u0026logo=discord\u0026logoColor=white)](https://discord.gg/4QWgSz4hTC) ![GitHub](https://img.shields.io/github/license/fonoster/goodtok?color=%2347b96d) ![Twitter Follow](https://img.shields.io/twitter/follow/fonoster?style=social)\n\nGoodtok helps businesses enhance their customer service right from their website. The video application lets customers connect with your staff in real-time. You can integrate this simple and easy-to-use application into any website.\n\n\u003e [!WARNING]\n\u003e This project is just starting and is not ready for production use yet.\n\n## Table of Contents\n\n- [Give a Star!](#give-a-star-)\n- [Installation](#installation)\n- [Development Mode](#development-mode-with-gitpod)\n- [Usage](#usage)\n- [Architecture](#architecture)\n- [Contact us](#contact-us)\n- [Bugs and Feature Requests](#bugs-and-feature-requests)\n- [Contributing](#contributing)\n- [Authors](#authors)\n- [License](#license)\n\n## Give a Star! ⭐\n\nIt would mean a lot to us if you could give this project a star. It helps us identify if we are doing a good job and attract potential contributors, users, and investors. Thanks 🙏\n\n## Installation\n\nWe aim to make this as easy to install as possible. For now, follow the following instructions to get started.\n\nFirst, create a new directory called `goodtok` and change to that directory:\n\n```bash\nmkdir goodtok\ncd goodtok\n```\n\nNext, create a `.env` file with the following content:\n\n```bash\n# General config\nAPI_ENDPOINT=http://localhost:6789/v1\nAPP_URL=http://localhost:8080\nLOGS_LEVEL=verbose\n\n# Initial store owner credentials\n#   The server will create a new owner if the email does not exist\n#   The password will be updated if the email exists\nOWNER_EMAIL=admin@goodtok.local\nOWNER_PASSWORD=changeme\n\n# PeerJs Server config\nSIGNALING_HOST=localhost\nSIGNALING_PORT=9000\n# Ucomment to use custom ICE servers\n# ICE_SERVERS_CONFIG='[{\"urls\": \"stun:stun.l.google.com:19302\"}, {\"urls\": \"turn:us-turn4.xirsys.com:80?transport=udp\", \"username\": \"xirsys\", \"credential\": \"xirsys\"}]'\n\n# SMTP config\nSMTP_HOST=localhost\nSMTP_PORT=1025\nSMTP_SECURE=false\nSMTP_AUTH_USER=postmaster@goodtok.local\nSMTP_AUTH_PASS=secret\nSMTP_SENDER=Goodtok Info \u003cinfo@goodtok.local\u003e\n\n# Database and encryption config\n# Create a new encryption key with cloack (https://cloack.47ng.com)\nPOSTGRES_USER=postgres\nPOSTGRES_PASSWORD=postgres\nDATABASE_URL=postgresql://postgres:postgres@postgres:5432/goodtok\nCLOAK_ENCRYPTION_KEY=k1.aesgcm256.MmPSvzCG9fk654bAbl30tsqq4h9d3N4F11hlue8bGAY=\n\n# Uncomment to enable custom email templates\n#  See mods/apiserver/src/notifications/templates for available templates\n#  If not set, Goodtok will use the default templates\n# EMAIL_TEMPLATES_DIR=/path/to/email/templates\n```\n\nFinally, run the following command to start the application:\n\n```bash\ncurl -o ./compose.yaml https://raw.githubusercontent.com/fonoster/goodtok/main/compose.yaml\ndocker compose up -d\n```\n\nThe previous command will start all the services, including the Front Office. You can then open the application at [http://localhost:8080](http://localhost:8080) and access the dashboard.\n\n## Development mode with Gitpod\n\nGoodtok's one-click interactive deployment will familiarize you with the server in development mode.\n\n[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/fonoster/goodtok)\n\n## Usage\n\nIn the website where you want to integrate Goodtok, you will need to add the following script tag:\n\n```html\n\u003c!-- Goodtok video client --\u003e\n\u003cscript\n  type=\"module\"\n  src=\"https://unpkg.com/@goodtok/widget?key=eyJndGlkIjoiZy00ZjkwZDEzYTQyIiwic2VydmVyIjoiaHR0cHM6Ly9hcGkuZ29vZHRvay5pby92MSJ9\u0026token=OPTIONAL_CUSTOMER_TOKEN\"\n\u003e\n\u003c/script\u003e\n\u003c!-- Goodtok video client end --\u003e\n```\n\nThe key is a base64 encoded value containing the account `gtid` and `server` of your Goodtok instance. You can generate this value by running the following command:\n\n```bash\n# The gtid corresponds to the workspace id in the Goodtok dashboard\necho -n '{\"gtid\":\"g-7b7c46fb05\",\"server\":\"http://localhost:6789/v1\"}' | base64\n```\n\nThe client will default to `https://api.goodtok.io/v1` if no server is specified.\n\nA customer token is a [JSON Web Token](https://jwt.io/) with necessary claims to authenticate the user and connect to the signaling server. Here is an example of the claims for a customer token:\n\n```json\n{\n  \"ref\": \"iypok\",\n  \"customerId\": \"iypok\",\n  \"workspaceId\": \"g-7b7c46fb05\",\n  \"calendarUrl\": \"https://cal.com/placeholder\",\n  \"signalingHost\": \"peerjs.goodtok.io\",\n  \"signalingPort\": 443,\n  \"iceServers\": {...}\n  \"metadata\": {\n    \"name\": \"Peter\",\n    \"email\": \"peter@example.com\",\n    \"message\": \"Test message\"\n  },\n  \"iat\": 1701740245,\n  \"exp\": 1701826645\n}\n```\n\nWhen no customer token is provided, the video widget will show a form requesting the user to enter their name, email, and a message. The video widget will then request an anonymous token from the server. We recommend providing a customer token to the video widget to avoid the form.\n\nTo learn more about customer tokens, see the [customer tokens](https://goodtok.io/docs/video-widget/customer-tokens) section in the documentation.\n\n## Architecture\n\nGoodtok uses a combination of open-source tools to provide a video application that can be integrated into any website. If the tool exists and is well maintained, we will use and support it. If the tool doesn't exist, we build and open-source it ourselves.\n\nGoodtok is a [hosted platform](https://goodtok.io). You can sign up and start using Goodtok without installing anything. You can also self-host and develop locally.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/fonoster/goodtok/blob/main/assets/architecture.png\" /\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n- [Postgres](https://www.postgresql.org/) is a popular open-source database with a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness.\n- [tRPC](https://trpc.io) is a library for building end-to-end type-safe APIs with TypeScript and Node.js. We connect all the services using tRPC.\n- [SMTP](https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol) is an Internet standard for email transmission. We use SMTP to send emails to customers and agents.\n- [PeerJS](https://peerjs.com/) simplifies WebRTC peer-to-peer data, video, and audio calls. We use PeerJS to establish a WebRTC connection between the customer and the agent.\n\n## Contact us\n\nMeet our sales team for any commercial inquiries.\n\n\u003ca href=\"https://cal.com/psanders\"\u003e\u003cimg src=\"https://cal.com/book-with-cal-dark.svg\" alt=\"Book us with Cal.com\"\u003e\u003c/a\u003e\n\n## Bugs and Feature Requests\n\nFor bugs or feature requests, please create an issue [here](https://github.com/fonoster/goodtok/issues). For questions, take a look at the [Discussions](https://github.com/fonoster/goodtok/discussions) section.\n\n## Known Issues\n\nWhen running Goodtok without a TLS certificate, you must add the following to your browser to allow the camera to work: `chrome://flags/#unsafely-treat-insecure-origin-as-secure` or an equivalent for your browser. The camera will not work on an insecure origin.\n\n## Contributing\n\nFor contributing, please see the following links:\n\n - [Contribution Documents](https://github.com/fonoster/goodtok/blob/master/CONTRIBUTING.md)\n - [Contributors](https://github.com/fonoster/goodtok/contributors)\n\n\u003c!--contributors:start--\u003e\n\n\u003ctable\u003e\n\u003ctr\u003e\n    \u003ctd align=\"center\" style=\"word-wrap: break-word; width: 150.0; height: 150.0\"\u003e\n        \u003ca href=https://github.com/psanders\u003e\n            \u003cimg src=https://avatars.githubusercontent.com/u/539774?v=4 width=\"100;\"  style=\"border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px\" alt=Pedro Sanders/\u003e\n            \u003cbr /\u003e\n            \u003csub style=\"font-size:14px\"\u003e\u003cb\u003ePedro Sanders\u003c/b\u003e\u003c/sub\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" style=\"word-wrap: break-word; width: 150.0; height: 150.0\"\u003e\n        \u003ca href=https://github.com/obrucheoghene\u003e\n            \u003cimg src=https://avatars.githubusercontent.com/u/111436934?v=4 width=\"100;\"  style=\"border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px\" alt=Obruche Wilfred  Oghenechohwo/\u003e\n            \u003cbr /\u003e\n            \u003csub style=\"font-size:14px\"\u003e\u003cb\u003eObruche Wilfred  Oghenechohwo\u003c/b\u003e\u003c/sub\u003e\n        \u003c/a\u003e\n    \u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Authors\n\n- [Pedro Sanders](https://github.com/fonoster)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffonoster%2Fgoodtok","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffonoster%2Fgoodtok","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffonoster%2Fgoodtok/lists"}