its-kunal / chatbot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CHATBOT

Objective:
To Develop a RESTful API using Express.js framework backed by SQLite and Sequelize ORM. The API will serve as the backend for a platform where users can create chatbots. These chatbots will have conversations with end users.

Entities:

  1. User
  2. Chatbot
  3. Conversation
  4. EndUser (The individual interacting with the chatbot)

Entity Relationships:

  1. A User can have multiple Chatbots.
  2. A Chatbot belongs to a User and can have multiple Conversations.
  3. A Conversation belongs to a Chatbot and involves an EndUser.
  4. An EndUser is identified by a name and an email.

Endpoints:

  1. Users

    • POST /users - Create a new user
    • GET /users - List all users
    • GET /users/:id - Retrieve a single user
    • PUT /users/:id - Update a user
    • DELETE /users/:id - Delete a user
  2. Chatbots

    • POST /users/:userId/chatbots - Create a new chatbot for a user
    • GET /users/:userId/chatbots - List all chatbots for a user
    • GET /chatbots/:chatbotId - Retrieve a single chatbot
    • PUT /chatbots/:chatbotId - Update a chatbot
    • DELETE /chatbots/:chatbotId - Delete a chatbot
  3. Conversations

    • POST /chatbots/:chatbotId/conversations - Start a new conversation for a chatbot
    • GET /chatbots/:chatbotId/conversations - List all conversations for a chatbot
    • GET /conversations/:conversationId - Retrieve a single conversation
    • PUT /conversations/:conversationId - Update a conversation (for instance, to mark it as completed)
    • DELETE /conversations/:conversationId - End/delete a conversation
  4. EndUsers

    • POST /endusers - Register a new end user
    • GET /endusers - List all end users
    • GET /endusers/:endUserId - Retrieve details of a single end user
    • PUT /endusers/:endUserId - Update end user details
    • DELETE /endusers/:endUserId - Delete an end user

About


Languages

Language:TypeScript 100.0%