# rektive/interactive-login architecture

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

- Interactive diagram: https://gitdiagram.com/rektive/interactive-login
- Repository: https://github.com/rektive/interactive-login

## Overview

This is an interactive, themed login experience: users enter credentials, the browser requests authentication, and successful login triggers a character transition into a dashboard. The frontend also supports theme switching, eye tracking, typing/proximity reactions, and password visibility; on reload it checks for an existing session. The Express backend issues, verifies, and clears JWT cookies. The README documents the visual capabilities; the sampled frontend excerpt is partial, so edges are limited to relationships shown in the excerpt or README.

Main entry points: [`public/script.js`](https://github.com/rektive/interactive-login/blob/main/public/script.js) (Character interactions), [`public/index.html`](https://github.com/rektive/interactive-login/blob/main/public/index.html) (Login page), [`server.js`](https://github.com/rektive/interactive-login/blob/main/server.js) (JWT cookie session), [`public/style.css`](https://github.com/rektive/interactive-login/blob/main/public/style.css) (Themes and animation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Interactive frontend"]
  node_page["Login page<br/>[index.html]"]
  node_styles["Themes and animation<br/>[style.css]"]
  node_interactions["Character interactions<br/>[script.js]"]
  node_loginflow["Login and dashboard<br/>[script.js]"]
end

subgraph group_backend["Authentication backend"]
  node_static["Static page hosting<br/>[server.js]"]
  node_login["Login endpoint<br/>[server.js]"]
  node_verify["Session verification<br/>[server.js]"]
  node_logout["Logout endpoint<br/>[server.js]"]
  node_jwt["JWT cookie session<br/>[server.js]"]
end

node_user(("User"))

node_user -->|"uses"| node_page
node_page -.->|"loads"| node_styles
node_page -.->|"loads"| node_interactions
node_user -->|"interacts"| node_interactions
node_interactions -->|"updates appearance"| node_styles
node_interactions -->|"submits credentials"| node_login
node_login -->|"issues cookie"| node_jwt
node_interactions -->|"checks session"| node_verify
node_verify -->|"verifies token"| node_jwt
node_interactions -.->|"requests logout"| node_logout
node_logout -->|"clears cookie"| node_jwt
node_user -.->|"requests page"| node_static
node_static -->|"serves files"| node_page

click node_page "https://github.com/rektive/interactive-login/blob/main/public/index.html"
click node_styles "https://github.com/rektive/interactive-login/blob/main/public/style.css"
click node_interactions "https://github.com/rektive/interactive-login/blob/main/public/script.js"
click node_loginflow "https://github.com/rektive/interactive-login/blob/main/public/script.js"
click node_static "https://github.com/rektive/interactive-login/blob/main/server.js"
click node_login "https://github.com/rektive/interactive-login/blob/main/server.js"
click node_verify "https://github.com/rektive/interactive-login/blob/main/server.js"
click node_logout "https://github.com/rektive/interactive-login/blob/main/server.js"
click node_jwt "https://github.com/rektive/interactive-login/blob/main/server.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_page,node_styles,node_interactions,node_loginflow,node_user toneBlue
class node_static,node_login,node_verify,node_logout,node_jwt toneAmber
```

## Components

### Interactive frontend

- [Login page](https://github.com/rektive/interactive-login/blob/main/public/index.html): `public/index.html`
- [Themes and animation](https://github.com/rektive/interactive-login/blob/main/public/style.css): `public/style.css`
- [Character interactions](https://github.com/rektive/interactive-login/blob/main/public/script.js): `public/script.js`
- [Login and dashboard](https://github.com/rektive/interactive-login/blob/main/public/script.js): `public/script.js`

### Authentication backend

- [Static page hosting](https://github.com/rektive/interactive-login/blob/main/server.js): `server.js`
- [Login endpoint](https://github.com/rektive/interactive-login/blob/main/server.js): `server.js`
- [Session verification](https://github.com/rektive/interactive-login/blob/main/server.js): `server.js`
- [Logout endpoint](https://github.com/rektive/interactive-login/blob/main/server.js): `server.js`
- [JWT cookie session](https://github.com/rektive/interactive-login/blob/main/server.js): `server.js`

### Other components

- **User**

## Connections

- User → Login page: uses (evidence: `README.md`)
- Login page → Themes and animation: loads
- Login page → Character interactions: loads
- User → Character interactions: interacts (evidence: `README.md`)
- Character interactions → Themes and animation: updates appearance (evidence: `README.md`)
- Character interactions → Login endpoint: submits credentials (evidence: `public/script.js`)
- Login endpoint → JWT cookie session: issues cookie (evidence: `server.js`)
- Character interactions → Session verification: checks session (evidence: `public/script.js`)
- Session verification → JWT cookie session: verifies token (evidence: `server.js`)
- Character interactions → Logout endpoint: requests logout
- Logout endpoint → JWT cookie session: clears cookie (evidence: `server.js`)
- User → Static page hosting: requests page
- Static page hosting → Login page: serves files (evidence: `server.js`)
