[Open Source] An open-source document library system developed in Golang, similar to Baidu Wenku and Sina iAsk Library

Open SourceKnowledge Base
2026-06-28 07:14 1 次浏览 • 0 次下载 0KB
[Open Source] An open-source document library system developed in Golang, similar to Baidu Wenku and Sina iAsk Library

1. Project Overview

moredoc - Modou Document Library, an open-source document library system similar to Baidu Wenku and Sina iAsk Document Library, developed in Golang by Shenzhen Mofeng Network Technology Co.,Morefun Network Technology Co., Ltd ) Supports online preview and management of documents in formats such as TXT、PDF、EPUB、MOBI、Office and serves as the refactored version of dochub Document Library.

2. Open Source License

Licensed under Apache-2.0

3. Screenshots

Home Page


Document List Page


Document Details Page


Document Upload Page


Search Results Page


Admin Console

4. Feature Overview

Features

  • Frontend and Backend Separation
  • User Registration, Login, and Password Recovery
  • Banner Support
  • Unlimited Nested Categories
  • Batch Document Upload
  • Recycle Bin Support: Deleted documents can be restored.
  • Supports previewing various document formats, including Office, PDF, TXT, EPUB, and MOBI.
  • Batch Document Conversion (Standard Edition)
  • Full-Text Search (Standard Edition)
Note: This is currently version 1.0, which only includes a PC website. Mobile adaptation, mini-programs, and additional features will be introduced in future releases.

Function List

  • Dashboard Personal Profile, Change Password, Log Out
  • Document Management Category Management, Document List, Recycle Bin
  • User Management User Management, Role Management, Permission Management
  • Banner Management
  • Single Page Management
  • Friend Link Management
  • Comment Management
  • Report Management
  • Attachment Management
  • System Settings

User Manual

For more detailed tutorials on installing, deploying, using, and further developing Modou Document Library, see the Modou Document Library User Manual on Shuzhan.

5. Tech Stack

Tech Stack

  • Golang :gin + gRPC + GORM
  • Vue.js : nuxt2 + element-ui
  • Database : MySQL 5.7

Secondary development

Except for file upload-related APIs, all other APIs are defined uniformly using proto.

Environment Requirements

  • Golang 1.18+
  • Node.js 14.16.0 (nvm can be used for version management)
  • MySQL 5.7+

Please configure the corresponding environment yourself. If you encounter errors during this process, use the error messages as a guide to find solutions through Google or Baidu.

Directory Structure

Some directories are generated automatically when the application runs and do not need to be created manually.

.
├── LICENSE                 # Open-source license
├── Makefile                # Build script
├── README.md               # Project documentation
├── api                     # proto API, API protocol definitions
├── app.example.toml        # Example configuration file; copy it to app.toml
├── biz                     # Business logic layer, primarily handles business logic and implements API interfaces
├── cmd                     # Command-line tools
├── cache                   # Cache-related files
├── conf                    # Configuration definitions
├── dict                    # Jieba word segmentation dictionary, used for automatic document tokenization
├── dist                    # Built frontend files
├── docs                    # API documentation and other documents
├── documents               # Storage directory for user-uploaded documents
├── go.mod                  # Go dependency management
├── go.sum                  # Go dependency management
├── main.go                 # Project entry point
├── middleware              # Middleware
├── model                   # Database models; uses GORM for database operations
├── release                 # Generated release versions are stored here
├── service                 # Service layer, connecting cmd and biz
├── sitemap                 # Sitemap
├── third_party             # Third-party dependencies, primarily proto files
├── uploads                 # Storage directory for files other than documents
├── util                    # Utility functions
└── web                     # Frontend Web

app.toml


# Application log levels: debug, info, warn, error
level="debug"

# Log encoding format. Supported: json, console
logEncoding="console"

# Backend listening port
port="8880"

# Database configuration
[database]
    driver="mysql"
    dsn="root:root@tcp(localhost:3306)/moredoc?charset=utf8mb4&loc=Local&parseTime=true"
    showSQL=true
    maxOpen=10
    maxIdle=10

# JWT configuration
[jwt]
    secret="moredoc"
    expireDays=365

Initialization

Backend Initialization


# Install Go dependencies
go mod tidy

# Initialize project dependencies
make init

# Compile proto API
make api

# Modify the app.toml configuration file
cp app.example.toml app.toml

# Compile the backend
go build -o moredoc main.go

# Initialize database schema
./moredoc syncdb

# Run the backend (other hot-reload tools can also be used), listening on port 8880
go run main.go serve

Frontend Initialization


# Switch to the web directory
cd web

# Install dependencies
npm install

# Run the frontend, listening on port 3000. Open [http://localhost:3000
npm](http://localhost:3000
npm) run dev in your browser

Default Administrator Username and Password


admin
mnt.ltd

Release

The following is an example


# Create a tag
git tag -a v1.0.0 -m "release v1.0.0"

# Push the tag
git push origin v1.0.0

# Build the frontend
cd web && npm run generate

# Build the backend. The compiled version will be placed in the release directory.
# Build the Linux version (for Windows, use make buildwin)
make buildlinux

Acknowledgments

Thanks to all the open-source projects that laid the foundation for the development of Magic Bean Library. For details about related open-source projects and backend dependencies, see go.mod; for frontend dependencies, see web/package.json.

#1
资源直链https://gitee.com/mnt-ltd/moredoc
去下载
星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare