# simonequeiroz/cti-insights architecture

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

- Interactive diagram: https://gitdiagram.com/simonequeiroz/cti-insights
- Repository: https://github.com/simonequeiroz/cti-insights

## Overview

CTI Insights is a commercial-customer spreadsheet treatment and analysis product. The documented user flow is public home → simulated login → staged spreadsheet import → browser-stored customer base → dashboard and reports; administrators also manage pending accounts. A separate Python analytics pipeline is implemented for cleaning, analysis and database persistence, but the README says the Vue app and Spring Boot are not yet integrated. Edges reflect excerpts and explicit README statements; unsampled feature links are omitted where their callers are not shown.

Main entry points: [`frontend-vue/src/router/index.js`](https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/router/index.js) (Routes and guards), [`frontend-vue/src/stores/uploadStore.js`](https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/stores/uploadStore.js) (Import state and history), [`analytics-python/main.py`](https://github.com/simonequeiroz/cti-insights/blob/main/analytics-python/main.py) (Batch orchestrator), [`frontend-vue/src/stores/authStore.js`](https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/stores/authStore.js) (Session and roles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Vue application"]
  node_router["Routes and guards<br/>[index.js]"]
  node_home["Public home<br/>[Home.vue]"]
  node_authui["Login and signup<br/>[Login.vue]"]
  node_authstore["Session and roles<br/>[authStore.js]"]
  node_useradmin["User administration<br/>[Usuarios.vue]"]
end

subgraph group_import["Spreadsheet import"]
  node_uploadui["Import workflow UI<br/>[UploadView.vue]"]
  node_uploadsteps["Import stages<br/>[EtapaEnviar.vue]"]
  node_etl["Spreadsheet ETL<br/>[etl.js]"]
  node_uploadstore["Import state and history<br/>[uploadStore.js]"]
  node_preview["Client preview<br/>[PreviaClientes.vue]"]
end

subgraph group_data["Client data and analytics"]
  node_api["Browser data service<br/>[api.js]"]
  node_clientstore["Shared client base<br/>[clientesStore.js]"]
  node_browserstore[("Browser storage")]
  node_dashboard["Dashboard and KPIs<br/>[Dashboard.vue]"]
  node_reports["Client reports<br/>[Relatorios.vue]"]
end

subgraph group_python["Python processing"]
  node_pythonapi["Analytics API entry<br/>[api.py]"]
  node_batch["Batch orchestrator<br/>[main.py]"]
  node_clean["Data cleaning<br/>[limpeza.py]"]
  node_analysis["Statistics and insights<br/>[analise.py]"]
  node_pydb[("Analytics persistence<br/>[banco.py]")]
end

subgraph group_backend["Spring Boot"]
  node_spring["Spring Boot starter"]
end

node_visitor(("Visitor / user"))

node_visitor -->|"opens"| node_home
node_visitor -->|"signs in"| node_authui
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_authui
node_router -->|"routes to"| node_uploadui
node_router -->|"routes to"| node_dashboard
node_router -->|"routes to"| node_reports
node_router -->|"routes to"| node_useradmin
node_router -->|"checks access"| node_authstore
node_authui -->|"uses session"| node_authstore
node_authstore -->|"calls auth"| node_api
node_uploadui -->|"presents stages"| node_uploadsteps
node_uploadsteps -->|"submits import"| node_uploadstore
node_uploadstore -->|"parses and validates"| node_etl
node_uploadstore -->|"replaces base"| node_clientstore
node_uploadstore -->|"saves history"| node_api
node_uploadsteps -->|"shows preview"| node_preview
node_clientstore -->|"loads and saves"| node_api
node_api -->|"persists locally"| node_browserstore
node_dashboard -->|"reads clients"| node_clientstore
node_reports -->|"reads clients"| node_clientstore
node_useradmin -->|"manages accounts"| node_authstore
node_pythonapi -->|"invokes processing"| node_batch
node_batch -->|"cleans rows"| node_clean
node_batch -->|"calculates metrics"| node_analysis
node_batch -->|"writes results"| node_pydb

click node_router "https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/router/index.js"
click node_home "https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/views/Home.vue"
click node_authui "https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/views/Login.vue"
click node_authstore "https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/stores/authStore.js"
click node_api "https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/services/api.js"
click node_uploadui "https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/views/UploadView.vue"
click node_uploadsteps "https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/components/importacao/EtapaEnviar.vue"
click node_etl "https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/utils/etl.js"
click node_uploadstore "https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/stores/uploadStore.js"
click node_preview "https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/components/PreviaClientes.vue"
click node_clientstore "https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/stores/clientesStore.js"
click node_dashboard "https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/views/Dashboard.vue"
click node_reports "https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/views/Relatorios.vue"
click node_useradmin "https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/views/Usuarios.vue"
click node_pythonapi "https://github.com/simonequeiroz/cti-insights/blob/main/analytics-python/api.py"
click node_batch "https://github.com/simonequeiroz/cti-insights/blob/main/analytics-python/main.py"
click node_clean "https://github.com/simonequeiroz/cti-insights/blob/main/analytics-python/limpeza.py"
click node_analysis "https://github.com/simonequeiroz/cti-insights/blob/main/analytics-python/analise.py"
click node_pydb "https://github.com/simonequeiroz/cti-insights/blob/main/analytics-python/banco.py"
click node_spring "https://github.com/simonequeiroz/cti-insights/blob/main/backend-java/src/main/java/br/com/datapulse/ctiinsights/CtiInsightsApplication.java"

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_router,node_home,node_authui,node_authstore,node_useradmin,node_visitor toneBlue
class node_uploadui,node_uploadsteps,node_etl,node_uploadstore,node_preview toneAmber
class node_api,node_clientstore,node_browserstore,node_dashboard,node_reports toneMint
class node_pythonapi,node_batch,node_clean,node_analysis,node_pydb toneRose
class node_spring toneIndigo
```

## Components

### Vue application

- [Routes and guards](https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/router/index.js): `frontend-vue/src/router/index.js`
- [Public home](https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/views/Home.vue): `frontend-vue/src/views/Home.vue`
- [Login and signup](https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/views/Login.vue): `frontend-vue/src/views/Login.vue`
- [Session and roles](https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/stores/authStore.js): `frontend-vue/src/stores/authStore.js`
- [User administration](https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/views/Usuarios.vue): `frontend-vue/src/views/Usuarios.vue`

### Spreadsheet import

- [Import workflow UI](https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/views/UploadView.vue): `frontend-vue/src/views/UploadView.vue`
- [Import stages](https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/components/importacao/EtapaEnviar.vue): `frontend-vue/src/components/importacao/EtapaEnviar.vue`
- [Spreadsheet ETL](https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/utils/etl.js): `frontend-vue/src/utils/etl.js`
- [Import state and history](https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/stores/uploadStore.js): `frontend-vue/src/stores/uploadStore.js`
- [Client preview](https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/components/PreviaClientes.vue): `frontend-vue/src/components/PreviaClientes.vue`

### Client data and analytics

- [Browser data service](https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/services/api.js): `frontend-vue/src/services/api.js`
- [Shared client base](https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/stores/clientesStore.js): `frontend-vue/src/stores/clientesStore.js`
- **Browser storage**
- [Dashboard and KPIs](https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/views/Dashboard.vue): `frontend-vue/src/views/Dashboard.vue`
- [Client reports](https://github.com/simonequeiroz/cti-insights/blob/main/frontend-vue/src/views/Relatorios.vue): `frontend-vue/src/views/Relatorios.vue`

### Python processing

- [Analytics API entry](https://github.com/simonequeiroz/cti-insights/blob/main/analytics-python/api.py): `analytics-python/api.py`
- [Batch orchestrator](https://github.com/simonequeiroz/cti-insights/blob/main/analytics-python/main.py): `analytics-python/main.py`
- [Data cleaning](https://github.com/simonequeiroz/cti-insights/blob/main/analytics-python/limpeza.py): `analytics-python/limpeza.py`
- [Statistics and insights](https://github.com/simonequeiroz/cti-insights/blob/main/analytics-python/analise.py): `analytics-python/analise.py`
- [Analytics persistence](https://github.com/simonequeiroz/cti-insights/blob/main/analytics-python/banco.py): `analytics-python/banco.py`

### Spring Boot

- [Spring Boot starter](https://github.com/simonequeiroz/cti-insights/blob/main/backend-java/src/main/java/br/com/datapulse/ctiinsights/CtiInsightsApplication.java): `backend-java/src/main/java/br/com/datapulse/ctiinsights/CtiInsightsApplication.java`

### Other components

- **Visitor / user**

## Connections

- Visitor / user → Public home: opens (evidence: `README.md`)
- Visitor / user → Login and signup: signs in (evidence: `README.md`)
- Routes and guards → Public home: routes to (evidence: `frontend-vue/src/router/index.js`)
- Routes and guards → Login and signup: routes to (evidence: `frontend-vue/src/router/index.js`)
- Routes and guards → Import workflow UI: routes to (evidence: `frontend-vue/src/router/index.js`)
- Routes and guards → Dashboard and KPIs: routes to (evidence: `frontend-vue/src/router/index.js`)
- Routes and guards → Client reports: routes to (evidence: `frontend-vue/src/router/index.js`)
- Routes and guards → User administration: routes to (evidence: `frontend-vue/src/router/index.js`)
- Routes and guards → Session and roles: checks access (evidence: `frontend-vue/src/router/index.js`)
- Login and signup → Session and roles: uses session (evidence: `frontend-vue/src/views/Login.vue`)
- Session and roles → Browser data service: calls auth (evidence: `frontend-vue/src/stores/authStore.js`)
- Import workflow UI → Import stages: presents stages (evidence: `README.md`)
- Import stages → Import state and history: submits import (evidence: `frontend-vue/src/components/importacao/EtapaEnviar.vue`)
- Import state and history → Spreadsheet ETL: parses and validates (evidence: `frontend-vue/src/stores/uploadStore.js`)
- Import state and history → Shared client base: replaces base (evidence: `frontend-vue/src/stores/uploadStore.js`)
- Import state and history → Browser data service: saves history (evidence: `frontend-vue/src/stores/uploadStore.js`)
- Import stages → Client preview: shows preview
- Shared client base → Browser data service: loads and saves (evidence: `frontend-vue/src/stores/clientesStore.js`)
- Browser data service → Browser storage: persists locally (evidence: `README.md`)
- Dashboard and KPIs → Shared client base: reads clients (evidence: `frontend-vue/src/views/Dashboard.vue`)
- Client reports → Shared client base: reads clients (evidence: `frontend-vue/src/views/Relatorios.vue`)
- User administration → Session and roles: manages accounts (evidence: `frontend-vue/src/views/Usuarios.vue`)
- Analytics API entry → Batch orchestrator: invokes processing (evidence: `analytics-python/api.py`)
- Batch orchestrator → Data cleaning: cleans rows (evidence: `analytics-python/main.py`)
- Batch orchestrator → Statistics and insights: calculates metrics (evidence: `analytics-python/main.py`)
- Batch orchestrator → Analytics persistence: writes results (evidence: `analytics-python/main.py`)
