Jank, a lightweight blogging system, developed using Go language and the Echo framework, emphasizes minimalism, low coupling, and high scalability.
Simplified Chinese | English
Jank is a lightweight blogging system, developed using Go language and the Echo framework, designed with a focus on minimalism, low coupling, and high scalability. It aims to provide users with a feature-rich, simple, and secure blogging experience.
Note: This project currently lacks a front-end component. We invite developers interested in front-end development to join and contribute to the project. We look forward to your valuable feedback and contributions!
👉 Demo Site: https://fenderisfine.icu
👉 【Jank Blog System】New Technology Stack and UI
👉 Front-end Repository: https://github.com/Done-0/Jank-website
Note: Since the project is in its early stages, some configuration files may need to be adjusted according to actual requirements. Please contact the author using the information below, or join the developer community for further discussions.
- Go Language: A popular back-end development language, suitable for building high-concurrency applications.
- Echo Framework: A high-performance web framework that supports rapid development and flexible routing management.
- PostgreSQL: An open-source relational database offering high performance and reliability for data storage.
- Redis: A popular caching solution that offers fast data access and persistence options.
- JWT: A secure user authentication mechanism to ensure the integrity and security of data transmission.
- Docker: A containerization deployment tool that simplifies application packaging and distribution.
- Frontend: React + Umi + Shadcn/ui + TailwindCSS.
- Account Module: Implements JWT authentication, supporting user login, registration, logout, password modification, and personal information updates.
- Permission Module: Implements RBAC (Role-Based Access Control) for role permission management, supporting CRUD operations for users, roles, and permissions.
- Basic features are implemented, but due to the complexity and user-friendliness concerns, this feature is not yet released.
- Article Module: Provides functionality for creating, viewing, updating, and deleting articles.
- Category Module: Supports recursive queries for category trees and subcategory trees, single category queries, and category creation, updating, and deletion.
- Comment Module: Provides functionality for creating, viewing, deleting, and replying to comments, supporting tree structures for comment display.
- Plugin System: Actively under development, coming soon...
- 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 for Markdown
- Other modules are under development, feedback and suggestions are welcome!
-
Install Dependencies:
# Install swagger tool 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 theconfigs/config.yaml
file as shown below:database: DB_DIALECT: "postgres" # Database type, options: postgres, mysql, sqlite DB_NAME: "jank_db" DB_HOST: "127.0.0.1" # Change to "postgres_db" if using Docker DB_PORT: "5432" DB_USER: "<DATABASE_USER>" DB_PSW: "<DATABASE_PASSWORD>" DB_PATH: "./database" # SQLite database file path # Email type and SMTP authorization code (optional) EMAIL_TYPE: "qq" # Email type, options: qq, gmail, outlook FROM_EMAIL: "<FROM_EMAIL>" # Sender email EMAIL_SMTP: "<EMAIL_SMTP>" # SMTP authorization code
-
Start the Service:
Use the following command to start the application:go run main.go
Or use Air for hot reloading:
This method is the most convenient, but make sure to configure the GOPATH environment variable beforehand.
# Install Air (requires Go 1.22 or higher) go install github.com/air-verse/air@latest # Start with hot reloading air -c ./configs/.air.toml
-
Access the Interface:
After starting the application locally, access it via the browser at http://localhost:9010/ping
-
Modify the database and email configurations in the
configs/config.yaml
file as shown below:APP_HOST: "0.0.0.0" # Change to "0.0.0.0" if using Docker database: DB_DIALECT: "postgres" # Database type, options: postgres, mysql, sqlite DB_NAME: "jank_db" DB_HOST: "postgres_db" # Change to "postgres_db" if using Docker DB_PORT: "5432" DB_USER: "<DATABASE_USER>" DB_PSW: "<DATABASE_PASSWORD>" DB_PATH: "./database" # SQLite database file path # Email type and SMTP authorization code (optional) EMAIL_TYPE: "qq" # Email type, options: qq, gmail, outlook FROM_EMAIL: "<FROM_EMAIL>" # Sender email EMAIL_SMTP: "<EMAIL_SMTP>" # SMTP authorization code
-
Modify the environment variables in the
docker-compose.yaml
file as shown below:environment: - POSTGRES_USER=<DATABASE_USER> - POSTGRES_PASSWORD=<DATABASE_PASSWORD>
-
Start the container:
docker-compose up -d
-
View Swagger Documentation Locally: After starting the application locally, access the Swagger documentation at http://localhost:9010/swagger/index.html
-
README.md Documentation: Open the
README.md
file in thedocs
directory. -
Postman Documentation: Import the
docs/Jank_blog.postman_collection.json
file into Postman to view.
Note: Black represents completed features, white represents pending features.
Architecture Diagram and Visual API Documentation: Open the docs/jank_blog_architecture.drawio
file in the project root directory.
Note: This document was created using
draw.io
and requires the draw.io tool to view.
If you have any questions or suggestions, feel free to join the official community for discussions.
We sincerely thank every sponsor for their support of the open-source community!
- QQ: 927171598
- Email: fenderisfine@outlook.com
- Developer Community (QQ): 828270460
Language | Files | Code Lines | Comment Lines | Blank Lines | Percentage |
---|---|---|---|---|---|
Go | 82 | 3342 | 664 | 669 | 92.3% |
Docker | 1 | 16 | 14 | 13 | 0.4% |
YAML | 3 | 227 | 21 | 32 | 6.3% |
Markdown | 1 | 1 | 0 | 0 | 0.0% |
Others | 1 | 36 | 0 | 6 | 1.0% |
Total | 88 | 3622 | 699 | 720 | 100% |
Note: Statistics are automatically updated by GitHub Actions, last updated on 2025-03-20 Excluded docs, tmp directories and go.mod, go.sum, LICENSE, .gitignore, .dockerignore, README.md, README_en.md files
This project is licensed under the MIT License.