Skip to content

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

License

Notifications You must be signed in to change notification settings

arpankundu4/groww-contextual-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

  • email : test@groww.in
  • password : test

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published