Jank,一个轻量级的博客系统,基于 Go 语言和 Echo 框架开发,强调极简、低耦合和高扩展
English | 简体中文
Jank is a lightweight blogging system developed using Go and the Echo framework, with a design philosophy that emphasizes minimalism, low coupling, and high extensibility. It aims to provide users with a rich, clean, simple, and secure blogging experience.
The project is currently lacking front-end development. We welcome developers who are interested to contact me for collaboration. We look forward to your valuable input!
- Go: A popular backend programming language suitable for building high-concurrency applications.
- Echo Framework: A high-performance web framework that supports rapid development and flexible routing management.
- MySQL: A mature relational database management system that supports complex queries and transaction processing.
- Redis: A popular caching solution offering fast data access and persistence options.
- JWT: A secure user authentication mechanism ensuring data integrity and security during transmission.
- Docker: A containerization tool that simplifies packaging and distributing applications.
- Frontend: Vue 3 + Nuxt + Shadcn-vue (The original project is no longer maintained; contributions from frontend experts are welcome).
- Account Module: Implements JWT authentication, supporting user login, registration, logout, password changes, and personal information updates.
- Article Module: Provides features for creating, viewing, updating, and deleting articles.
- Category Module: Supports recursive category tree queries, single category queries, as well as category creation, update, and deletion.
- Comment Module: Provides functionality for comment creation, viewing, deletion, and replies, supporting the display of comment tree structures.
- Other Features:
- Provides OpenAPI documentation.
- Integrates Air for hot reloading.
- Uses Logrus for logging.
- Supports CORS for cross-origin requests.
- Provides CSRF and XSS protection.
- Supports server-side rendering of Markdown.
Other modules are under development, and suggestions and feedback are welcome!
-
Install Dependencies:
# install swagger utils go install github.com/swaggo/swag/cmd/swag@latest # install dependencies go mod tidy
-
Configure Database and Email: Modify the database and email configurations in the
configs/config.yaml
file as shown below:# MySQL Database password (required) DB_PSW: "<DATABASE_PASSWORD>" # QQ email and SMTP authorization code (optional) QQ_SMTP: "<QQ_SMTP>" FROM_EMAIL: "<FROM_QQ_EMAIL>"
-
Start the Service: Use the following command to start the application:
go run main.go
Or use Air for hot reloading:
# install air, requires go 1.22+ go install github.com/air-verse/air@latest air -c ./configs/.air.toml
-
Access the API: Open your browser and go to http://localhost:9010/ping when you start the system locally.
docker-compose up -d
- Local Swagger Documentation: After launching the application locally, visit http://localhost:9010/swagger/index.html in your browser.
- Postman Documentation: In the project root directory, import the
docs/Jank_blog.postman_collection.json
file into Postman to view.
Architecture Diagram and Visualized API Documentation: Open the docs/jank_blog_architecture.drawio
file in the project root directory.
note: This document is drawn by draw.io, which requires the installation of the draw.io software to view.
If you have any questions or suggestions, feel free to join the official community for discussion.
- QQ: 927171598
- Email: [email protected]
This project is licensed under the MIT License.