feat: Add Sendly SMS app to App Store#28782
feat: Add Sendly SMS app to App Store#28782sendly-live wants to merge 10 commits intocalcom:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis pull request adds a new Sendly SMS integration package to the app-store. It introduces package metadata, a package manifest, and a config.json entry describing the app and required API key. It adds a README and an example 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (3)
packages/app-store/sendly-sms/config.json (1)
13-13: Consider adding an app store image.The
imageSrcis empty. While not required, adding a preview image improves the app store listing appearance. If no image is available now, this can be addressed later.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/app-store/sendly-sms/config.json` at line 13, The config.json currently has an empty "imageSrc" value which leaves the app store listing without a preview image; update the "imageSrc" property in packages/app-store/sendly-sms/config.json to point to a valid image URL or relative asset path (e.g., a hosted PNG/JPEG or an image in the repo) so the app store can display a preview, ensuring the path is accessible and the file format/size meet store requirements.packages/app-store/sendly-sms/components/SendlySmsSetup.tsx (2)
11-18: Hardcoded UI strings should use i18n.Cal.com uses internationalization for UI strings. These hardcoded English strings should be moved to the translation files for consistency. Based on learnings, UI strings for apps should be added to
packages/i18n/locales/en/common.json.Example for the heading:
import { useLocale } from "@calcom/lib/hooks/useLocale"; export default function SendlySmsSetup() { const { t } = useLocale(); // Then use t("sendly_sms_notifications") instead of hardcoded string🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/app-store/sendly-sms/components/SendlySmsSetup.tsx` around lines 11 - 18, The JSX in SendlySmsSetup contains hardcoded English strings; replace them with i18n keys by importing and using the locale hook (useLocale) to get t and call t("sendly_sms_notifications"), t("sendly_sms_description"), etc., for the heading and paragraph, then add the corresponding keys and English values to the locales file (packages/i18n/locales/en/common.json). Ensure you update all visible literals in SendlySmsSetup to use t(...) and add matching keys to the translation JSON so the component renders the strings via i18n.
10-86: Refactor to use Tailwind classes and Cal.com UI components instead of inline styles.All other app-store components in the codebase use
classNamewith Tailwind CSS and import UI components from@calcom/ui/components/, not inline style objects. For consistency, this setup page should follow the same pattern. Additionally, the hardcoded English text should use theuseLocale()hook for i18n support.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/app-store/sendly-sms/components/SendlySmsSetup.tsx` around lines 10 - 86, The SendlySmsSetup component uses inline style objects and hardcoded English text; refactor it to use Tailwind className utilities and Cal.com UI components from `@calcom/ui/components` (e.g., Card, Heading, Text, Button, Link, List/ListItem) instead of inline styles, replacing each div/h*/p/ul/ol/a with appropriate UI components and Tailwind classes, and remove inline style props; also replace hardcoded strings with values from useLocale() (call useLocale() at the top of SendlySmsSetup and use the returned localization helpers/keys for all visible text and links). Ensure you update imports to pull the UI components and useLocale, and keep the component name SendlySmsSetup unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/app-store/sendly-sms/api/add.ts`:
- Around line 24-34: The external fetch to "https://sendly.live/api/v1/account"
in the try block should use an AbortController with a timeout: create an
AbortController before calling fetch, pass controller.signal in the fetch
options alongside the Authorization header, start a timeout (e.g., setTimeout)
that calls controller.abort() after a chosen ms, and clear the timeout once
fetch completes; in the catch block detect an abort (controller.signal.aborted
or check for an AbortError) and return a 504 (or appropriate timeout) response,
otherwise keep returning 500 for other errors—update handling around the
existing response, apiKey, and res variables accordingly.
- Around line 14-21: The API handler function `handler` currently accepts any
HTTP method; add a method check at the start to only accept POST (or whichever
intended method) and return a 405 Method Not Allowed for others (include an
Allow header with the allowed method), then proceed to read `req.body` and
validate `apiKey` as before; update the early-return redirect branch to run only
after the method validation so body processing never happens for invalid
methods.
---
Nitpick comments:
In `@packages/app-store/sendly-sms/components/SendlySmsSetup.tsx`:
- Around line 11-18: The JSX in SendlySmsSetup contains hardcoded English
strings; replace them with i18n keys by importing and using the locale hook
(useLocale) to get t and call t("sendly_sms_notifications"),
t("sendly_sms_description"), etc., for the heading and paragraph, then add the
corresponding keys and English values to the locales file
(packages/i18n/locales/en/common.json). Ensure you update all visible literals
in SendlySmsSetup to use t(...) and add matching keys to the translation JSON so
the component renders the strings via i18n.
- Around line 10-86: The SendlySmsSetup component uses inline style objects and
hardcoded English text; refactor it to use Tailwind className utilities and
Cal.com UI components from `@calcom/ui/components` (e.g., Card, Heading, Text,
Button, Link, List/ListItem) instead of inline styles, replacing each
div/h*/p/ul/ol/a with appropriate UI components and Tailwind classes, and remove
inline style props; also replace hardcoded strings with values from useLocale()
(call useLocale() at the top of SendlySmsSetup and use the returned localization
helpers/keys for all visible text and links). Ensure you update imports to pull
the UI components and useLocale, and keep the component name SendlySmsSetup
unchanged.
In `@packages/app-store/sendly-sms/config.json`:
- Line 13: The config.json currently has an empty "imageSrc" value which leaves
the app store listing without a preview image; update the "imageSrc" property in
packages/app-store/sendly-sms/config.json to point to a valid image URL or
relative asset path (e.g., a hosted PNG/JPEG or an image in the repo) so the app
store can display a preview, ensuring the path is accessible and the file
format/size meet store requirements.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a5c10a12-168a-45ea-93c3-96b0e08b5581
⛔ Files ignored due to path filters (1)
packages/app-store/sendly-sms/static/icon.svgis excluded by!**/*.svg
📒 Files selected for processing (7)
packages/app-store/sendly-sms/.env.examplepackages/app-store/sendly-sms/README.mdxpackages/app-store/sendly-sms/api/add.tspackages/app-store/sendly-sms/components/SendlySmsSetup.tsxpackages/app-store/sendly-sms/config.jsonpackages/app-store/sendly-sms/index.tspackages/app-store/sendly-sms/package.json
romitg2
left a comment
There was a problem hiding this comment.
can you please add video demo
Summary
Adds Sendly SMS as a new app in the Cal.com App Store. Sendly provides SMS notifications for Cal.com bookings — confirmations, reminders, rescheduling notices, and cancellation alerts.
Why Sendly over Twilio?
{{attendee_name}},{{event_title}},{{start_time}}, etc.)What's included
packages/app-store/sendly-sms/config.json— app metadatapackages/app-store/sendly-sms/index.ts— app entry pointpackages/app-store/sendly-sms/api/add.ts— install handler (redirects to Sendly setup)packages/app-store/sendly-sms/components/SendlySmsSetup.tsx— settings UIpackages/app-store/sendly-sms/README.mdx— App Store listingpackages/app-store/sendly-sms/static/icon.svg— app iconpackages/app-store/sendly-sms/.env.example— env templateHow it works
sendly.live/integrations/calcom(enters Cal.com API key)Supported events
Links