Skip to content

timsankara/Calendarey---Calendly-Clone

Repository files navigation

πŸ“… Calendarey - Calendly Clone

Next.js TypeScript MongoDB Auth0 Tailwind CSS

Calendarey is a completely free, open-source scheduling platform that makes it easy to book meetings without the back-and-forth emails. Connect your Google Calendar, set your availability, and let others book time with you seamlessly.

πŸ“Έ Screenshots

Dashboard Overview

Dashboard Screenshot Professional dashboard with appointment management, real-time stats, and quick actions

Interactive Booking Experience

Booking Page Screenshot Clean, mobile-first booking interface with interactive calendar and instant confirmation

✨ Features

🎯 Core Scheduling

  • Smart Availability Detection - Real-time conflict checking with Google Calendar
  • Basic Time Slots - Meeting durations and buffer times
  • Timezone Intelligence - Automatic timezone detection and conversion
  • Single Meeting Type - Default appointment type with basic information

πŸ“± User Experience

  • Mobile-First Design - Fully responsive on all devices
  • Interactive Calendar - Click-to-book available time slots
  • Real-Time Updates - Instant sync across all platforms
  • Professional UI - Clean, modern interface built with Tailwind CSS

πŸ”— Integrations

  • Google Calendar Sync - Bi-directional appointment synchronization
  • Google Meet Integration - Automatic video meeting links (in Google Calendar events)
  • OAuth Security - Secure authentication with Auth0

πŸ“Š Management Dashboard

  • Appointment Overview - Basic booking management
  • Simple Filtering - Search by status, date, attendee
  • Quick Actions - Mark complete, cancel appointments
  • Basic Stats - Simple appointment counts

🚧 Coming Soon (Community Contributions Welcome!)

Advanced Features

  • Video Calling Integration - Built-in video conferencing (priority contribution!)
  • Multiple Meeting Types - Different appointment categories with custom questions
  • Advanced Analytics - Detailed booking insights and reports
  • Custom Questions - Collect specific information from attendees
  • Team Scheduling - Collaborative calendar management
  • Calendar Widgets - Embeddable booking components
  • Public Booking Pages - Personalized /book/username URLs
  • Email Notifications - Custom email templates and automation
  • Branding Options - White-label customization
  • API Access - RESTful API for custom integrations
  • Advanced Settings - Granular control over booking preferences

πŸ—οΈ Architecture

Technology Stack

Frontend:
β”œβ”€β”€ Next.js 15 (App Router)
β”œβ”€β”€ TypeScript 5.x
β”œβ”€β”€ Tailwind CSS
β”œβ”€β”€ React 18
└── Lucide React Icons

Backend:
β”œβ”€β”€ Next.js API Routes
β”œβ”€β”€ MongoDB Database
β”œβ”€β”€ Auth0 Authentication
└── Google APIs Integration

External Services:
β”œβ”€β”€ Google Calendar API
β”œβ”€β”€ Auth0 Identity Platform
└── MongoDB Atlas (optional)

Project Structure

calendarey/
β”œβ”€β”€ src/app/                    # Next.js App Router
β”‚   β”œβ”€β”€ api/                   # API Routes
β”‚   β”‚   β”œβ”€β”€ appointments/      # Appointment CRUD
β”‚   β”‚   β”œβ”€β”€ auth/             # Authentication endpoints
β”‚   β”‚   β”œβ”€β”€ calendar/         # Google Calendar integration
β”‚   β”‚   └── user/             # User management
β”‚   β”œβ”€β”€ components/           # React Components
β”‚   β”œβ”€β”€ dashboard/           # Dashboard pages
β”‚   └── globals.css         # Global styles
β”œβ”€β”€ lib/                     # Utility Libraries
β”‚   β”œβ”€β”€ config/             # Configuration files
β”‚   β”œβ”€β”€ db/                # Database operations
β”‚   β”œβ”€β”€ services/          # External service integrations
β”‚   └── types/             # TypeScript definitions
└── public/                # Static assets

Database Schema

Users Collection

interface User {
  _id: ObjectId;
  auth0Id: string;           // Auth0 user identifier
  email: string;
  name: string;
  username?: string;         // For future public booking URLs
  timezone: string;
  googleCalendarId?: string; // Connected calendar ID
  googleRefreshToken?: string; // OAuth refresh token
  isActive: boolean;
  createdAt: Date;
  updatedAt: Date;
}

Appointments Collection

interface Appointment {
  _id: ObjectId;
  hostId: ObjectId;          // Reference to User
  attendeeName: string;
  attendeeEmail: string;
  attendeePhone?: string;
  startTime: Date;
  endTime: Date;
  timezone: string;
  status: 'confirmed' | 'cancelled' | 'completed' | 'no-show';
  location: string;
  googleEventId?: string;    // Google Calendar event ID
  customAnswers: Record<string, string>;
  cancellationReason?: string;
  createdAt: Date;
  updatedAt: Date;
}

Availability Collection

interface Availability {
  _id: ObjectId;
  userId: ObjectId;
  weeklySchedule: {
    [day: string]: {
      enabled: boolean;
      timeSlots: { start: string; end: string; }[];
    };
  };
  bufferTime: number;        // Minutes between meetings
  maxMeetingsPerDay: number;
  advanceBookingDays: number;
  minimumNotice: number;     // Hours
  createdAt: Date;
  updatedAt: Date;
}

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • MongoDB (local or Atlas)
  • Google Cloud Platform account
  • Auth0 account

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/calendarey.git
    cd calendarey
  2. Install dependencies

    npm install
    npm install googleapis google-auth-library
  3. Set up environment variables

    cp .env.example .env.local
  4. Configure your .env.local

    # Auth0 Configuration
    AUTH0_SECRET=your_random_32_character_secret
    AUTH0_BASE_URL=http://localhost:3000
    AUTH0_ISSUER_BASE_URL=https://your-domain.auth0.com
    AUTH0_CLIENT_ID=your_auth0_client_id
    AUTH0_CLIENT_SECRET=your_auth0_client_secret
    
    # MongoDB
    MONGODB_URI=mongodb://localhost:27017/calendarey
    
    # Google Calendar API
    GOOGLE_CLIENT_ID=your_client_id.googleusercontent.com
    GOOGLE_CLIENT_SECRET=your_google_client_secret

Setup External Services

Auth0 Setup

  1. Create an Auth0 application
  2. Configure callback URLs: http://localhost:3000/api/auth/callback
  3. Add Google social connection (optional)
  4. Copy credentials to .env.local

Google Cloud Setup

  1. Create a new Google Cloud project
  2. Enable Google Calendar API
  3. Create OAuth 2.0 credentials
  4. Add authorized redirect URI: http://localhost:3000/api/auth/google/callback
  5. Configure OAuth consent screen with calendar scopes
  6. Copy credentials to .env.local

MongoDB Setup

  • Local: Install MongoDB locally
  • Atlas: Create free cluster at mongodb.com

Development

  1. Start the development server

    npm run dev
  2. Open your browser

    http://localhost:3000
    
  3. Create your first account

    • Click "Get Started Free"
    • Complete Auth0 registration
    • Connect Google Calendar in dashboard

πŸ“– Usage Guide

For Schedule Owners

  1. Initial Setup

    • Sign up and verify email
    • Connect Google Calendar in Integrations tab
    • Basic availability is set by default
  2. Managing Appointments

    • View all bookings in Appointments tab
    • Update appointment status (complete/cancel)
    • Basic appointment information display

Current Limitations

  • Public booking pages not yet implemented
  • Limited customization options
  • Basic email notifications only through Google Calendar
  • Single meeting type only

πŸ”§ Configuration

Environment Variables

Variable Description Required
AUTH0_SECRET Random 32-character string βœ…
AUTH0_BASE_URL Your application URL βœ…
AUTH0_ISSUER_BASE_URL Auth0 domain βœ…
AUTH0_CLIENT_ID Auth0 application ID βœ…
AUTH0_CLIENT_SECRET Auth0 application secret βœ…
MONGODB_URI MongoDB connection string βœ…
GOOGLE_CLIENT_ID Google OAuth client ID βœ…
GOOGLE_CLIENT_SECRET Google OAuth client secret βœ…

🀝 Contributing

We welcome contributions! This project is in early stages and many features are waiting to be built.

Development Setup

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Commit changes: git commit -m 'Add amazing feature'
  5. Push to branch: git push origin feature/amazing-feature
  6. Open Pull Request

Priority Contributions Needed

  • Video Calling Integration - WebRTC, Jitsi, or custom solution
  • Public Booking Pages - /book/username functionality
  • Multiple Meeting Types - Different appointment categories
  • Advanced Analytics - Booking insights and reporting
  • Email Notifications - Custom email templates
  • Team Features - Collaborative scheduling
  • Mobile Applications - React Native or native apps
  • Custom Questions - Attendee information collection
  • Internationalization - Multi-language support

Code Standards

  • TypeScript for all new code
  • ESLint + Prettier for formatting
  • Clear commit messages
  • Follow existing code patterns

πŸ› Troubleshooting

Common Issues

Google Calendar Connection Fails

  • Verify OAuth redirect URI matches exactly: http://localhost:3000/api/auth/google/callback
  • Check OAuth consent screen configuration
  • Ensure calendar API is enabled in Google Cloud Console
  • Verify credentials in .env.local

Auth0 Login Problems

  • Confirm callback URLs are configured: http://localhost:3000/api/auth/callback
  • Check Auth0 application settings
  • Verify environment variables
  • Review Auth0 logs for errors

MongoDB Connection Issues

  • Test connection string format
  • Verify network access (Atlas)
  • Check authentication credentials
  • Ensure database exists

Build Errors

  • Clear .next folder: rm -rf .next
  • Reinstall dependencies: rm -rf node_modules && npm install
  • Check TypeScript errors: npm run type-check

Getting Help

  • Check existing GitHub Issues
  • Open new issue with detailed description
  • Include error logs and environment details

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

🌟 Acknowledgments

πŸ”— Links


Made with ❀️ by the open-source community

Calendarey is completely free and will always be open source. If you find it useful, please consider giving us a ⭐ on GitHub and contributing to make it even better!

πŸ—οΈ Architecture

Technology Stack

Frontend:
β”œβ”€β”€ Next.js 15 (App Router)
β”œβ”€β”€ TypeScript 5.x
β”œβ”€β”€ Tailwind CSS
β”œβ”€β”€ React 18
└── Lucide React Icons

Backend:
β”œβ”€β”€ Next.js API Routes
β”œβ”€β”€ MongoDB Database
β”œβ”€β”€ Auth0 Authentication
└── Google APIs Integration

External Services:
β”œβ”€β”€ Google Calendar API
β”œβ”€β”€ Google Cloud Platform
β”œβ”€β”€ Auth0 Identity Platform
└── MongoDB Atlas (optional)

Project Structure

calendarey/
β”œβ”€β”€ src/app/                    # Next.js App Router
β”‚   β”œβ”€β”€ api/                   # API Routes
β”‚   β”‚   β”œβ”€β”€ appointments/      # Appointment CRUD
β”‚   β”‚   β”œβ”€β”€ auth/             # Authentication endpoints
β”‚   β”‚   β”œβ”€β”€ calendar/         # Google Calendar integration
β”‚   β”‚   └── user/             # User management
β”‚   β”œβ”€β”€ components/           # React Components
β”‚   β”œβ”€β”€ dashboard/           # Dashboard pages
β”‚   └── globals.css         # Global styles
β”œβ”€β”€ lib/                     # Utility Libraries
β”‚   β”œβ”€β”€ config/             # Configuration files
β”‚   β”œβ”€β”€ db/                # Database operations
β”‚   β”œβ”€β”€ services/          # External service integrations
β”‚   └── types/             # TypeScript definitions
└── public/                # Static assets

Database Schema

Users Collection

interface User {
  _id: ObjectId;
  auth0Id: string;           // Auth0 user identifier
  email: string;
  name: string;
  username?: string;         // For public booking URLs
  timezone: string;
  googleCalendarId?: string; // Connected calendar ID
  googleRefreshToken?: string; // OAuth refresh token
  isActive: boolean;
  createdAt: Date;
  updatedAt: Date;
}

Appointments Collection

interface Appointment {
  _id: ObjectId;
  hostId: ObjectId;          // Reference to User
  meetingTypeId: ObjectId;   // Reference to MeetingType
  attendeeName: string;
  attendeeEmail: string;
  attendeePhone?: string;
  startTime: Date;
  endTime: Date;
  timezone: string;
  status: 'confirmed' | 'cancelled' | 'completed' | 'no-show';
  location: string;
  googleEventId?: string;    // Google Calendar event ID
  customAnswers: Record<string, string>;
  cancellationReason?: string;
  createdAt: Date;
  updatedAt: Date;
}

Availability Collection

interface Availability {
  _id: ObjectId;
  userId: ObjectId;
  weeklySchedule: {
    [day: string]: {
      enabled: boolean;
      timeSlots: { start: string; end: string; }[];
    };
  };
  bufferTime: number;        // Minutes between meetings
  maxMeetingsPerDay: number;
  advanceBookingDays: number;
  minimumNotice: number;     // Hours
  createdAt: Date;
  updatedAt: Date;
}

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • MongoDB (local or Atlas)
  • Google Cloud Platform account
  • Auth0 account

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/calendarey.git
    cd calendarey
  2. Install dependencies

    npm install
  3. Set up environment variables

    cp .env.example .env.local
  4. Configure your .env.local

    # Auth0 Configuration
    AUTH0_SECRET=your_random_32_character_secret
    AUTH0_BASE_URL=http://localhost:3000
    AUTH0_ISSUER_BASE_URL=https://your-domain.auth0.com
    AUTH0_CLIENT_ID=your_auth0_client_id
    AUTH0_CLIENT_SECRET=your_auth0_client_secret
    
    # MongoDB
    MONGODB_URI=mongodb://localhost:27017/calendarey
    
    # Google Calendar API
    GOOGLE_CLIENT_ID=your_client_id.googleusercontent.com
    GOOGLE_CLIENT_SECRET=your_google_client_secret

Setup External Services

Auth0 Setup

  1. Create an Auth0 application
  2. Configure callback URLs: http://localhost:3000/api/auth/callback
  3. Add Google social connection (optional)
  4. Copy credentials to .env.local

Google Cloud Setup

  1. Create a new Google Cloud project
  2. Enable Google Calendar API
  3. Create OAuth 2.0 credentials
  4. Add authorized redirect URI: http://localhost:3000/api/auth/google/callback
  5. Configure OAuth consent screen
  6. Copy credentials to .env.local

MongoDB Setup

  • Local: Install MongoDB locally
  • Atlas: Create free cluster at mongodb.com
  • Docker: docker run -d -p 27017:27017 mongo

Development

  1. Start the development server

    npm run dev
  2. Open your browser

    http://localhost:3000
    
  3. Create your first account

    • Click "Get Started Free"
    • Complete Auth0 registration
    • Connect Google Calendar in dashboard

πŸ“– Usage Guide

For Schedule Owners

  1. Initial Setup

    • Sign up and verify email
    • Connect Google Calendar
    • Set availability preferences
    • Configure meeting types
  2. Managing Appointments

    • View all bookings in dashboard
    • Update appointment status
    • Send messages to attendees
    • Export calendar data
  3. Customization

    • Set custom booking questions
    • Configure buffer times
    • Update availability schedule
    • Personalize booking page

For Meeting Attendees

  1. Booking Process

    • Visit host's booking page: /book/username
    • Select available time slot
    • Fill in required information
    • Receive confirmation email
  2. Meeting Preparation

    • Check calendar invitation
    • Join Google Meet link (if enabled)
    • Prepare for scheduled discussion

πŸ”§ Configuration

Environment Variables

Variable Description Required
AUTH0_SECRET Random 32-character string βœ…
AUTH0_BASE_URL Your application URL βœ…
AUTH0_ISSUER_BASE_URL Auth0 domain βœ…
AUTH0_CLIENT_ID Auth0 application ID βœ…
AUTH0_CLIENT_SECRET Auth0 application secret βœ…
MONGODB_URI MongoDB connection string βœ…
GOOGLE_CLIENT_ID Google OAuth client ID βœ…
GOOGLE_CLIENT_SECRET Google OAuth client secret βœ…

Customization Options

Styling

  • Modify tailwind.config.js for design system changes
  • Update color schemes in globals.css
  • Customize component themes in /components

Features

  • Enable/disable Google Meet integration
  • Configure default meeting durations
  • Set organization-wide booking policies
  • Customize email templates

πŸ§ͺ Testing

Run Tests

# Unit tests
npm run test

# Integration tests  
npm run test:integration

# E2E tests
npm run test:e2e

Test Coverage

npm run test:coverage

πŸ“¦ Deployment

Vercel (Recommended)

  1. Connect GitHub repository
  2. Add environment variables
  3. Deploy automatically

Docker

# Build image
docker build -t calendarey .

# Run container
docker run -p 3000:3000 calendarey

Manual Deployment

# Build production bundle
npm run build

# Start production server
npm start

🀝 Contributing

We welcome contributions! Here's how to get started:

Development Setup

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Add tests for new functionality
  5. Commit changes: git commit -m 'Add amazing feature'
  6. Push to branch: git push origin feature/amazing-feature
  7. Open Pull Request

Priority Contributions Needed

  • Video Calling Integration - WebRTC, Jitsi, or custom solution
  • Mobile Applications - React Native or native apps
  • Advanced Analytics - Booking insights and reporting
  • Team Features - Collaborative scheduling
  • Internationalization - Multi-language support

Code Standards

  • TypeScript for all new code
  • ESLint + Prettier for formatting
  • Comprehensive test coverage
  • Clear commit messages
  • Documentation updates

πŸ› Troubleshooting

Common Issues

Google Calendar Connection Fails

  • Verify OAuth redirect URI matches exactly
  • Check OAuth consent screen configuration
  • Ensure calendar API is enabled
  • Verify credentials in .env.local

Auth0 Login Problems

  • Confirm callback URLs are configured
  • Check Auth0 application settings
  • Verify environment variables
  • Review Auth0 logs for errors

MongoDB Connection Issues

  • Test connection string format
  • Verify network access (Atlas)
  • Check authentication credentials
  • Ensure database exists

Build Errors

  • Clear .next folder: rm -rf .next
  • Reinstall dependencies: rm -rf node_modules && npm install
  • Check TypeScript errors: npm run type-check

Getting Help

🌟 Acknowledgments

πŸ”— Links


Made with ❀️ by the open-source community

Calendarey is completely free and will always be open source. If you find it useful, please consider giving us a ⭐ on GitHub!

About

A modern, free alternative to Calendly built with Next.js, TypeScript, and Google Calendar integration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages