diff --git a/src/components/Layout/mdx/tiles.tsx b/src/components/Layout/mdx/tiles.tsx index a4d50b48b4..47616d0887 100644 --- a/src/components/Layout/mdx/tiles.tsx +++ b/src/components/Layout/mdx/tiles.tsx @@ -32,7 +32,7 @@ const Tile = ({ title, description, image, link = '/docs' }: TileProps) => { export const Tiles = ({ children }: { children: TileProps[] }) => { return ( -
{text}
); diff --git a/src/components/SDKsPage/data.ts b/src/components/SDKsPage/data.ts index 50b0ae8cb1..ece22c0aa7 100644 --- a/src/components/SDKsPage/data.ts +++ b/src/components/SDKsPage/data.ts @@ -2,6 +2,7 @@ import js from './images/js.svg'; import java from './images/java.svg'; import python from './images/python.svg'; import react from './images/react.svg'; +import reactnative from './images/reactnative.svg'; import csharp from './images/csharp.svg'; import go from './images/go.svg'; import nodejs from './images/nodejs.svg'; @@ -33,155 +34,139 @@ export const data = { title: 'JavaScript', text: 'Ably SDK for JavaScript.', image: { src: js, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-js', - setupLink: 'getting-started/setup?lang=javascript', + setupLink: 'getting-started/javascript', }, { title: 'Java', text: 'Ably SDK for Java.', image: { src: java, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-java', - setupLink: 'getting-started/setup?lang=java', + setupLink: 'getting-started/java', }, { title: 'Python', text: 'Ably SDK for Python.', image: { src: python, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-python', - setupLink: 'getting-started/setup?lang=python', + setupLink: 'getting-started/python', }, { title: 'React', text: 'Ably React Hooks package.', image: { src: react, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-js', - setupLink: 'getting-started/react-hooks', + setupLink: 'getting-started/react', + }, + { + title: 'React Native', + text: 'Ably React Native SDK.', + image: { src: reactnative, isWide: false }, + setupLink: 'getting-started/react-native', }, { title: 'C#.NET', text: 'Ably SDK for C#.NET.', image: { src: csharp, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-dotnet', - setupLink: 'getting-started/setup?lang=csharp', + setupLink: 'getting-started/dotnet', }, { title: 'Go', text: 'Ably SDK for Go.', image: { src: go, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-go', - setupLink: 'getting-started/setup?lang=go', + setupLink: 'getting-started/go', }, { title: 'Node.js', text: 'Ably SDK for Node.js.', image: { src: nodejs, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-js', - setupLink: 'getting-started/setup?lang=nodejs', + setupLink: 'getting-started/node', }, { title: 'Ruby', text: 'Ably SDK for Ruby.', image: { src: ruby, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-ruby', - setupLink: 'getting-started/setup?lang=ruby', + setupLink: 'getting-started/ruby', }, { title: 'Swift', text: 'Ably SDK for Swift.', image: { src: swift, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-cocoa', - setupLink: 'getting-started/setup?lang=swift', + setupLink: 'getting-started/swift', }, { title: 'Objective-C', text: 'Ably SDK for Objective-C.', image: { src: objectivec, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-cocoa', - setupLink: 'getting-started/setup?lang=objc', + setupLink: 'getting-started/objective-c', }, { title: 'Flutter', text: 'Ably SDK for Flutter.', image: { src: flutter, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-flutter', - setupLink: 'getting-started/setup?lang=flutter', + setupLink: 'getting-started/flutter', }, { title: 'PHP', text: 'Ably SDK for PHP.', image: { src: php, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-php', - setupLink: 'getting-started/setup?lang=php', + setupLink: 'getting-started/php', }, { title: 'PHP Laravel', text: 'Ably SDK for PHP Laravel.', image: { src: laravel, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-php#laravel-realtime-broadcasting', - setupLink: 'https://github.com/ably/ably-php#laravel-realtime-broadcasting', + setupLink: 'getting-started/laravel', }, { title: 'Android', text: 'Ably SDK for Android.', image: { src: android, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-java', - setupLink: 'getting-started/setup?lang=java', + setupLink: 'getting-started/kotlin', }, { title: 'Kotlin', text: 'Ably SDK for Kotlin.', image: { src: kotlin, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-java', - setupLink: 'getting-started/setup?lang=java', + setupLink: 'getting-started/kotlin', }, { title: 'Unity', text: 'Ably SDK for Unity.', image: { src: unity, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-dotnet', setupLink: 'https://github.com/ably/ably-dotnet/blob/main/unity/README.md', }, { title: 'Xamarin', text: 'Ably SDK for Xamarin.', image: { src: xamarin, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-dotnet', - setupLink: 'getting-started/setup?lang=csharp', + setupLink: 'getting-started/dotnet', }, { title: 'NativeScript', text: 'Ably SDK for NativeScript.', image: { src: nativescript, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-js-nativescript', setupLink: 'https://github.com/ably/ably-js-nativescript#how-to-use-this-library', }, { title: 'React Native', text: 'Ably SDK for React Native.', image: { src: react, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-js', - setupLink: 'getting-started/react-hooks', + setupLink: 'getting-started/react-native', }, { title: 'Cordova', text: 'Ably SDK for Cordova.', image: { src: cordova, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-js', - setupLink: 'getting-started/setup?lang=javascript', + setupLink: 'getting-started/javascript', }, { title: 'Clojure', text: 'Ably SDK for Clojure.', image: { src: clojure, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-java', - setupLink: 'getting-started/setup?lang=java', + setupLink: 'getting-started/java', }, { title: 'Scala', text: 'Ably SDK for Scala.', image: { src: scala, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-java', - setupLink: 'getting-started/setup?lang=java', + setupLink: 'getting-started/java', }, ], }, @@ -192,14 +177,12 @@ export const data = { title: 'JavaScript', text: 'Ably Spaces SDK for JavaScript.', image: { src: js, isWide: false }, - githubRepoURL: 'https://github.com/ably/spaces', setupLink: 'spaces/setup', }, { title: 'React', text: 'Ably Spaces React Hooks package.', image: { src: react, isWide: false }, - githubRepoURL: 'https://github.com/ably/spaces', setupLink: 'spaces/react', }, ], @@ -211,29 +194,25 @@ export const data = { title: 'JavaScript', text: 'Ably Chat SDK for JavaScript.', image: { src: js, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-chat-js', - setupLink: 'chat/setup?lang=javascript', + setupLink: 'chat/getting-started/javascript', }, { title: 'React', text: 'Ably Chat React Hooks package.', image: { src: react, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-chat-js', - setupLink: 'chat/setup?lang=react', + setupLink: 'chat/getting-started/react', }, { title: 'Swift', text: 'Ably Chat SDK for Swift.', image: { src: swift, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-chat-swift', - setupLink: 'chat/setup?lang=swift', + setupLink: 'chat/getting-started/swift', }, { title: 'Kotlin', text: 'Ably Chat SDK for Kotlin.', image: { src: kotlin, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-chat-kotlin', - setupLink: 'chat/setup?lang=kotlin', + setupLink: 'chat/getting-started/kotlin', }, ], }, @@ -244,21 +223,18 @@ export const data = { title: 'JavaScript', text: 'LiveObjects plugin for JavaScript.', image: { src: js, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-js', setupLink: 'liveobjects/quickstart/javascript', }, { title: 'Swift', text: 'LiveObjects plugin for Swift.', image: { src: swift, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-liveobjects-swift-plugin', setupLink: 'liveobjects/quickstart/swift', }, { title: 'Java', text: 'LiveObjects plugin for Java.', image: { src: java, isWide: false }, - githubRepoURL: 'https://github.com/ably/ably-java/tree/main/liveobjects', setupLink: 'liveobjects/quickstart/java', }, ], @@ -270,8 +246,7 @@ export const data = { title: 'JavaScript', text: 'Ably Models SDK for JavaScript.', image: { src: js, isWide: false }, - githubRepoURL: 'https://github.com/ably-labs/models', - setupLink: 'livesync/postgres/models', + setupLink: 'livesync/postgres/quickstart', }, ], }, diff --git a/src/components/SDKsPage/images/reactnative.svg b/src/components/SDKsPage/images/reactnative.svg new file mode 100644 index 0000000000..191e173e49 --- /dev/null +++ b/src/components/SDKsPage/images/reactnative.svg @@ -0,0 +1,4 @@ + diff --git a/src/data/nav/chat.ts b/src/data/nav/chat.ts index 6d4f842e2c..b5cdc3313a 100644 --- a/src/data/nav/chat.ts +++ b/src/data/nav/chat.ts @@ -19,6 +19,11 @@ export default { { name: 'Getting started', pages: [ + { + name: 'Overview', + link: '/docs/chat/getting-started', + index: true, + }, { name: 'JavaScript', link: '/docs/chat/getting-started/javascript', diff --git a/src/data/nav/pubsub.ts b/src/data/nav/pubsub.ts index 7c66eea192..efd127b762 100644 --- a/src/data/nav/pubsub.ts +++ b/src/data/nav/pubsub.ts @@ -86,10 +86,6 @@ export default { }, ], }, - { - name: 'SDK setup', - link: '/docs/getting-started/setup', - }, { name: 'React Hooks', link: '/docs/getting-started/react-hooks', diff --git a/src/pages/docs/chat/getting-started/index.mdx b/src/pages/docs/chat/getting-started/index.mdx new file mode 100644 index 0000000000..3abc541719 --- /dev/null +++ b/src/pages/docs/chat/getting-started/index.mdx @@ -0,0 +1,69 @@ +--- +title: "Getting started with Chat" +meta_description: "Getting started with Ably Chat in your language or framework of choice. Learn how to send and receive messages, track online presence, fetch message history, implement typing indicators, among other features." +meta_keywords: "Chat, Ably Chat SDKs, realtime messaging, send and receive messages, getting started guides, realtime communication, Ably tutorial, message history, presence and occupancy APIs, Ably CLI Chat" +--- + +Getting started with Ably Chat by choosing your language or framework. + +You'll learn the essentials of building realtime chat applications, including how to create and manage chat rooms, send and edit messages, implement typing indicators, track user presence, retrieve message history, and send ephemeral reactions. You'll also discover how to use the Ably CLI for testing chat functionality and manage your chat applications through your Ably dashboard. + +## Getting started guides + +These are your first steps towards building a Chat application that can effortlessly scale to serve millions of users. + +
-```javascript
-
-```
-
-
-```shell
-npm install ably
-```
-
-
-```shell
-# Install the gem
-gem install ably
-
-# To use the REST-only SDK
-gem install ably-rest
-```
-
-
-
-```ruby
-# Add the gem to your Gemfile
-gem 'ably'
-
-# To use the REST-only SDK
-gem 'ably-rest'
-```
-
-
-```java
-// For Java applications
-dependencies {
- implementation 'io.ably:ably-java:1.2.40'
-}
-
-repositories {
- mavenCentral()
-}
-
-// For Android applications
-dependencies {
- implementation 'io.ably:ably-android:1.2.40'
-}
-
-repositories {
- mavenCentral()
-}
-```
-
-
-```shell
-dotnet add package ably.io --version [version]
-```
-
-
-
-```text
-PM> Install-Package ably.io
-```
-
-
-```text
-pod 'Ably'
-```
-
-
-
-```shell
-pod install
-```
-
-
-```text
-pod 'Ably'
-```
-
-
-
-```shell
-pod install
-```
-
-
-```text
-# ...
-ably_flutter: [version]
-# ...
-```
-
-
-
-```flutter
-import 'package:ably_flutter/ably_flutter.dart' as ably;
-```
-
-
-```go
-go get -u github.com/ably/ably-go/ably
-```
-
-
-
-```go
-import (
- "context"
- "fmt"
- "github.com/ably/ably-go/ably"
-)
-```
-
-
-```shell
-pip install ably
-```
-
-
-```shell
-composer require ably/ably-php --update-no-dev
-```
-
-
-
-```php
-require_once __DIR__ . '/../vendor/autoload.php';
-```
-
-
-```realtime_javascript
-const Ably = require('ably');
-const realtime = new Ably.Realtime({ key: apiKey });
-```
-
-```realtime_nodejs
-const Ably = require('ably');
-const realtime = new Ably.Realtime({ key: apiKey });
-```
-
-```realtime_ruby
-EventMachine.run do
- ably = Ably::Realtime.new(key: api_key)
-end
-```
-
-```realtime_java
-import io.ably.lib.types.*;
-import io.ably.lib.realtime.*;
-ClientOptions options = new ClientOptions(apiKey);
-AblyRealtime realtime = new AblyRealtime(options);
-```
-
-```realtime_csharp
-using IO.Ably;
-using IO.Ably.Realtime;
-ClientOptions clientOptions = new ClientOptions("");
-AblyRealtime realtime = new AblyRealtime(clientOptions);
-```
-
-```realtime_objc
-ARTRealtime realtime = [[ARTRealtime alloc] initWithKey:apiKey];
-```
-
-```realtime_swift
-let realtime = ARTRealtime(key: apiKey)
-```
-
-```realtime_flutter
-final clientOptions = ably.ClientOptions(key: '');
-ably.Realtime realtime = ably.Realtime(options: clientOptions);
-```
-
-```realtime_go
-client, err := ably.NewRealtime(ably.WithKey("apiKey"))
-if err != nil {
- panic(err)
-}
-```
-
-```realtime_python
-import asyncio
-from ably import AblyRealtime
-
-client = AblyRealtime(api_key)
-```
-
-```rest_javascript
-const Ably = require('ably');
-var rest = new Ably.Rest({ key: apiKey });
-```
-
-```rest_nodejs
-var Ably = require('ably');
-var rest = new Ably.Rest({ key: apiKey });
-```
-
-```rest_ruby
-ably = Ably::Rest.new(key: api_key)
-```
-
-```rest_java
-import io.ably.lib.types.*;
-import io.ably.lib.rest.*;
-ClientOptions options = new ClientOptions(apiKey);
-AblyRest rest = new AblyRest(options);
-```
-
-```rest_csharp
-using IO.Ably;
-ClientOptions clientOptions = new ClientOptions(ApiKey);
-AblyRest rest = new AblyRest(clientOptions);
-```
-
-```rest_objc
-ARTRest rest = [[ARTRest alloc] initWithKey:apiKey];
-```
-
-```rest_swift
-let rest = ARTRest(key: apiKey)
-```
-
-```rest_flutter
-final clientOptions = ably.ClientOptions(key: '');
-ably.Rest rest = ably.Rest(options: clientOptions);
-```
-
-```rest_go
-client, err := ably.NewREST(ably.WithKey("apiKey"))
-if err != nil {
- panic(err)
-}
-```
-
-```rest_python
-import asyncio
-from ably import AblyRest
-
-client = AblyRest(api_key)
-```
-
-```rest_php
-$ably = new Ably\AblyRest(apiKey);
-```
-
-
-## Client options
-
-`ClientOptions` enable the client connection to be configured when instantiating the client.
-
-Properties that can be set include those used to:
-
-* authenticate the client, such as `key` if using [basic authentication](/docs/auth/basic), or an `authUrl` or `authCallback` if using [token authentication](/docs/auth/token).
-* customize client behavior, such as using `echoMessages` to set whether messages published by the client are received by them, or `idempotentRestPublishing` to enable idempotent publishing.
-* set retry and timeout durations.
-* set environment names and fallbacks if using a [custom environment](/docs/platform/account/enterprise-customization).
-
-See the API references for a full list of properties available to the [realtime](/docs/api/realtime-sdk#client-options) and [REST](/docs/api/rest-sdk?#client-options) interfaces.