How koioio/myblog works
MyBlog-ES is a Go/Gin and Vue 3 blogging system. A visitor or administrator uses the web UI, whose API modules communicate with the server; the server routes requests through authentication/authorization middleware to API handlers and business services. Services manage blog content, users, comments, and site features, using MySQL for relational data, Elasticsearch for article search, and Redis for cached/session-related state. Other documented capabilities include image storage, third-party login, weather, hot searches, and scheduled work. The README describes these capabilities; some subsystem links below reflect its documentation rather than sampled implementation.
Main entry points: api API handlers · user.go User and auth · router Domain routes · article.go Content services
Components 26
Web application
- Vue application
web/src/main.ts - Web and dashboard
web/src/views - API clients
web/src/api
Server request flow
- Server startup
server/main.go - Route registration
server/initialize/router.go - Domain routes
server/router - Auth and logging
server/middleware - API handlers
server/api
Blog capabilities
- Content services
server/service/article.go - User and auth
server/service/user.go - Comments and feedback
server/service/comment.go - Image management
server/service/image.go - Site features
server/service/website.go
Data and storage
- MySQL
- Elasticsearch
- Redis
- Image storage
server/utils/upload/upload.go
Integrations and tasks
- Hot search service
server/service/hot_search.go - Hot search task
server/task/hot_search.go - Hot search sources
server/utils/hotSearch/hot_search.go - Weather integration
server/service/gaode.go - QQ login integration
server/service/qq.go - Email utility
server/utils/email.go - Scheduled jobs
server/initialize/corn.go
Other components
- Visitor
- Administrator
Connections 29
- Visitor → Vue application: uses
- Administrator → Vue application: manages
- Vue application → Web and dashboard: renders
- Web and dashboard → API clients: requests
- API clients → Domain routes: sends HTTP
- Server startup → Route registration: starts
- Route registration → Domain routes: registers
- Domain routes → Auth and logging: applies
- Domain routes → API handlers: dispatches
- API handlers → Content services: calls
- API handlers → User and auth: calls
- API handlers → Comments and feedback: calls
- API handlers → Image management: calls
- API handlers → Site features: calls
- Content services → MySQL: reads and writes
- Content services → Elasticsearch: searches
- User and auth → MySQL: reads and writes
- User and auth → Redis: uses
- Comments and feedback → MySQL: reads and writes
- Image management → MySQL: reads and writes
- Image management → Image storage: stores files
- Hot search service → Redis: reads and writes
- Hot search service → Hot search sources: fetches on miss
- Hot search task → Hot search sources: fetches
- Hot search task → Redis: writes cache
- Scheduled jobs → Hot search task: schedules
- Site features → Weather integration: uses
- User and auth → QQ login integration: uses
- User and auth → Email utility: uses