# enduranceops/login-estatico-orm architecture

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

- Interactive diagram: https://gitdiagram.com/enduranceops/login-estatico-orm
- Repository: https://github.com/enduranceops/login-estatico-orm

## Overview

This is a small static-web login application backed by an Express server and PostgreSQL through Prisma. The main workflow is: a user submits the login form, browser-side validation runs, the browser posts credentials to the login endpoint, and the server looks up the user and returns a result; successful login navigates to the dashboard. The README also identifies simple validation and ORM-backed PostgreSQL access. Source excerpts show the key request and lookup; the schema contents and page markup were not sampled.

Main entry points: [`public/app.js`](https://github.com/enduranceops/login-estatico-orm/blob/main/public/app.js) (Login validation), [`server.js`](https://github.com/enduranceops/login-estatico-orm/blob/main/server.js) (Login endpoint), [`public/index.html`](https://github.com/enduranceops/login-estatico-orm/blob/main/public/index.html) (Login page), [`public/dashboard.html`](https://github.com/enduranceops/login-estatico-orm/blob/main/public/dashboard.html) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_login_page["Login page<br/>[index.html]"]
  node_login_logic["Login validation<br/>[app.js]"]
  node_dashboard["Dashboard<br/>[dashboard.html]"]
  node_static_assets["Web styling<br/>[style.css]"]
end

subgraph group_backend["Login server"]
  node_login_api["Login endpoint<br/>[server.js]"]
end

subgraph group_data["Persistence"]
  node_prisma_access["Prisma lookup<br/>[server.js]"]
  node_postgres[("PostgreSQL")]
  node_data_model["Prisma schema<br/>[schema.prisma]"]
end

node_user(("User"))

node_user -->|"submits credentials"| node_login_page
node_login_page -->|"loads behavior"| node_login_logic
node_login_logic -->|"posts credentials"| node_login_api
node_login_api -->|"looks up user"| node_prisma_access
node_prisma_access -->|"queries via ORM"| node_postgres
node_login_logic -->|"redirects on success"| node_dashboard
node_login_api -->|"serves static files"| node_login_page

click node_login_page "https://github.com/enduranceops/login-estatico-orm/blob/main/public/index.html"
click node_login_logic "https://github.com/enduranceops/login-estatico-orm/blob/main/public/app.js"
click node_dashboard "https://github.com/enduranceops/login-estatico-orm/blob/main/public/dashboard.html"
click node_static_assets "https://github.com/enduranceops/login-estatico-orm/blob/main/public/style.css"
click node_login_api "https://github.com/enduranceops/login-estatico-orm/blob/main/server.js"
click node_prisma_access "https://github.com/enduranceops/login-estatico-orm/blob/main/server.js"
click node_data_model "https://github.com/enduranceops/login-estatico-orm/blob/main/prisma/schema.prisma"

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_login_page,node_login_logic,node_dashboard,node_static_assets,node_user toneBlue
class node_login_api toneAmber
class node_prisma_access,node_postgres,node_data_model toneMint
```

## Components

### Web interface

- [Login page](https://github.com/enduranceops/login-estatico-orm/blob/main/public/index.html): `public/index.html`
- [Login validation](https://github.com/enduranceops/login-estatico-orm/blob/main/public/app.js): `public/app.js`
- [Dashboard](https://github.com/enduranceops/login-estatico-orm/blob/main/public/dashboard.html): `public/dashboard.html`
- [Web styling](https://github.com/enduranceops/login-estatico-orm/blob/main/public/style.css): `public/style.css`

### Login server

- [Login endpoint](https://github.com/enduranceops/login-estatico-orm/blob/main/server.js): `server.js`

### Persistence

- [Prisma lookup](https://github.com/enduranceops/login-estatico-orm/blob/main/server.js): `server.js`
- **PostgreSQL**
- [Prisma schema](https://github.com/enduranceops/login-estatico-orm/blob/main/prisma/schema.prisma): `prisma/schema.prisma`

### Other components

- **User**

## Connections

- User → Login page: submits credentials
- Login page → Login validation: loads behavior (evidence: `public/app.js`)
- Login validation → Login endpoint: posts credentials (evidence: `public/app.js`)
- Login endpoint → Prisma lookup: looks up user (evidence: `server.js`)
- Prisma lookup → PostgreSQL: queries via ORM (evidence: `README.md`)
- Login validation → Dashboard: redirects on success (evidence: `public/app.js`)
- Login endpoint → Login page: serves static files (evidence: `server.js`)
