Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/piratta/gymApp/llms.txt

Use this file to discover all available pages before exploring further.

The Chat tab gives you direct, real-time access to your coach from wherever you are — the gym floor, your kitchen, or mid-way through a rest period between sets. Rather than relying on external messaging apps, FocusFlow keeps all communication about your training in one place, alongside your workout history, progress data, and check-ins. Messages are delivered instantly and the entire conversation history is always available, so neither you nor your coach ever loses context.

Chat Features

Send Messages

Type your message in the input field at the bottom of the chat screen and tap the Send button (or press Enter on desktop). Messages are delivered to your coach immediately via Firebase Firestore’s real-time listener.

Online Presence

A presence indicator next to your coach’s name shows whether they are currently active in the app. When they are online you can expect a faster reply. The indicator updates in real time.

Typing Indicator

When your coach begins composing a reply you will see a “Escribiendo…” indicator appear in the conversation. This lets you know a response is on its way without needing to re-send your message.

Read Receipts

A double blue checkmark (✓✓) appears next to your messages once your coach has opened and read them. A single grey checkmark means the message was delivered but not yet read.

Message History

The full conversation thread with your coach — from your very first message — is always displayed in chronological order, oldest at the top. Each message is timestamped so you can refer back to advice your coach gave weeks ago.

Unread Badge

The Chat tab icon in the navigation bar shows a red badge with the number of unread messages from your coach. The badge clears automatically as soon as you open the Chat tab.

Message Structure

Every message exchanged between you and your coach is a Message document stored in Firestore:
export interface Message {
  id: string;
  senderId: string;    // your userId or your coach's userId
  receiverId: string;  // the other party's userId
  content: string;     // the text body of the message
  timestamp: string;   // ISO 8601 datetime string, e.g. "2024-11-14T09:32:00.000Z"
  isRead: boolean;     // true once the receiver has opened the conversation
}
Messages where senderId === your userId are displayed on the right side of the chat with your avatar. Messages where senderId === coach userId appear on the left. The isRead flag is set to true automatically when you open the Chat tab, and your coach’s client-side listener does the same when they view the conversation on their end.

Notifications for New Messages

When your coach sends you a message while you are not in the Chat tab, FocusFlow creates an AppNotification in your notification feed:
{
  type: "message",
  linkTab: "chat",
  title: "Nuevo mensaje de tu entrenador",
  message: "Tu entrenador te ha enviado un mensaje."
}
Tap the notification anywhere in the app to be taken directly to the Chat tab. The red unread badge on the tab icon also guides you back whenever a new message arrives.

Suggested Use Cases

The chat is a versatile tool — use it for any training-related communication that does not need to wait until your next weekly check-in.

Technique Questions

Ask your coach about the correct execution of an exercise before or after a set. Attach a description of what you felt and they can adjust the cue or suggest a variation.

Report an Injury or Pain

If something hurts, message your coach immediately. They can modify your routine on their end so you see the updated exercises the next time you open the Workout tab.

Between-Week Check-ins

The weekly check-in form is structured and periodic, but some weeks you will want to share something quickly. Use the chat for informal mid-week updates that do not warrant a full check-in submission.

Schedule Coordination

Confirm the time of a face-to-face session, a video call, or a measurement appointment. Your coach can also create an AgendaEvent in response and you will see it appear in your Workout tab notification feed.

Build docs developers (and LLMs) love