# mbk1991/first_freeboard architecture

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

- Interactive diagram: https://gitdiagram.com/mbk1991/first_freeboard
- Repository: https://github.com/mbk1991/first_freeboard

## Overview

This is a small Java Servlet/JSP bulletin board. Users open the post list, view a selected post, or submit a new post; servlets coordinate DAO operations and forward data to JSP views. The README documents the three views and their routes. The sampled sources show MySQL access and the shared post model; JSP internals and route configuration were not sampled, so view interactions beyond the documented flow are not inferred.

Main entry points: [`BoardDao.java`](https://github.com/mbk1991/first_freeboard/blob/main/BoardDao.java) (Board DAO), [`MainServlet.java`](https://github.com/mbk1991/first_freeboard/blob/main/MainServlet.java) (List handler), [`InsertServlet.java`](https://github.com/mbk1991/first_freeboard/blob/main/InsertServlet.java) (Create handler), [`ContentServlet.java`](https://github.com/mbk1991/first_freeboard/blob/main/ContentServlet.java) (Detail handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web requests"]
  node_main["List handler<br/>[MainServlet.java]"]
  node_insert["Create handler<br/>[InsertServlet.java]"]
  node_content["Detail handler"]
  node_listview["Post list<br/>[BoardMain.jsp]"]
  node_formview["Post form<br/>[BoardInsert.jsp]"]
  node_detailview["Post detail<br/>[BoardContent.jsp]"]
end

subgraph group_board["Board operations"]
  node_model["Post model<br/>[BoardVo.java]"]
end

subgraph group_persistence["Persistence"]
  node_dao["Board DAO<br/>[BoardDao.java]"]
  node_mysql[("MySQL board")]
end

node_visitor(("Visitor"))

node_visitor -->|"opens list"| node_main
node_visitor -->|"opens form"| node_insert
node_visitor -->|"opens post"| node_content
node_main -->|"loads posts"| node_dao
node_main -->|"forwards list"| node_listview
node_insert -->|"forwards form"| node_formview
node_insert -->|"saves post"| node_dao
node_content -->|"loads post"| node_dao
node_content -->|"forwards post"| node_detailview
node_dao -->|"queries and writes"| node_mysql
node_dao -->|"maps posts"| node_model

click node_main "https://github.com/mbk1991/first_freeboard/blob/main/MainServlet.java"
click node_insert "https://github.com/mbk1991/first_freeboard/blob/main/InsertServlet.java"
click node_content "https://github.com/mbk1991/first_freeboard/blob/main/ContentServlet.java"
click node_listview "https://github.com/mbk1991/first_freeboard/blob/main/BoardMain.jsp"
click node_formview "https://github.com/mbk1991/first_freeboard/blob/main/BoardInsert.jsp"
click node_detailview "https://github.com/mbk1991/first_freeboard/blob/main/BoardContent.jsp"
click node_dao "https://github.com/mbk1991/first_freeboard/blob/main/BoardDao.java"
click node_model "https://github.com/mbk1991/first_freeboard/blob/main/BoardVo.java"

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_main,node_insert,node_content,node_listview,node_formview,node_detailview toneBlue
class node_model toneAmber
class node_dao,node_mysql toneMint
class node_visitor toneIndigo
```

## Components

### Web requests

- [List handler](https://github.com/mbk1991/first_freeboard/blob/main/MainServlet.java): `MainServlet.java`
- [Create handler](https://github.com/mbk1991/first_freeboard/blob/main/InsertServlet.java): `InsertServlet.java`
- [Detail handler](https://github.com/mbk1991/first_freeboard/blob/main/ContentServlet.java): `ContentServlet.java`
- [Post list](https://github.com/mbk1991/first_freeboard/blob/main/BoardMain.jsp): `BoardMain.jsp`
- [Post form](https://github.com/mbk1991/first_freeboard/blob/main/BoardInsert.jsp): `BoardInsert.jsp`
- [Post detail](https://github.com/mbk1991/first_freeboard/blob/main/BoardContent.jsp): `BoardContent.jsp`

### Board operations

- [Post model](https://github.com/mbk1991/first_freeboard/blob/main/BoardVo.java): `BoardVo.java`

### Persistence

- [Board DAO](https://github.com/mbk1991/first_freeboard/blob/main/BoardDao.java): `BoardDao.java`
- **MySQL board**

### Other components

- **Visitor**

## Connections

- Visitor → List handler: opens list (evidence: `README.md`)
- Visitor → Create handler: opens form (evidence: `README.md`)
- Visitor → Detail handler: opens post (evidence: `README.md`)
- List handler → Board DAO: loads posts (evidence: `MainServlet.java`)
- List handler → Post list: forwards list (evidence: `MainServlet.java`)
- Create handler → Post form: forwards form (evidence: `InsertServlet.java`)
- Create handler → Board DAO: saves post (evidence: `InsertServlet.java`)
- Detail handler → Board DAO: loads post (evidence: `ContentServlet.java`)
- Detail handler → Post detail: forwards post (evidence: `ContentServlet.java`)
- Board DAO → MySQL board: queries and writes (evidence: `BoardDao.java`)
- Board DAO → Post model: maps posts (evidence: `BoardDao.java`)
