Android and IOS App Based Custom AI Chat

Job ID: 39090149

Budget: $30 – $250 USD

Android and IOS applications with below rules.

endpoint:
"version.json": /api/apps/{ios_or_android_key}/version
"ai.json": /api/apps/{ios_or_android_key}/ai
"app.json": /api/apps/{ios_or_android_key}/app
"list-of-update-languages": /api/apps/{ios_or_android_key}/update-languages
"update-language":/api/apps/{ios_or_android_key}/language-content/{ISO_ 639_1_short_language_name}
"agreement-content":/api/apps/{ios_or_android_key}/agreement-content/{ISO_ 639_1_short_language_name}

NOT: {ios_or_android_key} means "ios" or "android" key depend on the OS of device.

the apps has version.json, app.json, ai.json, update-languages.json and languages files under "language_directory" directory. language files must follow ISO 639-1 standard. version.json file must keeps "file name" and "version" pair include the version of itself and other files. version.json is a kind of a "version table" for the apps.
example: version.json =>
{
"version.json": "0001",
"ai.json": "0012",
"app.json": "0012",
"update-languages": "0288"
}
when the apps opens must fetch version.json file from server as a silent job in background. the endpoint is "/api/apps/version/{ios_or_android_key}". If the server does not response or the response not valid json file the apps must works with existing files(ai, app, language_directory/...).

The server will return a json stream and each of line has a file name and the latest version of the file. A job must read version.json file from locale and compare if the files has newer version or not. If there is higher(newer) version must fetch the new version of the file from the server and save the content(override the existing content) to local and update the version table in local version.json file.

Example:
Local storage version.json is
{
"version.json": "0001",
"ai.json": "0012",
"app.json": "0012",
"update-languages": "0288"
}

and "/api/apps/version/{ios_or_android_key}" return below json

{
"version.json": "0004",
"ai.json": "0013",
"app.json": "0012",
"update-languages": "0289"
}

we see here "version.json", "ai.json" and "update-languages" must update. there are 3 steps.

1. step: "ai.json" file fetch from "/api/apps/{ios_or_android_key}/ai" and check if the response valid or not. If the response valid than override "ai.json" file and update "ai.json" version from "0012" to "0013" in version.json file.


2. step: "update-languages" file fetch from "/api/apps/{ios_or_android_key}/update-languages" and check if the response valid or not. Here is the example response:
{ "updateList": ["en", "it", "nl", "de"] }
the response has 4 items. That means each of item must update.
fetch "en" json content by calling "/api/apps/{ios_or_android_key}/language-content/en" endpoint and check if the response valid or not. If the response valid than override "language_directory/en" file by response.
fetch "it" json content by calling "/api/apps/{ios_or_android_key}/language-content/it" endpoint and check if the response valid or not. If the response valid than override "language_directory/en" file by response.
and same for "nl" and "de".
update "update-languages.json" version from "0288" to "0289" in version.json file.


3. step: update "version.json" version from "0001" to "0003" in version.json file.


The apps must support multiple languages. the short name of the languages must follow ISO 639-1 standard. The apps must fetch all the languages with their version from a specific endpoint(/api/apps/{ios_or_android_key}/update-languages) and get the list of the languages. Please see the above example for details.


When the user open the apps at first time a popup must appears for usage agreement text. The popup must appears each time till the user accepted. The popup must have two buttons: cancel and accept buttons. the user can be used the apps when accepted the agreement. The agreement content must get from AWS server by HTTP GET method (/api/apps/{ios_or_android_key}/agreement-content/{ISO_ 639_1_short_language_name}). In case of any issue must try 3 times. If the agreement could not fetch from server must show a popup with "I accept the <url link reference> term and condition</>" with "disagree" "Agree" buttons.

When the user open the apps in background the ai.json must fetch from the server. In case of any issue must try 3 times. If the ai.json could not fetch from server the latest fetched from server must use a default one. the ai.json keeps a list of object. each of object has an endpoint ai server, client & secret id, preferred order number, and name of ai. The ai.json must get from AWS server by HTTP GET method (/api/apps/{ios_or_android_key}/ai.json).

ai.json at least has 4 major ai servers. the ai servers will sort by "preferred order number" and the smaller number is the default ai server. the apps must send attached file and message to the ai server and parse the response from that ai servers and show the pure content in the chat panel. The response if has style must apply and visible on that chat panel.


"app.json" holds the endpoint of the servers, authentication, advertisment endpoint and configuration, the account info so on.
{
"endpoints": [
"version.json": "/api/apps/{ios_or_android_key}/version",
"ai.json": "/api/apps/{ios_or_android_key}/ai",
"app.json": "/api/apps/{ios_or_android_key}/app",
"list-of-update-languages": "/api/apps/{ios_or_android_key}/update-languages",
"update-language":"/api/apps/{ios_or_android_key}/language-content/{ISO_ 639_1_short_language_name}",
"agreement-content":"/api/apps/{ios_or_android_key}/agreement-content/{ISO_ 639_1_short_language_name}",
"pharmacy.json": "/api/apps/{ios_or_android_key}/pharmacy/{latitude and longitude info}"
],
"first_

the main page of the apps will have a sepcific design:
1- on the top of the page has a chat panel with %75 height size. under that chat panel there is an input text and end of the input text have file upload icon.
when the file upload icon clicked the file upload modal must open and that modal allow the user to upload and send a file to ai server from local device or the user can use the device camera to take a photo and send it to ai server.

AI servers:
deepseek
Google Gemini 1.0 Ultra
ChatGPT-4o
Microsoft Copilot


when the user upload a file and click "send" button or click "enter" the apps must execute a rule set before send the message to the ai server.

first step the app must find the language file depend on locale
"add_prefix_message_to_attached_message" key must find in that file and added the value as a prefix than a white space.
"add_suffix_message_to_attached_message" key must find in that file and added a white space than the suffix value .
than send the message to ai server.


when the response stream ended from ai server in the chat input must appears a button with value of "give_me_more_details" from locale file. if the user clicked on that button the value must send to ai server without any prefix and suffix and response stream paste to panel.

the panel must support text styles such as bold, italic ...vs


2- in the bottom of the main page there should be 2 buttons with images for a specific functions
first function show a map that nearest pharmacy list on the map(the data provide by server as a json list)
the second a list of hospitals with a text search(the text on the top of the page)

the app will have an advertising support for incoming and must demostrait with simple example works the advertisment.

Google Analytics must implement for buttons and user actions. the Google Analytics user key and api information will be send to developer when the development started.

the logo, button images and icon of the file upload will be decided and send the developer when the development started.
the apps must be stable on different type of smart phones.

all the code and the unit test of the project will be delivered on time