How edwinfebrianto44-gif/go-vue-blogcms works
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: routes.go API routing · api.js API client · database.go MySQL database · main.go HTTP server
Components 31
Vue application
- App shell
frontend/src/App.vue - Page routes
frontend/src/router/routes.js - Auth state
frontend/src/stores/auth.js - API client
frontend/src/services/api.js - Blog views
frontend/src/views - Editorial dashboard
frontend/src/views/dashboard - Comments UI
frontend/src/components/comments/CommentsSection.vue - Dynamic route discovery
frontend/src/utils/ssg-routes.js
Go API
- HTTP server
backend/cmd/server/main.go - API routing
backend/internal/routes/routes.go - Auth handlers
backend/internal/handlers/auth_handler.go - Content handlers
backend/internal/handlers/post_handler.go - Comment handlers
backend/internal/handlers/comment_handler.go - Upload handler
backend/internal/handlers/upload_handler.go - Security middleware
backend/internal/middleware - Health and metrics
backend/pkg/metrics/metrics.go
Content services
- Authentication
backend/internal/services/auth_service.go - JWT tokens
backend/internal/services/jwt_service.go - Post management
backend/internal/services/post_service.go - Category management
backend/internal/services/category_service.go - Comment management
backend/internal/services/comment_service.go - Upload storage
backend/internal/services/storage_service.go
Persistence and media
- MySQL database
backend/internal/database/database.go - User repository
backend/internal/repositories/user_repository.go - Refresh-token repository
backend/internal/repositories/refresh_token_repository.go - Post repository
backend/internal/repositories/post_repository.go - Category repository
backend/internal/repositories/category_repository.go - Comment repository
backend/internal/repositories/comment_repository.go
Other components
- Reader or editor
- Object storage
- Redis cache
Connections 36
- Reader or editor → App shell: uses
frontend/src/App.vue - App shell → Page routes: renders routes
frontend/src/App.vue - Page routes → Blog views: routes to
frontend/src/router/routes.js - Page routes → Editorial dashboard: routes to
frontend/src/router/routes.js - App shell → Auth state: initializes
frontend/src/App.vue - Auth state → API client: calls API
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
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
backend/internal/handlers/auth_handler.go - Authentication → JWT tokens: uses tokens
backend/internal/services/auth_service.go - Content handlers → Post management: delegates
backend/internal/handlers/post_handler.go - Content handlers → Category management: category operations
- Comment handlers → Comment management: delegates
backend/internal/handlers/comment_handler.go - Upload handler → Upload storage: stores uploads
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
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