# nabilulilalbab/assignmentpemogramanweb architecture

> Architecture diagram of the GitHub repository nabilulilalbab/assignmentpemogramanweb, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nabilulilalbab/assignmentpemogramanweb
- Repository: https://github.com/nabilulilalbab/assignmentpemogramanweb

## Overview

##### Project type and purpose
- This is a simple command‐line (CLI) Go application whose sole purpose is to read a user’s name from standard input and print a greeting. It is not a web server or full‐stack app, but an educational CLI tool demonstrating buffered input in Go.

##### File structure
- Top‐level files:
- README.md – project description and usage instructions
- go.mod – Go module declaration
- main.go – application entry point and business logic
- No subdirectories or external services. All logic resides in main.go, which imports only Go’s standard libraries (`bufio`, `fmt`, `os`).

##### README for additional insights
- The README clarifies that the core function is `SayHello(name string)`, which uses `bufio.NewScanner(os.Stdin)` to read possibly‐spaced input, then prints via `fmt.Printf`.
- There is no network interaction, database, or configuration beyond Go’s module system.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Project Files
    subgraph "Project Files"
        README["README.md"]:::docs
        GOMOD["go.mod"]:::docs
    end

    %% Actors and Shell
    USER["User"]:::actor
    TERMINAL["Terminal / Shell"]:::shell

    %% OS Interfaces
    OS_STDIN["os.Stdin"]:::os
    OS_STDOUT["os.Stdout"]:::os

    %% Go Runtime Components
    SCANNER["bufio.Scanner\n(reads from os.Stdin)"]:::lib
    SAYHELLO["SayHello(name string)\n(business logic)"]:::app
    FORMATTER["fmt.Printf\n(writes to os.Stdout)"]:::lib

    %% Flow
    USER -->|"input text"| TERMINAL
    TERMINAL -->|"raw bytes"| OS_STDIN
    OS_STDIN -->|"NewScanner() reads"| SCANNER
    SCANNER -->|"name string"| SAYHELLO
    SAYHELLO -->|"greeting text"| FORMATTER
    FORMATTER -->|"writes to stdout"| OS_STDOUT
    OS_STDOUT -->|"text output"| TERMINAL
    TERMINAL -->|"displays greeting"| USER

    %% Click Events
    click README "https://github.com/nabilulilalbab/assignmentpemogramanweb/blob/main/README.md"
    click GOMOD "https://github.com/nabilulilalbab/assignmentpemogramanweb/blob/main/go.mod"
    click SCANNER "https://github.com/nabilulilalbab/assignmentpemogramanweb/blob/main/main.go"
    click SAYHELLO "https://github.com/nabilulilalbab/assignmentpemogramanweb/blob/main/main.go"
    click FORMATTER "https://github.com/nabilulilalbab/assignmentpemogramanweb/blob/main/main.go"

    %% Styles
    classDef docs fill:#f0f8ff,stroke:#333,stroke-width:1px
    classDef actor fill:#e0e0e0,stroke:#333,stroke-width:1px
    classDef shell fill:#c8f7c5,stroke:#333,stroke-width:1px
    classDef os fill:#c8f7c5,stroke:#333,stroke-width:1px
    classDef lib fill:#fff2b2,stroke:#333,stroke-width:1px
    classDef app fill:#add8e6,stroke:#333,stroke-width:1px
```
