{"id":26678232,"url":"https://github.com/telexintegrations/break-time","last_synced_at":"2025-07-19T15:02:10.188Z","repository":{"id":279050098,"uuid":"937353406","full_name":"telexintegrations/break-time","owner":"telexintegrations","description":"Telex integration that sends in break reminders with random quotes.","archived":false,"fork":false,"pushed_at":"2025-02-24T14:14:12.000Z","size":109,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T05:15:11.897Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://telex-break.onrender.com","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/telexintegrations.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2025-02-22T21:42:23.000Z","updated_at":"2025-02-24T14:14:16.000Z","dependencies_parsed_at":"2025-02-23T13:26:03.349Z","dependency_job_id":"6136d563-b1ca-4e77-8294-50158d30a694","html_url":"https://github.com/telexintegrations/break-time","commit_stats":null,"previous_names":["telexintegrations/break-time"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/telexintegrations/break-time","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telexintegrations%2Fbreak-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telexintegrations%2Fbreak-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telexintegrations%2Fbreak-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telexintegrations%2Fbreak-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/telexintegrations","download_url":"https://codeload.github.com/telexintegrations/break-time/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telexintegrations%2Fbreak-time/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265949778,"owners_count":23853629,"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":[],"created_at":"2025-03-26T05:15:14.798Z","updated_at":"2025-07-19T15:02:10.090Z","avatar_url":"https://github.com/telexintegrations.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Break Time\n\nThis showcases an Integration with Telex that sends break time notifications with random quotes to keep users motivated and productive. It uses a Interval Type of integration. The BreakTime reminder is sent every hour. This can be changed by changing the interval.\n\n## Table of Contents\n\n-   [Features](#features)\n-   [Prerequisites](#prerequisites)\n-   [Installation](#installation)\n-   [Environment Variables](#environment-variables)\n-   [API Documentation](#api-documentation)\n-   [Testing](#testing)\n-   [Project Structure](#project-structure)\n-   [Technologies Used](#technologies-used)\n\n## Features\n\n-   Integration with external quote service\n-   Scheduled break notifications\n-   Customizable break intervals\n-   Random motivational quotes\n-   RESTful API endpoints\n-   Integraatioi with Telex\n\n## Prerequisites\n\n-   Node.js (v14 or higher)\n-   npm (v6 or higher)\n-   TypeScript (v4 or higher)\n\n## Installation\n\n1. Clone the repository\n\n```bash\ngit clone https://github.com/telexintegrations/break-time.git\ncd break-time\n```\n\n2. Install dependencies\n\n```bash\npnpm install\n```\n\n3. Create a `.env` file in the root direstory. It should contain:\n\n```bash\nPORT=3000\nTELEX_URL=\u003cyour-telex-channel-webhook\u003e\nNODE_ENV=development\n```\n\n4. Start the development server\n\n```bash\npnpm run dev # console log message Server successfully running on port: 3000\n```\n\n## Environment Variables\n\n| Variable  | Description                         | Required | Default     |\n| --------- | ----------------------------------- | -------- | ----------- |\n| PORT      | Port number for the server          | No       | 3000        |\n| TELEX_URL | Telex webhook URL for notifications | Yes      | -           |\n| NODE_ENV  | Application environment             | No       | development |\n\n-   **PORT**: The port number where the server will run\n-   **TELEX_URL**: Your Telex channel webhook URL for sending notifications\n-   **NODE_ENV**: Current environment (development/production/test)\n\n## API Documentation\n\n### Integration Endpoint\n\n-   GET `/integration`\n    -   Returns the integration details and configuration\n\n#### Response Example\n\n```json\n{\n\t\"data\": {\n\t\t\"date\": {\n\t\t\t\"created_at\": \"2025-02-22\",\n\t\t\t\"updated_at\": \"2025-02-22\"\n\t\t},\n\t\t\"descriptions\": {\n\t\t\t\"app_name\": \"Break Time\",\n\t\t\t\"app_description\": \"Break TIme\",\n\t\t\t\"app_logo\": \"https://as1.ftcdn.net/jpg/02/00/33/96/240_F_200339666_fZhsLAgpYkd5ogjTpFmSYOPcslpNezYA.jpg\",\n\t\t\t\"app_url\": \"https://localhost:3000\",\n\t\t\t\"background_color\": \"#fff\"\n\t\t},\n\t\t\"is_active\": true,\n\t\t\"integration_type\": \"interval\",\n\t\t\"integration_category\": \"Human Resources \u0026 Payroll\",\n\t\t\"key_features\": [\"break\", \"quotes\"],\n\t\t\"author\": \"Paul Ajijola\",\n\t\t\"settings\": [\n\t\t\t{\n\t\t\t\t\"label\": \"interval\",\n\t\t\t\t\"type\": \"text\",\n\t\t\t\t\"required\": true,\n\t\t\t\t\"default\": \"* */1 * * *\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"label\": \"header\",\n\t\t\t\t\"type\": \"text\",\n\t\t\t\t\"required\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t}\n\t\t],\n\t\t\"target_url\": \"\",\n\t\t\"tick_url\": \"https://localhost:3000/break\"\n\t}\n}\n```\n\n### Break Time Endpoint\n\n-   POST `/break`\n    -   Triggers a break notification with a random quote\n    -   Requires settings in the request body\n    -   This is required to set the event name e.g., what is set in `default` becomes the `event_name`\n\n#### Request Body Example\n\n```json\n{\n\t\"settings\": {\n\t\t\"label\": \"header\",\n\t\t\"type\": \"text\",\n\t\t\"required\": true,\n\t\t\"default\": \"Break Time!\"\n\t}\n}\n```\n\n### Testing\n\nRun the test suite:\n\n```bash\npnpm run test\n```\n\nWatch for changes in tests files:\n\n```bash\npnpm run test:watch\n```\n\n## Project Structure\n\nThe app folder structure\n\n```\nbreak-time/\n├── src/\n│ ├── controller/\n│ │ └── index.ts\n│ ├── routes/\n│ │ └── index.ts\n│ ├── types/\n│ │ └── index.d.ts\n│ ├── service.ts\n│ └── app.ts\n├── **test**/\n│ ├── controller/\n│ │ └── index.test.ts\n│ └── routes/\n│ └── index.test.ts\n| └── app.test.ts\n| └── service.test.ts\n├── .gitignore\n├── jest.config.ts\n├── LICENSE\n└── package.json\n└── pnpm-lock.yaml\n└── README.md\n├── tsconfig.json\n```\n### Technologies Used\n\n-   Express.js\n-   TypeScript\n-   Jest\n-   ts-jest\n-   Cors\n-   Dotenv\n-   HTTP Status Codes\n-   Axios\n\n### License\n\nMIT\n\n### Quotes \nThe random quotes sent are gotten from `http://api.quotable.io/quotes/random`.\n\n### Image showing integration\n[Telex Chat showing BreakTime integration](https://res.cloudinary.com/dl5nzkcs4/image/upload/yranmd4bpqykthumt75y.jpg)\n\n### To test the integration: using `curl`\n\n```bash\ncurl -X POST \\\n  \"https://telex-break.onrender.com/break\" \\\n  -H \"accept: application/json\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"settings\": {\n      \"label\": \"header\",\n      \"type\": \"text\",\n      \"required\": true,\n      \"default\": \"🙂🙂 Dey Rest 🙂🙂\"\n    }\n  }'\n```\n\nTelex-Organization: Telex-Integration-Test-4 Organization\nChannel Name: break-time","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelexintegrations%2Fbreak-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftelexintegrations%2Fbreak-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelexintegrations%2Fbreak-time/lists"}