# edwinfebrianto44-gif/go-vue-blogcms architecture

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

- Interactive diagram: https://gitdiagram.com/edwinfebrianto44-gif/go-vue-blogcms
- Repository: https://github.com/edwinfebrianto44-gif/go-vue-blogcms

## Overview

Go Vue Blog CMS combines a public blog and authenticated editorial dashboard. Readers browse posts and categories, open post details, and participate in comments; editors sign in and manage posts, while uploads support content creation. The Vue client routes views through stores and API services to the Go REST API, whose handlers delegate domain operations to services and repositories backed by MySQL. Authentication, categories, and media storage are distinct capabilities. README capabilities include Redis caching and operational monitoring; their runtime wiring is not shown in sampled source, so those links are indicated as unverified where appropriate.

Main entry points: [`backend/internal/routes/routes.go`](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/routes/routes.go) (API routing), [`frontend/src/services/api.js`](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/frontend/src/services/api.js) (API client), [`backend/internal/database/database.go`](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/database/database.go) (MySQL database), [`backend/cmd/server/main.go`](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/cmd/server/main.go) (HTTP server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Vue application"]
  node_app["App shell<br/>[App.vue]"]
  node_routes["Page routes<br/>[routes.js]"]
  node_authstore["Auth state<br/>[auth.js]"]
  node_client["API client<br/>[api.js]"]
  node_reading["Blog views"]
  node_editing["Editorial dashboard"]
  node_comments["Comments UI"]
  node_ssg["Dynamic route discovery<br/>[ssg-routes.js]"]
end

subgraph group_api["Go API"]
  node_server["HTTP server<br/>[main.go]"]
  node_routing["API routing<br/>[routes.go]"]
  node_authhandler["Auth handlers<br/>[auth_handler.go]"]
  node_contenthandlers["Content handlers<br/>[post_handler.go]"]
  node_commenthandler["Comment handlers<br/>[comment_handler.go]"]
  node_uploadhandler["Upload handler<br/>[upload_handler.go]"]
  node_middleware["Security middleware"]
  node_metrics["Health and metrics<br/>[metrics.go]"]
end

subgraph group_domain["Content services"]
  node_authservice["Authentication<br/>[auth_service.go]"]
  node_jwt["JWT tokens<br/>[jwt_service.go]"]
  node_postservice["Post management<br/>[post_service.go]"]
  node_categoryservice["Category management"]
  node_commentservice["Comment management<br/>[comment_service.go]"]
  node_storage["Upload storage<br/>[storage_service.go]"]
end

subgraph group_persistence["Persistence and media"]
  node_database[("MySQL database<br/>[database.go]")]
  node_userrepo["User repository<br/>[user_repository.go]"]
  node_tokenrepo["Refresh-token repository"]
  node_postrepo["Post repository<br/>[post_repository.go]"]
  node_categoryrepo["Category repository"]
  node_commentrepo["Comment repository"]
end

node_visitor(("Reader or editor"))
node_objectstore[("Object storage")]
node_redis[("Redis cache")]

node_visitor -->|"uses"| node_app
node_app -->|"renders routes"| node_routes
node_routes -->|"routes to"| node_reading
node_routes -->|"routes to"| node_editing
node_app -->|"initializes"| node_authstore
node_authstore -->|"calls API"| node_client
node_reading -.->|"loads content"| node_client
node_editing -.->|"manages content"| node_client
node_comments -.->|"uses API"| node_client
node_ssg -->|"fetches published content"| node_visitor
node_client -.->|"HTTP requests"| node_server
node_server -.->|"registers routes"| node_routing
node_routing -.->|"dispatches auth"| node_authhandler
node_routing -.->|"dispatches posts"| node_contenthandlers
node_routing -.->|"dispatches comments"| node_commenthandler
node_routing -.->|"dispatches uploads"| node_uploadhandler
node_routing -.->|"configures"| node_middleware
node_authhandler -->|"delegates"| node_authservice
node_authservice -->|"uses tokens"| node_jwt
node_contenthandlers -->|"delegates"| node_postservice
node_contenthandlers -.->|"category operations"| node_categoryservice
node_commenthandler -->|"delegates"| node_commentservice
node_uploadhandler -->|"stores uploads"| node_storage
node_authservice -.->|"reads and writes"| node_userrepo
node_authservice -.->|"rotates tokens"| node_tokenrepo
node_postservice -->|"reads and writes"| node_postrepo
node_categoryservice -.->|"reads and writes"| node_categoryrepo
node_commentservice -.->|"reads and writes"| node_commentrepo
node_postrepo -.->|"persists posts"| node_database
node_categoryrepo -.->|"persists categories"| node_database
node_commentrepo -.->|"persists comments"| node_database
node_userrepo -.->|"persists users"| node_database
node_tokenrepo -.->|"persists tokens"| node_database
node_storage -.->|"uploads objects"| node_objectstore
node_server -.->|"exposes monitoring"| node_metrics
node_server -.->|"caches data"| node_redis

click node_app "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/frontend/src/App.vue"
click node_routes "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/frontend/src/router/routes.js"
click node_authstore "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/frontend/src/stores/auth.js"
click node_client "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/frontend/src/services/api.js"
click node_reading "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/tree/main/frontend/src/views"
click node_editing "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/tree/main/frontend/src/views/dashboard"
click node_comments "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/frontend/src/components/comments/CommentsSection.vue"
click node_ssg "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/frontend/src/utils/ssg-routes.js"
click node_server "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/cmd/server/main.go"
click node_routing "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/routes/routes.go"
click node_authhandler "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/handlers/auth_handler.go"
click node_contenthandlers "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/handlers/post_handler.go"
click node_commenthandler "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/handlers/comment_handler.go"
click node_uploadhandler "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/handlers/upload_handler.go"
click node_middleware "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/tree/main/backend/internal/middleware"
click node_authservice "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/services/auth_service.go"
click node_jwt "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/services/jwt_service.go"
click node_postservice "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/services/post_service.go"
click node_categoryservice "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/services/category_service.go"
click node_commentservice "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/services/comment_service.go"
click node_storage "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/services/storage_service.go"
click node_database "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/database/database.go"
click node_userrepo "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/repositories/user_repository.go"
click node_tokenrepo "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/repositories/refresh_token_repository.go"
click node_postrepo "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/repositories/post_repository.go"
click node_categoryrepo "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/repositories/category_repository.go"
click node_commentrepo "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/repositories/comment_repository.go"
click node_metrics "https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/pkg/metrics/metrics.go"

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_app,node_routes,node_authstore,node_client,node_reading,node_editing,node_comments,node_ssg toneBlue
class node_server,node_routing,node_authhandler,node_contenthandlers,node_commenthandler,node_uploadhandler,node_middleware,node_metrics,node_objectstore,node_redis toneAmber
class node_authservice,node_jwt,node_postservice,node_categoryservice,node_commentservice,node_storage toneMint
class node_database,node_userrepo,node_tokenrepo,node_postrepo,node_categoryrepo,node_commentrepo toneRose
class node_visitor toneIndigo
```

## Components

### Vue application

- [App shell](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/frontend/src/App.vue): `frontend/src/App.vue`
- [Page routes](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/frontend/src/router/routes.js): `frontend/src/router/routes.js`
- [Auth state](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/frontend/src/stores/auth.js): `frontend/src/stores/auth.js`
- [API client](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [Blog views](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/tree/main/frontend/src/views): `frontend/src/views`
- [Editorial dashboard](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/tree/main/frontend/src/views/dashboard): `frontend/src/views/dashboard`
- [Comments UI](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/frontend/src/components/comments/CommentsSection.vue): `frontend/src/components/comments/CommentsSection.vue`
- [Dynamic route discovery](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/frontend/src/utils/ssg-routes.js): `frontend/src/utils/ssg-routes.js`

### Go API

- [HTTP server](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/cmd/server/main.go): `backend/cmd/server/main.go`
- [API routing](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/routes/routes.go): `backend/internal/routes/routes.go`
- [Auth handlers](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/handlers/auth_handler.go): `backend/internal/handlers/auth_handler.go`
- [Content handlers](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/handlers/post_handler.go): `backend/internal/handlers/post_handler.go`
- [Comment handlers](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/handlers/comment_handler.go): `backend/internal/handlers/comment_handler.go`
- [Upload handler](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/handlers/upload_handler.go): `backend/internal/handlers/upload_handler.go`
- [Security middleware](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/tree/main/backend/internal/middleware): `backend/internal/middleware`
- [Health and metrics](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/pkg/metrics/metrics.go): `backend/pkg/metrics/metrics.go`

### Content services

- [Authentication](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/services/auth_service.go): `backend/internal/services/auth_service.go`
- [JWT tokens](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/services/jwt_service.go): `backend/internal/services/jwt_service.go`
- [Post management](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/services/post_service.go): `backend/internal/services/post_service.go`
- [Category management](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/services/category_service.go): `backend/internal/services/category_service.go`
- [Comment management](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/services/comment_service.go): `backend/internal/services/comment_service.go`
- [Upload storage](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/services/storage_service.go): `backend/internal/services/storage_service.go`

### Persistence and media

- [MySQL database](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/database/database.go): `backend/internal/database/database.go`
- [User repository](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/repositories/user_repository.go): `backend/internal/repositories/user_repository.go`
- [Refresh-token repository](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/repositories/refresh_token_repository.go): `backend/internal/repositories/refresh_token_repository.go`
- [Post repository](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/repositories/post_repository.go): `backend/internal/repositories/post_repository.go`
- [Category repository](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/repositories/category_repository.go): `backend/internal/repositories/category_repository.go`
- [Comment repository](https://github.com/edwinfebrianto44-gif/go-vue-blogcms/blob/main/backend/internal/repositories/comment_repository.go): `backend/internal/repositories/comment_repository.go`

### Other components

- **Reader or editor**
- **Object storage**
- **Redis cache**

## Connections

- Reader or editor → App shell: uses (evidence: `frontend/src/App.vue`)
- App shell → Page routes: renders routes (evidence: `frontend/src/App.vue`)
- Page routes → Blog views: routes to (evidence: `frontend/src/router/routes.js`)
- Page routes → Editorial dashboard: routes to (evidence: `frontend/src/router/routes.js`)
- App shell → Auth state: initializes (evidence: `frontend/src/App.vue`)
- Auth state → API client: calls API (evidence: `frontend/src/stores/auth.js`)
- Blog views → API client: loads content
- Editorial dashboard → API client: manages content
- Comments UI → API client: uses API
- Dynamic route discovery → Reader or editor: fetches published content (evidence: `frontend/src/utils/ssg-routes.js`)
- API client → HTTP server: HTTP requests
- HTTP server → API routing: registers routes
- API routing → Auth handlers: dispatches auth
- API routing → Content handlers: dispatches posts
- API routing → Comment handlers: dispatches comments
- API routing → Upload handler: dispatches uploads
- API routing → Security middleware: configures
- Auth handlers → Authentication: delegates (evidence: `backend/internal/handlers/auth_handler.go`)
- Authentication → JWT tokens: uses tokens (evidence: `backend/internal/services/auth_service.go`)
- Content handlers → Post management: delegates (evidence: `backend/internal/handlers/post_handler.go`)
- Content handlers → Category management: category operations
- Comment handlers → Comment management: delegates (evidence: `backend/internal/handlers/comment_handler.go`)
- Upload handler → Upload storage: stores uploads (evidence: `backend/internal/handlers/upload_handler.go`)
- Authentication → User repository: reads and writes
- Authentication → Refresh-token repository: rotates tokens
- Post management → Post repository: reads and writes (evidence: `backend/internal/services/post_service.go`)
- Category management → Category repository: reads and writes
- Comment management → Comment repository: reads and writes
- Post repository → MySQL database: persists posts
- Category repository → MySQL database: persists categories
- Comment repository → MySQL database: persists comments
- User repository → MySQL database: persists users
- Refresh-token repository → MySQL database: persists tokens
- Upload storage → Object storage: uploads objects
- HTTP server → Health and metrics: exposes monitoring
- HTTP server → Redis cache: caches data
