A modern, full-stack appointment booking application built with Next.js, featuring Google Calendar integration, timezone support, and role-based user management.
Clone the repository
git clone <repository-url>
cd booking
Install dependencies
pnpm install
Environment Setup
Create a .env.local file in the root directory:
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/booking_db"
# NextAuth
NEXTAUTH_SECRET="your-secret-key"
NEXTAUTH_URL="http://localhost:3000"
# Google OAuth & Calendar API
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
# Encryption (for storing calendar tokens)
ENCRYPTION_SECRET="your-encryption-secret"
Database Setup
# Generate and run migrations
pnpm drizzle-kit generate
pnpm drizzle-kit migrate
Run the development server
Open [http://localhost:3000](http://localhost:3000) to view the application.
The application uses the following main tables:
users - User authentication and profilessellers - Seller-specific data and settingsappointments - Booking recordsseller_availability - Weekly availability schedulesuser_tokens - Encrypted OAuth tokens