Skip to content

Kusumar95/Chatbot-Appointment-system

Repository files navigation

AI Appointment Chatbot System

A full-stack chatbot system for appointment scheduling, built with Next.js, Node.js (Express), Python (FastAPI + LangChain), and PostgreSQL.
The chatbot intelligently handles user conversations, identifies appointment intents, and books appointments using AI-driven logic. Please find technical Documentation for Architecture Overview


Features

Frontend (Next.js)

  • Responsive, modern chat interface (Socket.IO)
  • Real-time messaging
  • Secure user authentication (JWT via cookies)
  • Session management and chat history
  • Intuitive, clean user experience

Backend (Node.js + Express)

  • /api/chatbot/token endpoint for short-lived access tokens
  • Secure JWT-based authentication
  • Middleware for logging, rate limiting, and request validation
  • Socket.IO integration for real-time chat relay
  • Communication bridge between frontend and Python microservice

Python Microservice (FastAPI + LangChain)

  • Manages chatbot conversation flow
  • Integrates with OpenAI (or Anthropic / local LLM)
  • Detects intent and manages appointment scheduling logic
  • Logs all interactions for analytics
  • Writes confirmed appointments to PostgreSQL

Database (PostgreSQL)

  • users: stores user profiles & credentials
  • appointments: handles scheduling data and status
  • chat_sessions: logs messages and metadata for analytics
  • Optimized with proper indexes and constraints

Runchecklist.txt

-Gives the command by command execution of code

Security.txt

  • Gives security highlights

Manual setup

Manual Local Setup

Database setup

  • psql -U postgres -d chatbot_appointments -f db/schema.sql

Backend setup

  • cd backend
  • npm install
  • npm run dev

Microservice setup

  • cd microservice
  • pip install -r requirements.txt
  • uvicorn app:app --host 0.0.0.0 --port 8000 --reload

Frontend setup

  • cd frontend
  • npm install
  • npm run dev

Open in browser

-Visit → http://localhost:3000

Login → Start chatting → Book appointments!

About

A simple LLM implemented chatbot system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors