Skip to content

irisfaustina/bookingtime

Repository files navigation

📅 bookingtime

Next.js TypeScript Tailwind CSS License: MIT

A modern scheduling platform that makes booking appointments effortless.

Key FeaturesGetting StartedTech StackDocumentation

🌟 Key Features

  • 🔐 Secure Authentication - User management with Clerk
  • 📊 Event Management - Create and manage booking events
  • Smart Scheduling - Set weekly availability with timezone support
  • 🔄 Real-time Updates - Instant booking confirmations
  • 📱 Responsive Design - Optimized for all devices

🚀 Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Neon PostgreSQL database
  • Clerk account

Installation

  1. Clone the repository

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

    npm install
  3. Set up environment variables

    cp .env.example .env.local

    Fill in your environment variables:

    DATABASE_URL=your_neon_database_url
    CLERK_SECRET_KEY=your_clerk_secret_key
    NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
  4. Run database migrations

    npm run db:migrate
  5. Start the development server

    npm run dev

🛠 Tech Stack

Frontend

  • Framework: Next.js 15.2
  • UI: Tailwind CSS, shadcn/ui
  • State Management: React Hooks
  • Forms: React Hook Form

Backend

  • Runtime: Next.js App Router
  • Database: Neon PostgreSQL
  • ORM: Drizzle
  • Authentication: Clerk

📖 Documentation

Data Models

Event

interface Event {
  id: UUID
  name: string
  description?: string
  durationInMinutes: number
  clerkUserId: string
  isActive: boolean
  createdAt: Date
  updatedAt: Date
}

Schedule

interface Schedule {
  id: UUID
  timezone: string
  clerkUserId: string
  createdAt: Date
  updatedAt: Date
}

API Routes

  • GET /api/events - List user's events
  • POST /api/events - Create new event
  • PUT /api/events/:id - Update event
  • GET /api/schedule - Get user's schedule
  • POST /api/book - Book a time slot

🔧 Scripts

# Development
npm run dev         # Start development server
npm run build      # Build for production
npm run start      # Start production server

# Database
npm run db:generate  # Generate migrations
npm run db:migrate   # Run migrations
npm run db:studio    # Open database UI

# Testing
npm run lint       # Run ESLint

🚀 Deployment

Vercel Deployment

  1. Connect your GitHub repository to Vercel
  2. Configure environment variables in Vercel dashboard
  3. Deploy with git push to main branch

Environment Variables

Required variables for deployment:

DATABASE_URL
CLERK_SECRET_KEY
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

Distributed under the MIT License. See LICENSE for more information.

👏 Acknowledgments

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors