A modern, full-stack calendar sharing application that integrates with Google Calendar, iCloud Calendar, and Outlook Calendar. Designed for teams and individuals to view shared availability, manage friend connections, and schedule meetings with AI-powered assistance.
- Multi-Provider Support: Connect Google Calendar, iCloud Calendar, and Outlook Calendar simultaneously
- Unified View: View all your calendars and friends' calendars in a single weekly view
- Event Creation: Create calendar invites directly from the app with attendee selection
- Cross-Timezone Support: Events are properly synchronized across different timezones
- Friend System: Add friends by email and share calendar availability
- Friend Requests: Send, receive, accept, or reject friend requests
- Privacy-Focused: Only mutually accepted friends can view each other's calendars
- Team Collaboration: Filter calendar view by team members
- Smart Invitation Drafts: Generate professional, casual, or friendly invitation messages using Google Gemini AI
- Customizable Tone: Choose between professional, casual, and friendly tones for your invitations
- Secure Input Handling: Built-in sanitization to prevent prompt injection attacks
- Progressive Web App (PWA): Install as a native app on desktop or mobile
- Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
- Real-Time Updates: Automatic calendar refresh and event synchronization
- Toast Notifications: Instant feedback for all user actions
| Layer | Technologies |
|---|---|
| Frontend | React 18, TypeScript, Vite, Tailwind CSS, shadcn/ui, Radix UI, Lucide Icons |
| Backend | Node.js 24, Express 5, TypeScript, SQLite (libSQL) |
| Auth | Server-side OAuth 2.0 (Google), CalDAV (iCloud), OneCal API (Outlook), JWT |
| AI | Google Gemini API (gemini-flash-latest) |
| Tooling | Pixi (package management), ESLint, Prettier, Zod (validation), Pino (logging) |
| PWA | Vite PWA Plugin, Workbox |
- Pixi package manager installed
- Node.js 24.x (automatically managed by Pixi)
# Clone the repository
git clone https://github.com/boyonglin/shared-calendar.git
cd shared-calendar
# Install all dependencies
pixi run install
# Start development server (frontend + backend)
pixi run devThe app will be available at:
- Frontend: http://localhost:5173
- Backend API: http://localhost:3001
| Command | Description |
|---|---|
pixi run install |
Install all dependencies |
pixi run build |
Build both client and server for production |
pixi run format |
Format code with Prettier |
pixi run lint |
Lint code with ESLint |
pixi run dev |
Start both frontend and backend dev servers |
Configuration is managed via environment variables. Refer to .env.example for the complete list.
Server Variables (server/.env)
- Server Configuration:
NODE_ENV,PORT,CLIENT_URL - Google OAuth:
GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET,GOOGLE_REDIRECT_URI - OneCal (Optional):
ONECAL_APP_ID,ONECAL_API_KEY,ONECAL_REDIRECT_URI - Security:
JWT_SECRET,ENCRYPTION_KEY
Client Variables (client/.env)
- API Configuration:
VITE_API_BASE_URL
Production / Deployment
- Turso Database:
TURSO_DATABASE_URL,TURSO_AUTH_TOKEN
- Go to Google Cloud Console β APIs & Services β Credentials
- Create OAuth 2.0 Client ID (Web application):
- Authorized JavaScript origins:
http://localhost:5173 - Authorized redirect URIs:
http://localhost:3001/api/auth/google/callback
- Authorized JavaScript origins:
- Enable Google Calendar API in APIs & Services β Library
- Configure OAuth consent screen:
- Add your account as a test user
- Required scopes:
.../auth/userinfo.profile.../auth/userinfo.email.../auth/calendar.readonly.../auth/calendar.events
- Copy Client ID and Client Secret to your
.envfile
Note: This app uses server-side OAuth to securely store refresh tokens in a local SQLite database (
server/shared-calendar.db), maintaining calendar access across sessions.
- Go to Apple ID Account Settings
- Sign in with your Apple ID
- Navigate to Sign-In and Security β App-Specific Passwords
- Generate a new app-specific password for this application
- Use your iCloud email and the generated password when connecting in the app
Important: Always use an app-specific password, not your regular Apple ID password.
- Sign up for OneCal to get API credentials
- Create a new app in the OneCal dashboard
- Copy the App ID and API Key to your
.envfile - Connect your Microsoft/Outlook account through the app interface
shared-calendar/
βββ client/ # Frontend (React + Vite + Tailwind)
βββ server/ # Backend (Express + SQLite)
βββ shared/ # Shared code between server and Vercel
β βββ types.ts # Shared TypeScript types
β βββ core/ # Shared core modules
β βββ constants/ # Centralized configuration values
β βββ db/ # Database layer (Turso/libSQL)
β βββ repositories/ # Data access layer
β βββ services/ # Business logic (auth, AI, etc.)
β βββ utils/ # Utility functions
βββ api/ # Vercel serverless functions
βββ pixi.toml # Pixi configuration
βββ package.json # Root package (npm workspaces)
The API specification is available in openapi.json (OpenAPI 3.0 format).
- Server-side OAuth: Tokens are stored securely on the server, never exposed to the client
- JWT Authentication: HTTP-only cookies with configurable expiration
- Encrypted Storage: iCloud passwords encrypted with AES-256-GCM
- Input Validation: Zod schemas for all API inputs
- CORS Protection: Strict origin validation
- Helmet Security Headers: HTTP security headers enabled
- Rate Limiting: Built-in protection against abuse
- AI Prompt Sanitization: Protection against prompt injection attacks
- β Google, iCloud, and Outlook Calendar integrations
- β Filter calendar view by team members
- β Create calendar invites with attendee selection
- β AI-powered invitation draft generation
- β Multi-user calendar sharing with friend system
- β Cross-timezone event synchronization
- β Progressive Web App (PWA) support
- π§ AI calendar assistant: scheduling conflicts, suggest optimal times
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- shadcn/ui for the beautiful UI components
- Radix UI for accessible component primitives
- Lucide for the icon set
- Google Gemini for AI capabilities
- OneCal for Outlook Calendar integration