# pankti910/htmltonode architecture

> Architecture diagram of the GitHub repository pankti910/htmltonode, 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/pankti910/htmltonode
- Repository: https://github.com/pankti910/htmltonode

## Overview

HTMLToNode accepts an uploaded HTML form and generates a runnable Node.js CRUD project: it extracts named fields, derives model attributes and validation, then renders project files. A separate dropdown-constant capability supports large option lists through MongoDB-backed references and a generated dropdown API. The graph reflects the sampled upload/generation code and README capabilities; generated CRUD runtime details are represented by their templates, whose contents were not sampled.

Main entry points: [`Project/Function.js`](https://github.com/pankti910/htmltonode/blob/main/Project/Function.js) (Artifact generation), [`Project/index.js`](https://github.com/pankti910/htmltonode/blob/main/Project/index.js) (Upload and parse), [`Project/views/Index.ejs`](https://github.com/pankti910/htmltonode/blob/main/Project/views/Index.ejs) (App entry template), [`Project/views/Connection.ejs`](https://github.com/pankti910/htmltonode/blob/main/Project/views/Connection.ejs) (DB connection template)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Form interpretation"]
  node_entry["Upload and parse<br/>[index.js]"]
  node_attributes["Field attributes<br/>[Function.js]"]
end

subgraph group_generation["Project generation"]
  node_generator["Artifact generation<br/>[Function.js]"]
  node_indexout["App entry template<br/>[Index.ejs]"]
  node_connection["DB connection template<br/>[Connection.ejs]"]
  node_packageout["Package template<br/>[Package.ejs]"]
  node_constantsout["Constants template<br/>[Constants.ejs]"]
end

subgraph group_crud["Generated CRUD"]
  node_model["Model template<br/>[Model.ejs]"]
  node_controller["Controller template<br/>[Controller.ejs]"]
  node_route["Route template<br/>[Route.ejs]"]
end

subgraph group_dropdown["Dropdown references"]
  node_dropdownmodel["Dropdown model"]
  node_dropdownconstant["Dropdown generation<br/>[Function.js]"]
end

node_user(("Form uploader"))
node_mongo[("MongoDB")]

node_user -->|"uploads HTML"| node_entry
node_entry -->|"derives fields"| node_attributes
node_entry -->|"requests artifacts"| node_generator
node_generator -->|"renders model"| node_model
node_generator -->|"renders controller"| node_controller
node_generator -->|"renders routes"| node_route
node_generator -->|"renders entry"| node_indexout
node_generator -->|"renders connection"| node_connection
node_generator -->|"renders package"| node_packageout
node_generator -->|"renders constants"| node_constantsout
node_generator -->|"creates when needed"| node_dropdownconstant
node_dropdownconstant -->|"defines schema"| node_dropdownmodel
node_dropdownconstant -->|"stores options"| node_mongo

click node_entry "https://github.com/pankti910/htmltonode/blob/main/Project/index.js"
click node_attributes "https://github.com/pankti910/htmltonode/blob/main/Project/Function.js"
click node_generator "https://github.com/pankti910/htmltonode/blob/main/Project/Function.js"
click node_model "https://github.com/pankti910/htmltonode/blob/main/Project/views/Model.ejs"
click node_controller "https://github.com/pankti910/htmltonode/blob/main/Project/views/Controller.ejs"
click node_route "https://github.com/pankti910/htmltonode/blob/main/Project/views/Route.ejs"
click node_indexout "https://github.com/pankti910/htmltonode/blob/main/Project/views/Index.ejs"
click node_connection "https://github.com/pankti910/htmltonode/blob/main/Project/views/Connection.ejs"
click node_packageout "https://github.com/pankti910/htmltonode/blob/main/Project/views/Package.ejs"
click node_constantsout "https://github.com/pankti910/htmltonode/blob/main/Project/views/Constants.ejs"
click node_dropdownmodel "https://github.com/pankti910/htmltonode/blob/main/Project/Model/DropDownConstant.js"
click node_dropdownconstant "https://github.com/pankti910/htmltonode/blob/main/Project/Function.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_entry,node_attributes toneBlue
class node_generator,node_indexout,node_connection,node_packageout,node_constantsout,node_mongo toneAmber
class node_model,node_controller,node_route toneMint
class node_dropdownmodel,node_dropdownconstant toneRose
class node_user toneIndigo
```

## Components

### Form interpretation

- [Upload and parse](https://github.com/pankti910/htmltonode/blob/main/Project/index.js): `Project/index.js`
- [Field attributes](https://github.com/pankti910/htmltonode/blob/main/Project/Function.js): `Project/Function.js`

### Project generation

- [Artifact generation](https://github.com/pankti910/htmltonode/blob/main/Project/Function.js): `Project/Function.js`
- [App entry template](https://github.com/pankti910/htmltonode/blob/main/Project/views/Index.ejs): `Project/views/Index.ejs`
- [DB connection template](https://github.com/pankti910/htmltonode/blob/main/Project/views/Connection.ejs): `Project/views/Connection.ejs`
- [Package template](https://github.com/pankti910/htmltonode/blob/main/Project/views/Package.ejs): `Project/views/Package.ejs`
- [Constants template](https://github.com/pankti910/htmltonode/blob/main/Project/views/Constants.ejs): `Project/views/Constants.ejs`

### Generated CRUD

- [Model template](https://github.com/pankti910/htmltonode/blob/main/Project/views/Model.ejs): `Project/views/Model.ejs`
- [Controller template](https://github.com/pankti910/htmltonode/blob/main/Project/views/Controller.ejs): `Project/views/Controller.ejs`
- [Route template](https://github.com/pankti910/htmltonode/blob/main/Project/views/Route.ejs): `Project/views/Route.ejs`

### Dropdown references

- [Dropdown model](https://github.com/pankti910/htmltonode/blob/main/Project/Model/DropDownConstant.js): `Project/Model/DropDownConstant.js`
- [Dropdown generation](https://github.com/pankti910/htmltonode/blob/main/Project/Function.js): `Project/Function.js`

### Other components

- **Form uploader**
- **MongoDB**

## Connections

- Form uploader → Upload and parse: uploads HTML
- Upload and parse → Field attributes: derives fields
- Upload and parse → Artifact generation: requests artifacts
- Artifact generation → Model template: renders model
- Artifact generation → Controller template: renders controller
- Artifact generation → Route template: renders routes
- Artifact generation → App entry template: renders entry
- Artifact generation → DB connection template: renders connection
- Artifact generation → Package template: renders package
- Artifact generation → Constants template: renders constants
- Artifact generation → Dropdown generation: creates when needed
- Dropdown generation → Dropdown model: defines schema
- Dropdown generation → MongoDB: stores options
