# slimeball12399/pivot_expert_in_teams architecture

> Architecture diagram of the GitHub repository slimeball12399/pivot_expert_in_teams, 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/slimeball12399/pivot_expert_in_teams
- Repository: https://github.com/slimeball12399/pivot_expert_in_teams

## Overview

Pivot combines a mobile client with Django account services and a web interface. The main verified workflow is mobile sign-in or registration: form hooks validate input, the auth provider invokes API functions, and the API client manages requests and stored tokens. On the server, API views use serializers and account services for account, verification, and profile operations; services use account models and email/verification helpers. Web account flows are also present. The README is empty, and some routing and integration details were not sampled, so uncertain links are omitted or marked unverified.

Main entry points: [`Server/accounts/services.py`](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/accounts/services.py) (Account workflows), [`Server/accounts/models.py`](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/accounts/models.py) (Account records), [`Server/web/views.py`](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/web/views.py) (Web views), [`Server/api/views.py`](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/api/views.py) (API views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile app"]
  node_authscreen["Auth screen<br/>[AuthScreen.js]"]
  node_loginform["Login form<br/>[useLoginForm.js]"]
  node_registerform["Registration form<br/>[useRegisterForm.js]"]
  node_authprovider["Auth state<br/>[AuthProvider.js]"]
  node_authapi["Auth API<br/>[auth.js]"]
  node_apiclient["Request client<br/>[client.js]"]
  node_tokenstore[("Secure token store<br/>[storage.js]")]
  node_validators["Input validation<br/>[validators.js]"]
end

subgraph group_identity["Account services"]
  node_services["Account workflows<br/>[services.py]"]
  node_manager["User manager<br/>[manager.py]"]
  node_accountmodels[("Account records<br/>[models.py]")]
  node_accountvalidators["Account validation<br/>[validators.py]"]
  node_verification["Code verification<br/>[verification.py]"]
  node_emails["Email rendering<br/>[emails.py]"]
end

subgraph group_api["HTTP API"]
  node_views["API views<br/>[views.py]"]
  node_serializers["API serializers<br/>[serializers.py]"]
  node_exceptions["API errors<br/>[exceptions.py]"]
end

subgraph group_web["Web interface"]
  node_webviews["Web views<br/>[views.py]"]
  node_webforms["Web forms<br/>[forms.py]"]
end

subgraph group_voice["Voice utility"]
  node_voicemock["Voice feature extraction"]
end

node_user(("App user"))
node_backend{{"Django API"}}
node_webuser(("Web user"))

node_user -->|"uses"| node_authscreen
node_authscreen -->|"renders"| node_loginform
node_authscreen -->|"renders"| node_registerform
node_loginform -->|"validates with"| node_validators
node_registerform -->|"validates with"| node_validators
node_loginform -->|"calls login"| node_authprovider
node_registerform -->|"calls register"| node_authprovider
node_authprovider -->|"calls"| node_authapi
node_authprovider -->|"reads and writes"| node_tokenstore
node_authapi -->|"requests through"| node_apiclient
node_apiclient -->|"reads and refreshes"| node_tokenstore
node_apiclient -->|"sends HTTP requests"| node_backend
node_backend -.->|"routes requests to"| node_views
node_views -->|"uses"| node_serializers
node_views -->|"calls"| node_services
node_views -->|"uses"| node_exceptions
node_serializers -->|"reads account data"| node_accountmodels
node_serializers -->|"uses"| node_services
node_services -->|"reads and updates"| node_accountmodels
node_services -->|"sends mail via"| node_emails
node_services -->|"uses"| node_verification
node_manager -->|"creates users"| node_accountmodels
node_manager -->|"schedules verification"| node_services
node_accountmodels -->|"configures"| node_manager
node_accountmodels -->|"validates fields with"| node_accountvalidators
node_webuser -.->|"uses"| node_webviews
node_webviews -->|"uses"| node_webforms
node_webviews -->|"calls"| node_services
node_webviews -->|"uses"| node_emails
node_webviews -->|"reads account data"| node_accountmodels

click node_authscreen "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/MobileApp/src/screens/AuthScreen.js"
click node_loginform "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/MobileApp/src/hooks/useLoginForm.js"
click node_registerform "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/MobileApp/src/hooks/useRegisterForm.js"
click node_authprovider "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/MobileApp/src/providers/AuthProvider.js"
click node_authapi "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/MobileApp/src/api/auth.js"
click node_apiclient "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/MobileApp/src/api/client.js"
click node_tokenstore "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/MobileApp/src/utils/storage.js"
click node_validators "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/MobileApp/src/utils/validators.js"
click node_views "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/api/views.py"
click node_serializers "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/api/serializers.py"
click node_exceptions "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/api/exceptions.py"
click node_services "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/accounts/services.py"
click node_manager "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/accounts/manager.py"
click node_accountmodels "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/accounts/models.py"
click node_accountvalidators "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/accounts/validators.py"
click node_verification "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/accounts/verification.py"
click node_emails "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/accounts/emails.py"
click node_webviews "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/web/views.py"
click node_webforms "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/web/forms.py"
click node_voicemock "https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/VoiceMock/FeatureExtractor.py"

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_authscreen,node_loginform,node_registerform,node_authprovider,node_authapi,node_apiclient,node_tokenstore,node_validators,node_user,node_webuser toneBlue
class node_services,node_manager,node_accountmodels,node_accountvalidators,node_verification,node_emails toneAmber
class node_views,node_serializers,node_exceptions,node_backend toneMint
class node_webviews,node_webforms toneRose
class node_voicemock toneIndigo
```

## Components

### Mobile app

- [Auth screen](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/MobileApp/src/screens/AuthScreen.js): `MobileApp/src/screens/AuthScreen.js`
- [Login form](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/MobileApp/src/hooks/useLoginForm.js): `MobileApp/src/hooks/useLoginForm.js`
- [Registration form](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/MobileApp/src/hooks/useRegisterForm.js): `MobileApp/src/hooks/useRegisterForm.js`
- [Auth state](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/MobileApp/src/providers/AuthProvider.js): `MobileApp/src/providers/AuthProvider.js`
- [Auth API](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/MobileApp/src/api/auth.js): `MobileApp/src/api/auth.js`
- [Request client](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/MobileApp/src/api/client.js): `MobileApp/src/api/client.js`
- [Secure token store](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/MobileApp/src/utils/storage.js): `MobileApp/src/utils/storage.js`
- [Input validation](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/MobileApp/src/utils/validators.js): `MobileApp/src/utils/validators.js`

### Account services

- [Account workflows](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/accounts/services.py): `Server/accounts/services.py`
- [User manager](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/accounts/manager.py): `Server/accounts/manager.py`
- [Account records](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/accounts/models.py): `Server/accounts/models.py`
- [Account validation](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/accounts/validators.py): `Server/accounts/validators.py`
- [Code verification](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/accounts/verification.py): `Server/accounts/verification.py`
- [Email rendering](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/accounts/emails.py): `Server/accounts/emails.py`

### HTTP API

- [API views](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/api/views.py): `Server/api/views.py`
- [API serializers](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/api/serializers.py): `Server/api/serializers.py`
- [API errors](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/api/exceptions.py): `Server/api/exceptions.py`

### Web interface

- [Web views](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/web/views.py): `Server/web/views.py`
- [Web forms](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/Server/web/forms.py): `Server/web/forms.py`

### Voice utility

- [Voice feature extraction](https://github.com/slimeball12399/pivot_expert_in_teams/blob/main/VoiceMock/FeatureExtractor.py): `VoiceMock/FeatureExtractor.py`

### Other components

- **App user**
- **Django API**
- **Web user**

## Connections

- App user → Auth screen: uses (evidence: `MobileApp/src/screens/AuthScreen.js`)
- Auth screen → Login form: renders (evidence: `MobileApp/src/screens/AuthScreen.js`)
- Auth screen → Registration form: renders (evidence: `MobileApp/src/screens/AuthScreen.js`)
- Login form → Input validation: validates with (evidence: `MobileApp/src/hooks/useLoginForm.js`)
- Registration form → Input validation: validates with (evidence: `MobileApp/src/hooks/useRegisterForm.js`)
- Login form → Auth state: calls login (evidence: `MobileApp/src/hooks/useLoginForm.js`)
- Registration form → Auth state: calls register (evidence: `MobileApp/src/hooks/useRegisterForm.js`)
- Auth state → Auth API: calls (evidence: `MobileApp/src/providers/AuthProvider.js`)
- Auth state → Secure token store: reads and writes (evidence: `MobileApp/src/providers/AuthProvider.js`)
- Auth API → Request client: requests through (evidence: `MobileApp/src/api/auth.js`)
- Request client → Secure token store: reads and refreshes (evidence: `MobileApp/src/api/client.js`)
- Request client → Django API: sends HTTP requests (evidence: `MobileApp/src/api/client.js`)
- Django API → API views: routes requests to
- API views → API serializers: uses (evidence: `Server/api/views.py`)
- API views → Account workflows: calls (evidence: `Server/api/views.py`)
- API views → API errors: uses (evidence: `Server/api/views.py`)
- API serializers → Account records: reads account data (evidence: `Server/api/serializers.py`)
- API serializers → Account workflows: uses (evidence: `Server/api/serializers.py`)
- Account workflows → Account records: reads and updates (evidence: `Server/accounts/services.py`)
- Account workflows → Email rendering: sends mail via (evidence: `Server/accounts/services.py`)
- Account workflows → Code verification: uses (evidence: `Server/accounts/services.py`)
- User manager → Account records: creates users (evidence: `Server/accounts/manager.py`)
- User manager → Account workflows: schedules verification (evidence: `Server/accounts/manager.py`)
- Account records → User manager: configures (evidence: `Server/accounts/models.py`)
- Account records → Account validation: validates fields with (evidence: `Server/accounts/models.py`)
- Web user → Web views: uses
- Web views → Web forms: uses (evidence: `Server/web/views.py`)
- Web views → Account workflows: calls (evidence: `Server/web/views.py`)
- Web views → Email rendering: uses (evidence: `Server/web/views.py`)
- Web views → Account records: reads account data (evidence: `Server/web/views.py`)
