Appointment booking and scheduling platform that allows users to create events, manage availability, and let clients book meetings seamlessly.
- π― Event Management: Create, edit, and manage events with custom durations
- π Availability Scheduling: Set your weekly availability with timezone support
- π Public Booking Pages: Share your profile link for clients to book appointments
- π§ Google Calendar Integration: Automatically sync bookings with Google Calendar (optional)
- β° Smart Time Slot Validation: Automatically validates available time slots based on your schedule and existing calendar events
- π Secure Authentication: Powered by Clerk for secure user authentication
- π¨ Modern UI: Built with Tailwind CSS for a clean, responsive design
- Framework: Next.js 16 (App Router)
- Language: TypeScript
- Database: PostgreSQL with Neon
- ORM: Drizzle ORM
- Authentication: Clerk
- Forms: React Hook Form + Zod
- Date Handling: date-fns + date-fns-tz
- Calendar Integration: Google Calendar API
- Styling: Tailwind CSS
- Node.js 20+ and pnpm (or npm/yarn)
- PostgreSQL database (Neon recommended)
- Clerk account for authentication
- Google Cloud project (optional, for Calendar integration)
git clone <repository-url>
cd happointpnpm installCreate a .env.local file in the root directory:
# Database
DATABASE_URL="postgresql://user:password@host:port/database"
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_..."
CLERK_SECRET_KEY="sk_test_..."
# Google OAuth (Optional - for Calendar integration)
GOOGLE_OAUTH_CLIENT_ID="your-client-id"
GOOGLE_OAUTH_CLIENT_SECRET="your-client-secret"
GOOGLE_OAUTH_REDIRECT_URL="http://localhost:3000/api/auth/callback/google"Generate migrations:
pnpm db:generateRun migrations:
pnpm db:migrate(Optional) Open Drizzle Studio to view your database:
pnpm db:studiopnpm devOpen http://localhost:3000 in your browser.
happoint/
βββ app/ # Next.js App Router pages
β βββ (auth)/ # Authentication routes
β βββ (main)/
β β βββ (private)/ # Protected routes (events, schedule)
β β βββ (public)/ # Public booking pages
β βββ layout.tsx # Root layout
βββ components/ # React components
β βββ forms/ # Form components
β βββ events/ # Event-related components
β βββ icons/ # Icon components
βββ server/ # Server-side code
β βββ actions/ # Server actions
β βββ google/ # Google Calendar integration
β βββ utils.ts # Server utilities
βββ drizzle/ # Database schema and migrations
βββ schema/ # Zod validation schemas
βββ types/ # TypeScript type definitions
βββ lib/ # Utility functions
βββ constants/ # App constants
pnpm dev- Start development serverpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Run ESLintpnpm db:generate- Generate database migrationspnpm db:migrate- Run database migrationspnpm db:studio- Open Drizzle Studio
Users can create events with:
- Custom names and descriptions
- Duration settings (in 15-minute increments)
- Active/inactive status
Set your weekly availability:
- Configure time slots for each day of the week
- Timezone support for accurate scheduling
- Multiple time ranges per day
- Each user gets a public profile page
- Shareable booking links for specific events
- Real-time availability checking
- Automatic conflict detection with Google Calendar
- Optional OAuth connection
- Automatic event creation in Google Calendar
- Conflict detection with existing calendar events
- Works seamlessly even without Google Calendar connected
- User-created events with duration and metadata
- User availability settings with timezone
- Day-of-week availability slots linked to schedules
- Create the database schema in
drizzle/schema.tsif needed - Generate and run migrations:
pnpm db:generate && pnpm db:migrate - Create Zod schemas in
schema/for validation - Implement server actions in
server/actions/ - Create UI components in
components/ - Add routes in
app/directory
- TypeScript strict mode enabled
- ESLint for code quality
- React Server Components by default
- Server Actions for mutations
- Push your code to GitHub
- Import project in Vercel
- Add environment variables
- Deploy
Make sure to set all required environment variables in your deployment platform:
DATABASE_URLNEXT_PUBLIC_CLERK_PUBLISHABLE_KEYCLERK_SECRET_KEYGOOGLE_OAUTH_CLIENT_ID(optional)GOOGLE_OAUTH_CLIENT_SECRET(optional)GOOGLE_OAUTH_REDIRECT_URL(optional)
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
For issues and questions, please open an issue in the repository.