The Profile & Reports section of ComuniTEA is designed for the adults in a child’s support network — parents, speech-language therapists, psychologists, and teachers. It surfaces clear, actionable data about how the child is using the AAC board: which pictograms they reach for most, how many sentences they build per session, whether their accuracy in exercises is improving, and what daily routines look like. Reports can be exported as PDF and shared directly with any member of the child’s support team. The goal is not clinical surveillance but collaborative support: giving families and therapists a shared picture of the child’s communicative growth.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ElthonJohan/comunitea/llms.txt
Use this file to discover all available pages before exploring further.
Usage statistics (useStats)
Every interaction with the tablero and exercises is captured by the useStats hook and stored in the usage_stats Supabase table. Events fire-and-forget: they never block the UI, and they are queued locally when the device is offline and synced when connectivity is restored.
logSentence method also writes to the sentence_log table, which powers personalized pictogram ordering predictions over time.
Events are queued via
enqueueEvent() when the device is offline and flushed to Supabase automatically once the network is restored. No usage data is ever silently discarded.Report generation (useReport)
The useReport hook fetches a comprehensive FullReportData object by calling four Supabase RPC functions in parallel. A selectable days window (default: 7 days) controls the reporting period.
previous period is computed by fetching a double-length window (p_days * 2) and subtracting the current-period totals, yielding the prior-period baseline for trend arrows in the UI.
Statistics display (EstadisticasRow)
The top of the profile screen shows a three-card summary row powered by EstadisticasRow:
| Metric | Description |
|---|---|
| Frases hoy | Number of sentence_play events recorded today |
| Días seguidos | Consecutive days streak (from profile streakDays) |
| Aciertos | Exercise accuracy percentage across all recorded attempts |
Achievements system
ComuniTEA includes a fixed catalog of five achievements displayed in theLogrosGrid component as a horizontal scrollable row of emoji badges. Unlocked badges are shown with a golden background; locked badges are greyed out.
evaluateNewAchievementIds(), which receives current session stats plus the set of already-unlocked IDs. Any newly qualifying achievements are written back to the child’s profile in Supabase. The buildLogrosFromUnlocked(unlockedIds) helper maps the catalog to LogroItem[] objects for rendering.
Favorites tracking (FavoritosRow)
The FavoritosRow component renders a horizontal list of the child’s favorite pictograms — those with esFavorito: true in the merged board. Favorites are surfaced as tappable mini-cards (64 × 72 px) showing the pictogram’s emoji and label. Tapping a favorite in the profile view can be configured to trigger the pictogram’s audio clip (onPressPicto prop).
Caregivers see favorites as a quick-glance indicator of which vocabulary items the child has chosen to pin, and can update them from the tablero editor.
Daily routines (useRutinas)
The routine manager lets caregivers build a visual daily schedule that links to the child’s tablero context. Routines are stored in the Supabase tasks table with row-level security.
| Emoji | Label | Duration |
|---|---|---|
| ☀️ | Despertar | — |
| 🚽 | Baño | 5 min |
| 🪥 | Lavarse los dientes | 2 min |
| 🥞 | Desayunar | 15 min |
| 🏫 | Ir a la escuela | — |
toggleCompleted uses optimistic updates: the UI updates immediately and the Supabase call fires in the background. resetCompleted is intended to be called at the start of each day to clear all completed states.
AI Insights
AI-generated recommendations appear in the report screen under the insights section. They are produced by theai-insights Supabase Edge Function, which calls the OpenAI API and returns short, actionable suggestions in warm, non-clinical Spanish.
The Edge Function receives:
fetchReport() from the ai_insights table — up to 5 non-expired rows, ordered by unread-first. Each insight has a seen flag that caregivers can mark to dismiss it.
PDF export
The report screen usesexpo-print and expo-sharing to generate and share a formatted PDF of the current report. The export is triggered from app/report.tsx and includes:
- Summary statistics (sessions, sentence plays, pictogram taps)
- Bar chart of activity by hour of day
- Daily usage line chart
- Top 5 most-used pictograms
- Exercise game history
- AI insight suggestions
Sharing.shareAsync(). No data leaves the device except through the standard OS share mechanism.
Team access (useChildTeam)
Caregivers can share report access with the child’s full support team using the useChildTeam hook. Team members are stored in the child_team Supabase table with role-based permissions.
| Role | View Reports | Edit Vocabulary |
|---|---|---|
padre_madre | ✅ | ✅ |
terapeuta | ✅ | ✅ |
psicologo | ✅ | ❌ |
docente | ✅ | ❌ |
TeamMember record with a unique invite_token. The invited professional accepts by entering the token in their own instance of the app, which calls the accept_team_invite Supabase RPC function. All team management actions are logged in the audit trail via auditLog().