# lanscky/totinda-mobile architecture

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

- Interactive diagram: https://gitdiagram.com/lanscky/totinda-mobile
- Repository: https://github.com/lanscky/totinda-mobile

## Overview

Totinda Mobile is an Expo app for students to discover internships and companies, apply to offers, manage their profile/CV, and follow applications and notifications. The principal flow runs from login or registration through the home discovery screen to offer details and an application; authenticated users can then manage their profile and track applications. Edges use the README and SOURCE INDEX relationships; several screen implementations were not sampled, so their internal calls are not inferred.

Main entry points: [`api/client.ts`](https://github.com/lanscky/totinda-mobile/blob/master/api/client.ts) (HTTP client), [`context/AuthContext.tsx`](https://github.com/lanscky/totinda-mobile/blob/master/context/AuthContext.tsx) (Session context), [`app/home/index.tsx`](https://github.com/lanscky/totinda-mobile/blob/master/app/home/index.tsx) (Discovery home), [`app/login`](https://github.com/lanscky/totinda-mobile/tree/master/app/login) (Login and registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and session"]
  node_auth_screens["Login and registration"]
  node_session["Session context<br/>[AuthContext.tsx]"]
end

subgraph group_discovery["Internship discovery"]
  node_home["Discovery home<br/>[index.tsx]"]
  node_offer_list["Offer browsing<br/>[offres.tsx]"]
  node_company_list["Company browsing<br/>[entreprises.tsx]"]
  node_company_detail["Company detail<br/>[&#91;id&#93;.tsx]"]
  node_offer_detail["Offer details and application<br/>[&#91;id&#93;.tsx]"]
end

subgraph group_student["Student activity"]
  node_application_list["Applications tracking<br/>[candidatures.tsx]"]
  node_profile["Profile management<br/>[profils.tsx]"]
  node_profile_completion["Profile completion<br/>[complete.tsx]"]
  node_notifications_screen["Notifications screen<br/>[notifications.tsx]"]
  node_stage_detail["Internship stage detail<br/>[&#91;id&#93;.tsx]"]
  node_stage_journal["Weekly journal<br/>[WeeklyJournal.tsx]"]
end

subgraph group_services["Application services"]
  node_auth_service["Account service<br/>[auth.ts]"]
  node_google_signin["Google sign-in<br/>[googleAuth.ts]"]
  node_http["HTTP client<br/>[client.ts]"]
  node_secure_storage[("Secure session storage<br/>[secureStorage.ts]")]
  node_company_api["Company service<br/>[companies.ts]"]
  node_notifications_api["Notifications service<br/>[notifications.ts]"]
  node_push_api["Push device service"]
  node_stage_api["Stage service<br/>[stages.ts]"]
end

subgraph group_shared["Shared interface"]
  node_ui["Shared UI components"]
  node_study_levels["Study level options<br/>[studyLevels.ts]"]
  node_date_utils["Date utilities<br/>[dateUtils.ts]"]
end

node_student(("Student"))
node_backend[("Totinda backend")]
node_google(("Google identity"))
node_push_provider["Push notification provider"]

node_student -->|"starts session"| node_auth_screens
node_auth_screens -->|"submits credentials"| node_session
node_auth_screens -->|"requests sign-in"| node_google_signin
node_google_signin -.->|"authenticates with"| node_google
node_session -->|"manages account"| node_auth_service
node_auth_service -->|"sends requests"| node_http
node_auth_service -->|"persists session"| node_secure_storage
node_http -->|"reads tokens"| node_secure_storage
node_http -->|"calls API"| node_backend
node_student -->|"opens discovery"| node_home
node_home -->|"loads companies"| node_company_api
node_company_api -->|"uses client"| node_http
node_home -->|"opens offers"| node_offer_list
node_home -->|"opens companies"| node_company_list
node_student -->|"views company"| node_company_detail
node_student -->|"views offer"| node_offer_detail
node_offer_detail -->|"submits application"| node_http
node_student -->|"tracks applications"| node_application_list
node_application_list -->|"loads applications"| node_http
node_student -->|"manages profile"| node_profile
node_profile -->|"reads session"| node_session
node_student -->|"completes profile"| node_profile_completion
node_profile_completion -->|"updates profile"| node_session
node_student -->|"views notifications"| node_notifications_screen
node_notifications_screen -->|"loads notifications"| node_notifications_api
node_notifications_api -->|"uses client"| node_http
node_session -->|"syncs device"| node_push_api
node_push_api -->|"uses client"| node_http
node_student -->|"views internship stage"| node_stage_detail
node_stage_detail -->|"loads stage data"| node_stage_api
node_stage_detail -->|"renders journal"| node_stage_journal
node_stage_journal -->|"uses stage service"| node_stage_api
node_stage_api -->|"uses client"| node_http
node_session -.->|"provides shared UI"| node_ui
node_home -->|"renders components"| node_ui
node_auth_screens -->|"uses study options"| node_study_levels
node_offer_detail -->|"checks deadlines"| node_date_utils
node_stage_detail -->|"formats dates"| node_date_utils
node_push_api -.->|"registers device"| node_push_provider

click node_auth_screens "https://github.com/lanscky/totinda-mobile/tree/master/app/login"
click node_session "https://github.com/lanscky/totinda-mobile/blob/master/context/AuthContext.tsx"
click node_auth_service "https://github.com/lanscky/totinda-mobile/blob/master/api/auth.ts"
click node_google_signin "https://github.com/lanscky/totinda-mobile/blob/master/api/googleAuth.ts"
click node_http "https://github.com/lanscky/totinda-mobile/blob/master/api/client.ts"
click node_secure_storage "https://github.com/lanscky/totinda-mobile/blob/master/api/secureStorage.ts"
click node_home "https://github.com/lanscky/totinda-mobile/blob/master/app/home/index.tsx"
click node_offer_list "https://github.com/lanscky/totinda-mobile/blob/master/app/home/offres.tsx"
click node_company_list "https://github.com/lanscky/totinda-mobile/blob/master/app/home/entreprises.tsx"
click node_company_detail "https://github.com/lanscky/totinda-mobile/blob/master/app/entreprises/%5Bid%5D.tsx"
click node_company_api "https://github.com/lanscky/totinda-mobile/blob/master/api/companies.ts"
click node_offer_detail "https://github.com/lanscky/totinda-mobile/blob/master/app/offres/%5Bid%5D.tsx"
click node_application_list "https://github.com/lanscky/totinda-mobile/blob/master/app/home/candidatures.tsx"
click node_profile "https://github.com/lanscky/totinda-mobile/blob/master/app/home/profils.tsx"
click node_profile_completion "https://github.com/lanscky/totinda-mobile/blob/master/app/profile/complete.tsx"
click node_notifications_screen "https://github.com/lanscky/totinda-mobile/blob/master/app/notifications.tsx"
click node_notifications_api "https://github.com/lanscky/totinda-mobile/blob/master/api/notifications.ts"
click node_push_api "https://github.com/lanscky/totinda-mobile/blob/master/api/pushNotifications.ts"
click node_stage_detail "https://github.com/lanscky/totinda-mobile/blob/master/app/stages/%5Bid%5D.tsx"
click node_stage_journal "https://github.com/lanscky/totinda-mobile/blob/master/components/stages/WeeklyJournal.tsx"
click node_stage_api "https://github.com/lanscky/totinda-mobile/blob/master/api/stages.ts"
click node_ui "https://github.com/lanscky/totinda-mobile/tree/master/components"
click node_study_levels "https://github.com/lanscky/totinda-mobile/blob/master/constants/studyLevels.ts"
click node_date_utils "https://github.com/lanscky/totinda-mobile/blob/master/utils/dateUtils.ts"

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_auth_screens,node_session toneBlue
class node_home,node_offer_list,node_company_list,node_company_detail,node_offer_detail,node_backend toneAmber
class node_application_list,node_profile,node_profile_completion,node_notifications_screen,node_stage_detail,node_stage_journal toneMint
class node_auth_service,node_google_signin,node_http,node_secure_storage,node_company_api,node_notifications_api,node_push_api,node_stage_api toneRose
class node_ui,node_study_levels,node_date_utils,node_student,node_google,node_push_provider toneIndigo
```

## Components

### Identity and session

- [Login and registration](https://github.com/lanscky/totinda-mobile/tree/master/app/login): `app/login`
- [Session context](https://github.com/lanscky/totinda-mobile/blob/master/context/AuthContext.tsx): `context/AuthContext.tsx`

### Internship discovery

- [Discovery home](https://github.com/lanscky/totinda-mobile/blob/master/app/home/index.tsx): `app/home/index.tsx`
- [Offer browsing](https://github.com/lanscky/totinda-mobile/blob/master/app/home/offres.tsx): `app/home/offres.tsx`
- [Company browsing](https://github.com/lanscky/totinda-mobile/blob/master/app/home/entreprises.tsx): `app/home/entreprises.tsx`
- [Company detail](https://github.com/lanscky/totinda-mobile/blob/master/app/entreprises/%5Bid%5D.tsx): `app/entreprises/[id].tsx`
- [Offer details and application](https://github.com/lanscky/totinda-mobile/blob/master/app/offres/%5Bid%5D.tsx): `app/offres/[id].tsx`

### Student activity

- [Applications tracking](https://github.com/lanscky/totinda-mobile/blob/master/app/home/candidatures.tsx): `app/home/candidatures.tsx`
- [Profile management](https://github.com/lanscky/totinda-mobile/blob/master/app/home/profils.tsx): `app/home/profils.tsx`
- [Profile completion](https://github.com/lanscky/totinda-mobile/blob/master/app/profile/complete.tsx): `app/profile/complete.tsx`
- [Notifications screen](https://github.com/lanscky/totinda-mobile/blob/master/app/notifications.tsx): `app/notifications.tsx`
- [Internship stage detail](https://github.com/lanscky/totinda-mobile/blob/master/app/stages/%5Bid%5D.tsx): `app/stages/[id].tsx`
- [Weekly journal](https://github.com/lanscky/totinda-mobile/blob/master/components/stages/WeeklyJournal.tsx): `components/stages/WeeklyJournal.tsx`

### Application services

- [Account service](https://github.com/lanscky/totinda-mobile/blob/master/api/auth.ts): `api/auth.ts`
- [Google sign-in](https://github.com/lanscky/totinda-mobile/blob/master/api/googleAuth.ts): `api/googleAuth.ts`
- [HTTP client](https://github.com/lanscky/totinda-mobile/blob/master/api/client.ts): `api/client.ts`
- [Secure session storage](https://github.com/lanscky/totinda-mobile/blob/master/api/secureStorage.ts): `api/secureStorage.ts`
- [Company service](https://github.com/lanscky/totinda-mobile/blob/master/api/companies.ts): `api/companies.ts`
- [Notifications service](https://github.com/lanscky/totinda-mobile/blob/master/api/notifications.ts): `api/notifications.ts`
- [Push device service](https://github.com/lanscky/totinda-mobile/blob/master/api/pushNotifications.ts): `api/pushNotifications.ts`
- [Stage service](https://github.com/lanscky/totinda-mobile/blob/master/api/stages.ts): `api/stages.ts`

### Shared interface

- [Shared UI components](https://github.com/lanscky/totinda-mobile/tree/master/components): `components`
- [Study level options](https://github.com/lanscky/totinda-mobile/blob/master/constants/studyLevels.ts): `constants/studyLevels.ts`
- [Date utilities](https://github.com/lanscky/totinda-mobile/blob/master/utils/dateUtils.ts): `utils/dateUtils.ts`

### Other components

- **Student**
- **Totinda backend**
- **Google identity**
- **Push notification provider**

## Connections

- Student → Login and registration: starts session (evidence: `README.md`)
- Login and registration → Session context: submits credentials (evidence: `app/login/login.tsx`)
- Login and registration → Google sign-in: requests sign-in (evidence: `app/login/login.tsx`)
- Google sign-in → Google identity: authenticates with (evidence: `README.md`)
- Session context → Account service: manages account (evidence: `context/AuthContext.tsx`)
- Account service → HTTP client: sends requests (evidence: `api/auth.ts`)
- Account service → Secure session storage: persists session (evidence: `api/auth.ts`)
- HTTP client → Secure session storage: reads tokens (evidence: `api/client.ts`)
- HTTP client → Totinda backend: calls API (evidence: `README.md`)
- Student → Discovery home: opens discovery (evidence: `README.md`)
- Discovery home → Company service: loads companies (evidence: `app/home/index.tsx`)
- Company service → HTTP client: uses client (evidence: `api/companies.ts`)
- Discovery home → Offer browsing: opens offers (evidence: `app/home/index.tsx`)
- Discovery home → Company browsing: opens companies (evidence: `app/home/index.tsx`)
- Student → Company detail: views company (evidence: `README.md`)
- Student → Offer details and application: views offer (evidence: `README.md`)
- Offer details and application → HTTP client: submits application (evidence: `app/offres/[id].tsx`)
- Student → Applications tracking: tracks applications (evidence: `README.md`)
- Applications tracking → HTTP client: loads applications (evidence: `app/home/candidatures.tsx`)
- Student → Profile management: manages profile (evidence: `README.md`)
- Profile management → Session context: reads session (evidence: `app/home/profils.tsx`)
- Student → Profile completion: completes profile (evidence: `README.md`)
- Profile completion → Session context: updates profile (evidence: `app/profile/complete.tsx`)
- Student → Notifications screen: views notifications (evidence: `README.md`)
- Notifications screen → Notifications service: loads notifications (evidence: `app/notifications.tsx`)
- Notifications service → HTTP client: uses client (evidence: `api/notifications.ts`)
- Session context → Push device service: syncs device (evidence: `context/AuthContext.tsx`)
- Push device service → HTTP client: uses client (evidence: `api/pushNotifications.ts`)
- Student → Internship stage detail: views internship stage (evidence: `README.md`)
- Internship stage detail → Stage service: loads stage data (evidence: `app/stages/[id].tsx`)
- Internship stage detail → Weekly journal: renders journal (evidence: `app/stages/[id].tsx`)
- Weekly journal → Stage service: uses stage service (evidence: `components/stages/WeeklyJournal.tsx`)
- Stage service → HTTP client: uses client (evidence: `api/stages.ts`)
- Session context → Shared UI components: provides shared UI
- Discovery home → Shared UI components: renders components (evidence: `app/home/index.tsx`)
- Login and registration → Study level options: uses study options (evidence: `app/login/register.tsx`)
- Offer details and application → Date utilities: checks deadlines (evidence: `app/offres/[id].tsx`)
- Internship stage detail → Date utilities: formats dates (evidence: `app/stages/[id].tsx`)
- Push device service → Push notification provider: registers device
