Skip to content

Commit c3db0be

Browse files
committed
Add project zip download links to READMEs
1 parent 013e3a7 commit c3db0be

File tree

72 files changed

+577
-340
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+577
-340
lines changed

android/basic-example/README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
TalkJS Basic Android Example
2-
============================
1+
# TalkJS and Android basic example
32

4-
This code shows how you can embed TalkJS into a WebView using Android.
5-
The app itself is a minimal WhatsApp clone with a hardcoded contact list.
3+
This code shows how you can embed TalkJS into a WebView using Android. The app itself is a minimal WhatsApp clone with a hardcoded contact list.
64

75
It shows off three use cases:
86
- Show a conversation list (the "inbox")
@@ -13,3 +11,6 @@ How it works, in brief:
1311
1. When the Inbox (`InboxTab`) is opened, a webview is created which runs the JS code in `asserts/chat.js`, which is generic for all three use cases
1412
2. The JS code calls back into the app via `JavascriptCallbacks.getOptions` to determine what to do (open an inbox, start a chat with somebody, etc). Then, it calls TalkJS SDK methods as described in the [TalkJS docs](https://talkjs.com/docs).
1513
3. When a user clicks on a conversation in the inbox, an intent is generated to navigate to the `ChatboxActivity`, which reuses the code above to display a chatbox of a single conversation, instead of a conversation list.
14+
15+
> [!TIP]
16+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/android.basic-example.zip)

android/file-upload-example/README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
# TalkJS Android File Upload Example
1+
# Android file upload example
22

33
This code shows how to implement file upload support in Android's WebView.
44
Despite TalkJS already supporting uploading of files, the default Android WebView implementation
55
does not implement file uploads. The code also shows how to upload rich content
66
to TalkJS via the [unified API](https://developer.android.com/develop/ui/views/receive-rich-content)
77
This enables users to upload images and videos from the clipboard, keyboard or through drag and drop.
88

9+
> [!TIP]
10+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/android.file-upload-example.zip)
11+
912
## Getting Started
1013

1114
It is recommended to open this project in Android Studio so that Gradle sync is handled
1215
automatically for you.
1316

14-
Before running the app, don’t forget to replace the string, YOUR_APP_ID, with your TalkJS app ID from the dashboard.
17+
Before running the app, don’t forget to replace the string, `YOUR_APP_ID`, with your app ID from the [TalkJS dashboard](https://talkjs.com/dashboard/).
1518

1619
This code sample was used as part of two tutorials:
1720

angular/angular-chat-app/README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
This is an example project for TalkJS's tutorial on [how to build a chat into an Angular app with TalkJS](https://talkjs.com/resources/angular-chat-app/).
44

5+
> [!TIP]
6+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/angular.angular-chat-app.zip)
7+
58
## Prerequisites
69

710
To run this tutorial, you will need:
@@ -13,7 +16,7 @@ To run this tutorial, you will need:
1316

1417
## How to run the tutorial
1518

16-
1. Clone or download the project.
19+
1. Clone or [download this project](https://github.com/talkjs/talkjs-examples/releases/latest/download/angular.angular-chat-app.zip).
1720
2. Replace `YOUR_APP_ID_HERE` in `src/app/talk.service.ts` with your own app ID. You can find your app ID on the **Settings** page of your [TalkJS dashboard](https://talkjs.com/dashboard/).
1821
3. Run `npm install` to install dependencies.
1922
4. Run `ng serve` to start the server.

angular/angular-getting-started/README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
This is the example code for the [Angular getting started guide](https://talkjs.com/docs/Getting_Started/Frameworks/Angular/).
44

5+
> [!TIP]
6+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/angular.angular-getting-started.zip)
7+
58
## Prerequisites
69

710
To run this tutorial, you will need:
@@ -12,7 +15,7 @@ To run this tutorial, you will need:
1215

1316
## How to run the tutorial
1417

15-
1. Clone or download the project.
18+
1. Clone or [download this project](https://github.com/talkjs/talkjs-examples/releases/latest/download/angular.angular-getting-started.zip).
1619
2. Replace `<APP_ID>` in `src/app/talkjs-chat/talkjs-chat.component.ts` with the value found in the **Settings** tab of your [TalkJS dashboard](https://talkjs.com/dashboard/login).
1720
3. Run `npm install` to install dependencies.
1821
4. Run `ng serve` to start the server.

chatbot-integration/anthropic-claude/README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
# How to integrate Claude into your TalkJS chat with the Anthropic API
2+
13
This is an example project for TalkJS's tutorial on [How to integrate Claude into your TalkJS chat with the Anthropic API](https://talkjs.com/resources/how-to-integrate-claude-into-your-talkjs-chat-with-the-anthropic-api/). The project uses TalkJS webhooks to listen for new message events from the TalkJS server, calls the Anthropic API to generate a message reply, and then adds the reply to the conversation with the TalkJS API.
24

5+
> [!TIP]
6+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/chatbot-integration.anthropic-claude.zip)
7+
38
## Prerequisites
49

510
To run this tutorial, you will need:
@@ -12,7 +17,7 @@ To run this tutorial, you will need:
1217

1318
## How to run the tutorial
1419

15-
1. Clone or download the project.
20+
1. Clone or [download this project](https://github.com/talkjs/talkjs-examples/releases/latest/download/chatbot-integration.anthropic-claude.zip).
1621
2. Replace `<APP_ID>` and `<TALKJS_SECRET_KEY>` in `index.html` and `server.js` with the values found in your [TalkJS dashboard](https://talkjs.com/dashboard/login).
1722
3. Replace `<ANTHROPIC_SECRET_KEY>` with your Anthropic API key
1823
4. Enable the `message.sent` option in the **Webhooks** section of the TalkJS dashboard.

chatbot-integration/google-gemini/README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
# How to integrate Google's Gemini into your TalkJS chat
2+
13
This is an example project for TalkJS's tutorial on [How to integrate Google's Gemini into your TalkJS chat](https://talkjs.com/resources/create-a-chatbot-with-talkjs-and-gemini/). The project uses TalkJS webhooks to listen for new message events from the TalkJS server, calls the Gemini API to generate a message reply, and then adds the reply to the conversation with the TalkJS API.
24

5+
> [!TIP]
6+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/chatbot-integration.google-gemini.zip)
7+
38
## Prerequisites
49

510
To run this tutorial, you will need:
@@ -12,7 +17,7 @@ To run this tutorial, you will need:
1217

1318
## How to run the tutorial
1419

15-
1. Clone or download the project.
20+
1. Clone or [download this project](https://github.com/talkjs/talkjs-examples/releases/latest/download/chatbot-integration.google-gemini.zip).
1621
2. Replace `<APP_ID>` and `<TALKJS_SECRET_KEY>` in `index.html` and `server.js` with the values found in your [TalkJS dashboard](https://talkjs.com/dashboard/login).
1722
3. Replace `<GEMINI_SECRET_KEY>` with your Anthropic API key
1823
4. Enable the `message.sent` option in the **Webhooks** section of the TalkJS dashboard.

chatbot-integration/openai-chatgpt/README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
# How to integrate a chatbot into your TalkJS chat with the OpenAI API
2+
13
This is an example project for TalkJS's tutorial on [How to integrate a chatbot into your TalkJS chat with the OpenAI API](https://talkjs.com/resources/how-to-make-a-customizable-chatbot-frontend-with-talkjs-and-the-openai-api/).
24

35
The project uses TalkJS webhooks to listen for new message events from the TalkJS server, calls the OpenAI API to generate a message reply, and then adds the reply to the conversation with the TalkJS API.
46

7+
> [!TIP]
8+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/chatbot-integration.openai-chatgpt.zip)
9+
510
## Prerequisites
611

712
To run this tutorial, you will need:
@@ -14,7 +19,7 @@ To run this tutorial, you will need:
1419

1520
## How to run the tutorial
1621

17-
1. Clone or download the project.
22+
1. Clone or [download this project](https://github.com/talkjs/talkjs-examples/releases/latest/download/chatbot-integration.openai-chatgpt.zip).
1823
2. Replace `<APP_ID>` and `<TALKJS_SECRET_KEY>` in `index.html` and `server.js` with the values found in your [TalkJS dashboard](https://talkjs.com/dashboard/login).
1924
3. Replace `<OPENAI_SECRET_KEY>` with your OpenAI API key
2025
4. Enable the `message.sent` option in the **Webhooks** section of the TalkJS dashboard.

csharp/blazor_talkjs/README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
# TalkJS and Blazor integration tutorial example
1+
# TalkJS and Blazor example
22

33
This is an example project for TalkJS's tutorial on [how to integrate TalkJS with a Blazor app](https://talkjs.com/resources/how-to-add-chat-to-a-blazor-web-app-with-talkjs/).
44

55
This example demonstrates how to integrate TalkJS with a Blazor web application. There is one project present inside the repo:
66

77
- The `Blazor Web App` Interactive Server project which uses TalkJS's [JavaScript SDK](https://talkjs.com/docs/Getting_Started/JavaScript_SDK) to create a one on one chat.
88

9+
> [!TIP]
10+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/csharp.blazor_talkjs.zip)
11+
912
## Prerequisites
1013

1114
To run this tutorial project, you will need:
@@ -14,7 +17,7 @@ To run this tutorial project, you will need:
1417
- .NET 8 [SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
1518
- A code editor like [Visual Studio Code](https://code.visualstudio.com/download) or IDE like [Visual Studio](https://visualstudio.microsoft.com/vs/community/)
1619

17-
1. Clone or download the project.
20+
1. Clone or [download this project](https://github.com/talkjs/talkjs-examples/releases/latest/download/csharp.blazor_talkjs.zip).
1821
1. Open the project in your code editor or IDE.
1922
1. In the `Home.razor` page, replace `<APP_ID>` in the `AppId` string property with your App Id which can be found in the **Settings** tab of your [TalkJS dashboard](https://talkjs.com/dashboard/login).
2023
1. From the `blazor_talkjs` directory, run the command `dotnet watch` to render your project on the browser.

django/django_talkjs/README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
This is an example project for TalkJS's tutorial on [how to build a Django chat app with TalkJS](https://talkjs.com/resources/how-to-build-a-django-chat-app-with-talkjs/). This example demonstrates how to integrate TalkJS with a Python application that uses the Django framework.
44

5+
> [!TIP]
6+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/django.django_talkjs.zip)
7+
58
## Prerequisites
69

710
To run this tutorial, you will need:
@@ -11,7 +14,7 @@ To run this tutorial, you will need:
1114

1215
## How to run the tutorial
1316

14-
1. Clone or download the project.
17+
1. Clone or [download this project](https://github.com/talkjs/talkjs-examples/releases/latest/download/django.django_talkjs.zip).
1518
2. Replace `<APP_ID>` in `talkjs/templates/talkjs/chat.html` with the value found in the **Settings** tab of your [TalkJS dashboard](https://talkjs.com/dashboard/login).
1619
3. Install Django:
1720
```bash

django/gameschat/README.md

+10-13
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
1-
# Games Chat App with Django and TalkJS
1+
# Games chat app with Django and TalkJS
22

3-
## Context
43
This directory contains two games chat applications: one with and one without TalkJS integrated.
54

65
The application without chat functionality serves as a start application for the TalkJS implementation tutorial, in which chat functionalities are being added within a project. The final product of the tutorial is the games chat application with chat functionality.
76

8-
## First things first
7+
You can find additional information in the tutorial [How to add chat to a Django app with TalkJS](https://talkjs.com/tutorials/article/how-to-add-direct-messaging-to-a-discussion-forum-with-django-and-talkjs/).
98

10-
### Python version
11-
Make sure you're working with Python 3.7.4 or above.
12-
You can download it from [here](https://www.python.org/).
9+
> [!TIP]
10+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/django.gameschat.zip)
1311
14-
Make sure you tick the box that says 'Add Python to PATH'.
12+
## Prerequisites
1513

16-
### PostgreSQL version
17-
Make sure you're working with PostgreSQL 11.6 or above.
18-
You can download it from [here](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads).
19-
20-
Through the installation you will be asked to enter a password for your database. In this example the password `gameschat` is used, but you can write whatever you want, just make sure to remember it because you will need it later.
14+
- **Python version:** Make sure you're working with Python 3.7.4 or above. You can download it from [here](https://www.python.org/). Make sure you tick the box that says 'Add Python to PATH'.
15+
- **PostgreSQL version:** Make sure you're working with PostgreSQL 11.6 or above. You can download it from [here](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads). You'll be asked to enter a password for your database. In this example the password `gameschat` is used, but you can write whatever you want. Just make sure to remember your password because you'll need it later.
2116

2217
## Getting started
18+
2319
The following steps should be executed in either the ```gameschat-with-talkjs``` or ```gameschat-without-talkjs``` directory.
2420

2521
- After the installation of PostgreSQL is done, start the `pgAdmin` which will open the database in your browser. Enter the password you chose during the installation. Expand the Servers section from the `Browser` on the right (if asked enter the same password again). Right click on `Databases->Create->Database...`, then enter the name you want and click `Save`.
@@ -39,7 +35,8 @@ The following steps should be executed in either the ```gameschat-with-talkjs```
3935

4036
- After you've cloned/downloaded the repository, open the terminal in the project's directory and write `pip install -r requirements.txt`. After the installation is done, write `python manage.py migrate`. Lastly, write `python manage.py runserver`, this will start the server on port 8000. Go ahead and write the following in your browser `http://localhost:8000`.
4137

42-
Good job! Additional information can be found in the [tutorial](https://talkjs.com/tutorials/article/how-to-add-direct-messaging-to-a-discussion-forum-with-django-and-talkjs/) of this application.
38+
Good job!
4339

4440
## Documentation
41+
4542
For more information on how to integrate TalkJS into your projects, check out our [documentation](https://talkjs.com/docs/?ref=gh-example-readme).

flask/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ This is an example project for TalkJS's tutorial on [how to build a Flask chat a
44

55
This example demonstrates how to integrate TalkJS with a Python application that uses the Flask framework. There are two projects present inside the repo:
66

7-
- The `talkjs-flask-python` project contains the Flask backend, which serves a REST endpoint with user data.
8-
- The `talkjs-frontend` project contains the frontend code, which uses TalkJS's [JavaScript SDK](https://talkjs.com/docs/Reference/JavaScript_Chat_SDK/) to create chats between users.
7+
- `talkjs-flask-python`: This project contains the Flask backend, which serves a REST endpoint with user data. [Download `talkjs-flask-python` as a zip file.](https://github.com/talkjs/talkjs-examples/releases/latest/download/flask.talkjs-flask-python.zip)
8+
- `talkjs-frontend`: This project contains the frontend code, which uses TalkJS's [JavaScript SDK](https://talkjs.com/docs/Reference/JavaScript_Chat_SDK/) to create chats between users. [Download `talkjs-frontend` as a zip file.](https://github.com/talkjs/talkjs-examples/releases/latest/download/flask.talkjs-frontend.zip)
99

1010
## Prerequisites
1111

@@ -16,7 +16,7 @@ To run this tutorial, you will need:
1616

1717
## How to run the tutorial
1818

19-
1. Clone or download the project.
19+
1. Clone or download the project (as zip files: [`talkjs-flask-python`](https://github.com/talkjs/talkjs-examples/releases/latest/download/flask.talkjs-flask-python.zip) and [`talkjs-frontend`](https://github.com/talkjs/talkjs-examples/releases/latest/download/flask.talkjs-frontend.zip)).
2020
1. From the `talkjs-flask-python` directory:
2121
1. Run `pip install flask` and `pip install flask-cors` to install the dependencies
2222
1. Run `python3 flask-python.py` to run the project

flutter_sdk/README.md

+15-25
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# TalkJS Flutter SDK example
1+
# TalkJS and Flutter example
22

3-
An example project that shows both the ChatBox and ConversationList widgets of TalkJS
3+
An example project that shows both the [ChatBox](https://talkjs.com/docs/Reference/Flutter_SDK/Widgets/Chatbox/) and [ConversationList](https://talkjs.com/docs/Reference/Flutter_SDK/Widgets/ConversationList/) widgets of TalkJS.
44

5-
## Getting Started
5+
> [!TIP]
6+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/flutter_sdk.basic-example.zip)
7+
8+
## Getting started
69

710
The first thing to do is to install all the dependencies with the command:
811

@@ -12,8 +15,7 @@ flutter pub get
1215

1316
This is to be done only once.
1417

15-
After that, change in the `lib/main.dart` file the 'YOUR_APP_ID' string with a
16-
valid appId.
18+
After that, change in the `lib/main.dart` file the 'YOUR_APP_ID' string with a valid appId.
1719

1820
Finally, connect an Android/iOS device or emulator and run:
1921

@@ -27,29 +29,17 @@ to run the example.
2729

2830
This example uses the 'provider' package to manage a global app state.
2931

30-
The `MyAppState` class has a `session` and a `conversation` properties, that
31-
are used by the ChatBox and ConversationList widgets.
32+
The `MyAppState` class has a `session` and a `conversation` properties, that are used by the ChatBox and ConversationList widgets.
3233

33-
The `conversation` property is in reality a getter and setter pair, in order
34-
to call the `notifyListeners()` functions whenever the `conversation` property
35-
is changed.
34+
The `conversation` property is in reality a getter and setter pair, in order to call the `notifyListeners()` functions whenever the `conversation` property is changed.
3635

37-
In our `main()` function the TalkJS Session is initialized, and is used as the
38-
global app state.
36+
In our `main()` function the TalkJS Session is initialized, and is used as the global app state.
3937

4038
The app has 3 routes:
41-
'/' contains the buttons to select either a ChatBox or ConversationList
42-
'/chatbox' is the ChatBox screen, and finally
43-
'/conversationlist' is the ConversationList screen.
44-
45-
The ChatBoxScreen uses Consumer<MyAppState> in order to get the global session
46-
and conversation objects, and be able to rebuild itself whenever the global
47-
state changes.
39+
- '/' contains the buttons to select either a ChatBox or ConversationList
40+
- '/chatbox' is the ChatBox screen, and finally
41+
- '/conversationlist' is the ConversationList screen.
4842

49-
The ConversationList has an event called `onSelectConversation` that is
50-
triggered when the user clicks on a conversation.
51-
When the event is triggered, a new `Conversation` object is built, using the
52-
`id` ov the selected conversation, then this object is assigned to the global
53-
app state, and finally we navigate to the '/chatbox' route to show a ChatBox
54-
widget with the selected conversation.
43+
The ChatBoxScreen uses Consumer<MyAppState> in order to get the global session and conversation objects, and be able to rebuild itself whenever the global state changes.
5544

45+
The ConversationList has an event called `onSelectConversation` that is triggered when the user clicks on a conversation. When the event is triggered, a new `Conversation` object is built, using the `id` of the selected conversation, then this object is assigned to the global app state, and finally we navigate to the '/chatbox' route to show a ChatBox widget with the selected conversation.

0 commit comments

Comments
 (0)