Giter Site home page Giter Site logo

arpankundu4 / groww-contextual-chatbot Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 141 KB

A pluggable contextual chatbot for Groww. Helps users navigate the website smoothly, by providing relevant FAQs and info based on the user’s context.

Home Page: https://groww-chatbot.herokuapp.com/swagger-ui/

License: MIT License

Shell 0.29% Java 99.71%
groww chatbot contextual java mongodb springboot junit mockito

groww-contextual-chatbot's Introduction

Groww

OpenAPI Docs | Live Backend

Contextual Chatbot for Investors

groww-contextual-chatbot

This project is a part of Crio Launch (2022) Externship with Groww.

OpenAPI Docs https://groww-chatbot.herokuapp.com/swagger-ui/

Live Backend https://groww-chatbot.herokuapp.com

Table of Contents

About

This application consists of a contextual chatbot on top of webpages modelled on Groww. The chatbot displays FAQs and information based on an investor’s current context on the website, by making use of the user's context consisting of user's id, category of choice (Stocks, Mutual Funds, Gold, FDs), web page selection (product or order pages), and other information to help the investor have a smooth & interactive browsing experience.

stocks-page

stocks-product-page

Demo

Demo Video https://www.loom.com/share/d14a2da0d8eb44adabe486704bed919f

Features

User

  • User login & register
  • Browse categories & products
  • View product details
  • Place order for a product
  • View user's orders
  • Cancel an order
  • View / edit user's account details

Chatbot

  • Click to activate on any webpage
  • Get relevant set of responses based on user's context (if logged in)
  • Get categories (e.g. Stocks, FDs, etc.) based on user context
  • Get subcategories based on categories or webpage selection (e.g. IPO, Investments, Charges, etc.)
  • Get FAQs based on subcategories or webpage selection (e.g. product specific FAQs on product pages)

Admin

  • Add / edit / delete categories
  • Add / edit / delete subcategories
  • Add / edit / delete FAQs
  • Add / edit / delete products

System Design

  • Website Flows & APIs
website-flows
  • Chatbot Flows
groww-chatbot-flows

  • Database Structure
db-structure

Contextual Responses

  • As an example, let's take a non-KYC user whose My Account looks like this:
non-kyc-account

  • The chatbot on a product page will show user's KYC status related FAQs in addition to product FAQs
non-kyc-chatbot-product-faqs
  • The chatbot on My Orders page will show FAQs relevant to the user's orders
failed-order-chatbot-order-faqs
  • The chatbot on product pages also shows FAQs relevant to order status, if the user has any order history for that product
product-page-chatbot-order-faqs

REST APIs

Webpages

  1. User login / registration
    POST /api/login
    POST /api/register

  2. Browse products
    GET /api/products/categories/{categoryId}
    GET /api/products/{productId}

  3. Place order / get user's orders*
    POST /api/user/place-order
    GET /api/user/orders

  4. Get / edit user's account details*
    GET /api/user/account
    PATCH /api/user/account/edit

*Secure endpoints which need authorization for access

Chatbot

  1. Get FAQ categories / subcategories (with context)
    POST /api/categories

  2. Get FAQs (with context)
    POST /api/faqs

Context

   {
      "userId": "string",
      "productId": "string",
      "orderId": "string"
   }

API Docs

open-api-docs

Try out the APIs with complete documentation at the OpenAPI Docs.

Tech Stack

  1. Java (JDK 11)
  2. SpringBoot 2.6.7
  3. MongoDB 4.2
  4. JUnit 5
  5. Mockito
  6. Maven
  7. OpenAPI (Swagger v3)
  8. Postman

Setup

From terminal:

  1. Type cd groww-contextual-chatbot
  2. Type cd backend
  3. Type chmod +x setup.sh
  4. Type ./setup.sh

Restore mongo-dump:

  1. Start MongoDB on localhost:27017
  2. Type cd groww-contextual-chatbot
  3. Type cd backend
  4. Type mongorestore mongodb://localhost:27017 dump/

Run

To run backend server locally

From terminal:

  1. Type cd groww-contextual-chatbot
  2. Type cd backend
  3. Type chmod +x server_run.sh
  4. Type ./server_run.sh
  5. Server will start on localhost:8081

Demo account

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.