To integrate with Q-Consultation, you first need to initialize the QuickBlox SDK.
- iOS: https://docs.quickblox.com/docs/ios-setup
- Android: https://docs.quickblox.com/docs/android-setup
- JS: https://docs.quickblox.com/docs/js-setup
- ReactNative: https://docs.quickblox.com/docs/react-native-setup
- Flutter: https://docs.quickblox.com/docs/flutter-setup
The next step is to create a session. This must be done before login or creating a user.
- iOS: https://docs.quickblox.com/docs/ios-users#create-user
- Android: https://docs.quickblox.com/docs/android-users#create-user
- JS: https://docs.quickblox.com/docs/js-users#create-user
- React Native: https://docs.quickblox.com/docs/react-native-users#create-user
- Flutter: https://docs.quickblox.com/docs/flutter-users#create-user
After login, you can use the session token to go to any Q-Consultation page without authorization on the site.
Routes:
- https://client-website.com/[pathname]?token=[session_token]
- https://provider-website.com/[pathname]?token=[session_token]
[pathname] is the path to a specific Q-Consultation page
[session_token] is the token from the session (https://docs.quickblox.com/reference/session-model)
Sign Up page in the client application
You can create a user on the Sign Up page in the client application, but you can also create it outside the application using the API or SDK.
Routes:
User object schema: https://docs.quickblox.com/reference/user-model
There are 2 types of users in Q-Consultation: client and provider.
To create a provider, you need to set user_tags to provider value. For a provider, you can fill in the custom_data fields (optional): description, language, avatar.
To create a client, you need to leave the user_tags field empty. For a client, you can fill in the custom_data fields (optional): address, birthdate, gender, language, avatar.
custom_data is an JSON object converted to a string.
- iOS: https://docs.quickblox.com/docs/ios-users#create-user
- Android: https://docs.quickblox.com/docs/android-users#create-user
- JS: https://docs.quickblox.com/docs/js-users#create-user
- React Native: https://docs.quickblox.com/docs/react-native-users#create-user
- Flutter: https://docs.quickblox.com/docs/flutter-users#create-user
Sign In page in the client application
Sign In page in the provider application
You can login to the application on the Sign In page in the client and provider applications, or you can do it outside the application using the API or SDK.
Routes:
To be able to work with all the data, you need to login as a user.
- iOS: https://docs.quickblox.com/docs/ios-authentication#log-in-user
- Android: https://docs.quickblox.com/docs/android-authentication#log-in-user
- JS: https://docs.quickblox.com/docs/js-authentication#log-in-user
- React Native: https://docs.quickblox.com/docs/react-native-authentication#log-in-user
- Flutter: https://docs.quickblox.com/docs/flutter-authentication#log-in-user
Appointments created by client or provider are placed in a Live queue with the selected provider. The client is waiting for a response from the provider in the Waiting room.
Waiting room
Live queue
Routes:
- https://client-website.com/appointment/[appointment_id]
- https://provider-website.com/queue/[appointment_id]
To create an Appointment in Q-Consultation, it is imperative to create a Dialog, then create a Custom object (Appointment). If you need to notify your opponent about the created Appointment, then you need to send System messages to your opponent (for this you need to be connected to the chat).
Need to create a group Dialog with the user
- iOS: https://docs.quickblox.com/docs/ios-chat-dialogs#create-dialog
- Android: https://docs.quickblox.com/docs/android-chat-dialogs#create-dialog
- JS: https://docs.quickblox.com/docs/js-chat-dialogs#create-dialog
- React Native: https://docs.quickblox.com/docs/react-native-chat-dialogs#create-dialog
- Flutter: https://docs.quickblox.com/docs/flutter-chat-dialogs#create-dialog
Appointment is a Custom Object class(https://docs.quickblox.com/reference/custom-objects) with the next fields:
client_id: int // Client id(QB user id) to whom this appointment is scheduled
provider_id: int // Provider id(QB user id) to whom this appointment is scheduled
dialog_id: string // QB group dialog id associated with this appointment
description: string // Contains description for appointment
date_end: datetime // Appointment end date in ISO format
date_start: datetime // Appointment start date in ISO format
priority: int // may be 0,1 or 2, 0 - lowest
notes: string // Notes created by provider
conclusion: string // The conclusion from the provider
language: string // Language conclusion
records: int[] // Array of recorded files ids
When creating an Appointment, it is necessary to specify the fields: client_id, provider_id, dialog_id, description.
- iOS: https://docs.quickblox.com/docs/ios-custom-objects#create-records
- Android: https://docs.quickblox.com/docs/android-custom-objects#create-records
- JS: https://docs.quickblox.com/docs/js-custom-objects#create-records
- React Native: https://docs.quickblox.com/docs/react-native-custom-objects#create-records
- Flutter: https://docs.quickblox.com/docs/flutter-custom-objects#create-records
In order to send System messages and Messages to Dialog, you need to connect to the chat.
- iOS: https://docs.quickblox.com/docs/ios-chat-connection#connect-to-chat-server-with-quickblox-session-token
- Android: https://docs.quickblox.com/docs/android-chat-connection#connect-to-chat-server-with-quickblox-session-token
- JS: https://docs.quickblox.com/docs/js-chat-connection#connect-to-chat-server-with-quickblox-session-token
- React Native: https://docs.quickblox.com/docs/react-native-chat-connection#connect-to-chat-server
- Flutter: https://docs.quickblox.com/docs/flutter-chat-connection#connect-to-chat-server
After creating an Appointment, you can send 2 system messages to your opponent.
The first system message must be sent with the parameters: notification_type(value: "DIALOG") and dialog_id. This system message tells the opponent to get this Dialog and connect to it.
The second system message must be sent with the parameters: notification_type(value: "APPOINTMENT") and appointment_id. This system message tells the opponent to get this Appointment.
- iOS: https://docs.quickblox.com/docs/ios-chat-messaging#send-system-messages
- Android: https://docs.quickblox.com/docs/android-chat-messaging#send-system-messages
- JS: https://docs.quickblox.com/docs/js-chat-messaging#send-system-messages
- React Native: https://docs.quickblox.com/docs/react-native-chat-messaging#send-system-messages
- Flutter: https://docs.quickblox.com/docs/flutter-chat-messaging#send-system-messages
You can fully customize the application style settings. Most used colors are defined as css variables in src/variables.css in every packages.
The main set of variables are the following:
| Variable | Value | Description |
|---|---|---|
| --grey-10 | rgba(0, 0, 0, 0.4) | Shadow for header and notifications |
| --grey-11 | rgba(0, 0, 0, 0.8) | Backdrop color for modal dialogs |
| --blue-3 | #CCD0D9 | Border color |
| --blue-9 | #3978FC | Theme main color |
| --blue-5 | #99A9C6 | Theme secondary color |
| --grey-8 | #333333 | Primary text |
| --blue-7 | #6C7A92 | Secondary text |
| --red-4 | red | Errors text |
| --red-5 | #FF4B4B | Color for high priority button / notification |
| --green-5 | #00C248 | Color for medium priority button / notification |
| --orange-4 | #FFBE30 | Color for low priority button / notification |
Svg file is used as a logo. This file can be found in "icons" directory in every packages.
The logo is only used in the Header component.
When replacing a logo, it may be necessary to change the height of your logo.
To change the height of the logo, you need to change the value of the css variable --HeaderLogo-height
The react-i18next library was used to implement the translations.
Translations can be found in "translations" directory in every packages.
You can add text here with new languages. After adding new languages, be sure to include them in the i18next configuration files.
Integration pages are examples of how your application/website can interact with the Q-Consultation application. Now the integration pages use links that lead to the provider's profile.
Link: https://localhost:3001/providers/[provider_id]
In this link, you need to replace [provider_id] with the id of the previously created provider.
To run the integration pages locally, you need to run the command: npm run pages.
This command will run integration pages on http://localhost:8000 .
Currently, there are available two integration examples. The source code can be found in the 'packages' folder >> 'integration-pages' (/packages/integration-pages).







