# hoyaurd/teach-me architecture

> Architecture diagram of the GitHub repository hoyaurd/teach-me, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hoyaurd/teach-me
- Repository: https://github.com/hoyaurd/teach-me

## Overview

Teach-Me is an Expo app for connecting learners and tutors through service and help-request listings. The main user journey is browsing and filtering listings, opening a tutor profile, checking compatibility, and contacting them; users can also publish listings and use messaging, notifications, and an AI assistant. Firebase provides authentication and Firestore-backed app data. Several routes are represented from the file tree and SOURCE INDEX, but their implementations were not sampled, so their internal interactions are left unspecified.

Main entry points: [`src/lib/firebase.ts`](https://github.com/hoyaurd/teach-me/blob/main/src/lib/firebase.ts) (Firebase services), [`src/app/(tabs)/Acceuil.tsx`](https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Acceuil.tsx) (Browse listings), [`src/app/(tabs)/Detail_Profil.tsx`](https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Detail_Profil.tsx) (View tutor profile), [`src/lib/useNouvelleNotification.ts`](https://github.com/hoyaurd/teach-me/blob/main/src/lib/useNouvelleNotification.ts) (Notification indicators)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Listing discovery"]
  node_home["Browse listings<br/>[Acceuil.tsx]"]
  node_filter["Filter listings<br/>[Filtre.tsx]"]
  node_profile_detail["View tutor profile<br/>[Detail_Profil.tsx]"]
  node_compatibility["Compatibility scoring"]
  node_compatibility_views["Compatibility displays"]
  node_price_estimate["Price estimation"]
  node_publish_service["Publish a service"]
  node_publish_request["Publish a request"]
  node_publications["Publication operations<br/>[publications.ts]"]
end

subgraph group_accounts["Accounts and profiles"]
  node_connection["Sign in<br/>[Connection.tsx]"]
  node_register["Create account"]
  node_user_records["User records<br/>[utilisateurs.ts]"]
  node_profile["Profile management<br/>[Profil.tsx]"]
end

subgraph group_communication["Communication"]
  node_messages["Messages<br/>[Messages.tsx]"]
  node_discussion["Conversation<br/>[Discussion.tsx]"]
  node_assistant["AI assistant<br/>[Chat_Bot.tsx]"]
  node_ai_history["AI conversation history<br/>[historiqueIA.ts]"]
  node_notification_hooks["Notification indicators"]
  node_notifications["Push and local notifications<br/>[notification.ts]"]
end

subgraph group_platform["Shared platform"]
  node_firebase[("Firebase services<br/>[firebase.ts]")]
  node_auth_helpers["Authentication helpers<br/>[auth.ts]"]
  node_profile_helper["Profile routing helper<br/>[Profil.ts]"]
  node_alerts["Alert helper<br/>[alerte.ts]"]
  node_theme["Theme and UI primitives<br/>[theme.ts]"]
  node_animated_icon["Animated icon<br/>[animated-icon.tsx]"]
end

node_user(("App user"))

node_user -->|"browses"| node_home
node_home -->|"reads listings"| node_firebase
node_home -->|"loads tutor photo"| node_firebase
node_user -.->|"filters"| node_filter
node_user -.->|"opens profile"| node_profile_detail
node_profile_detail -->|"calculates match"| node_compatibility
node_compatibility_views -->|"uses scoring"| node_compatibility
node_user -->|"publishes service"| node_publish_service
node_publish_service -->|"creates listing"| node_publications
node_user -.->|"publishes request"| node_publish_request
node_publications -->|"uses Firestore"| node_firebase
node_user -->|"signs in"| node_connection
node_user -->|"registers"| node_register
node_register -->|"creates user record"| node_user_records
node_user_records -->|"uses Firestore"| node_firebase
node_connection -->|"uses Firebase"| node_firebase
node_connection -.->|"uses auth helpers"| node_auth_helpers
node_user -.->|"manages profile"| node_profile
node_user -->|"views messages"| node_messages
node_messages -->|"reads conversations"| node_firebase
node_user -.->|"opens conversation"| node_discussion
node_user -->|"asks assistant"| node_assistant
node_assistant -->|"uses history"| node_ai_history
node_ai_history -->|"uses Firestore"| node_firebase
node_home -->|"shows indicators"| node_notification_hooks
node_messages -->|"shows indicators"| node_notification_hooks
node_notification_hooks -->|"watches app data"| node_firebase
node_notification_hooks -->|"requests permission"| node_notifications
node_notifications -->|"stores and reads tokens"| node_firebase
node_profile_detail -->|"uses alert helper"| node_alerts
node_profile_detail -->|"uses Firebase"| node_firebase
node_publish_service -->|"uses alert helper"| node_alerts
node_home -->|"selects publish route"| node_profile_helper
node_theme --> node_firebase

click node_home "https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Acceuil.tsx"
click node_filter "https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Filtre.tsx"
click node_profile_detail "https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Detail_Profil.tsx"
click node_compatibility "https://github.com/hoyaurd/teach-me/blob/main/src/lib/calculerCompatibilite.ts"
click node_compatibility_views "https://github.com/hoyaurd/teach-me/blob/main/src/components/BlocCompatibilite.tsx"
click node_price_estimate "https://github.com/hoyaurd/teach-me/blob/main/src/lib/estimerCompatibilite.ts"
click node_publish_service "https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Publier_service.tsx"
click node_publish_request "https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Publier_Demande.tsx"
click node_publications "https://github.com/hoyaurd/teach-me/blob/main/src/lib/publications.ts"
click node_connection "https://github.com/hoyaurd/teach-me/blob/main/src/app/Connection.tsx"
click node_register "https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Creer%20un%20compte2.tsx"
click node_user_records "https://github.com/hoyaurd/teach-me/blob/main/src/lib/utilisateurs.ts"
click node_profile "https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Profil.tsx"
click node_messages "https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Messages.tsx"
click node_discussion "https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Discussion.tsx"
click node_assistant "https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Chat_Bot.tsx"
click node_ai_history "https://github.com/hoyaurd/teach-me/blob/main/src/lib/historiqueIA.ts"
click node_notification_hooks "https://github.com/hoyaurd/teach-me/blob/main/src/lib/useNouvelleNotification.ts"
click node_notifications "https://github.com/hoyaurd/teach-me/blob/main/src/lib/notification.ts"
click node_firebase "https://github.com/hoyaurd/teach-me/blob/main/src/lib/firebase.ts"
click node_auth_helpers "https://github.com/hoyaurd/teach-me/blob/main/src/lib/auth.ts"
click node_profile_helper "https://github.com/hoyaurd/teach-me/blob/main/src/lib/Profil.ts"
click node_alerts "https://github.com/hoyaurd/teach-me/blob/main/src/lib/alerte.ts"
click node_theme "https://github.com/hoyaurd/teach-me/blob/main/src/constants/theme.ts"
click node_animated_icon "https://github.com/hoyaurd/teach-me/blob/main/src/components/animated-icon.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_home,node_filter,node_profile_detail,node_compatibility,node_compatibility_views,node_price_estimate,node_publish_service,node_publish_request,node_publications,node_user toneBlue
class node_connection,node_register,node_user_records,node_profile toneAmber
class node_messages,node_discussion,node_assistant,node_ai_history,node_notification_hooks,node_notifications toneMint
class node_firebase,node_auth_helpers,node_profile_helper,node_alerts,node_theme,node_animated_icon toneRose
```

## Components

### Listing discovery

- [Browse listings](https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Acceuil.tsx): `src/app/(tabs)/Acceuil.tsx`
- [Filter listings](https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Filtre.tsx): `src/app/(tabs)/Filtre.tsx`
- [View tutor profile](https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Detail_Profil.tsx): `src/app/(tabs)/Detail_Profil.tsx`
- [Compatibility scoring](https://github.com/hoyaurd/teach-me/blob/main/src/lib/calculerCompatibilite.ts): `src/lib/calculerCompatibilite.ts`
- [Compatibility displays](https://github.com/hoyaurd/teach-me/blob/main/src/components/BlocCompatibilite.tsx): `src/components/BlocCompatibilite.tsx`
- [Price estimation](https://github.com/hoyaurd/teach-me/blob/main/src/lib/estimerCompatibilite.ts): `src/lib/estimerCompatibilite.ts`
- [Publish a service](https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Publier_service.tsx): `src/app/(tabs)/Publier_service.tsx`
- [Publish a request](https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Publier_Demande.tsx): `src/app/(tabs)/Publier_Demande.tsx`
- [Publication operations](https://github.com/hoyaurd/teach-me/blob/main/src/lib/publications.ts): `src/lib/publications.ts`

### Accounts and profiles

- [Sign in](https://github.com/hoyaurd/teach-me/blob/main/src/app/Connection.tsx): `src/app/Connection.tsx`
- [Create account](https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Creer%20un%20compte2.tsx): `src/app/(tabs)/Creer un compte2.tsx`
- [User records](https://github.com/hoyaurd/teach-me/blob/main/src/lib/utilisateurs.ts): `src/lib/utilisateurs.ts`
- [Profile management](https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Profil.tsx): `src/app/(tabs)/Profil.tsx`

### Communication

- [Messages](https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Messages.tsx): `src/app/(tabs)/Messages.tsx`
- [Conversation](https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Discussion.tsx): `src/app/(tabs)/Discussion.tsx`
- [AI assistant](https://github.com/hoyaurd/teach-me/blob/main/src/app/(tabs)/Chat_Bot.tsx): `src/app/(tabs)/Chat_Bot.tsx`
- [AI conversation history](https://github.com/hoyaurd/teach-me/blob/main/src/lib/historiqueIA.ts): `src/lib/historiqueIA.ts`
- [Notification indicators](https://github.com/hoyaurd/teach-me/blob/main/src/lib/useNouvelleNotification.ts): `src/lib/useNouvelleNotification.ts`
- [Push and local notifications](https://github.com/hoyaurd/teach-me/blob/main/src/lib/notification.ts): `src/lib/notification.ts`

### Shared platform

- [Firebase services](https://github.com/hoyaurd/teach-me/blob/main/src/lib/firebase.ts): `src/lib/firebase.ts`
- [Authentication helpers](https://github.com/hoyaurd/teach-me/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [Profile routing helper](https://github.com/hoyaurd/teach-me/blob/main/src/lib/Profil.ts): `src/lib/Profil.ts`
- [Alert helper](https://github.com/hoyaurd/teach-me/blob/main/src/lib/alerte.ts): `src/lib/alerte.ts`
- [Theme and UI primitives](https://github.com/hoyaurd/teach-me/blob/main/src/constants/theme.ts): `src/constants/theme.ts`
- [Animated icon](https://github.com/hoyaurd/teach-me/blob/main/src/components/animated-icon.tsx): `src/components/animated-icon.tsx`

### Other components

- **App user**

## Connections

- App user → Browse listings: browses (evidence: `src/app/(tabs)/Acceuil.tsx`)
- Browse listings → Firebase services: reads listings (evidence: `src/app/(tabs)/Acceuil.tsx`)
- Browse listings → Firebase services: loads tutor photo (evidence: `src/app/(tabs)/Acceuil.tsx`)
- App user → Filter listings: filters
- App user → View tutor profile: opens profile
- View tutor profile → Compatibility scoring: calculates match (evidence: `src/app/(tabs)/Detail_Profil.tsx`)
- Compatibility displays → Compatibility scoring: uses scoring (evidence: `src/components/BlocCompatibilite.tsx`)
- App user → Publish a service: publishes service (evidence: `src/app/(tabs)/Publier_service.tsx`)
- Publish a service → Publication operations: creates listing (evidence: `src/app/(tabs)/Publier_service.tsx`)
- App user → Publish a request: publishes request
- Publication operations → Firebase services: uses Firestore (evidence: `src/lib/publications.ts`)
- App user → Sign in: signs in (evidence: `src/app/Connection.tsx`)
- App user → Create account: registers (evidence: `src/app/(tabs)/Creer un compte2.tsx`)
- Create account → User records: creates user record (evidence: `src/app/(tabs)/Creer un compte2.tsx`)
- User records → Firebase services: uses Firestore (evidence: `src/lib/utilisateurs.ts`)
- Sign in → Firebase services: uses Firebase (evidence: `src/app/Connection.tsx`)
- Sign in → Authentication helpers: uses auth helpers
- App user → Profile management: manages profile
- App user → Messages: views messages (evidence: `src/app/(tabs)/Messages.tsx`)
- Messages → Firebase services: reads conversations (evidence: `src/app/(tabs)/Messages.tsx`)
- App user → Conversation: opens conversation
- App user → AI assistant: asks assistant (evidence: `src/app/(tabs)/Chat_Bot.tsx`)
- AI assistant → AI conversation history: uses history (evidence: `src/app/(tabs)/Chat_Bot.tsx`)
- AI conversation history → Firebase services: uses Firestore (evidence: `src/lib/historiqueIA.ts`)
- Browse listings → Notification indicators: shows indicators (evidence: `src/app/(tabs)/Acceuil.tsx`)
- Messages → Notification indicators: shows indicators (evidence: `src/app/(tabs)/Messages.tsx`)
- Notification indicators → Firebase services: watches app data (evidence: `src/lib/useNouvelleNotification.ts`)
- Notification indicators → Push and local notifications: requests permission (evidence: `src/lib/useNouvelleNotification.ts`)
- Push and local notifications → Firebase services: stores and reads tokens (evidence: `src/lib/notification.ts`)
- View tutor profile → Alert helper: uses alert helper (evidence: `src/app/(tabs)/Detail_Profil.tsx`)
- View tutor profile → Firebase services: uses Firebase (evidence: `src/app/(tabs)/Detail_Profil.tsx`)
- Publish a service → Alert helper: uses alert helper (evidence: `src/app/(tabs)/Publier_service.tsx`)
- Browse listings → Profile routing helper: selects publish route (evidence: `src/app/(tabs)/Acceuil.tsx`)
- Theme and UI primitives → Firebase services
