# ask-ia/projetoaskia architecture

> Architecture diagram of the GitHub repository ask-ia/projetoaskia, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ask-ia/projetoaskia
- Repository: https://github.com/ask-ia/projetoaskia

## Overview

AskIa is a web application whose visible workflow is browsing a home page and navigating to login or registration. The Angular router loads those page components; the home page assembles header, hero, feature, information, and confirmation sections. A Node/Angular server supports server-side rendering, while the backend is a Spring Boot application with a user model and SQL initialization file. The sampled code does not show authentication, AI request handling, frontend-to-backend calls, or database access, so those connections are omitted.

Main entry points: [`frontend/src/app/pages/home/home.ts`](https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/pages/home/home.ts) (Home page), [`frontend/src/app/app.routes.ts`](https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/app.routes.ts) (App routes), [`frontend/src/app/app.ts`](https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/app.ts) (Root app), [`frontend/src/server.ts`](https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/server.ts) (SSR handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Angular frontend"]
  node_app["Root app<br/>[app.ts]"]
  node_routes["App routes<br/>[app.routes.ts]"]
  node_login["Login page<br/>[login.ts]"]
  node_registration["Registration page<br/>[cadastro.ts]"]
end

subgraph group_home["Home experience"]
  node_home["Home page<br/>[home.ts]"]
  node_header["Header<br/>[app-header.ts]"]
  node_hero["Hero section<br/>[hero.ts]"]
  node_features["Features section<br/>[features.ts]"]
  node_info["Info section<br/>[info.ts]"]
  node_confirm["Confirmation section<br/>[confirm.ts]"]
end

subgraph group_server["Rendering server"]
  node_ssr["SSR handler<br/>[server.ts]"]
  node_server_bootstrap["Server bootstrap<br/>[main.server.ts]"]
end

subgraph group_backend["Spring backend"]
  node_backend_app["Spring application<br/>[IaApplication.java]"]
  node_user_model["User model<br/>[UserModel.java]"]
  node_sql_init["SQL initialization<br/>[init.sql]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_app
node_app -->|"hosts outlet"| node_routes
node_routes -->|"loads default"| node_home
node_routes -->|"loads login"| node_login
node_routes -->|"loads registration"| node_registration
node_home -->|"composes"| node_header
node_home -->|"composes"| node_hero
node_home -->|"composes"| node_features
node_home -->|"composes"| node_info
node_home -->|"composes"| node_confirm
node_ssr -->|"renders app"| node_server_bootstrap
node_backend_app --> node_user_model

click node_app "https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/app.ts"
click node_routes "https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/app.routes.ts"
click node_home "https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/pages/home/home.ts"
click node_header "https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/pages/home/components/app-header/app-header.ts"
click node_hero "https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/pages/home/components/hero/hero.ts"
click node_features "https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/pages/home/components/features/features.ts"
click node_info "https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/pages/home/components/info/info.ts"
click node_confirm "https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/pages/home/components/confirm/confirm.ts"
click node_login "https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/pages/login/login.ts"
click node_registration "https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/pages/cadastro/cadastro.ts"
click node_ssr "https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/server.ts"
click node_server_bootstrap "https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/main.server.ts"
click node_backend_app "https://github.com/ask-ia/projetoaskia/blob/main/backend/src/main/java/com/aski/IA/IaApplication.java"
click node_user_model "https://github.com/ask-ia/projetoaskia/blob/main/backend/src/main/java/com/aski/IA/model/UserModel.java"
click node_sql_init "https://github.com/ask-ia/projetoaskia/blob/main/backend/db/init.sql"

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_routes,node_login,node_registration toneBlue
class node_home,node_header,node_hero,node_features,node_info,node_confirm toneAmber
class node_ssr,node_server_bootstrap toneMint
class node_backend_app,node_user_model,node_sql_init toneRose
class node_visitor toneIndigo
```

## Components

### Angular frontend

- [Root app](https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/app.ts): `frontend/src/app/app.ts`
- [App routes](https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/app.routes.ts): `frontend/src/app/app.routes.ts`
- [Login page](https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/pages/login/login.ts): `frontend/src/app/pages/login/login.ts`
- [Registration page](https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/pages/cadastro/cadastro.ts): `frontend/src/app/pages/cadastro/cadastro.ts`

### Home experience

- [Home page](https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/pages/home/home.ts): `frontend/src/app/pages/home/home.ts`
- [Header](https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/pages/home/components/app-header/app-header.ts): `frontend/src/app/pages/home/components/app-header/app-header.ts`
- [Hero section](https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/pages/home/components/hero/hero.ts): `frontend/src/app/pages/home/components/hero/hero.ts`
- [Features section](https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/pages/home/components/features/features.ts): `frontend/src/app/pages/home/components/features/features.ts`
- [Info section](https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/pages/home/components/info/info.ts): `frontend/src/app/pages/home/components/info/info.ts`
- [Confirmation section](https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/app/pages/home/components/confirm/confirm.ts): `frontend/src/app/pages/home/components/confirm/confirm.ts`

### Rendering server

- [SSR handler](https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/server.ts): `frontend/src/server.ts`
- [Server bootstrap](https://github.com/ask-ia/projetoaskia/blob/main/frontend/src/main.server.ts): `frontend/src/main.server.ts`

### Spring backend

- [Spring application](https://github.com/ask-ia/projetoaskia/blob/main/backend/src/main/java/com/aski/IA/IaApplication.java): `backend/src/main/java/com/aski/IA/IaApplication.java`
- [User model](https://github.com/ask-ia/projetoaskia/blob/main/backend/src/main/java/com/aski/IA/model/UserModel.java): `backend/src/main/java/com/aski/IA/model/UserModel.java`
- [SQL initialization](https://github.com/ask-ia/projetoaskia/blob/main/backend/db/init.sql): `backend/db/init.sql`

### Other components

- **Visitor**

## Connections

- Visitor → Root app: opens
- Root app → App routes: hosts outlet
- App routes → Home page: loads default
- App routes → Login page: loads login
- App routes → Registration page: loads registration
- Home page → Header: composes
- Home page → Hero section: composes
- Home page → Features section: composes
- Home page → Info section: composes
- Home page → Confirmation section: composes
- SSR handler → Server bootstrap: renders app
- Spring application → User model
