> ## Documentation Index
> Fetch the complete documentation index at: https://social-b97141fb-auto-generate-llmstxt.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# TypeScript

> Get up and running with social.plus TypeScript SDK for web applications in minutes.

Get your web application connected to social.plus in just a few steps. This guide covers everything from installation to your first authenticated session.

## Requirements

### Browser Support

* Chrome 38+
* Firefox 42+
* Safari 9+
* Microsoft Edge 13+
* Opera 25+

<Warning>
  Internet Explorer 11 is not supported. The SDK requires modern browser features.
</Warning>

### Framework Compatibility

<CardGroup cols={2}>
  <Card title="React Applications" icon="react">
    * Create React App
    * Next.js (client-side)
    * Vite React
    * Custom React setups
  </Card>

  <Card title="Vue Applications" icon="vuejs">
    * Vue 3 composition API
    * Vue 2 options API
    * Nuxt.js (client-side)
    * Vite Vue
  </Card>

  <Card title="Angular Applications" icon="angular">
    * Angular 12+
    * Angular CLI projects
    * Nx workspaces
    * Custom Angular setups
  </Card>

  <Card title="Other Frameworks" icon="browsers">
    * React Native
    * Svelte/SvelteKit
    * Solid.js
    * Lit Framework
  </Card>
</CardGroup>

## Installation

<Tabs>
  <Tab title="npm">
    ```bash theme={null}
    npm install @amityco/ts-sdk --save
    ```
  </Tab>

  <Tab title="yarn">
    ```bash theme={null}
    yarn add @amityco/ts-sdk
    ```
  </Tab>

  <Tab title="pnpm">
    ```bash theme={null}
    pnpm add @amityco/ts-sdk
    ```
  </Tab>
</Tabs>

## Parameters

| Operation      | Parameter      | Required | Description                                                                         |
| -------------- | -------------- | -------- | ----------------------------------------------------------------------------------- |
| Initialize SDK | API key        | Yes      | Application API key from the social.plus Console.                                   |
| Initialize SDK | Region         | Yes      | Region string passed to `Client.createClient`, such as `us`, `eu`, or `sg`.         |
| Initialize SDK | Client options | No       | Optional TypeScript client configuration, such as custom endpoints where supported. |

## Initialize the SDK

Create the client with your API key and region so the SDK is ready for authentication.

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { Client } from '@amityco/ts-sdk';

  const client = Client.createClient('YOUR_API_KEY', 'sg');
  ```
</CodeGroup>

<Info>
  This creates the SDK client but does not yet authenticate a user. See [Authentication](/social-plus-sdk/getting-started/authentication) for the next step.
</Info>

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication Guide" icon="shield-check" href="/social-plus-sdk/getting-started/authentication">
    Learn about session management and secure authentication flows
  </Card>

  <Card title="Chat Features" icon="message" href="/social-plus-sdk/chat/overview">
    Start building chat and messaging features
  </Card>

  <Card title="Social Features" icon="users" href="/social-plus-sdk/social/README">
    Add posts, feeds, and social interactions
  </Card>

  <Card title="Video Streaming" icon="video" href="/social-plus-sdk/video-new/broadcasting/overview">
    Implement live video and streaming features
  </Card>
</CardGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Installation Issues" icon="wrench">
    **Module not found**: Make sure you've installed the package correctly with your package manager

    **TypeScript errors**: Ensure you're using TypeScript 3.7+ and have proper type definitions

    **Build errors**: Check that your bundler supports ES6 modules and async/await
  </Accordion>

  <Accordion title="Runtime Issues" icon="bug">
    **Network failures**: Verify your API key and region settings

    **Authentication errors**: Check that your auth token is valid and not expired

    **Memory leaks**: Always call `Client.logout()` when your app unmounts
  </Accordion>

  <Accordion title="Platform-Specific Issues" icon="globe">
    **Older browsers**: Make sure you've included the required polyfills

    **Safari issues**: Ensure you're using HTTPS in production (required for WebRTC features)
  </Accordion>
</AccordionGroup>
