Cal.diy

repository·main·Indexed 13 days ago

https://github.com/calcom/cal.diy

A community-driven, 100% MIT-licensed fork of Cal.com designed for self-hosting. It removes enterprise-only features and proprietary code to provide a fully open-source scheduling platform, including support for API v2, a credential sync example app, and various app store integrations.

Tokens
194.5K
Snippets
774
Records
1.1K
Agent score
99%

What's inside Cal.diy

  1. Overview of Cal.diy

    main

    Cal.diy is a community-driven, fully open-source scheduling platform. It is a fork of Cal.com with all enterprise and commercial code removed, making it 100% MIT-licensed.

    Key characteristics:

    • No enterprise features: Features like Teams, Organizations, Insights, Workflows, and SSO/SAML are removed.
    • No license keys: Everything is functional out of the box without requiring a Cal.com account.
    • Self-hosted: There is no managed or hosted version; you must run it on your own infrastructure.
    • Open Source: Unlike 'Open Core' models, the entire codebase is MIT-licensed.
  2. Capabilities of the Bolna integration

    main

    Bolna is an integration within the Cal.diy app store designed to automate front desk operations using AI agents. Key capabilities include:

    • No-Code Agent Creation: Design custom agents or edit pre-built ones without writing code.
    • Low Latency: Supports human-like conversations with latencies under 500ms.
    • Function Calling: Agents can execute specific actions during calls, such as booking appointments via Cal.com or transferring calls to human agents in real time.
    • Multi-lingual Support: Agents can be created in any language for global call placement.
    • Call Analytics: Provides access to transcripts, recordings, conversational summaries, and call logs.
    • Webhook Integration: Supports real-time call event notifications (e.g., ringing, answered, in-progress, completed).
  3. Use cases for Fonio AI telephone assistant

    main

    Fonio AI is an AI telephone assistant that integrates with systems like calendars and CRMs to automate calls. Key use cases include:

    • Secretariat: Handles incoming calls and forwards them to the appropriate contact person as needed.
    • Transcription: Receives customer requests, transcribes them, and sends them via email if the user is unavailable.
    • Customer Service: Provides 24/7 customer support. Users can precisely define the AI's behavior, including handling special cases, via the platform.
    • Order Intake: Offers 24/7 automated inquiry processing for fast service.
    • Appointment Scheduling: Can schedule appointments during a conversation. It is compatible with all calendars supported by cal.com.
  4. What is the Tasker pattern and how does it work?

    main

    The Tasker pattern is a structured approach for managing non-critical background tasks (e.g., sending emails, generating reports, or maintenance) to improve application responsiveness. It provides a mechanism for task scheduling, execution, automatic retries, and cancellation.

    Core Concepts

    • Offloading: Instead of executing a task immediately on the main thread, you schedule it via a Tasker. This moves the execution to a separate queue.
    • Retry Mechanism: If a task fails, the system automatically increments the attempts count and retries it on the next processing cycle. By default, tasks are attempted up to 3 times, though this can be overridden during task creation.
    • Task Lifecycle:
      • Success: The task is marked with suceededAt: new Date().
      • Failure: The attempts property increases. If attempts reaches maxAttemps, the task is marked as failed and is no longer retried.
    • Implementation Types:
      • InternalTasker: A built-in implementation that requires no third-party dependencies and relies on a configured cron job.
      • Third-party Taskers: The pattern is modular, allowing replacement with services like TriggerDevTasker or AwsSqsTasker.

    Task Definition

    A task is defined as a function that receives a string payload:

    type TaskHandler = (payload: string) => Promise<void>;
    type TaskHandler = (payload: string) => Promise<void>;
  5. How the Spec-Driven Development Workflow works

    main

    Spec-Driven Development is an opt-in workflow used to manage feature development through structured design documents located in the specs/ directory. This workflow ensures that implementation follows a predefined technical specification and that architectural decisions are recorded.

    The standard spec directory structure:

    • specs/{feature}/CLAUDE.md: Feature-specific instructions (read this first).
    • specs/{feature}/design.md: The technical specification of what is being built.
    • specs/{feature}/implementation.md: Tracks current progress and status.
    • specs/{feature}/decisions.md: Records why specific technical decisions were made.
    • specs/{feature}/prompts.md: Reusable prompts for the feature.
    • specs/{feature}/future-work.md: List of deferred tasks.
    • specs/{feature}/docs/: Documentation and screenshots.

    Standard Workflow:

    1. Read CLAUDE.md for specific instructions.
    2. Read design.md to understand the technical requirements.
    3. Check implementation.md to see the current status.
    4. Locate relevant code and implement in small, incremental pieces.
    5. Update implementation.md after every completed piece.
  6. How Embed Core Architecture works

    main

    The embed system is built on a message-based communication model between the parent page and the embedded iframe.

    Initialization

    1. The embed script loads on the parent page.
    2. A global Cal object is created as the entry point.
    3. Custom elements like cal-modal-box, cal-floating-button, and cal-inline are initialized.
    4. A namespace-based action manager is created for event handling.

    Communication and Queuing

    • Parent-to-Iframe: Uses a message-based system. The parent can call ui(config) to update the interface or connect(config) to pass prefill data and attributes.
    • Instruction Queue: If commands are issued before the iframe is fully ready, they are stored in an InstructionQueue and executed once iframeReady is true.
    • Namespacing: Events are namespaced to ensure that multiple embeds on a single page do not conflict with one another.
  7. Use Multi-Calendar Tools for Team and Service Scheduling

    main

    Famulor.io supports Multi-Calendar Tools, allowing a single AI assistant to manage multiple calendars simultaneously. This is useful for:

    • Team & Service Calendars: Assigning different calendars to one assistant so users can choose specific team members or services (e.g., selecting a specific professional in a salon).
    • Medical/Clinic Workflows: Directing patients to the correct doctor's calendar within a single assistant interface.
    • Automated Management: Reducing manual back-and-forth by letting the assistant handle multiple calendar contexts effortlessly.
  8. How the Zapier Integration works in Cal.diy

    main

    The Zapier app in Cal.diy is a redirect app. It does not require local OAuth configuration or Cal.diy credentials for setup. Instead, it directs users to Zapier's native integration platform.

    User Workflow:

    1. The user clicks "Visit" within the Cal.diy app store.
    2. They are redirected to the Zapier integrations page.
    3. They set up automations directly on Zapier's platform, authenticating with Zapier instead of Cal.diy.
  9. Understand the differences between Cal.diy and Cal.com

    main

    Cal.diy is the open-source community edition of Cal.com, intended for self-hosting and strictly recommended for personal, non-production use. Cal.com is the commercial, enterprise-ready version hosted by Cal.com, Inc.

    Key Feature Differences

    Features available in Cal.diy:

    • Scheduling: Event Types, Recurring Event Types, Seated Events, Paid Events (Stripe/PayPal), Private Links.
    • Availability: Schedules, Date Overrides, Buffer Times, Minimum Notice, Travel Schedules, Out-of-Office.
    • Integrations: Google, Outlook, Apple, CalDAV, Lark, Feishu, Zoho, Exchange, ICS.
    • Conferencing: Zoom, Google Meet, Microsoft Teams, Webex, Jitsi, Cal Video (Daily.co), and others.
    • Authentication: Email/Password, Google OAuth, Azure AD/Microsoft OAuth.
    • Automation: Webhooks, Zapier, n8n/Make/Pipedream, CRM (HubSpot/Salesforce), Messaging (Discord/Telegram/WhatsApp), AI Agents.
    • Embed & API: Embeds (Inline, Popup, Floating Button), API v2 (REST), API Keys, OAuth Clients.

    Features ONLY in Cal.com (Enterprise/Commercial):

    • Teams & Organizations: Team Event Types (Round-Robin/Collective), Managed Event Types, Instant Meeting, Organizations.
    • Advanced Auth: SAML SSO, SCIM Directory Sync, Impersonation.
    • Advanced Automation: Workflows, Routing Forms.
    • Analytics & Admin: Insights Dashboard, Attributes & Segments, Admin Panel, Workspace Platform, Delegation.