# linearthrone22/project-portofolio-management architecture

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

- Interactive diagram: https://gitdiagram.com/linearthrone22/project-portofolio-management
- Repository: https://github.com/linearthrone22/project-portofolio-management

## Overview

This is a small Go-hosted portfolio site with browser-side project-card creation and a contact form that opens an email draft. The shown server serves the home template and public assets; project entry and contact handling happen in JavaScript. The README names PostgreSQL, but no database implementation or connection is visible in the sampled source, so that capability is shown only as an unverified integration.

Main entry points: [`main.go`](https://github.com/linearthrone22/project-portofolio-management/blob/day11/main.go) (Echo Server), [`public/js/addproject.js`](https://github.com/linearthrone22/project-portofolio-management/blob/day11/public/js/addproject.js) (Project Form Logic), [`public/js/contact.js`](https://github.com/linearthrone22/project-portofolio-management/blob/day11/public/js/contact.js) (Contact Form Logic), [`views/index.html`](https://github.com/linearthrone22/project-portofolio-management/blob/day11/views/index.html) (Portfolio Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_server["Web Server"]
  node_server["Echo Server<br/>[main.go]"]
  node_home["Home Handler<br/>[main.go]"]
  node_hello["Hello Route<br/>[main.go]"]
end

subgraph group_browser["Browser Features"]
  node_project["Project Form Logic<br/>[addproject.js]"]
  node_duration["Duration Helpers<br/>[addproject.js]"]
  node_cards["Project Cards<br/>[addproject.js]"]
  node_contact["Contact Form Logic<br/>[contact.js]"]
end

subgraph group_assets["Page Assets"]
  node_page["Portfolio Page<br/>[index.html]"]
  node_styles["Page Styles<br/>[style.css]"]
end

node_user(("Visitor"))
node_mailer["Email Client"]
node_postgres[("PostgreSQL")]

node_user -->|"requests page"| node_server
node_server -->|"routes home"| node_home
node_server -->|"routes hello"| node_hello
node_home -->|"renders template"| node_page
node_server -->|"serves assets"| node_styles
node_project -->|"calculates duration"| node_duration
node_project -->|"appends card"| node_cards
node_contact -->|"opens draft"| node_mailer
node_user -.->|"enters projects"| node_project
node_user -.->|"submits contact"| node_contact
node_server -.->|"database unspecified"| node_postgres

click node_server "https://github.com/linearthrone22/project-portofolio-management/blob/day11/main.go"
click node_home "https://github.com/linearthrone22/project-portofolio-management/blob/day11/main.go"
click node_hello "https://github.com/linearthrone22/project-portofolio-management/blob/day11/main.go"
click node_page "https://github.com/linearthrone22/project-portofolio-management/blob/day11/views/index.html"
click node_styles "https://github.com/linearthrone22/project-portofolio-management/blob/day11/public/css/style.css"
click node_project "https://github.com/linearthrone22/project-portofolio-management/blob/day11/public/js/addproject.js"
click node_duration "https://github.com/linearthrone22/project-portofolio-management/blob/day11/public/js/addproject.js"
click node_cards "https://github.com/linearthrone22/project-portofolio-management/blob/day11/public/js/addproject.js"
click node_contact "https://github.com/linearthrone22/project-portofolio-management/blob/day11/public/js/contact.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_server,node_home,node_hello,node_mailer toneBlue
class node_project,node_duration,node_cards,node_contact,node_postgres toneAmber
class node_page,node_styles toneMint
class node_user toneIndigo
```

## Components

### Web Server

- [Echo Server](https://github.com/linearthrone22/project-portofolio-management/blob/day11/main.go): `main.go`
- [Home Handler](https://github.com/linearthrone22/project-portofolio-management/blob/day11/main.go): `main.go`
- [Hello Route](https://github.com/linearthrone22/project-portofolio-management/blob/day11/main.go): `main.go`

### Browser Features

- [Project Form Logic](https://github.com/linearthrone22/project-portofolio-management/blob/day11/public/js/addproject.js): `public/js/addproject.js`
- [Duration Helpers](https://github.com/linearthrone22/project-portofolio-management/blob/day11/public/js/addproject.js): `public/js/addproject.js`
- [Project Cards](https://github.com/linearthrone22/project-portofolio-management/blob/day11/public/js/addproject.js): `public/js/addproject.js`
- [Contact Form Logic](https://github.com/linearthrone22/project-portofolio-management/blob/day11/public/js/contact.js): `public/js/contact.js`

### Page Assets

- [Portfolio Page](https://github.com/linearthrone22/project-portofolio-management/blob/day11/views/index.html): `views/index.html`
- [Page Styles](https://github.com/linearthrone22/project-portofolio-management/blob/day11/public/css/style.css): `public/css/style.css`

### Other components

- **Visitor**
- **Email Client**
- **PostgreSQL**

## Connections

- Visitor → Echo Server: requests page (evidence: `main.go`)
- Echo Server → Home Handler: routes home (evidence: `main.go`)
- Echo Server → Hello Route: routes hello (evidence: `main.go`)
- Home Handler → Portfolio Page: renders template (evidence: `main.go`)
- Echo Server → Page Styles: serves assets (evidence: `main.go`)
- Project Form Logic → Duration Helpers: calculates duration (evidence: `public/js/addproject.js`)
- Project Form Logic → Project Cards: appends card (evidence: `public/js/addproject.js`)
- Contact Form Logic → Email Client: opens draft (evidence: `public/js/contact.js`)
- Visitor → Project Form Logic: enters projects
- Visitor → Contact Form Logic: submits contact
- Echo Server → PostgreSQL: database unspecified
