# dolienteronabels-gif/yapspace architecture

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

- Interactive diagram: https://gitdiagram.com/dolienteronabels-gif/yapspace
- Repository: https://github.com/dolienteronabels-gif/yapspace

## Overview

YapSpace is a Java community web application for account registration and login, sharing categorized posts with feelings, and interacting through comments and reactions. Its documented user journey runs from a browser through a local web server into authentication and post handling, then renders feed or My Posts views. Source references support the service-to-repository and repository-to-database layers; the README also describes persistent data storage. Some runtime wiring is unsampled, so the graph avoids asserting unverified router-to-controller dispatch.

Main entry points: [`src/yapspace/service/PostService.java`](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/service/PostService.java) (Post Service), [`src/yapspace/web/Router.java`](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/Router.java) (Request Router), [`src/yapspace/service/UserService.java`](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/service/UserService.java) (Account Service), [`src/database/DatabaseConnection.java`](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/database/DatabaseConnection.java) (MySQL Connection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application Runtime"]
  node_main["Application Entry<br/>[Main.java]"]
  node_server["Web Server<br/>[WebServer.java]"]
end

subgraph group_web["Web Interface"]
  node_router["Request Router<br/>[Router.java]"]
  node_auth["Authentication"]
  node_postcontroller["Post Actions"]
  node_views["Page Views<br/>[Views.java]"]
  node_webrequest["Web Request<br/>[WebRequest.java]"]
  node_webresponse["Web Response<br/>[WebResponse.java]"]
  node_sessions["Session Manager"]
  node_session["User Session<br/>[Session.java]"]
end

subgraph group_domain["Community Domain"]
  node_userservice["Account Service<br/>[UserService.java]"]
  node_postservice["Post Service<br/>[PostService.java]"]
  node_validator["Input Validation<br/>[Validator.java]"]
  node_models["Community Models"]
end

subgraph group_persistence["Persistence"]
  node_userrepo["User Repository"]
  node_postrepo["Post Repository"]
  node_commentrepo["Comment Repository"]
  node_reactionrepo["Reaction Repository"]
  node_dbconnection["MySQL Connection"]
  node_datastore[("File Data Store<br/>[DataStore.java]")]
  node_tsv["TSV Codec<br/>[Tsv.java]"]
end

node_visitor(("Community User"))

node_visitor -->|"opens app"| node_server
node_main -->|"starts"| node_server
node_main -->|"loads data"| node_datastore
node_auth -->|"authenticates"| node_userservice
node_auth -->|"manages session"| node_sessions
node_postcontroller -->|"handles posts"| node_postservice
node_postcontroller -->|"uses views"| node_views
node_router -->|"uses account service"| node_userservice
node_router -->|"uses sessions"| node_sessions
node_router -->|"reads request"| node_webrequest
node_router -->|"builds response"| node_webresponse
node_views -->|"reads post data"| node_postservice
node_webrequest -->|"uses session"| node_session
node_sessions -->|"creates sessions"| node_session
node_userservice -->|"queries accounts"| node_userrepo
node_userservice -->|"validates input"| node_validator
node_postservice -->|"reads and writes posts"| node_postrepo
node_postservice -->|"manages comments"| node_commentrepo
node_postservice -->|"manages reactions"| node_reactionrepo
node_postservice -->|"validates content"| node_validator
node_userrepo -->|"opens connection"| node_dbconnection
node_postrepo -->|"opens connection"| node_dbconnection
node_commentrepo -->|"opens connection"| node_dbconnection
node_reactionrepo -->|"opens connection"| node_dbconnection
node_datastore -->|"encodes tables"| node_tsv

click node_main "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/Main.java"
click node_server "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/WebServer.java"
click node_router "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/Router.java"
click node_auth "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/AuthController.java"
click node_postcontroller "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/PostController.java"
click node_views "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/Views.java"
click node_webrequest "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/WebRequest.java"
click node_webresponse "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/WebResponse.java"
click node_sessions "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/SessionManager.java"
click node_session "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/Session.java"
click node_userservice "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/service/UserService.java"
click node_postservice "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/service/PostService.java"
click node_validator "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/service/Validator.java"
click node_models "https://github.com/dolienteronabels-gif/yapspace/tree/main/src/yapspace/model"
click node_userrepo "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/repository/UserRepository.java"
click node_postrepo "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/repository/PostRepository.java"
click node_commentrepo "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/repository/CommentRepository.java"
click node_reactionrepo "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/repository/ReactionRepository.java"
click node_dbconnection "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/database/DatabaseConnection.java"
click node_datastore "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/storage/DataStore.java"
click node_tsv "https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/storage/Tsv.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_server,node_visitor toneBlue
class node_router,node_auth,node_postcontroller,node_views,node_webrequest,node_webresponse,node_sessions,node_session toneAmber
class node_userservice,node_postservice,node_validator,node_models toneMint
class node_userrepo,node_postrepo,node_commentrepo,node_reactionrepo,node_dbconnection,node_datastore,node_tsv toneRose
```

## Components

### Application Runtime

- [Application Entry](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/Main.java): `src/yapspace/Main.java`
- [Web Server](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/WebServer.java): `src/yapspace/web/WebServer.java`

### Web Interface

- [Request Router](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/Router.java): `src/yapspace/web/Router.java`
- [Authentication](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/AuthController.java): `src/yapspace/web/AuthController.java`
- [Post Actions](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/PostController.java): `src/yapspace/web/PostController.java`
- [Page Views](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/Views.java): `src/yapspace/web/Views.java`
- [Web Request](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/WebRequest.java): `src/yapspace/web/WebRequest.java`
- [Web Response](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/WebResponse.java): `src/yapspace/web/WebResponse.java`
- [Session Manager](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/SessionManager.java): `src/yapspace/web/SessionManager.java`
- [User Session](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/web/Session.java): `src/yapspace/web/Session.java`

### Community Domain

- [Account Service](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/service/UserService.java): `src/yapspace/service/UserService.java`
- [Post Service](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/service/PostService.java): `src/yapspace/service/PostService.java`
- [Input Validation](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/service/Validator.java): `src/yapspace/service/Validator.java`
- [Community Models](https://github.com/dolienteronabels-gif/yapspace/tree/main/src/yapspace/model): `src/yapspace/model`

### Persistence

- [User Repository](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/repository/UserRepository.java): `src/yapspace/repository/UserRepository.java`
- [Post Repository](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/repository/PostRepository.java): `src/yapspace/repository/PostRepository.java`
- [Comment Repository](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/repository/CommentRepository.java): `src/yapspace/repository/CommentRepository.java`
- [Reaction Repository](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/repository/ReactionRepository.java): `src/yapspace/repository/ReactionRepository.java`
- [MySQL Connection](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/database/DatabaseConnection.java): `src/database/DatabaseConnection.java`
- [File Data Store](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/storage/DataStore.java): `src/yapspace/storage/DataStore.java`
- [TSV Codec](https://github.com/dolienteronabels-gif/yapspace/blob/main/src/yapspace/storage/Tsv.java): `src/yapspace/storage/Tsv.java`

### Other components

- **Community User**

## Connections

- Community User → Web Server: opens app (evidence: `README.md`)
- Application Entry → Web Server: starts (evidence: `src/yapspace/Main.java`)
- Application Entry → File Data Store: loads data (evidence: `src/yapspace/Main.java`)
- Authentication → Account Service: authenticates (evidence: `src/yapspace/web/AuthController.java`)
- Authentication → Session Manager: manages session (evidence: `src/yapspace/web/AuthController.java`)
- Post Actions → Post Service: handles posts (evidence: `src/yapspace/web/PostController.java`)
- Post Actions → Page Views: uses views (evidence: `src/yapspace/web/PostController.java`)
- Request Router → Account Service: uses account service (evidence: `src/yapspace/web/Router.java`)
- Request Router → Session Manager: uses sessions (evidence: `src/yapspace/web/Router.java`)
- Request Router → Web Request: reads request (evidence: `src/yapspace/web/Router.java`)
- Request Router → Web Response: builds response (evidence: `src/yapspace/web/Router.java`)
- Page Views → Post Service: reads post data (evidence: `src/yapspace/web/Views.java`)
- Web Request → User Session: uses session (evidence: `src/yapspace/web/WebRequest.java`)
- Session Manager → User Session: creates sessions (evidence: `src/yapspace/web/SessionManager.java`)
- Account Service → User Repository: queries accounts (evidence: `src/yapspace/service/UserService.java`)
- Account Service → Input Validation: validates input (evidence: `src/yapspace/service/UserService.java`)
- Post Service → Post Repository: reads and writes posts (evidence: `src/yapspace/service/PostService.java`)
- Post Service → Comment Repository: manages comments (evidence: `src/yapspace/service/PostService.java`)
- Post Service → Reaction Repository: manages reactions (evidence: `src/yapspace/service/PostService.java`)
- Post Service → Input Validation: validates content (evidence: `src/yapspace/service/PostService.java`)
- User Repository → MySQL Connection: opens connection (evidence: `src/yapspace/repository/UserRepository.java`)
- Post Repository → MySQL Connection: opens connection (evidence: `src/yapspace/repository/PostRepository.java`)
- Comment Repository → MySQL Connection: opens connection (evidence: `src/yapspace/repository/CommentRepository.java`)
- Reaction Repository → MySQL Connection: opens connection (evidence: `src/yapspace/repository/ReactionRepository.java`)
- File Data Store → TSV Codec: encodes tables (evidence: `src/yapspace/storage/DataStore.java`)
