Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WhatsApp Appointment Booking Platform

A complete appointment booking system with admin dashboard and WhatsApp integration.

Tech Stack

  • Backend: Node.js + Express + TypeScript + Prisma + PostgreSQL
  • Frontend: React + TypeScript + TailwindCSS + shadcn/ui
  • WhatsApp: Clawdbot Skill integration

Quick Start

1. Start Database

docker-compose up -d postgres

2. Backend Setup

cd backend
npm install
cp .env.example .env
npx prisma generate
npx prisma db push
npm run db:seed
npm run dev

Backend runs at http://localhost:3001

3. Admin Dashboard Setup

cd admin-dashboard
npm install
npm run dev

Dashboard runs at http://localhost:5173

4. Login Credentials

API Endpoints

Authentication

  • POST /api/auth/login - Admin login
  • POST /api/auth/register - Register new admin

Services

  • GET /api/services - List all services
  • POST /api/services - Create service (auth required)
  • PUT /api/services/:id - Update service (auth required)
  • DELETE /api/services/:id - Delete service (auth required)

Appointments

  • GET /api/appointments - List appointments (auth required)
  • POST /api/appointments - Create appointment (auth required)
  • PUT /api/appointments/:id - Update appointment (auth required)
  • DELETE /api/appointments/:id - Cancel appointment (auth required)

Client Endpoints (for WhatsApp)

  • POST /api/appointments/book - Book appointment (phone verification)
  • GET /api/appointments/client/:phone - Get client's appointments
  • POST /api/appointments/cancel-client - Cancel by client
  • POST /api/appointments/reschedule-client - Reschedule by client

Slots

  • GET /api/slots?date=YYYY-MM-DD&serviceId=xxx - Get available slots

Clients

  • GET /api/clients - List clients (auth required)
  • POST /api/clients - Create client (auth required)
  • PUT /api/clients/:id - Update client (auth required)

Dashboard

  • GET /api/dashboard/stats - Dashboard statistics (auth required)
  • GET /api/dashboard/today - Today's schedule (auth required)
  • GET /api/dashboard/recent - Recent activity (auth required)

Project Structure

appointment-platform/
├── docker-compose.yml
├── README.md
├── backend/
│   ├── prisma/
│   │   ├── schema.prisma
│   │   └── seed.ts
│   └── src/
│       ├── index.ts
│       ├── app.ts
│       ├── config/
│       ├── types/
│       ├── utils/
│       ├── middleware/
│       ├── services/
│       ├── controllers/
│       └── routes/
├── admin-dashboard/
│   └── src/
│       ├── api/
│       ├── components/
│       ├── hooks/
│       ├── pages/
│       ├── stores/
│       └── types/
└── clawdbot-skill/
    └── SKILL.md          # Clawdbot skill (markdown only)

Clawdbot WhatsApp Integration

The clawdbot-skill/SKILL.md teaches Clawdbot how to use the appointment API via WhatsApp.

Setup

  1. Copy the skill to your Clawdbot skills directory:

    cp -r clawdbot-skill ~/.clawdbot/skills/appointment-booking
  2. Set the API URL environment variable:

    export APPOINTMENT_API_URL="http://localhost:3001/api"
  3. The skill will be automatically loaded by Clawdbot.

Usage via WhatsApp

Users can message your Clawdbot-connected WhatsApp number:

  • "What services do you offer?"
  • "Book a dental cleaning for tomorrow at 10am"
  • "Show my appointments"
  • "Cancel my appointment"
  • "Reschedule my appointment to Friday at 2pm"

Environment Variables

Backend (.env)

DATABASE_URL="postgresql://postgres:postgres123@localhost:5432/appointments"
JWT_SECRET="your-jwt-secret-key"
PORT=3001

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages