A web-based calendar synchronization tool that automatically pulls Outlook calendar events and displays them as timeblocks in a daily planner interface.
- Microsoft Outlook Integration: Automatically sync calendar events for today + next 7 days
- Timeblock Visualization: View events as visual timeblocks grouped by day
- Task Conversion: Convert calendar events to tasks with one click
- Read-Only Safety: Never modifies your Outlook calendar
- Automatic Sync: Re-syncs on app open
- Timezone Support: Handles your local timezone correctly
- Frontend: Next.js 14 (React 18)
- Authentication: Microsoft Authentication Library (MSAL)
- Calendar API: Microsoft Graph API
- Database: Supabase
- State Management: Zustand
- Node.js 18+
- Microsoft 365 account
- Supabase project
-
Clone the repository
-
Install dependencies:
npm install
-
Set up environment variables (see
.env.local.example) -
Run development server:
npm run dev
NEXT_PUBLIC_MSAL_CLIENT_ID=<your_client_id>
NEXT_PUBLIC_MSAL_AUTHORITY=https://login.microsoftonline.com/common
NEXT_PUBLIC_SUPABASE_URL=<your_supabase_url>
NEXT_PUBLIC_SUPABASE_ANON_KEY=<your_anon_key>
SUPABASE_SERVICE_ROLE_KEY=<your_service_key>
The timeblocks table stores synced Outlook events:
id- UUID primary keyuser_id- Supabase user referenceoutlook_event_id- Unique identifier from Outlook (used for upsert)subject- Event titlestart_time- Event start (ISO 8601 datetime)end_time- Event end (ISO 8601 datetime)is_all_day- Boolean flag for all-day eventslocation- Event locationorganizer- Event organizer namesource_link- Deep link to event in Outlookdate- Date only (derived from start_time)last_synced_at- Timestamp of last sync
- Log in with Microsoft account
- Calendar syncs automatically
- View events in Planner tab (grouped by day)
- See all upcoming events in Upcoming tab
Click "Convert to Task" on any timeblock to:
- Create a new task with the event title
- Automatically link back to the calendar event
- Set the task date to match the event date
Click "Sync Calendar Now" button to refresh events manually.
src/
├── app/ # Next.js app directory
│ ├── layout.tsx
│ ├── page.tsx
│ └── api/ # API routes
│ ├── auth/
│ └── calendar/
├── components/ # React components
│ ├── Auth/
│ ├── PlannerTabs/
│ ├── Timeblock/
│ └── TaskConversion/
├── lib/ # Utilities
│ ├── msal.ts # MSAL configuration
│ ├── graph.ts # Microsoft Graph client
│ ├── supabase.ts # Supabase client
│ ├── calendar.ts # Calendar sync logic
│ └── tz.ts # Timezone utilities
├── hooks/ # Custom React hooks
├── store/ # Zustand state management
└── types/ # TypeScript types
- ✅ Read-only access to Outlook calendar
- ✅ No delete/edit operations on calendar
- ✅ MSAL handles OAuth 2.0 securely
- ✅ Calendars.ReadBasic permission scope only
- ✅ User data isolated by user_id