JUY‑490 – Feature Draft: “Smart Calendar Integration”
Goal: Enable users to connect their external calendar services (Google Calendar, Outlook/Exchange, Apple Calendar) to the Juy platform so that events, meetings, and availability are automatically synchronized and can be used throughout the app (e.g., for scheduling meetings, task reminders, and resource booking).
1. Overview | Item | Details | |------|---------| | Feature Name | Smart Calendar Integration | | Ticket ID | JUY‑490 | | Product Area | Collaboration & Scheduling | | Stakeholders | • End‑users (individual & team) • Sales & Customer Success (need to demo scheduling) • Engineering (Backend, Frontend, Security) • Legal & Compliance (data privacy) | | Priority | P2 – Medium (high‑impact for user adoption) | | Target Release | Q4 2026 (v3.5) | | Dependencies | • OAuth2 provider libraries (Google, Microsoft) • Existing “User Settings” micro‑service • Notification service for event reminders • UI component library upgrade to v2.3 (for new picker) | | Assumptions | • Users have a personal or work calendar that supports OAuth2. • Juy already stores user IDs and has a “connected‑accounts” table. • The platform is GDPR‑compliant, so any calendar data must be stored with explicit consent and can be revoked at any time. |
2. User Stories | # | As a… | I want to… | So that… | |---|-------|------------|----------| | US‑01 | registered user | link my Google, Outlook, or Apple calendar via a secure OAuth flow | my events are visible inside Juy and I can schedule without double‑booking | | US‑02 | registered user | view a unified “Calendar” tab that shows merged events from all connected calendars | I have a single source of truth for my schedule | | US‑03 | team lead | see teammates’ availability (busy/free) when creating a meeting in Juy | I can pick the optimal time without emailing back‑and‑forth | | US‑04 | user | set which calendars are read‑only vs. write‑enabled | I control which events Juy can create or modify | | US‑05 | user | receive push/email notifications for upcoming events synced from external calendars | I never miss a meeting that originated outside Juy | | US‑06 | user | revoke calendar access at any time from the Settings page | my data is no longer synced and the third‑party token is invalidated | | US‑07 | admin | audit which users have calendar connections and when the last sync occurred | I can enforce data‑retention policies and investigate anomalies | juy-490
3. Acceptance Criteria | # | Criteria | Test Approach | |---|----------|---------------| | AC‑01 | OAuth flow works for Google, Microsoft (Outlook/Exchange), and Apple. Tokens are stored encrypted and refreshed automatically. | Unit tests for token storage, integration tests with sandbox accounts, manual OAuth flow test for each provider. | | AC‑02 | Calendar data is fetched (events, start/end time, title, location, description) and stored in a read‑only user_calendar_events table (TTL 30 days). | Mock API responses → verify DB rows, confirm TTL cleanup job runs. | | AC‑03 | UI “Calendar” page shows a merged view, colour‑coded per provider, with pagination or infinite scroll. | Selenium end‑to‑end test: add two providers, create events, verify they appear correctly. | | AC‑04 | When creating a meeting inside Juy, the “Invitees” picker filters times based on busy slots from all connected calendars. | E2E test: schedule meeting across three users with overlapping events, ensure conflict detection. | | AC‑05 | Users can toggle each connected calendar between Read‑Only and Write mode. In Write mode, a newly created Juy meeting is posted back to the external calendar. | API test: create meeting → verify it appears in Google Calendar via API. | | AC‑06 | Revoking access removes the stored tokens and stops sync within 5 minutes. No further events are pulled. | Manual revocation → confirm sync job skips the user, DB token fields cleared. | | AC‑07 | All calendar data is encrypted at rest (AES‑256) and transmitted over TLS 1.2+. Access logs are written to the audit service. | Security scan, penetration test, log review. | | AC‑08 | GDPR compliance: user can download a JSON export of all synced calendar data and request deletion. | Data‑subject request flow test. | | AC‑09 | Performance: initial sync of a calendar with up to 5 000 events completes ≤ 30 seconds; incremental sync ≤ 5 seconds. | Load test with synthetic data. | | AC‑10 | Documentation updated – user guide, admin guide, API spec for “/v1/calendar/sync”. | Documentation review. |
4. UI / UX Mock‑up (Textual Description) | Component | Description | |-----------|-------------| | Settings → Connected Accounts | • List of providers with status icons (connected / error). • “Add Calendar” button opens a modal with provider selection. • Each row has a toggle for Read‑Only / Write and a “Revoke” link. | | Calendar Tab | • Top bar: date picker, provider filter dropdown, sync‑now button. • Main view: week / month view (toggle). Events displayed as blocks with colour‑coded header (Google – blue, Outlook – red, Apple – grey). • Hover tooltip shows event details and source. | | Meeting Scheduler | • When picking a time slot, a grey overlay blocks periods flagged as busy by any connected calendar. • “Add to external calendar” checkbox appears when the user has at least one Write‑enabled calendar. | | Notification Settings | • Switches for “Push”, “Email”, “SMS” per provider (e.g., only receive reminders for Google events). | | Admin Audit Page | • Table: User, Provider, Connected‑At, Last‑Sync, Sync‑Status, Actions (revoke). • Export CSV button. |
Note: The UI will reuse the existing design system (components: Modal , ToggleSwitch , DataTable , DatePicker ). No new visual assets are required. • Juy already stores user IDs and has
5. Technical Design 5.1 Architecture Overview +-------------------+ +-------------------+ +-------------------+ | Front‑End (React) | <--->| API Gateway (Node) | <--->| Calendar Service | +-------------------+ +-------------------+ +-------------------+ | ^ | | | | v | v +-------------------+ | OAuth Provider | | (Google, MS, Apple) | +-------------------+
Calendar Service (new micro‑service) handles:
OAuth token exchange & refresh Pulling events via provider APIs (incremental sync using syncToken / deltaLink where available) Normalising events to a common schema ( CalendarEvent ) Writing to user_calendar_events (encrypted) Publishing write‑back events for providers that allow it User Stories | # | As a… |
API Gateway exposes:
GET /v1/calendar/events?range=... POST /v1/calendar/sync (manual sync trigger) PATCH /v1/calendar/settings (read‑only/write toggle)