A full-stack appointment booking application with an admin dashboard, customer portal, and AI-powered chatbot assistant. Built for hackathon with modern technologies and a beautiful UI.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FRONTEND β
ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ€
β Admin Dashboard β Customer Portal β
β (React + Vite) β (React + Vite) β
β Port: 5174 β Port: 5173 β
ββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BACKEND (Express.js) β
β Port: 3000 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β REST API β Socket.IO β AI Chatbot (Gemini) β Email Service β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββΌββββββββββββββββ
βΌ βΌ βΌ
ββββββββββββ ββββββββββββ ββββββββββββ
βPostgreSQLβ β Redis β βGoogleGeminiβ
β Database β β Cache β β API β
ββββββββββββ ββββββββββββ ββββββββββββ
- π Browse and book appointment slots
- π’ View available services and resources (venues, courts, equipment)
- π€ User authentication & profile management
- π³ Payment integration (PhonePe)
- π€ AI Chatbot - Get help booking appointments, service recommendations
- π± Mobile-responsive design
- π Real-time updates via Socket.IO
- π Dashboard - Analytics & reporting with charts
- π Services - Create/manage services with custom questions, pricing, capacity
- π¨ββοΈ Providers - Manage service providers and their schedules
- ποΈ Resources - Manage venues, courts, equipment with hierarchy support
- π Appointments - View, confirm, or cancel bookings
- π« Discounts - Create promo codes with percentage-based discounts
- π₯ Users - User management with role-based access (Admin, Organiser, Provider)
- βοΈ Settings - Application configuration
- π JWT Authentication with role-based access control
- π§ Email notifications (Nodemailer)
- π° Payment processing with PhonePe
- π€ AI Chatbot integration with Google Gemini Pro
- π Real-time WebSocket events
- π File uploads for images
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, TailwindCSS, Zustand, Recharts |
| Backend | Node.js, Express 5, Socket.IO |
| Database | PostgreSQL + Prisma ORM |
| Cache | Redis |
| AI | Google Gemini API (gemini-2.0-flash) |
| Payments | PhonePe |
| Nodemailer |
Appointment_App_Gear_5/
βββ admin/ # Admin dashboard (React + Vite)
β βββ src/
β βββ components/ # UI components
β βββ views/ # Page views
β βββ store/ # Zustand state management
β
βββ customer/ # Customer portal (React + Vite)
β βββ src/
β βββ components/ # UI components (auth, booking, chat, home)
β βββ services/ # API service layer
β βββ context/ # React context
β
βββ backend/ # Express.js API server
β βββ prisma/
β β βββ schema.prisma # Database schema
β βββ src/
β βββ controllers/ # Route handlers
β βββ routes/ # API routes
β βββ services/ # Business logic
β βββ middlewares/ # Auth, error handling
β βββ utils/ # Helpers
β
βββ README.md
| Model | Description |
|---|---|
| User | Customers, admins, organizers, providers |
| Service | Bookable services with pricing, questions, capacity |
| Provider | Service providers with working hours |
| Resource | Venues, courts, equipment (supports hierarchy) |
| Slot | Available time slots for booking |
| Booking | Customer appointments |
| Transaction | Payment records |
| Discount | Promotional codes |
- Node.js 18+
- PostgreSQL
- Redis (optional, for caching)
- Google Gemini API Key
# Install backend dependencies
cd backend
npm install
# Install admin dependencies
cd ../admin
npm install
# Install customer dependencies
cd ../customer
npm installCreate .env file in backend/:
DATABASE_URL="postgresql://user:password@localhost:5432/appointment_db"
JWT_SECRET="your-super-secret-jwt-key"
PORT=3000
# Email (optional)
SMTP_HOST="smtp.gmail.com"
SMTP_PORT=587
SMTP_USER="your-email@gmail.com"
SMTP_PASS="your-app-password"
# PhonePe Payment (optional)
PHONEPE_MERCHANT_ID="your-merchant-id"
PHONEPE_SALT_KEY="your-salt-key"
PHONEPE_SALT_INDEX=1
# Google Gemini API
GEMINI_API_KEY="your-google-gemini-api-key"Create .env file in admin/ and customer/:
VITE_API_URL="http://localhost:3000/api"cd backend
# Generate Prisma client
npx prisma generate
# Run migrations
npx prisma migrate dev
# Seed sample data (optional)
node prisma/seed.js# Terminal 1 - Backend
cd backend
npm run dev # Runs on http://localhost:3000
# Terminal 2 - Admin
cd admin
npm run dev # Runs on http://localhost:5174
# Terminal 3 - Customer
cd customer
npm run dev # Runs on http://localhost:5173| Route | Description |
|---|---|
POST /api/auth/register |
User registration |
POST /api/auth/login |
User login |
GET /api/services |
List all services |
GET /api/resources |
List all resources |
GET /api/providers |
List all providers |
GET /api/slots |
Get available slots |
POST /api/bookings |
Create a booking |
GET /api/bookings |
List user bookings |
POST /api/payments/initiate |
Start payment |
GET /api/discounts |
List discounts |
POST /api/chatbot/message |
AI chatbot |
GET /api/reports |
Admin analytics |
GET /api/users |
User management |
| Role | Permissions |
|---|---|
| CUSTOMER | Book appointments, view own bookings |
| PROVIDER | View assigned appointments |
| ORGANISER | Manage services, providers, resources |
| ADMIN | Full system access |
The integrated chatbot uses Google Gemini 2.0 Flash to:
- Answer questions about services
- Recommend services based on symptoms/needs
- Guide users through the booking process
- Provide general appointment assistance
Setup Gemini:
- Get an API Key from Google AI Studio.
- Add it to
backend/.envasGEMINI_API_KEY.
npm run dev # Development with nodemon
npm start # Productionnpm run dev # Development server
npm run build # Production build
npm run preview # Preview production build
npm test # Run tests (admin only)The app uses a warm, professional design with:
- Primary Color: Terracotta (#C4653C)
- Background: Paper cream (#FAF6F0)
- Font: Inter / system fonts
- Icons: Lucide React
MIT License - Built for hackathon purposes.
Built with β€οΈ by Team Gear 5
