# nourchene-hamrita/infoplus architecture

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

- Interactive diagram: https://gitdiagram.com/nourchene-hamrita/infoplus
- Repository: https://github.com/nourchene-hamrita/infoplus

## Overview

InfoPlus is a school-management product: a React Native app for learners and school staff backed by an Express/MongoDB API. Users authenticate, enter the app’s navigation, and access academic and administrative features such as assignments, attendance, results, events, schedules, payments, and complaints. The backend also handles accounts, training formations, and email. The excerpts support the server’s route registration, authentication/model interactions, and selected app dependencies; many feature screens and controllers were not sampled, so uncertain links are dashed.

Main entry points: [`backend/index.js`](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/index.js) (HTTP and socket server), [`infoPlus_App/screens`](https://github.com/nourchene-hamrita/infoplus/tree/main/infoPlus_App/screens) (Operations screens), [`backend/routes/formations.js`](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/formations.js) (Formation routes), [`infoPlus_App/App.js`](https://github.com/nourchene-hamrita/infoplus/blob/main/infoPlus_App/App.js) (App shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile app"]
  node_app["App shell<br/>[App.js]"]
  node_authstate["Auth state<br/>[AuthContext.js]"]
  node_navigation["Navigation"]
  node_fetch["Data fetching<br/>[useFetch.js]"]
  node_academicui["Academic screens"]
  node_operationsui["Operations screens"]
  node_apiurl["API configuration<br/>[config.js]"]
end

subgraph group_api["API and access"]
  node_server["HTTP and socket server<br/>[index.js]"]
  node_authroutes["Auth routes<br/>[auth.js]"]
  node_authcontroller["Account authentication<br/>[auth.js]"]
  node_userstore[("User records<br/>[User.js]")]
  node_roleprofiles[("Role profiles")]
end

subgraph group_academics["Academic services"]
  node_formationroutes["Formation routes<br/>[formations.js]"]
  node_formationcontroller["Formation service<br/>[formation.js]"]
  node_formationstore[("Formations and classes<br/>[Formation.js]")]
  node_assignmentroutes["Assignment routes<br/>[assignments.js]"]
  node_timetable["Timetables<br/>[timetables.js]"]
  node_result["Results<br/>[result.js]"]
end

subgraph group_operations["School operations"]
  node_events["Events<br/>[events.js]"]
  node_attendanceinterns[("Intern records<br/>[Intern.js]")]
  node_payments["Payments<br/>[paiement.js]"]
  node_complaints["Complaints<br/>[reclamation.js]"]
  node_emailroutes["Email routes<br/>[emailRoutes.js]"]
  node_emailservice["Email delivery<br/>[emailController.js]"]
end

node_user(("App user"))
node_mongo[("MongoDB")]
node_smtp["SMTP service"]

node_user -.->|"uses"| node_app
node_app -.->|"opens"| node_navigation
node_app -->|"provides auth"| node_authstate
node_navigation -->|"routes to"| node_academicui
node_navigation -->|"routes to"| node_operationsui
node_authstate -->|"uses URL"| node_apiurl
node_authstate -.->|"logs in"| node_authroutes
node_academicui -.->|"uses"| node_fetch
node_fetch -.->|"requests"| node_apiurl
node_apiurl -.->|"targets API"| node_server
node_server -->|"connects"| node_mongo
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_formationroutes
node_server -->|"mounts"| node_assignmentroutes
node_server -->|"mounts"| node_timetable
node_server -->|"mounts"| node_result
node_server -->|"mounts"| node_events
node_server -->|"mounts"| node_payments
node_server -->|"mounts"| node_complaints
node_server -->|"mounts"| node_emailroutes
node_authroutes -->|"dispatches"| node_authcontroller
node_authcontroller -->|"reads and writes"| node_userstore
node_authcontroller -->|"reads and writes"| node_roleprofiles
node_formationroutes -->|"dispatches"| node_formationcontroller
node_formationroutes -.->|"uses records"| node_attendanceinterns
node_assignmentroutes -->|"reads"| node_formationstore
node_timetable -->|"uses records"| node_attendanceinterns
node_emailroutes -->|"dispatches"| node_emailservice
node_emailservice -->|"sends mail"| node_smtp
node_academicui -.->|"requests academic data"| node_formationroutes
node_operationsui -.->|"requests payments"| node_payments
node_operationsui -.->|"submits complaints"| node_complaints
node_operationsui -.->|"requests events"| node_events
node_operationsui -.->|"requests schedules"| node_timetable
node_academicui -.->|"requests results"| node_result

click node_app "https://github.com/nourchene-hamrita/infoplus/blob/main/infoPlus_App/App.js"
click node_authstate "https://github.com/nourchene-hamrita/infoplus/blob/main/infoPlus_App/context/AuthContext.js"
click node_navigation "https://github.com/nourchene-hamrita/infoplus/tree/main/infoPlus_App/navigators"
click node_fetch "https://github.com/nourchene-hamrita/infoplus/blob/main/infoPlus_App/hooks/useFetch.js"
click node_academicui "https://github.com/nourchene-hamrita/infoplus/tree/main/infoPlus_App/screens"
click node_operationsui "https://github.com/nourchene-hamrita/infoplus/tree/main/infoPlus_App/screens"
click node_apiurl "https://github.com/nourchene-hamrita/infoplus/blob/main/infoPlus_App/utils/config.js"
click node_server "https://github.com/nourchene-hamrita/infoplus/blob/main/backend/index.js"
click node_authroutes "https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/auth.js"
click node_authcontroller "https://github.com/nourchene-hamrita/infoplus/blob/main/backend/controllers/auth.js"
click node_userstore "https://github.com/nourchene-hamrita/infoplus/blob/main/backend/models/User.js"
click node_roleprofiles "https://github.com/nourchene-hamrita/infoplus/tree/main/backend/models"
click node_formationroutes "https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/formations.js"
click node_formationcontroller "https://github.com/nourchene-hamrita/infoplus/blob/main/backend/controllers/formation.js"
click node_formationstore "https://github.com/nourchene-hamrita/infoplus/blob/main/backend/models/Formation.js"
click node_assignmentroutes "https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/assignments.js"
click node_timetable "https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/timetables.js"
click node_result "https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/result.js"
click node_events "https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/events.js"
click node_attendanceinterns "https://github.com/nourchene-hamrita/infoplus/blob/main/backend/models/Intern.js"
click node_payments "https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/paiement.js"
click node_complaints "https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/reclamation.js"
click node_emailroutes "https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/emailRoutes.js"
click node_emailservice "https://github.com/nourchene-hamrita/infoplus/blob/main/backend/controllers/emailController.js"

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_app,node_authstate,node_navigation,node_fetch,node_academicui,node_operationsui,node_apiurl,node_user toneBlue
class node_server,node_authroutes,node_authcontroller,node_userstore,node_roleprofiles,node_mongo toneAmber
class node_formationroutes,node_formationcontroller,node_formationstore,node_assignmentroutes,node_timetable,node_result toneMint
class node_events,node_attendanceinterns,node_payments,node_complaints,node_emailroutes,node_emailservice toneRose
class node_smtp toneIndigo
```

## Components

### Mobile app

- [App shell](https://github.com/nourchene-hamrita/infoplus/blob/main/infoPlus_App/App.js): `infoPlus_App/App.js`
- [Auth state](https://github.com/nourchene-hamrita/infoplus/blob/main/infoPlus_App/context/AuthContext.js): `infoPlus_App/context/AuthContext.js`
- [Navigation](https://github.com/nourchene-hamrita/infoplus/tree/main/infoPlus_App/navigators): `infoPlus_App/navigators`
- [Data fetching](https://github.com/nourchene-hamrita/infoplus/blob/main/infoPlus_App/hooks/useFetch.js): `infoPlus_App/hooks/useFetch.js`
- [Academic screens](https://github.com/nourchene-hamrita/infoplus/tree/main/infoPlus_App/screens): `infoPlus_App/screens`
- [Operations screens](https://github.com/nourchene-hamrita/infoplus/tree/main/infoPlus_App/screens): `infoPlus_App/screens`
- [API configuration](https://github.com/nourchene-hamrita/infoplus/blob/main/infoPlus_App/utils/config.js): `infoPlus_App/utils/config.js`

### API and access

- [HTTP and socket server](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/index.js): `backend/index.js`
- [Auth routes](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/auth.js): `backend/routes/auth.js`
- [Account authentication](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/controllers/auth.js): `backend/controllers/auth.js`
- [User records](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/models/User.js): `backend/models/User.js`
- [Role profiles](https://github.com/nourchene-hamrita/infoplus/tree/main/backend/models): `backend/models`

### Academic services

- [Formation routes](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/formations.js): `backend/routes/formations.js`
- [Formation service](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/controllers/formation.js): `backend/controllers/formation.js`
- [Formations and classes](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/models/Formation.js): `backend/models/Formation.js`
- [Assignment routes](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/assignments.js): `backend/routes/assignments.js`
- [Timetables](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/timetables.js): `backend/routes/timetables.js`
- [Results](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/result.js): `backend/routes/result.js`

### School operations

- [Events](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/events.js): `backend/routes/events.js`
- [Intern records](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/models/Intern.js): `backend/models/Intern.js`
- [Payments](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/paiement.js): `backend/routes/paiement.js`
- [Complaints](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/reclamation.js): `backend/routes/reclamation.js`
- [Email routes](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/routes/emailRoutes.js): `backend/routes/emailRoutes.js`
- [Email delivery](https://github.com/nourchene-hamrita/infoplus/blob/main/backend/controllers/emailController.js): `backend/controllers/emailController.js`

### Other components

- **App user**
- **MongoDB**
- **SMTP service**

## Connections

- App user → App shell: uses
- App shell → Navigation: opens (evidence: `infoPlus_App/App.js`)
- App shell → Auth state: provides auth (evidence: `infoPlus_App/App.js`)
- Navigation → Academic screens: routes to (evidence: `infoPlus_App/navigators/tabs.js`)
- Navigation → Operations screens: routes to (evidence: `infoPlus_App/navigators/tabs.js`)
- Auth state → API configuration: uses URL (evidence: `infoPlus_App/context/AuthContext.js`)
- Auth state → Auth routes: logs in
- Academic screens → Data fetching: uses (evidence: `infoPlus_App/screens/Events/DetailEvent.js`)
- Data fetching → API configuration: requests
- API configuration → HTTP and socket server: targets API
- HTTP and socket server → MongoDB: connects (evidence: `backend/index.js`)
- HTTP and socket server → Auth routes: mounts (evidence: `backend/index.js`)
- HTTP and socket server → Formation routes: mounts (evidence: `backend/index.js`)
- HTTP and socket server → Assignment routes: mounts (evidence: `backend/index.js`)
- HTTP and socket server → Timetables: mounts (evidence: `backend/index.js`)
- HTTP and socket server → Results: mounts (evidence: `backend/index.js`)
- HTTP and socket server → Events: mounts (evidence: `backend/index.js`)
- HTTP and socket server → Payments: mounts (evidence: `backend/index.js`)
- HTTP and socket server → Complaints: mounts (evidence: `backend/index.js`)
- HTTP and socket server → Email routes: mounts (evidence: `backend/index.js`)
- Auth routes → Account authentication: dispatches (evidence: `backend/routes/auth.js`)
- Account authentication → User records: reads and writes (evidence: `backend/controllers/auth.js`)
- Account authentication → Role profiles: reads and writes (evidence: `backend/controllers/auth.js`)
- Formation routes → Formation service: dispatches (evidence: `backend/routes/formations.js`)
- Formation routes → Intern records: uses records
- Assignment routes → Formations and classes: reads (evidence: `backend/routes/assignments.js`)
- Timetables → Intern records: uses records (evidence: `backend/routes/timetables.js`)
- Email routes → Email delivery: dispatches (evidence: `backend/routes/emailRoutes.js`)
- Email delivery → SMTP service: sends mail (evidence: `backend/controllers/emailController.js`)
- Academic screens → Formation routes: requests academic data
- Operations screens → Payments: requests payments
- Operations screens → Complaints: submits complaints
- Operations screens → Events: requests events
- Operations screens → Timetables: requests schedules
- Academic screens → Results: requests results
