# angelvilla16/control-plus architecture

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

- Interactive diagram: https://gitdiagram.com/angelvilla16/control-plus
- Repository: https://github.com/angelvilla16/control-plus

## Overview

Control + is a cross-platform mobile app for tracking glucose and blood pressure. Users sign in or register, complete their profile when needed, then use the dashboard to record measurements and review recent readings; profile and history screens provide related account and measurement views. The README describes secure local persistence and an external API backend. Sampled source confirms several screen-to-service calls; links for unsampled screens and services are limited to the source index or README, so uncertain details are omitted.

Main entry points: [`src/services/api.ts`](https://github.com/angelvilla16/control-plus/blob/main/src/services/api.ts) (API base URL), [`src/app/index.tsx`](https://github.com/angelvilla16/control-plus/blob/main/src/app/index.tsx) (Sign in), [`src/services/updateperfil.ts`](https://github.com/angelvilla16/control-plus/blob/main/src/services/updateperfil.ts) (Profile update), [`src/services/glucosa.ts`](https://github.com/angelvilla16/control-plus/blob/main/src/services/glucosa.ts) (Glucose service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_account["Account setup"]
  node_login["Sign in<br/>[index.tsx]"]
  node_signup["Registration<br/>[Signin.tsx]"]
  node_complete_profile["Complete profile"]
  node_profile["Profile view<br/>[perfil.tsx]"]
end

subgraph group_measurements["Health measurements"]
  node_dashboard["Health dashboard<br/>[home.tsx]"]
  node_glucose_entry["Glucose entry"]
  node_pressure_entry["Blood pressure entry"]
  node_history["Measurement history<br/>[historial.tsx]"]
end

subgraph group_services["API services"]
  node_login_service["Login service<br/>[login.ts]"]
  node_registration_service["Registration service<br/>[registro.ts]"]
  node_profile_read["Profile lookup<br/>[getperfil.ts]"]
  node_profile_update["Profile update<br/>[updateperfil.ts]"]
  node_glucose_service["Glucose service<br/>[glucosa.ts]"]
  node_pressure_service["Pressure service<br/>[presion.ts]"]
  node_api_config["API base URL<br/>[api.ts]"]
end

subgraph group_navigation["App navigation"]
  node_root_layout["Root navigation<br/>[_layout.tsx]"]
  node_tabs_layout["Tab navigation<br/>[_layout.tsx]"]
end

node_user(("User"))
node_backend{{"External API"}}
node_secure_store[("Secure local storage")]

node_user -->|"enters credentials"| node_login
node_login -->|"authenticates"| node_login_service
node_login -->|"stores session"| node_secure_store
node_login -->|"routes when incomplete"| node_complete_profile
node_login -->|"routes when complete"| node_dashboard
node_user -->|"registers"| node_signup
node_signup -->|"submits registration"| node_registration_service
node_complete_profile -->|"updates details"| node_profile_update
node_profile -->|"loads profile"| node_profile_read
node_profile -->|"saves changes"| node_profile_update
node_dashboard -->|"loads recent glucose"| node_glucose_service
node_dashboard -->|"loads recent pressure"| node_pressure_service
node_user -->|"records glucose"| node_glucose_entry
node_glucose_entry -->|"submits reading"| node_glucose_service
node_user -->|"records pressure"| node_pressure_entry
node_pressure_entry -->|"submits reading"| node_pressure_service
node_history -.->|"shows history view"| node_user
node_login_service -->|"uses base URL"| node_api_config
node_registration_service -->|"uses base URL"| node_api_config
node_profile_read -->|"uses base URL"| node_api_config
node_profile_update -->|"uses base URL"| node_api_config
node_glucose_service -->|"uses base URL"| node_api_config
node_pressure_service -->|"uses base URL"| node_api_config
node_login_service -->|"sends auth request"| node_backend
node_registration_service -->|"sends registration"| node_backend
node_profile_read -->|"requests profile"| node_backend
node_profile_update -->|"updates profile"| node_backend
node_glucose_service -->|"sends glucose requests"| node_backend
node_pressure_service -->|"sends pressure requests"| node_backend
node_root_layout -.->|"hosts tab routes"| node_tabs_layout

click node_login "https://github.com/angelvilla16/control-plus/blob/main/src/app/index.tsx"
click node_signup "https://github.com/angelvilla16/control-plus/blob/main/src/app/Signin.tsx"
click node_complete_profile "https://github.com/angelvilla16/control-plus/blob/main/src/app/CompletarPerfil.tsx"
click node_profile "https://github.com/angelvilla16/control-plus/blob/main/src/app/(tabs)/perfil.tsx"
click node_dashboard "https://github.com/angelvilla16/control-plus/blob/main/src/app/(tabs)/home.tsx"
click node_glucose_entry "https://github.com/angelvilla16/control-plus/blob/main/src/app/RegistrarGlucosa.tsx"
click node_pressure_entry "https://github.com/angelvilla16/control-plus/blob/main/src/app/RegistrarPresion.tsx"
click node_history "https://github.com/angelvilla16/control-plus/blob/main/src/app/(tabs)/historial.tsx"
click node_login_service "https://github.com/angelvilla16/control-plus/blob/main/src/services/login.ts"
click node_registration_service "https://github.com/angelvilla16/control-plus/blob/main/src/services/registro.ts"
click node_profile_read "https://github.com/angelvilla16/control-plus/blob/main/src/services/getperfil.ts"
click node_profile_update "https://github.com/angelvilla16/control-plus/blob/main/src/services/updateperfil.ts"
click node_glucose_service "https://github.com/angelvilla16/control-plus/blob/main/src/services/glucosa.ts"
click node_pressure_service "https://github.com/angelvilla16/control-plus/blob/main/src/services/presion.ts"
click node_api_config "https://github.com/angelvilla16/control-plus/blob/main/src/services/api.ts"
click node_root_layout "https://github.com/angelvilla16/control-plus/blob/main/src/app/_layout.tsx"
click node_tabs_layout "https://github.com/angelvilla16/control-plus/blob/main/src/app/(tabs)/_layout.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_login,node_signup,node_complete_profile,node_profile,node_user toneBlue
class node_dashboard,node_glucose_entry,node_pressure_entry,node_history,node_secure_store toneAmber
class node_login_service,node_registration_service,node_profile_read,node_profile_update,node_glucose_service,node_pressure_service,node_api_config,node_backend toneMint
class node_root_layout,node_tabs_layout toneRose
```

## Components

### Account setup

- [Sign in](https://github.com/angelvilla16/control-plus/blob/main/src/app/index.tsx): `src/app/index.tsx`
- [Registration](https://github.com/angelvilla16/control-plus/blob/main/src/app/Signin.tsx): `src/app/Signin.tsx`
- [Complete profile](https://github.com/angelvilla16/control-plus/blob/main/src/app/CompletarPerfil.tsx): `src/app/CompletarPerfil.tsx`
- [Profile view](https://github.com/angelvilla16/control-plus/blob/main/src/app/(tabs)/perfil.tsx): `src/app/(tabs)/perfil.tsx`

### Health measurements

- [Health dashboard](https://github.com/angelvilla16/control-plus/blob/main/src/app/(tabs)/home.tsx): `src/app/(tabs)/home.tsx`
- [Glucose entry](https://github.com/angelvilla16/control-plus/blob/main/src/app/RegistrarGlucosa.tsx): `src/app/RegistrarGlucosa.tsx`
- [Blood pressure entry](https://github.com/angelvilla16/control-plus/blob/main/src/app/RegistrarPresion.tsx): `src/app/RegistrarPresion.tsx`
- [Measurement history](https://github.com/angelvilla16/control-plus/blob/main/src/app/(tabs)/historial.tsx): `src/app/(tabs)/historial.tsx`

### API services

- [Login service](https://github.com/angelvilla16/control-plus/blob/main/src/services/login.ts): `src/services/login.ts`
- [Registration service](https://github.com/angelvilla16/control-plus/blob/main/src/services/registro.ts): `src/services/registro.ts`
- [Profile lookup](https://github.com/angelvilla16/control-plus/blob/main/src/services/getperfil.ts): `src/services/getperfil.ts`
- [Profile update](https://github.com/angelvilla16/control-plus/blob/main/src/services/updateperfil.ts): `src/services/updateperfil.ts`
- [Glucose service](https://github.com/angelvilla16/control-plus/blob/main/src/services/glucosa.ts): `src/services/glucosa.ts`
- [Pressure service](https://github.com/angelvilla16/control-plus/blob/main/src/services/presion.ts): `src/services/presion.ts`
- [API base URL](https://github.com/angelvilla16/control-plus/blob/main/src/services/api.ts): `src/services/api.ts`

### App navigation

- [Root navigation](https://github.com/angelvilla16/control-plus/blob/main/src/app/_layout.tsx): `src/app/_layout.tsx`
- [Tab navigation](https://github.com/angelvilla16/control-plus/blob/main/src/app/(tabs)/_layout.tsx): `src/app/(tabs)/_layout.tsx`

### Other components

- **User**
- **External API**
- **Secure local storage**

## Connections

- User → Sign in: enters credentials (evidence: `README.md`)
- Sign in → Login service: authenticates (evidence: `src/app/index.tsx`)
- Sign in → Secure local storage: stores session (evidence: `src/app/index.tsx`)
- Sign in → Complete profile: routes when incomplete (evidence: `src/app/index.tsx`)
- Sign in → Health dashboard: routes when complete (evidence: `src/app/index.tsx`)
- User → Registration: registers (evidence: `README.md`)
- Registration → Registration service: submits registration (evidence: `src/app/Signin.tsx`)
- Complete profile → Profile update: updates details (evidence: `src/app/CompletarPerfil.tsx`)
- Profile view → Profile lookup: loads profile (evidence: `src/app/(tabs)/perfil.tsx`)
- Profile view → Profile update: saves changes (evidence: `src/app/(tabs)/perfil.tsx`)
- Health dashboard → Glucose service: loads recent glucose (evidence: `src/app/(tabs)/home.tsx`)
- Health dashboard → Pressure service: loads recent pressure (evidence: `src/app/(tabs)/home.tsx`)
- User → Glucose entry: records glucose (evidence: `README.md`)
- Glucose entry → Glucose service: submits reading (evidence: `src/app/RegistrarGlucosa.tsx`)
- User → Blood pressure entry: records pressure (evidence: `README.md`)
- Blood pressure entry → Pressure service: submits reading (evidence: `src/app/RegistrarPresion.tsx`)
- Measurement history → User: shows history view (evidence: `README.md`)
- Login service → API base URL: uses base URL (evidence: `src/services/login.ts`)
- Registration service → API base URL: uses base URL (evidence: `src/services/registro.ts`)
- Profile lookup → API base URL: uses base URL (evidence: `src/services/getperfil.ts`)
- Profile update → API base URL: uses base URL (evidence: `src/services/updateperfil.ts`)
- Glucose service → API base URL: uses base URL (evidence: `src/services/glucosa.ts`)
- Pressure service → API base URL: uses base URL (evidence: `src/services/presion.ts`)
- Login service → External API: sends auth request (evidence: `README.md`)
- Registration service → External API: sends registration (evidence: `README.md`)
- Profile lookup → External API: requests profile (evidence: `README.md`)
- Profile update → External API: updates profile (evidence: `README.md`)
- Glucose service → External API: sends glucose requests (evidence: `src/services/glucosa.ts`)
- Pressure service → External API: sends pressure requests (evidence: `src/services/presion.ts`)
- Root navigation → Tab navigation: hosts tab routes (evidence: `README.md`)
