Skip to content

Commit 8fd89e7

Browse files
committed
chore: cleanup the guides
1 parent ef1eea3 commit 8fd89e7

File tree

3 files changed

+247
-262
lines changed

3 files changed

+247
-262
lines changed

contributing-guide/mobile-app/setup-guide.mdx

Lines changed: 2 additions & 234 deletions
Original file line numberDiff line numberDiff line change
@@ -115,241 +115,9 @@ pnpm install package-name
115115

116116
## Push notifications
117117

118-
Chatwoot supports mobile push notifications through Firebase Cloud Messaging (FCM). There are two delivery paths depending on your setup:
118+
If you are using the community edition of Chatwoot with the [official mobile app](https://www.chatwoot.com/mobile-apps), push notifications work out of the box with no additional configuration.
119119

120-
- **Relay server (default)**: Self-hosted instances without Firebase credentials route notifications through the Chatwoot relay server, which forwards them to the **official Chatwoot mobile app**.
121-
- **Direct FCM**: Instances with Firebase configured send notifications directly to your **custom-built mobile app**.
122-
123-
<Note>
124-
You must use either the official apps for both platforms or custom builds for both — mixing is not supported. For more details, refer to the [push notification documentation](https://www.chatwoot.com/hc/handbook/articles/1687935909-push-notification).
125-
</Note>
126-
127-
### Using the official mobile app
128-
129-
If you are using the community edition of Chatwoot with the [official mobile app](https://www.chatwoot.com/mobile-apps), push notifications work out of the box with no additional configuration. The relay server is enabled by default (`ENABLE_PUSH_RELAY_SERVER=true`).
130-
131-
### Setting up Firebase for custom builds
132-
133-
If you are building a custom-branded mobile app, you need to configure Firebase on both the mobile app and the Chatwoot server.
134-
135-
#### Step 1: Create a Firebase project
136-
137-
1. Go to the [Firebase Console](https://console.firebase.google.com/) and create a new project (or use an existing one).
138-
2. Register your Android app with your package name (e.g., `com.yourcompany.app`).
139-
3. Register your iOS app with your bundle identifier (e.g., `com.yourcompany.app`).
140-
141-
#### Step 2: Download Firebase config files
142-
143-
Download the platform-specific configuration files from your Firebase project settings:
144-
145-
<Tabs>
146-
<Tab title="Android">
147-
1. In **Project Settings > General**, find your Android app and click **Download google-services.json**.
148-
2. Place the file in the root of the mobile app repository.
149-
</Tab>
150-
<Tab title="iOS">
151-
1. In **Project Settings > General**, find your iOS app and click **Download GoogleService-Info.plist**.
152-
2. Place the file in the root of the mobile app repository.
153-
</Tab>
154-
</Tabs>
155-
156-
#### Step 3: Configure mobile app environment variables
157-
158-
Update your `.env` file to point to the Firebase config files:
159-
160-
```bash
161-
EXPO_PUBLIC_ANDROID_GOOGLE_SERVICES_FILE=./google-services.json
162-
EXPO_PUBLIC_IOS_GOOGLE_SERVICES_FILE=./GoogleService-Info.plist
163-
```
164-
165-
Then regenerate the native code so the new config is picked up:
166-
167-
```bash
168-
pnpm generate
169-
```
170-
171-
#### Step 4: Generate a Firebase service account
172-
173-
The Chatwoot server needs a service account to send push notifications via the FCM v1 API.
174-
175-
1. In the Firebase Console, go to **Project Settings > Service accounts**.
176-
2. Click **Generate new private key** to download a JSON credentials file.
177-
178-
<Warning>
179-
Keep this file secure. It grants access to send push notifications on behalf of your Firebase project.
180-
</Warning>
181-
182-
#### Step 5: Configure the Chatwoot server
183-
184-
In your Chatwoot installation, navigate to **Super Admin > App Config** and set the following:
185-
186-
| Config key | Value |
187-
| ----------------------- | --------------------------------------------------------- |
188-
| `FIREBASE_PROJECT_ID` | Your Firebase project ID (e.g., `my-project-12345`) |
189-
| `FIREBASE_CREDENTIALS` | The full contents of the service account JSON file |
190-
191-
Once both values are set, the server will send push notifications directly to FCM instead of using the relay server.
192-
193-
#### Verifying the setup
194-
195-
1. Build and install the custom app on a device (`pnpm run:ios` or `pnpm run:android`).
196-
2. Log in to your Chatwoot instance from the mobile app.
197-
3. From another browser session, send a message to a conversation assigned to the logged-in agent.
198-
4. The device should receive a push notification.
199-
200-
<Note>
201-
Push notifications do not work on iOS simulators. You must use a physical device to test.
202-
</Note>
203-
204-
## Deep linking
205-
206-
Deep linking allows users to tap a Chatwoot conversation URL (or a push notification) and be taken directly to that conversation in the mobile app. The app supports two mechanisms:
207-
208-
- **Custom URL scheme**: `chatwootapp://` — used for SSO callbacks and internal routing.
209-
- **Universal Links (iOS) / App Links (Android)**: `https://<your-domain>/app/accounts/*/conversations/*` — used for opening web URLs directly in the app.
210-
211-
### How it works
212-
213-
When the app receives a deep link, React Navigation matches it against the configured path pattern and navigates to the conversation screen:
214-
215-
```
216-
https://<your-domain>/app/accounts/{accountId}/conversations/{conversationId}
217-
```
218-
219-
This works across all app states — whether the app is in the foreground, backgrounded, or was terminated. Push notification taps also use this same flow to navigate to the relevant conversation.
220-
221-
### Configuring deep links for custom builds
222-
223-
If you are building a custom-branded app with your own domain, you need to configure both the mobile app and the Chatwoot server so that deep links resolve correctly.
224-
225-
#### Mobile app configuration
226-
227-
The app uses Expo's built-in deep linking support. In `app.config.ts`, update the following to match your domain and bundle identifiers:
228-
229-
<Tabs>
230-
<Tab title="iOS">
231-
232-
Update the [associated domain](https://docs.expo.dev/linking/ios-universal-links/) to your Chatwoot installation URL:
233-
234-
```typescript
235-
ios: {
236-
associatedDomains: ['applinks:your-domain.com'],
237-
}
238-
```
239-
240-
Expo prebuild writes this into the `.entitlements` file automatically.
241-
242-
</Tab>
243-
<Tab title="Android">
244-
245-
Update the [intent filter](https://docs.expo.dev/linking/android-app-links/) host to your Chatwoot installation URL:
246-
247-
```typescript
248-
android: {
249-
intentFilters: [
250-
{
251-
action: 'VIEW',
252-
autoVerify: true,
253-
data: [
254-
{
255-
scheme: 'https',
256-
host: 'your-domain.com',
257-
pathPrefix: '/app/accounts/',
258-
},
259-
],
260-
category: ['BROWSABLE', 'DEFAULT'],
261-
},
262-
],
263-
}
264-
```
265-
266-
Expo prebuild writes this into the `AndroidManifest.xml` automatically.
267-
268-
</Tab>
269-
</Tabs>
270-
271-
After making changes, regenerate the native code:
272-
273-
```bash
274-
pnpm generate
275-
```
276-
277-
#### Server configuration
278-
279-
The Chatwoot server dynamically serves the verification files that Android and iOS require to confirm your app owns the domain. Configure the following environment variables on your Chatwoot installation:
280-
281-
<Tabs>
282-
<Tab title="iOS">
283-
284-
The server serves an `apple-app-site-association` file at `https://<your-domain>/.well-known/apple-app-site-association`. No additional configuration is needed beyond ensuring your Chatwoot installation is accessible at the domain specified in `associatedDomains`.
285-
286-
</Tab>
287-
<Tab title="Android">
288-
289-
Set the following environment variables with your app's package name and signing certificate fingerprint:
290-
291-
```bash
292-
ANDROID_BUNDLE_ID=com.yourcompany.app
293-
ANDROID_SHA256_CERT_FINGERPRINT=YOUR:SHA256:CERT:FINGERPRINT
294-
```
295-
296-
This is served at `https://<your-domain>/.well-known/assetlinks.json` and tells Android to open matching URLs in your app.
297-
298-
To obtain your SHA-256 certificate fingerprint, run:
299-
300-
```bash
301-
keytool -list -v -keystore your-keystore.jks -alias your-alias
302-
```
303-
304-
</Tab>
305-
</Tabs>
306-
307-
<Note>
308-
If you are using the official Chatwoot mobile app with `app.chatwoot.com`, deep linking works out of the box with no additional configuration.
309-
</Note>
310-
311-
## Build & Submit using EAS
312-
313-
We use Expo Application Services (EAS) for building, deploying, and submitting the app to app stores. EAS Build and Submit is available to anyone with an Expo account, regardless of whether you pay for EAS or use our Free plan.
314-
315-
You can sign up at [Expo EAS](https://expo.dev/eas).
316-
317-
### Build the app
318-
319-
#### iOS Build
320-
321-
```bash
322-
pnpm run build:ios:local
323-
```
324-
325-
#### Android Build
326-
327-
```bash
328-
pnpm run build:android:local
329-
```
330-
331-
### Submit the app
332-
333-
#### iOS Submission
334-
335-
```bash
336-
pnpm submit:ios
337-
```
338-
339-
#### Android Submission
340-
341-
```bash
342-
pnpm submit:android
343-
```
344-
345-
When you run the above command, you will be prompted to provide a path to a local app binary file. Please select the file that you built in the previous step:
346-
347-
- **iOS**: `.ipa` file
348-
- **Android**: `.aab` file
349-
350-
<Note>
351-
It may take a while to complete the submission process. You will see the status of the submission on your terminal.
352-
</Note>
120+
If you are building a custom-branded app, refer to the [custom mobile app guide](/self-hosted/custom-mobile-app) for Firebase, deep linking, and build setup.
353121

354122
## Troubleshooting
355123

docs.json

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,15 @@
3232
{
3333
"anchor": "Introduction",
3434
"icon": "house",
35-
"pages": [
36-
"introduction"
37-
]
35+
"pages": ["introduction"]
3836
},
3937
{
4038
"anchor": "Installation & Setup",
4139
"icon": "server",
4240
"pages": [
4341
{
4442
"group": "Getting Started",
45-
"pages": [
46-
"self-hosted"
47-
]
43+
"pages": ["self-hosted"]
4844
},
4945
{
5046
"group": "Deployment Methods",
@@ -127,9 +123,7 @@
127123
},
128124
{
129125
"group": "Help Center",
130-
"pages": [
131-
"self-hosted/configuration/help-center"
132-
]
126+
"pages": ["self-hosted/configuration/help-center"]
133127
}
134128
]
135129
},
@@ -170,7 +164,8 @@
170164
"self-hosted/supported-features",
171165
"self-hosted/restricted-instances",
172166
"self-hosted/instagram-app-review",
173-
"self-hosted/faq"
167+
"self-hosted/faq",
168+
"self-hosted/custom-mobile-app"
174169
]
175170
}
176171
]
@@ -181,9 +176,7 @@
181176
"pages": [
182177
{
183178
"group": "Getting Started",
184-
"pages": [
185-
"contributing-guide"
186-
]
179+
"pages": ["contributing-guide"]
187180
},
188181
{
189182
"group": "Environment Setup",
@@ -208,9 +201,7 @@
208201
},
209202
{
210203
"group": "Testing",
211-
"pages": [
212-
"contributing-guide/tests/cypress"
213-
]
204+
"pages": ["contributing-guide/tests/cypress"]
214205
},
215206
{
216207
"group": "Others",
@@ -235,9 +226,7 @@
235226
{
236227
"group": "Getting Started",
237228
"description": "Learn about Chatwoot APIs and how to use them",
238-
"pages": [
239-
"api-reference/introduction"
240-
]
229+
"pages": ["api-reference/introduction"]
241230
},
242231
{
243232
"group": "Application APIs",
@@ -268,12 +257,7 @@
268257
{
269258
"group": "Platform APIs",
270259
"description": "APIs for managing platform aspects of Chatwoot",
271-
"includeTags": [
272-
"Accounts",
273-
"Account Users",
274-
"AgentBots",
275-
"Users"
276-
],
260+
"includeTags": ["Accounts", "Account Users", "AgentBots", "Users"],
277261
"openapi": "https://raw.githubusercontent.com/chatwoot/chatwoot/develop/swagger/tag_groups/platform_swagger.json"
278262
},
279263
{
@@ -289,9 +273,7 @@
289273
{
290274
"group": "Other APIs",
291275
"description": "Additional Chatwoot APIs",
292-
"includeTags": [
293-
"CSAT Survey Page"
294-
],
276+
"includeTags": ["CSAT Survey Page"],
295277
"openapi": "https://raw.githubusercontent.com/chatwoot/chatwoot/develop/swagger/tag_groups/other_swagger.json"
296278
}
297279
]

0 commit comments

Comments
 (0)