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
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.
Demo Video
https://www.loom.com/share/d14a2da0d8eb44adabe486704bed919f
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
- Website Flows & APIs
- Chatbot Flows
- Database Structure
- As an example, let's take a non-KYC user whose
My Account
looks like this:
- The chatbot on a product page will show user's KYC status related FAQs in addition to product FAQs
- The chatbot on
My Orders
page will show FAQs relevant to the user's orders
- The chatbot on product pages also shows FAQs relevant to order status, if the user has any order history for that product
-
User login / registration
POST /api/login
POST /api/register
-
Browse products
GET /api/products/categories/{categoryId}
GET /api/products/{productId}
-
Place order / get user's orders*
POST /api/user/place-order
GET /api/user/orders
-
Get / edit user's account details*
GET /api/user/account
PATCH /api/user/account/edit
*Secure endpoints which need authorization for access
-
Get FAQ categories / subcategories (with context)
POST /api/categories
-
Get FAQs (with context)
POST /api/faqs
{
"userId": "string",
"productId": "string",
"orderId": "string"
}
Try out the APIs with complete documentation at the OpenAPI Docs.
- Java (JDK 11)
- SpringBoot 2.6.7
- MongoDB 4.2
- JUnit 5
- Mockito
- Maven
- OpenAPI (Swagger v3)
- Postman
From terminal:
- Type
cd groww-contextual-chatbot
- Type
cd backend
- Type
chmod +x setup.sh
- Type
./setup.sh
Restore mongo-dump:
- Start MongoDB on
localhost:27017
- Type
cd groww-contextual-chatbot
- Type
cd backend
- Type
mongorestore mongodb://localhost:27017 dump/
From terminal:
- Type
cd groww-contextual-chatbot
- Type
cd backend
- Type
chmod +x server_run.sh
- Type
./server_run.sh
- Server will start on
localhost:8081
- email :
[email protected]
- password :
test