Skip to content

Sumairahafeez/Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💬 Rule-Based Chatbot App

A mobile-friendly Rule-Based Chatbot built using React Native (Expo) for the frontend and Express.js for the backend. This chatbot responds to predefined patterns and keywords to simulate a conversation without relying on third-party APIs.

📱 Features

  • 📋 Rule-based logic with keyword detection
  • 🔄 Real-time messaging experience
  • ⚡ Lightweight and fast responses
  • 📲 Mobile UI built using React Native (Expo)
  • 🧠 No external APIs — everything is handled internally

🛠️ Tech Stack

  • Frontend: Expo (React Native)
  • Backend: Express.js
  • Communication: RESTful API between frontend and backend
  • Language: JavaScript (Node.js & React Native)

📸 Screenshots

LogIn Page

LogIn Page

SignUp Page

SignUp Page

Home Page

Home Page

Chat Page

Chat Page

🧑‍💻 Getting Started

🔧 Prerequisites

Make sure you have the following installed:

  • Node.js & npm
  • Expo CLI (npm install -g expo-cli)
  • Git

📦 Installation

1. Clone the Repository

git clone https://github.com/Sumairahafeez/Chatbot.git
cd Chatbot

2. Setup Backend (Express.js)

cd backend
npm install
node server.js

By default, the backend runs on http://localhost:3000

3. Setup Frontend (React Native using Expo)

In a new terminal window:

cd frontend
npm install
expo start

Scan the QR code with the Expo Go app or run it on an emulator.

📂 Project Structure

Chatbot/
├── backend/
│   ├── server.js
│   └── chatbotLogic.js
├── frontend/
│   ├── App.js
│   ├── assets/
│   ├── components/
│   └── screens/
├── screenshots/
│   ├── LogInUI.jpg
│   ├── SignUpUI.jpg
│   ├── HomeUI.jpg
│   └── chatUI.jpg
└── README.md

📦 Dependencies

Frontend (Expo)

  • react-native
  • axios
  • expo
  • react-navigation
  • react-native-gesture-handler
  • react-native-reanimated

Add other dependencies if you’re using additional libraries like formik, yup, etc.

Backend (Express.js)

  • express
  • cors
  • body-parser (optional)

🚀 Build/Deploy

To create a production-ready build of your app:

expo build:android

Or for EAS Build:

eas build --platform android

📱 Download APK

You can download the latest build here:

🤖 How It Works

  • User messages are sent from the frontend to the Express.js backend.
  • The backend matches keywords or phrases against a rule-based logic file (chatbotLogic.js).
  • The matched response is sent back to the frontend to be displayed.

📌 Future Enhancements

  • 📝 Add more conversational rules and conditions
  • 🌍 Support for multiple languages
  • 🗃️ Save chat history with local storage or database
  • 🎤 Add voice input/output features

👩‍💻 Author

Made with ❤️ by Sumaira Hafeez