How scc749/go_blog works
Project type and purpose
• This is a full-stack personal blog application (“go_blog”), with a Go/Gin-based RESTful backend and a Vue3 frontend.
• It supports CRUD blog posts, serves static assets (images, emojis), and integrates with MySQL for relational data, Elasticsearch for full-text search, and Redis for caching or session data.
File structure
• Top-level directories:
• server: Go code, configuration (config.yaml), initialization commands, main.go entrypoint.
• web: Vue3 source, build scripts, dist folder for production assets.
• Root files: README.md (setup & deployment), LICENSE, .gitmodules (if submodules exist).
• No microservices subfolders: the backend is a single monolith.
• Deployment artifacts: Docker containers for MySQL, Elasticsearch, Redis; compiled Go binary; built Vue “dist” directory; Nginx and Supervisor configurations.
README for additional insights
• Technology stack: Go 1.23, Gin framework, Vue3+Vite, MySQL, Elasticsearch 8.x, Redis, Docker, Nginx, Supervisor.
• Development workflow:
• Local Docker containers for DB/ES/Redis
• go run main.go with flags to initialize DB, ES and admin user
• npm run dev for frontend
• Production deploy:
• Compile Go binary (GOOS=linux)
• Build Vue “dist”
• Host structure under /opt/go_blog
• Containers configured with bind mounts for persistent data
• Nginx as SSL-terminating reverse proxy and static file server
• Supervisor to manage the Go process