# sahilchoudhari2004/loginsystem architecture

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

- Interactive diagram: https://gitdiagram.com/sahilchoudhari2004/loginsystem
- Repository: https://github.com/sahilchoudhari2004/loginsystem

## Overview

This is a small browser-based registration and login app. Users submit registration details, which the script stores in localStorage before redirecting to login; login checks those stored credentials and redirects successful users to the dashboard. The same script also animates a particle background when a canvas with the expected ID exists. The HTML and CSS contents were not provided, so their specific elements and connections beyond those referenced by the script are uncertain.

Main entry points: [`script.js`](https://github.com/sahilchoudhari2004/loginsystem/blob/main/script.js) (Registration handler), [`login.html`](https://github.com/sahilchoudhari2004/loginsystem/blob/main/login.html) (Login page), [`dashboard.html`](https://github.com/sahilchoudhari2004/loginsystem/blob/main/dashboard.html) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_auth["Authentication"]
  node_register_page["Registration page<br/>[register.html]"]
  node_registration["Registration handler<br/>[script.js]"]
  node_user_store[("Browser localStorage")]
  node_login_page["Login page<br/>[login.html]"]
  node_login["Login handler<br/>[script.js]"]
end

subgraph group_ui["User interface"]
  node_dashboard["Dashboard<br/>[dashboard.html]"]
  node_particle_animation["Particle animation<br/>[script.js]"]
  node_styles["Stylesheet<br/>[style.css]"]
end

node_visitor(("Visitor"))

node_visitor -->|"submits form"| node_registration
node_registration -->|"stores user"| node_user_store
node_registration -->|"redirects to"| node_login_page
node_visitor -->|"submits form"| node_login
node_login -->|"reads user"| node_user_store
node_login -->|"redirects to"| node_dashboard

click node_register_page "https://github.com/sahilchoudhari2004/loginsystem/blob/main/register.html"
click node_registration "https://github.com/sahilchoudhari2004/loginsystem/blob/main/script.js"
click node_login_page "https://github.com/sahilchoudhari2004/loginsystem/blob/main/login.html"
click node_login "https://github.com/sahilchoudhari2004/loginsystem/blob/main/script.js"
click node_dashboard "https://github.com/sahilchoudhari2004/loginsystem/blob/main/dashboard.html"
click node_particle_animation "https://github.com/sahilchoudhari2004/loginsystem/blob/main/script.js"
click node_styles "https://github.com/sahilchoudhari2004/loginsystem/blob/main/style.css"

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_register_page,node_registration,node_user_store,node_login_page,node_login toneBlue
class node_dashboard,node_particle_animation,node_styles toneAmber
class node_visitor toneIndigo
```

## Components

### Authentication

- [Registration page](https://github.com/sahilchoudhari2004/loginsystem/blob/main/register.html): `register.html`
- [Registration handler](https://github.com/sahilchoudhari2004/loginsystem/blob/main/script.js): `script.js`
- **Browser localStorage**
- [Login page](https://github.com/sahilchoudhari2004/loginsystem/blob/main/login.html): `login.html`
- [Login handler](https://github.com/sahilchoudhari2004/loginsystem/blob/main/script.js): `script.js`

### User interface

- [Dashboard](https://github.com/sahilchoudhari2004/loginsystem/blob/main/dashboard.html): `dashboard.html`
- [Particle animation](https://github.com/sahilchoudhari2004/loginsystem/blob/main/script.js): `script.js`
- [Stylesheet](https://github.com/sahilchoudhari2004/loginsystem/blob/main/style.css): `style.css`

### Other components

- **Visitor**

## Connections

- Visitor → Registration handler: submits form (evidence: `script.js`)
- Registration handler → Browser localStorage: stores user (evidence: `script.js`)
- Registration handler → Login page: redirects to (evidence: `script.js`)
- Visitor → Login handler: submits form (evidence: `script.js`)
- Login handler → Browser localStorage: reads user (evidence: `script.js`)
- Login handler → Dashboard: redirects to (evidence: `script.js`)
