A comprehensive, full-stack appointment booking and management system
Features β’ Demo β’ Installation β’ Documentation β’ Contributing
- Overview
- Features
- Tech Stack
- Architecture
- Screenshots
- Getting Started
- Project Structure
- API Documentation
- Desktop App
- Deployment
- Contributing
- License
- Contact
Book Now is a modern, production-ready appointment booking system designed for organizations and businesses. It enables organizations to manage appointments, resources, team members, and bookings with ease. The system includes a web application, REST API backend, and a cross-platform desktop application built with Tauri.
- Multi-Platform: Web app (Next.js) + Desktop app (Tauri)
- Role-Based Access: USER and ORGANIZATION roles with granular permissions
- Complete Booking System: Time slot management, conflict detection, and automatic/manual assignment
- Payment Integration: Razorpay Connect OAuth for per-organization payment accounts
- AI Voice Integration: Bolna integration for voice-based appointment management
- Real-time Notifications: Comprehensive notification system for all user actions
- Session Management: Track and manage active sessions across multiple devices
- Media Management: AWS S3 integration for file uploads
- Security First: JWT auth, bcrypt password hashing, CORS, rate limiting, and Helmet security
- β User registration with email verification
- β Role-based access control (USER, ORGANIZATION)
- β JWT access tokens (15 min expiry) + Refresh tokens (30 days)
- β Password reset via email
- β Multi-device session management with device tracking
- β Logout from specific devices or all devices
- β Automatic organization creation for ORGANIZATION role
- β USER to ORGANIZATION account conversion
- β Create and manage organizations with business hours
- β Add/remove team members
- β Resource management (rooms, equipment, staff)
- β Custom appointment types with flexible scheduling
- β Organization-specific Razorpay payment integration
- β Bolna AI agent configuration per organization
- β Flexible appointment types (USER-based or RESOURCE-based)
- β Custom duration and pricing per appointment
- β Automatic or visitor-based assignment
- β Multiple or single slot bookings
- β Custom questions for booking forms
- β Introduction and confirmation messages
- β Publish/unpublish appointments
- β Secret links for private appointments with expiry
- β Expiry by time or booking capacity
- β Available time slot calculation with conflict detection
- β Real-time availability checking
- β Booking cancellation with policy enforcement
- β User and organization booking history
- β Booking status tracking (PENDING, CONFIRMED, CANCELLED, COMPLETED)
- β Custom user responses to appointment questions
- β Razorpay Connect OAuth integration
- β Per-organization payment accounts
- β Order creation and webhook-driven payment updates
- β Payment status tracking (PENDING, PAID, FAILED, REFUNDED)
- β Free and paid appointments support
- β Real-time notifications for all major events
- β Appointment, booking, payment, and organization notifications
- β Mark as read/unread
- β Notification dropdown with real-time updates
- β 15+ notification types
- β Create and manage AI voice agents
- β Initiate voice calls for appointment reminders
- β Track call status, duration, and recordings
- β Call transcripts and metadata
- β AWS S3 integration for file uploads
- β Support for images, videos, documents, and audio
- β 50MB file size limit
- β Custom bucket and path configuration
- β File type validation
- β Helmet.js for HTTP headers security
- β CORS configuration
- β Rate limiting
- β Bcrypt password hashing (12 rounds)
- β HttpOnly cookies for refresh tokens
- β Token rotation on every refresh
- β Device and IP tracking
- β Prevents user enumeration
- Framework: Next.js 16.1.0 (App Router)
- UI Library: React 19.2.3
- Language: TypeScript 5.9.3
- Styling: Tailwind CSS 4.x
- UI Components: Radix UI primitives
- Forms: Custom components with validation
- Charts: Recharts
- Icons: Lucide React
- Theme: next-themes for dark mode
- Notifications: Sonner
- Runtime: Node.js
- Framework: Express 4.21.2
- Database: PostgreSQL
- ORM: Prisma 5.22.0
- Authentication: JWT + bcrypt
- Email: Nodemailer (SMTP)
- File Upload: Multer + AWS S3
- Payment: Razorpay Connect OAuth
- Security: Helmet, CORS, express-rate-limit
- AI Voice: Bolna API integration
- Framework: Tauri 2.x
- Frontend: Next.js (same as web)
- Language: Rust (Tauri backend)
- Cross-Platform: Windows, macOS, Linux
- Database Migrations: Prisma Migrate
- Version Control: Git
- Package Manager: npm
- Development: Nodemon, TypeScript compiler
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Client Layer β
ββββββββββββββββββββ¬βββββββββββββββββββ¬βββββββββββββββββββββββ€
β Web App β Desktop App β Mobile (Future) β
β (Next.js) β (Tauri) β β
ββββββββββββββββββββ΄βββββββββββββββββββ΄βββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β API Gateway Layer β
β (Express REST API - Port 4000) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββΌββββββββββββββββββ
βΌ βΌ βΌ
ββββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββ
β Authentication β β Business β β Integration β
β Services β β Logic β β Services β
β β β β β β
β β’ JWT Auth β β β’ Orgs β β β’ AWS S3 β
β β’ Sessions β β β’ Bookings β β β’ Razorpay β
β β’ Email β β β’ Resources β β β’ Bolna AI β
ββββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββ
β β β
βββββββββββββββββββΌββββββββββββββββββ
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Data Access Layer β
β (Prisma ORM) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Database Layer β
β (PostgreSQL) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Before you begin, ensure you have the following installed:
- Node.js (v16 or higher) - Download
- npm or yarn - Comes with Node.js
- PostgreSQL (v12 or higher) - Download
- Git - Download
- (Optional) Rust - For Tauri desktop app - Install
git clone https://github.com/yourusername/odooxspit-appointment-app.git
cd odooxspit-appointment-appBackend (API)
cd api
npm installFrontend (Web App)
cd ../frontend
npm installDesktop App (Tauri) - Optional
cd ../tauri
npm installStart PostgreSQL and create a database:
# Using psql
psql -U postgres
CREATE DATABASE appointment_app;
\qOr use pgAdmin, DBeaver, or any PostgreSQL GUI tool.
Create a .env file in the api directory:
# Server Configuration
NODE_ENV=development
PORT=4000
# Database (PostgreSQL)
DATABASE_URL="postgresql://postgres:password@localhost:5432/appointment_app?schema=public"
# JWT Configuration
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
JWT_EXPIRES_IN=15m
# Refresh Token Configuration
REFRESH_TOKEN_EXPIRES_DAYS=30
# CORS Configuration
CORS_ORIGIN=http://localhost:3000
# SMTP Configuration (Gmail example)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-specific-password
# Email Configuration
FROM_EMAIL=your-email@gmail.com
FROM_NAME=BookNow Appointments
# Base URL (for email links)
BASE_URL=http://localhost:4000
# AWS S3 Configuration (for media uploads)
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your-aws-access-key-id
AWS_SECRET_ACCESS_KEY=your-aws-secret-access-key
AWS_S3_BUCKET=your-s3-bucket-name
# Razorpay Connect Configuration
RAZORPAY_CLIENT_ID=your-razorpay-partner-client-id
RAZORPAY_CLIENT_SECRET=your-razorpay-partner-client-secret
RAZORPAY_OAUTH_AUTHORIZE_URL=https://auth.razorpay.com/authorize
RAZORPAY_OAUTH_TOKEN_URL=https://auth.razorpay.com/token
RAZORPAY_API_BASE_URL=https://api.razorpay.com/v1
RAZORPAY_REDIRECT_URI=http://localhost:4000/auth/razorpay/callback
RAZORPAY_WEBHOOK_SECRET=your-razorpay-webhook-signing-secret
RAZORPAY_STATE_SECRET=change-this-state-secret
# Bolna AI Configuration (Optional)
BOLNA_API_BASE_URL=https://api.bolna.devImportant Notes:
- For Gmail SMTP, use an App Password
- Replace all placeholder values with your actual credentials
- Never commit
.envto version control
Create a .env.local file in the frontend directory:
NEXT_PUBLIC_API_URL=http://localhost:4000cd api
npx prisma migrate dev
npx prisma generate# Development mode with auto-reload
npm run dev
# Or production mode
npm startThe API will start at http://localhost:4000
In a new terminal:
cd frontend
npm run devThe web app will start at http://localhost:3000
In a new terminal:
cd tauri
npm run tauri dev- Web App: http://localhost:3000
- API: http://localhost:4000
- Database Studio: Run
npm run prisma:studioinapidirectory
odooxspit-appointment-app/
β
βββ api/ # Backend API
β βββ prisma/
β β βββ schema.prisma # Database schema
β β βββ migrations/ # Database migrations
β β
β βββ src/
β β βββ controllers/ # Route controllers
β β β βββ authController.js
β β β βββ bookingController.js
β β β βββ organizationController.js
β β β βββ ...
β β β
β β βββ routes/ # API routes
β β β βββ auth.js
β β β βββ booking.js
β β β βββ organization.js
β β β βββ ...
β β β
β β βββ middlewares/ # Custom middleware
β β β βββ requireAuth.js
β β β
β β βββ lib/ # Utility libraries
β β β βββ auth.js
β β β βββ mailer.js
β β β βββ prisma.js
β β β βββ razorpay.js
β β β βββ bolnaClient.js
β β β βββ s3.js
β β β
β β βββ utils/ # Helper functions
β β β βββ crypto.js
β β β βββ deviceParser.js
β β β
β β βββ server.js # Express app entry point
β β
β βββ .env # Environment variables
β βββ package.json
β βββ README.md
β
βββ frontend/ # Next.js Web App
β βββ app/ # App Router pages
β β βββ (auth)/ # Auth pages (login, register)
β β βββ (dashboard)/ # Dashboard pages
β β βββ appointment/ # Appointment pages
β β βββ org/ # Organization pages
β β βββ search/ # Search page
β β βββ layout.tsx
β β βββ page.tsx
β β
β βββ components/ # React components
β β βββ auth/ # Auth components
β β βββ booking/ # Booking components
β β βββ dashboard/ # Dashboard components
β β βββ ui/ # Reusable UI components
β β
β βββ contexts/ # React contexts
β β βββ UserContext.tsx
β β
β βββ hooks/ # Custom React hooks
β β βββ use-auth.ts
β β βββ use-mobile.ts
β β
β βββ lib/ # Utility libraries
β β βββ api.ts # API client
β β βββ auth.ts # Auth helpers
β β βββ routes.ts # Route constants
β β βββ types.ts # TypeScript types
β β
β βββ public/ # Static assets
β βββ .env.local # Environment variables
β βββ next.config.ts
β βββ package.json
β βββ tsconfig.json
β
βββ tauri/ # Desktop App (same structure as frontend)
β βββ src-tauri/ # Tauri Rust backend
β β βββ src/
β β β βββ main.rs
β β βββ Cargo.toml
β β βββ tauri.conf.json
β β
β βββ [Same as frontend]
β
βββ docs/ # Documentation
β βββ images/ # Screenshots and images
β
βββ .gitignore
βββ LICENSE
βββ README.md # This file
Comprehensive API documentation is available in the api/README.md file.
POST /auth/register- Register new userPOST /auth/login- User loginPOST /auth/logout- User logoutPOST /auth/refresh-token- Refresh access tokenGET /auth/verify-email- Verify emailPOST /auth/request-password-reset- Request password resetPOST /auth/reset-password- Reset password
GET /user/me- Get current user profilePUT /user/update- Update user profileDELETE /user/delete- Delete user accountPOST /user/convert-to-organization- Convert USER to ORGANIZATION
POST /organization/members- Add member (admin only)GET /organization/members- Get all membersPOST /organization/resources- Create resourceGET /organization/resources- Get all resourcesDELETE /organization/resources/:id- Delete resource
POST /organization/appointments- Create appointmentGET /organization/appointments- Get all appointmentsGET /organization/appointments/:id- Get single appointmentPUT /organization/appointments/:id- Update appointmentDELETE /organization/appointments/:id- Delete appointment
POST /bookings- Create bookingGET /bookings- Get user bookingsGET /bookings/:id- Get booking detailsPUT /bookings/:id/cancel- Cancel bookingGET /organization/bookings- Get organization bookings
GET /public/organizations/:id/appointments- Browse public appointmentsGET /public/appointments/:id/slots- Get available slots
For complete API documentation, see api/README.md.
The desktop application provides the same functionality as the web app with additional benefits:
- Native Performance: Faster than browser-based apps
- Offline Capability: Work without internet (with limitations)
- System Integration: Better OS integration
- Privacy: No browser tracking
- Cross-Platform: Windows, macOS, and Linux
cd tauri
npm run tauri buildBuilt apps will be in tauri/src-tauri/target/release/bundle/
Option 1: Traditional Hosting (VPS, AWS EC2)
- Set up PostgreSQL database
- Install Node.js
- Clone repository and install dependencies
- Set environment variables
- Run migrations
- Start with PM2:
pm2 start src/server.js
Option 2: Platform as a Service
- Railway: One-click deploy
- Heroku: Buildpack support
- Render: PostgreSQL included
- DigitalOcean App Platform: Managed solution
Option 1: Vercel (Recommended)
cd frontend
vercel --prodOption 2: Netlify
cd frontend
npm run build
netlify deploy --prod --dir=outOption 3: Self-Hosted
cd frontend
npm run build
npm startBuild for your target platform:
cd tauri
npm run tauri buildDistribute the generated installers.
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/AmazingFeature - Commit changes:
git commit -m 'Add some AmazingFeature' - Push to branch:
git push origin feature/AmazingFeature - Open a Pull Request
- Follow existing code style
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting PR
This project is licensed under the MIT License - see the LICENSE file for details.
Your Name
- GitHub: @yourusername
- LinkedIn: Your Name
- Email: your.email@example.com
- Portfolio: https://yourwebsite.com
- Next.js - The React Framework
- Prisma - Next-generation ORM
- Tailwind CSS - Utility-first CSS framework
- Radix UI - Unstyled, accessible components
- Tauri - Build smaller, faster desktop apps
- Razorpay - Payment gateway
- Bolna - AI voice platform
If you encounter any issues or have questions:
- GitHub Issues: Create an issue
- Discussions: GitHub Discussions
- Email: support@yourdomain.com
- Mobile app (React Native)
- Video call integration
- SMS notifications
- Multi-language support
- Advanced analytics dashboard
- Calendar integrations (Google Calendar, Outlook)
- Recurring appointments
- Waiting list management
- Custom branding per organization
- API rate limiting per organization
- Webhook support for third-party integrations
β Star this repo if you find it helpful!
Made with β€οΈ by [Your Name]









