xms Management System Framework
repository·master·Indexed 19 days ago
https://github.com/migomiddle/xmsA cross-platform, .NET Core-based management system framework designed for rapid application development in e-commerce, enterprise software, SaaS backends, and mobile app management. It aims for a 'near-zero-code' experience and includes common modules, UEditor integration for content management, and support for SQL Server 2008 R2 or higher.
What's inside xms
- xms is a cross-platform application framework based on .NET Core. It is designed to be highly extensible and easy to use, functioning as an 'x(extensible/arbitrary) m(management) s(system)'. It includes numerous common modules and aims to provide a 'near-zero-code' development experience, allowing developers to focus on business logic rather than infrastructure.
Run and deploy xms
masterTo run xms, ensure your environment meets the following requirements:
Prerequisites
- .NET Core SDK 3
- SQL Server 2008 R2 or higher
Deployment Steps
- Database Setup: Attach the databases found in the
dbfolder to your SQL Server instance. The project uses three specific databases:XMS_CONFIG: The data center/configuration database.XSM_Empty: A business database with no demo data.XMS_Standar: A business database containing demo data.
- Execution: Run the
deploy.batfile to publish the application. - Initial Configuration: On the first run, you will be directed to an initialization interface where you must:
- Configure the Data Center database (
XMS_CONFIG). - Configure the Business database.
- Configure the Data Center database (
- Default Login Credentials:
- Username:
admin - Password:
888888
- Username:
deploy.batConfigure UEditor base URL
masterUEditor requires a base path to locate its resource files (like dialogs and themes). You can set this globally before the editor is instantiated by defining
window.UEDITOR_HOME_URL. It is strongly recommended to use a relative path starting with a slash (e.g.,/myProject/ueditor/) to avoid path resolution issues. If not explicitly set, the editor attempts to calculate the path automatically usinggetUEBasePath().// Set the base path at the top of your page before instantiating the editor window.UEDITOR_HOME_URL = "/your/project/path/ueditor/";Configure chart types and plot options in chart.config.js
masterThe
chart.config.jsfile defines a collection of configuration presets (typeConfig) for different chart types used within the UEditor charts dialog. Each object in thetypeConfigarray specifies achart.typeand associatedplotOptionsto customize behavior such as data labels, mouse tracking, and visual styles for specific chart categories (line, area, bar, column, and pie).var typeConfig = [ { chart: { type: 'line' }, plotOptions: { line: { dataLabels: { enabled: false }, enableMouseTracking: true } } }, // ... other configurations { chart: { type: 'pie' }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: true, color: '#000000', connectorColor: '#000000', formatter: function () { return '<b>' + this.point.name + '</b>: ' + (Math.round(this.point.percentage * 100) / 100) + ' %'; } } } } } ];Configure UEditor toolbars
masterThe
toolbarsoption inwindow.UEDITOR_CONFIGdefines the buttons and dropdowns available in the editor's toolbar. It accepts an array of arrays, where each inner array represents a row of tools. You can customize the toolbar by including or excluding specific command names. This can also be overridden during the instantiation of a specific editor instance.window.UEDITOR_CONFIG = { toolbars: [[ 'fullscreen', 'source', '|', 'undo', 'redo', '|', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|', 'rowspacingtop', 'rowspacingbottom', 'lineheight', '|', 'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|', 'directionalityltr', 'directionalityrtl', 'indent', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|', 'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe', 'insertcode', 'pagebreak', 'template', 'background', '|', 'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|', 'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|', 'print', 'preview', 'searchreplace', 'drafts', 'help' ]] };Configure UEditor XSS filtering and whitelist
masterUEditor provides built-in XSS (Cross-Site Scripting) protection. You can enable or disable these filters and define a custom whitelist of allowed tags and attributes in
window.UEDITOR_CONFIG.Key security settings:
xssFilterRules: Enables/disables XSS filtering forinsertHtmloperations.inputXssFilter: Enables/disables XSS filtering for input.outputXssFilter: Enables/disables XSS filtering for output.whitList: An object mapping HTML tags to an array of allowed attributes (e.g.,a: ['target', 'href', 'title', 'class', 'style']).
window.UEDITOR_CONFIG = { xssFilterRules: true, inputXssFilter: true, outputXssFilter: true, whitList: { iframe: ['frameborder', 'border', 'marginwidth', 'marginheight', 'width', 'height', 'src', 'id'], a: ['target', 'href', 'title', 'class', 'style'], img: ['src', 'alt', 'title', 'width', 'height', 'id', '_src', '_url', 'loadingclass', 'class', 'data-latex'], // ... other tags } };Configure UEditor language and themes
masterYou can customize the language and visual theme of the editor via
window.UEDITOR_CONFIG:lang: Sets the language (default iszh-cn). You can provide a string or use a dynamic value fromnavigator.language.langPath: The path to the language files (e.g.,URL + 'lang/').theme: Sets the visual theme (default isdefault).themePath: The path to the theme files (e.g.,URL + 'themes/').
window.UEDITOR_CONFIG = { lang: 'zh-cn', langPath: URL + 'lang/', theme: 'default', themePath: URL + 'themes/' };Configure UEditor editor behavior and appearance
masterThe following options control the core behavior and UI of the editor instance:
Key Description serverUrlThe unified request interface path for server-side operations (e.g., file uploads). initialContentThe content to initialize the editor with. textareaThe name/ID of the textarea used for form submission. readonlyIf true, the editor area is read-only.fullscreenIf true, the editor starts in fullscreen mode.enableAutoSaveEnables automatic saving of content. saveIntervalThe interval for auto-saving in milliseconds. wordCountEnables word count statistics. maximumWordsThe maximum allowed character count for word count statistics. autoHeightEnabledIf true, the editor height adjusts automatically.scaleEnabledIf true, allows manual resizing of the editor (disablesautoHeightEnabled).elementPathEnabledEnables/disables the element path display. imagePopupControls the visibility of the image operation popup. Reference available chart type configurations
masterThe following chart configurations are defined in
typeConfig:- Line Chart (No Labels):
type: 'line',dataLabels.enabled: false,enableMouseTracking: true. - Line Chart (With Labels):
type: 'line',dataLabels.enabled: true,enableMouseTracking: false. - Area Chart:
type: 'area'. - Bar Chart:
type: 'bar'. - Column Chart:
type: 'column'. - Pie Chart:
type: 'pie', includesallowPointSelect: true,cursor: 'pointer', and a customformatterfor data labels showing percentage values.
// Available chart types in typeConfig: // 'line' // 'area' // 'bar' // 'column' // 'pie'- Line Chart (No Labels):