Skip to content

BinaryByte0704/Neo-Talk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MERN Stack AI Chatbot

An AI Chatbot application inspired by ChatGPT, built using the MERN stack and OpenAI API.

Overview

This customized chatbot allows users to have conversational interactions with an AI, and all user messages are stored in a database for future retrieval or deletion. The application emphasizes both functionality and security.

Features

  • AI-powered chatbot using OpenAI API
  • Message storage in MongoDB for future retrieval
  • Message deletion feature
  • Fully secure with:
    • JWT (JSON Web Tokens) for authentication
    • HTTP-Only Cookies
    • Signed Cookies
    • Password encryption for user accounts
    • Middleware chains for request validation and security

Security

This application prioritizes security, employing a range of techniques to protect user data and ensure the integrity of the communication, including:

  • JWT Authentication: Secure token-based user authentication to protect API endpoints.
  • HTTP-Only Cookies: Used to store authentication tokens securely, inaccessible via JavaScript.
  • Signed Cookies: Cookies are signed to prevent tampering.
  • Password Encryption: Passwords are hashed and salted before being stored.
  • Middleware Chains: Predefined middleware chains are used for handling authentication, validation, and other operations.

Technologies

  • Frontend: React (as part of the MERN stack)
  • Backend: Node.js with Express
  • Database: MongoDB
  • Authentication: JWT (JSON Web Tokens), HTTP-Only Cookies, Signed Cookies
  • AI: OpenAI API for natural language processing and chatbot interaction

Getting Started

To get the application running locally, follow these steps:

1. Clone the Repository

git clone https://github.com/your-repo/mern-chatbot.git

2. Install Dependencies

In both the client and server directories, run the following command:

npm install

3. Setup Environment Variables

Create a .env file in the server directory and include the following:

  • JWT_SECRET
  • OPENAI_API_KEY
  • MONGO_URI

4. Run the Application

To start both the frontend and backend servers, run:

npm run dev

The React frontend will start on http://localhost:3000 and the backend on http://localhost:5000.

Contributing

Contributions are welcome! If you want to contribute, feel free to fork the repository and submit a pull request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors