About.
Two software students Kexin Huang & Dewei Liu have been developing this web app since 14 Aug 2018! Naming this
project as Best Friends App is for memorising the long-term friendship.
Click here to see this project on
GitHub
(Last updated on Thursday 01 January 1970)
This project is using multiple servers and their intergration based on Microsoft Azure Cloud Service, including
Web App,
SQL Database,
Azure Bot service (Direct Line API) and
QnAMaker. All of these servers are hosted on Azure Web App service, and
this app uses Django Framework written in Python 3.
Clients can only contact the app so other servers are hidden from clients. This makes sure that other servers
are in safe and won't get exposed in public.
Because of our limited budget, the performance of the servers is quite low, so please be paitent to the
delays while you are using the app.
Please see the images below to check out how it works.
Login page
When you log in with your first name and surname, the app checks if you are a registered user by checking your
name.
If it is, it redirects you to an URL with your user ID number.
If it is not, it assigns a new user ID to you and redirects you to an URL with your user ID number.
Starting the conversation
The app then receives the URL with your user ID. It queries the SQL database for your details and chatting
history.
Then it shows you the AI dialog and your previous messages (if any).
At the same time, the app send HTTP request to The Azure Bot to start a conversation with your bot credentials.
Note, the bot credentials are used for accessing the bot and identifing which messages are from a
same conversation/user. These are required by "Direct Line API", and not controlled by you. (not your login
details)
Sending a message
- Client side (your browser): sends a message to the app, and keeps sending HTTP request to
ask if there are new messages updated.
- App side: lodges the message to database, restructures the message, and sends it to the
Bot.
- Azure Bot: Asks the QnAMaker to find a question from knowledge base that matches the
question asked by the user, and temporaryly stores the answer.
Receiving a message
- Client side (your browser): Keeps sending request asking the app if there are any new
messages.
- App side:
1. For every request received from client, checks with the database. If
there are any, send the messages back to client.
2. Keeps asking the Bot if the answer is ready. Once the answer is ready, lodges the answer to the database.
- Azure Bot: When receiving request from the app, sends the answer back.