# anel006/finalll architecture

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

- Interactive diagram: https://gitdiagram.com/anel006/finalll
- Repository: https://github.com/anel006/finalll

## Overview

This is a portfolio showcase with account registration, login and optional email-delivered two-factor verification, plus a project carousel and weather visualization. The sampled server owns authentication, serves the frontend and mounts the carousel and weather routers. Carousel content is persisted in MongoDB; weather routes call external providers. The README describes visualization and responsive UI, but the visualization wiring and several listed routes were not sampled, so uncertain connections are omitted.

Main entry points: [`server.js`](https://github.com/anel006/finalll/blob/main/server.js) (Express server), [`routes/carousel.js`](https://github.com/anel006/finalll/blob/main/routes/carousel.js) (Carousel API), [`controllers/emailController.js`](https://github.com/anel006/finalll/blob/main/controllers/emailController.js) (Email delivery), [`frontend/signup.js`](https://github.com/anel006/finalll/blob/main/frontend/signup.js) (Sign-up form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_signup["Sign-up form<br/>[signup.js]"]
  node_login["Login page<br/>[login.html]"]
  node_verify["Verification page<br/>[verify.js]"]
  node_portfolio_ui["Portfolio carousel<br/>[portfolio.js]"]
  node_visualization["Weather charts<br/>[visualization.html]"]
end

subgraph group_identity["Identity and access"]
  node_server["Express server<br/>[server.js]"]
  node_auth["JWT access checks<br/>[auth.js]"]
  node_users[("User records<br/>[User.js]")]
  node_email["Email delivery<br/>[emailController.js]"]
end

subgraph group_showcase["Portfolio content"]
  node_carousel_routes["Carousel API<br/>[carousel.js]"]
  node_carousel_model[("Carousel records<br/>[Carousel.js]")]
  node_portfolio_routes["Portfolio routes<br/>[portfolio.js]"]
  node_portfolio_model[("Portfolio records<br/>[Portfolio.js]")]
end

subgraph group_data["Weather data"]
  node_weather_city["City weather API<br/>[stockRoutes.js]"]
  node_weather_fixed["Fixed-city weather API<br/>[currencyRoutes.js]"]
end

node_visitor(("Visitor"))
node_smtp["SMTP service"]
node_visualcrossing["Visual Crossing"]
node_openweather["OpenWeather"]

node_visitor -->|"starts registration"| node_signup
node_visitor -->|"starts login"| node_login
node_signup -->|"submits account"| node_server
node_server -->|"saves and reads"| node_users
node_server -->|"requests email"| node_email
node_email -->|"sends messages"| node_smtp
node_login -->|"submits credentials"| node_server
node_verify -->|"submits code"| node_server
node_server -->|"requests verification"| node_verify
node_server -->|"uses token checks"| node_auth
node_visitor -->|"browses projects"| node_portfolio_ui
node_portfolio_ui -->|"fetches and edits"| node_carousel_routes
node_server -->|"mounts API"| node_carousel_routes
node_carousel_routes -->|"reads and writes"| node_carousel_model
node_carousel_routes -->|"requests action notices"| node_email
node_visitor -->|"views weather charts"| node_visualization
node_server -->|"mounts API"| node_weather_city
node_weather_city -->|"fetches city weather"| node_visualcrossing
node_server -->|"mounts API"| node_weather_fixed
node_weather_fixed -->|"fetches fixed-city weather"| node_openweather
node_portfolio_routes -->|"reads and writes"| node_portfolio_model

click node_signup "https://github.com/anel006/finalll/blob/main/frontend/signup.js"
click node_login "https://github.com/anel006/finalll/blob/main/frontend/login.html"
click node_verify "https://github.com/anel006/finalll/blob/main/frontend/verify.js"
click node_portfolio_ui "https://github.com/anel006/finalll/blob/main/frontend/portfolio.js"
click node_visualization "https://github.com/anel006/finalll/blob/main/frontend/visualization.html"
click node_server "https://github.com/anel006/finalll/blob/main/server.js"
click node_auth "https://github.com/anel006/finalll/blob/main/middlewares/auth.js"
click node_users "https://github.com/anel006/finalll/blob/main/models/User.js"
click node_email "https://github.com/anel006/finalll/blob/main/controllers/emailController.js"
click node_carousel_routes "https://github.com/anel006/finalll/blob/main/routes/carousel.js"
click node_carousel_model "https://github.com/anel006/finalll/blob/main/models/Carousel.js"
click node_portfolio_routes "https://github.com/anel006/finalll/blob/main/routes/portfolio.js"
click node_portfolio_model "https://github.com/anel006/finalll/blob/main/models/Portfolio.js"
click node_weather_city "https://github.com/anel006/finalll/blob/main/routes/stockRoutes.js"
click node_weather_fixed "https://github.com/anel006/finalll/blob/main/routes/currencyRoutes.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_signup,node_login,node_verify,node_portfolio_ui,node_visualization toneBlue
class node_server,node_auth,node_users,node_email toneAmber
class node_carousel_routes,node_carousel_model,node_portfolio_routes,node_portfolio_model toneMint
class node_weather_city,node_weather_fixed toneRose
class node_visitor,node_smtp,node_visualcrossing,node_openweather toneIndigo
```

## Components

### Web experience

- [Sign-up form](https://github.com/anel006/finalll/blob/main/frontend/signup.js): `frontend/signup.js`
- [Login page](https://github.com/anel006/finalll/blob/main/frontend/login.html): `frontend/login.html`
- [Verification page](https://github.com/anel006/finalll/blob/main/frontend/verify.js): `frontend/verify.js`
- [Portfolio carousel](https://github.com/anel006/finalll/blob/main/frontend/portfolio.js): `frontend/portfolio.js`
- [Weather charts](https://github.com/anel006/finalll/blob/main/frontend/visualization.html): `frontend/visualization.html`

### Identity and access

- [Express server](https://github.com/anel006/finalll/blob/main/server.js): `server.js`
- [JWT access checks](https://github.com/anel006/finalll/blob/main/middlewares/auth.js): `middlewares/auth.js`
- [User records](https://github.com/anel006/finalll/blob/main/models/User.js): `models/User.js`
- [Email delivery](https://github.com/anel006/finalll/blob/main/controllers/emailController.js): `controllers/emailController.js`

### Portfolio content

- [Carousel API](https://github.com/anel006/finalll/blob/main/routes/carousel.js): `routes/carousel.js`
- [Carousel records](https://github.com/anel006/finalll/blob/main/models/Carousel.js): `models/Carousel.js`
- [Portfolio routes](https://github.com/anel006/finalll/blob/main/routes/portfolio.js): `routes/portfolio.js`
- [Portfolio records](https://github.com/anel006/finalll/blob/main/models/Portfolio.js): `models/Portfolio.js`

### Weather data

- [City weather API](https://github.com/anel006/finalll/blob/main/routes/stockRoutes.js): `routes/stockRoutes.js`
- [Fixed-city weather API](https://github.com/anel006/finalll/blob/main/routes/currencyRoutes.js): `routes/currencyRoutes.js`

### Other components

- **Visitor**
- **SMTP service**
- **Visual Crossing**
- **OpenWeather**

## Connections

- Visitor → Sign-up form: starts registration
- Visitor → Login page: starts login
- Sign-up form → Express server: submits account
- Express server → User records: saves and reads
- Express server → Email delivery: requests email
- Email delivery → SMTP service: sends messages
- Login page → Express server: submits credentials
- Verification page → Express server: submits code
- Express server → Verification page: requests verification
- Express server → JWT access checks: uses token checks
- Visitor → Portfolio carousel: browses projects
- Portfolio carousel → Carousel API: fetches and edits
- Express server → Carousel API: mounts API
- Carousel API → Carousel records: reads and writes
- Carousel API → Email delivery: requests action notices
- Visitor → Weather charts: views weather charts
- Express server → City weather API: mounts API
- City weather API → Visual Crossing: fetches city weather
- Express server → Fixed-city weather API: mounts API
- Fixed-city weather API → OpenWeather: fetches fixed-city weather
- Portfolio routes → Portfolio records: reads and writes
