Wangmarket SAAS Cloud Website Building System

repository·master·Indexed 43 days ago

https://github.com/xnx3/wangmarket

A high-performance SAAS cloud website building system for private deployment. It enables management of multiple independent websites from a single backend using a template-based approach. Features include a Proxy Backend for SaaS management, a Website Backend for content control, and dedicated Backend and Website APIs. Supports white-labeling via an OEM plugin, custom file storage (Local, Huawei Cloud OBS), and an extensible plugin system with over 40 built-in plugins.

Tokens
15.8K
Snippets
30
Records
71
Agent score
56%

What's inside Wangmarket

  1. Overview of the Cache Module

    master

    The cache module in wangmarket is responsible for managing performance-critical cached data. Its primary responsibilities include:

    • Website Generation: Caching data required during the process of generating static or dynamic website files.
    • Template Tag Replacement: Caching the results of dynamic tag replacements within templates to ensure high performance during page rendering.

    This module is essential for maintaining the system's ability to serve a large number of independent websites efficiently on minimal hardware.

  2. Explore the wangmarket ecosystem and source repositories

    master

    The wangmarket project is a SaaS-based website building system composed of several interconnected open-source components and specialized products. Developers can extend the system using the following core repositories:

    Core CMS & Framework

    • wangmarket CMS Core: Handles column management, content management, template management, and domain binding. Repository
    • wm Development Framework: The underlying technical framework providing database operations, caching, and permission management. Repository | Documentation

    Specialized Components

    • FileUpload: A component for file uploads that works identically across local, distributed, or object storage with just two lines of code. Repository
    • Log Component: For persistent storage and reading of large volumes of log data. Repository
    • HTTP Java: A lightweight, zero-dependency HTTP/HTTPS request tool for Java 8+. Repository
    • msg.js: A lightweight JavaScript component for UI notifications (loading, success, failure) without third-party dependencies. Repository
    • WriteCode: An automated code generator that produces standardized code based on database table designs. Repository
    • Page.java: A zero-dependency Java pagination utility. Repository
    • Cache Component: A tool that allows switching between Java Map and Redis via configuration. Repository

    Integrated Products

    • TemplateSpider: A desktop tool to scrape websites and convert them into HTML templates. Website
    • wangmarket Cloud Mall: A SaaS e-commerce system that integrates with the wangmarket template system via APIs. Source
    • Leiming Cloud Customer Service: A SaaS product providing real-time chat capabilities. Frontend JS Framework | Backend Java Service
    • Multi-language Translation: A JS-based component for automatic website translation and SEO-friendly multi-language support. Repository
  3. Explore related open source projects

    master

    The author maintains a variety of open source projects related to infrastructure, cloud storage (Huawei Cloud OBS), web tools, and Java utilities. These can be used alongside or as alternatives to the wangmarket system for specific tasks like file uploading, chat bots, or automated deployment.

    | 开源项目 | star数量 | 仓库 |
    | --- | --- | --- |
    | 可私有部署 SAAS 建站系统  |  ![](https://gitee.com/mail_osc/wangmarket/badge/star.svg?theme=white) | https://gitee.com/mail_osc/wangmarket |
    | Datax 的 华为云OBS 插件 | ![](https://gitee.com/HuaweiCloudDeveloper/obs-datax-plugins/badge/star.svg?theme=white) | https://gitee.com/HuaweiCloudDeveloper/obs-datax-plugins |
    | 扒网站工具 | ![](https://gitee.com/mail_osc/templatespider/badge/star.svg?theme=white)  |  https://gitee.com/mail_osc/templatespider |
    | 文件上传工具类,OBS存储  | ![](https://gitee.com/mail_osc/FileUpload/badge/star.svg?theme=white ) | https://gitee.com/mail_osc/FileUpload |
    | 智能客服机器人 | ![](https://gitee.com/leimingyun/chatbot/badge/star.svg?theme=white ) | https://gitee.com/leimingyun/chatbot |
    | 结合云存储做网站无需服务器 | ![](https://gitee.com/HuaweiCloudDeveloper/huaweicloud-obs-website-wangmarket-cms/badge/star.svg?theme=white ) | [huaweicloud-obs-website-wangmarket-cms](https://gitee.com/HuaweiCloudDeveloper/huaweicloud-obs-website-wangmarket-cms) |
    | kefu.js 在线聊天的前端 | ![](https://gitee.com/mail_osc/kefu.js/badge/star.svg?theme=white ) | https://gitee.com/mail_osc/kefu.js |
    | 轻量级js消息提醒组件 | ![](https://gitee.com/mail_osc/msg/badge/star.svg?theme=white ) | https://gitee.com/mail_osc/msg |
    | js 实现 html 全自动翻译 | ![](https://gitee.com/mail_osc/translate/badge/star.svg?theme=white ) | https://gitee.com/mail_osc/translate |
    | 代码生成器,自动写代码 | ![](https://gitee.com/mail_osc/writecode/badge/star.svg?theme=white ) | https://gitee.com/mail_osc/writecode |
    | Java日志存储及读取 | ![](https://gitee.com/mail_osc/log/badge/star.svg?theme=white ) | https://gitee.com/mail_osc/log |
    | Layui的国际化支持组件 | ![](https://gitee.com/mail_osc/translate_layui/badge/star.svg?theme=white ) | https://gitee.com/mail_osc/translate_layui |
    | Java8轻量级http请求类 | ![](https://gitee.com/mail_osc/http.java/badge/star.svg?theme=white ) | https://gitee.com/mail_osc/http.java |
    | Java版按键精灵,游戏辅助开发 | ![](https://gitee.com/mail_osc/xnx3/badge/star.svg?theme=white ) | https://gitee.com/mail_osc/xnx3 |
    | js的WebSocket框架封装 | ![](https://gitee.com/mail_osc/websocket.js/badge/star.svg?theme=white ) | https://gitee.com/mail_osc/websocket.js |
    | js邮件发送模块 | ![](https://gitee.com/mail_osc/email.java/badge/star.svg?theme=white ) | https://gitee.com/mail_osc/email.java |
    | WEB 端浏览器通知提醒工具类 | ![](https://gitee.com/mail_osc/notification.js/badge/star.svg?theme=white ) | https://gitee.com/mail_osc/notification.js |
    | JS中文转拼音工具类 | ![](https://gitee.com/mail_osc/pinyin.js/badge/star.svg?theme=white ) | https://gitee.com/mail_osc/pinyin.js |
    | Java-微信常用工具类 | ![](https://gitee.com/mail_osc/xnx3_weixin/badge/star.svg?theme=white ) | https://gitee.com/mail_osc/xnx3_weixin |
    | QQ寻仙的游戏辅助软件 | ![](https://gitee.com/mail_osc/xunxian/badge/star.svg?theme=white ) | https://gitee.com/mail_osc/xunxian |
    | 私有化部署 SAAS商城 | ![](https://gitee.com/leimingyun/wangmarket_shop/badge/star.svg?theme=white ) | https://gitee.com/leimingyun/wangmarket_shop |
    | Java开发框架及规章约束 | ![](https://gitee.com/leimingyun/wm/badge/star.svg?theme=white ) | https://gitee.com/leimingyun/wm |
    | SAAS客服系统 | ![](https://gitee.com/leimingyun/yunkefu/badge/star.svg?theme=white ) | https://gitee.com/leimingyun/yunkefu |
    | 根据标准的 JavaDoc 生成接口文档 | ![](https://gitee.com/leimingyun/javadoc/badge/star.svg?theme=white) | https://gitee.com/leimingyun/javadoc |
    | 用sql方式使用Elasticsearch | ![](https://gitee.com/leimingyun/elasticsearch/badge/star.svg?theme=white ) | https://gitee.com/leimingyun/elasticsearch |
    | Java应用全自动部署及更新 | ![](https://gitee.com/leimingyun/sftp-ssh-autopublish/badge/star.svg?theme=white ) | https://gitee.com/leimingyun/sftp-ssh-autopublish |
    | 智能聊天机器人 | ![](https://gitee.com/leimingyun/aichat/badge/star.svg?theme=white ) | https://gitee.com/leimingyun/aichat |
    | 自动备份文件到华为云 OBS | ![](https://gitee.com/leimingyun/yunbackups/badge/star.svg?theme=white ) | https://gitee.com/leimingyun/yunbackups |
    | Java打印及预览的工具类 | ![](https://gitee.com/leimingyun/printJframe/badge/star.svg?theme=white ) | https://gitee.com/leimingyun/printJframe |
  4. Understand the Wangmarket Repository Structure

    master

    The wangmarket project is a Maven-based Java application using Spring Boot 2.6.1 and Java 8. It is packaged as a war file (version 7.2.0).

    Core Components

    • Entry Point: src/main/java/com/Application.java handles the Spring Boot startup and includes restart() logic.
    • Configuration: src/main/resources/application.properties is the primary configuration file. It manages database connections (SQLite by default, supports MySQL 5.7), uploads, Redis, RabbitMQ, SMS, authorization, multi-language settings, and logging.
    • Local Dependencies: src/main/webapp/WEB-INF/lib/ contains local .jar files that are not sourced from remote Maven repositories. Do not delete these files when compiling or organizing dependencies.
    • Views: JSP views are located in src/main/webapp/WEB-INF/view/.
    • Static Assets: Static resources are located in src/main/resources/static/ and are mapped to static/ during Maven packaging.
  5. Understand the difference between Single-machine and SAAS versions

    master

    Wangmarket provides two distinct deployment models depending on your needs:

    1. Single-machine (Serverless) Version: Best for individuals or small projects. It requires minimal cost and is suitable for users with basic knowledge of domain resolution, HTML, and CSS. It can be deployed on cloud storage like Huawei Cloud OBS.
    2. SAAS Version: Designed for service providers. It allows you to manage multiple proxy backends, where each proxy can provision and manage multiple independent websites. Each website is managed via its own account. It includes an Open Platform API for automated website provisioning and management.
  6. Identify Java Package Responsibilities

    master

    The project logic is organized into several functional packages under src/main/java/com/xnx3/wangmarket/:

    PackageResponsibility
    adminMain website management backend (columns, content, templates, installation controllers).
    agencyadminAgency backend logic for site provisioning and agency-level management.
    domainFrontend access logic, domain resolution, page access, caching, and generation.
    pluginBuilt-in plugins and extension points (e.g., markdown, newsSearch, templateDevelop).
    superadminSystem-level management and global controls (e.g., plugin management).
    systemCore system support code.
  7. Use the HTML-based template system

    master

    The template system follows the logic of EmpireCMS and DedeCMS, allowing for high flexibility through HTML, JS, and CSS.

    Key Features:

    • Template Variables & Global Variables: Use these to dynamically reference common code blocks or global data across multiple template pages.
    • Code Editor: A built-in editor is provided for writing and editing code.
    • Cloud Template Library: Over 100 free templates are included by default. After installing the system and creating a website, you can select a template from the website management backend.
    • Static Site Generation: Once your content and templates are ready, click Generate Entire Site (生成整站) in the website management backend to convert everything into static HTML pages for high-performance access.
  8. Extend functionality with Plugins and Templates

    master

    The system is designed for high extensibility:

    • HTML Template System: Uses a mechanism similar to EmpireCMS or DedeCMS, allowing full control over site design via HTML. Every part of the site is customizable.
    • Input Model Extension: Allows adding custom fields (input models) to content types like News or Products to meet specific data requirements.
    • Plugin System: Supports over 40 built-in plugins. Developers can create custom plugins in approximately 5 minutes using the provided plugin development documentation, ensuring customizations do not interfere with future system upgrades.
  9. How to approach development in Wangmarket

    master

    When performing secondary development, template creation, plugin extension, or troubleshooting in the wangmarket repository (or derivative projects with the same structure), follow these core principles to ensure maintainability and compatibility:

    Development Priority

    Always follow the official hierarchy to ensure the core system remains upgradeable:

    1. Functional Plugins (Highest priority/Safest)
    2. Overwriting specific files
    3. Directly modifying the wangmarket core (Lowest priority/Avoid if possible)

    Key Development Areas

    • Template Tasks: Focus on TemplateController, ColumnController, plugin/templateDevelop, websiteTemplate, and associated JSP files.
    • Domain & Access Issues: For front-end access, domain mapping, or deployment link issues, prioritize checking domain/controller/PublicController.java and official domain documentation.
    • Installation & Configuration: For startup, installation, or configuration tasks, check com/Application.java, application.properties, and InstallController_.java.

    Important Note

    Do not attempt to fix or modify plugin/phoneCreateSite/reg.do. This belongs to a different repository and is outside the scope of the current wangmarket maintenance.

  10. Choose between Single-machine and SAAS versions

    master

    The system offers two distinct versions based on your deployment needs:

    • Single-machine version (单机版): Designed for creating individual websites without requiring a dedicated server. It leverages cloud technology (integrated with Huawei Cloud) to allow website creation locally. Use this if you only need to host one or two websites and want to avoid server costs.
    • SAAS version (SAAS版): Designed for website building companies. It is installed on a server, allowing you to open multiple website accounts online. Each website is managed independently with its own account. This version is the primary focus of the main documentation.
  11. Implement Custom File Storage

    master

    The system manages images and attachments using the FileUpload open-source component. By default, it supports:

    • Local server storage
    • Huawei Cloud OBS

    Developers can extend the FileUpload component to integrate with other storage modules such as FastDFS or Alibaba Cloud OSS.