midway-fatcms 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +391 -351
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,407 +1,447 @@
|
|
|
1
1
|
# Midway FatCMS
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
- SaaS
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
-
|
|
186
|
-
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
-
|
|
205
|
-
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
-
|
|
211
|
-
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
-
|
|
215
|
-
-
|
|
216
|
-
-
|
|
217
|
-
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
-
|
|
227
|
-
-
|
|
228
|
-
-
|
|
229
|
-
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
-
|
|
234
|
-
-
|
|
235
|
-
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
- 超级管理员机制
|
|
251
|
-
- 细粒度权限控制
|
|
252
|
-
|
|
253
|
-
#### 攻击防护
|
|
254
|
-
- SQL 注入防护
|
|
255
|
-
- XSS 防护
|
|
256
|
-
- CSRF Token
|
|
257
|
-
- 路径遍历防护
|
|
258
|
-
- User-Agent 黑名单(扫描工具检测)
|
|
259
|
-
- IP 限流
|
|
260
|
-
|
|
261
|
-
#### 数据安全
|
|
262
|
-
- AES-128-CBC 加密
|
|
263
|
-
- 非对称加密支持
|
|
264
|
-
- 敏感字段加密存储
|
|
265
|
-
- 密码加盐存储
|
|
266
|
-
|
|
267
|
-
## 应用场景
|
|
268
|
-
|
|
269
|
-
### 1. 企业后台系统
|
|
270
|
-
- 快速搭建管理后台
|
|
271
|
-
- 业务系统配置中心
|
|
272
|
-
- 内部工具平台
|
|
273
|
-
|
|
274
|
-
### 2. SaaS 平台
|
|
275
|
-
- 多租户应用
|
|
276
|
-
- 白标产品
|
|
277
|
-
- 行业解决方案
|
|
278
|
-
|
|
279
|
-
### 3. API 平台
|
|
280
|
-
- API 管理与网关
|
|
281
|
-
- 数据开放平台
|
|
282
|
-
- 微服务聚合
|
|
283
|
-
|
|
284
|
-
### 4. 低代码平台
|
|
285
|
-
- 业务系统快速开发
|
|
286
|
-
- 表单驱动应用
|
|
287
|
-
- 数据分析平台
|
|
288
|
-
|
|
289
|
-
### 5. 内容管理系统
|
|
290
|
-
- 文档管理
|
|
291
|
-
- 知识库
|
|
292
|
-
- 内容发布平台
|
|
293
|
-
|
|
294
|
-
## 快速开始
|
|
295
|
-
|
|
296
|
-
### 环境要求
|
|
3
|
+
<p align="center">
|
|
4
|
+
<strong>🚀 Enterprise-Grade Low-Code / Zero-Code Development Platform</strong>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
Build production-ready enterprise applications in minutes, not months.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## ✨ Why Midway FatCMS?
|
|
14
|
+
|
|
15
|
+
Stop writing repetitive CRUD boilerplate. Stop struggling with API versioning. Stop worrying about multi-tenant data isolation.
|
|
16
|
+
|
|
17
|
+
**Midway FatCMS** is a battle-tested, enterprise-grade low-code platform that transforms weeks of development into hours of configuration. Built on top of the robust Midway.js framework, it empowers teams to ship faster without sacrificing security, scalability, or control.
|
|
18
|
+
|
|
19
|
+
### The Problem We Solve
|
|
20
|
+
|
|
21
|
+
| Traditional Development | With Midway FatCMS |
|
|
22
|
+
|------------------------|-------------------|
|
|
23
|
+
| 2 weeks to build a CRUD module | 15 minutes of configuration |
|
|
24
|
+
| Manual API documentation | Auto-generated, always in sync |
|
|
25
|
+
| Complex multi-tenant logic | Built-in tenant isolation |
|
|
26
|
+
| Reinventing the wheel | Production-ready building blocks |
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 🎯 What You Get
|
|
31
|
+
|
|
32
|
+
### 🏗️ CRUD-Pro Engine — Zero-Code Data Operations
|
|
33
|
+
|
|
34
|
+
Transform database tables into fully functional REST APIs with zero code.
|
|
35
|
+
|
|
36
|
+
**Features:**
|
|
37
|
+
- ⚡ **Instant CRUD** — Auto-generated Create, Read, Update, Delete endpoints
|
|
38
|
+
- 🔍 **Advanced Querying** — Pagination, sorting, filtering, and joins out of the box
|
|
39
|
+
- 🔐 **Field-Level Security** — Granular control over visibility, read-only, and mandatory fields
|
|
40
|
+
- ✅ **Built-in Validation** — 20+ validators (email, phone, date, regex, etc.)
|
|
41
|
+
- 🔗 **Smart Relations** — Automatic handling of one-to-one, one-to-many, many-to-many
|
|
42
|
+
- 🗑️ **Soft Delete** — Logical deletion with recovery support
|
|
43
|
+
- 📊 **Audit Trail** — Automatic tracking of creators, modifiers, and timestamps
|
|
44
|
+
- 🌐 **Multi-Database** — MySQL, PostgreSQL, SQL Server support
|
|
45
|
+
|
|
46
|
+
**Perfect for:**
|
|
47
|
+
- Admin dashboards and back-office systems
|
|
48
|
+
- Data management platforms
|
|
49
|
+
- Reporting and analytics systems
|
|
50
|
+
- Business configuration centers
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
### 🌟 Any API — Three Ways to Build APIs
|
|
55
|
+
|
|
56
|
+
Whether you need a simple query or complex business logic, we've got you covered.
|
|
57
|
+
|
|
58
|
+
#### 1. SQL Query API
|
|
59
|
+
Write SQL, get REST. It's that simple.
|
|
60
|
+
- Native SQL with automatic parameter binding
|
|
61
|
+
- SQL injection protection built-in
|
|
62
|
+
- Ideal for complex reports and data analytics
|
|
63
|
+
|
|
64
|
+
#### 2. Sandbox Script API
|
|
65
|
+
Safe, sandboxed Node.js execution.
|
|
66
|
+
- Isolated VM environment for secure code execution
|
|
67
|
+
- Pre-loaded utilities (axios, lodash, moment)
|
|
68
|
+
- Direct access to database, Redis, and OSS
|
|
69
|
+
|
|
70
|
+
#### 3. Custom Code API
|
|
71
|
+
Full control when you need it.
|
|
72
|
+
- Serverless-like function deployment
|
|
73
|
+
- Hot-reload without service restart
|
|
74
|
+
- Complete business logic freedom
|
|
75
|
+
|
|
76
|
+
**Enterprise Security:**
|
|
77
|
+
- JWT authentication & role-based access control
|
|
78
|
+
- Token bucket rate limiting
|
|
79
|
+
- Circuit breaker & timeout protection
|
|
80
|
+
- IP whitelist/blacklist
|
|
81
|
+
|
|
82
|
+
**Perfect for:**
|
|
83
|
+
- Rapid API prototyping
|
|
84
|
+
- Data aggregation services
|
|
85
|
+
- Third-party integrations
|
|
86
|
+
- Microservice orchestration
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
### 🚪 API Gateway & Proxy — Enterprise-Grade Traffic Management
|
|
91
|
+
|
|
92
|
+
A full-featured API gateway that handles the complexity so you don't have to.
|
|
93
|
+
|
|
94
|
+
#### Load Balancing Strategies
|
|
95
|
+
- Round Robin
|
|
96
|
+
- Weighted Round Robin
|
|
97
|
+
- Random & Weighted Random
|
|
98
|
+
- IP Hash (sticky sessions by IP)
|
|
99
|
+
- User Hash (sticky sessions by user)
|
|
100
|
+
- Session Hash (sticky sessions by session)
|
|
101
|
+
|
|
102
|
+
#### Traffic Control
|
|
103
|
+
- Request rate limiting
|
|
104
|
+
- Configurable timeouts
|
|
105
|
+
- Automatic retry mechanisms
|
|
106
|
+
- Circuit breaker & fallback
|
|
107
|
+
|
|
108
|
+
#### Security & Context
|
|
109
|
+
- Real IP forwarding through proxies
|
|
110
|
+
- User context propagation
|
|
111
|
+
- Customizable headers (Host, Origin)
|
|
112
|
+
- Request/response header manipulation
|
|
113
|
+
|
|
114
|
+
**Perfect for:**
|
|
115
|
+
- Microservices gateway
|
|
116
|
+
- Canary deployments
|
|
117
|
+
- A/B testing
|
|
118
|
+
- Traffic splitting & aggregation
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
### 🏢 Multi-Tenant Architecture — True SaaS-Ready
|
|
123
|
+
|
|
124
|
+
Deploy once, serve unlimited customers. Complete tenant isolation without the complexity.
|
|
125
|
+
|
|
126
|
+
**Tenant Isolation:**
|
|
127
|
+
- **Domain Recognition** — Automatic tenant detection by domain
|
|
128
|
+
- **Data Separation** — Complete data isolation between tenants
|
|
129
|
+
- **Permission Boundaries** — Independent user, role, and permission management
|
|
130
|
+
- **Resource Isolation** — Files, configurations, and apps are tenant-scoped
|
|
131
|
+
|
|
132
|
+
**Flexible Configuration:**
|
|
133
|
+
- Primary domain + 2 backup domains per tenant
|
|
134
|
+
- Wildcard domain support
|
|
135
|
+
- Tenant templates for rapid onboarding
|
|
136
|
+
- Customizable tenant branding
|
|
137
|
+
|
|
138
|
+
**Perfect for:**
|
|
139
|
+
- SaaS platforms
|
|
140
|
+
- Multi-brand operations
|
|
141
|
+
- Enterprise groups
|
|
142
|
+
- White-label products
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
### 🔄 Workflow Engine — Automate Business Processes
|
|
147
|
+
|
|
148
|
+
Streamline approvals and business flows with a flexible workflow engine.
|
|
149
|
+
|
|
150
|
+
- Visual process definition
|
|
151
|
+
- Process instance tracking
|
|
152
|
+
- Task assignment and approval workflows
|
|
153
|
+
- Real-time status monitoring
|
|
154
|
+
- Historical flow records
|
|
155
|
+
|
|
156
|
+
**Perfect for:**
|
|
157
|
+
- Approval workflows (expenses, leaves, purchases)
|
|
158
|
+
- Business process automation
|
|
159
|
+
- State machine management
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
### 📚 Document Management System — Enterprise Knowledge Base
|
|
164
|
+
|
|
165
|
+
A complete document management solution with version control and analytics.
|
|
166
|
+
|
|
167
|
+
- **Document Libraries** — Multiple document repositories
|
|
168
|
+
- **Hierarchical Structure** — Tree-based organization
|
|
169
|
+
- **Version Control** — Full document versioning
|
|
170
|
+
- **Analytics** — PV/UV tracking with IP deduplication
|
|
171
|
+
- **Access Control** — Document-level permissions
|
|
172
|
+
|
|
173
|
+
**Perfect for:**
|
|
174
|
+
- API documentation
|
|
175
|
+
- Product documentation
|
|
176
|
+
- Internal knowledge bases
|
|
177
|
+
- Help centers
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
### 📁 File Service — Complete File Management
|
|
182
|
+
|
|
183
|
+
Enterprise file handling with cloud storage integration.
|
|
184
|
+
|
|
185
|
+
- **Upload & Download** — Single and batch file uploads
|
|
186
|
+
- **Cloud Storage** — Alibaba Cloud OSS integration (public & private buckets)
|
|
187
|
+
- **File Preview** — Images, PDFs, Office documents
|
|
188
|
+
- **Access Control** — Time-limited secure URLs
|
|
189
|
+
- **Organization** — Categories and tags
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
### ⚙️ System Management — Everything You Need
|
|
194
|
+
|
|
195
|
+
**User & Permissions:**
|
|
196
|
+
- User account management
|
|
197
|
+
- Role-based access control
|
|
198
|
+
- Feature-level permissions
|
|
199
|
+
- Permission allocation workflows
|
|
200
|
+
|
|
201
|
+
**Application Management:**
|
|
202
|
+
- Application registry
|
|
203
|
+
- Page management
|
|
204
|
+
- Menu configuration
|
|
205
|
+
- Low-code templates
|
|
206
|
+
|
|
207
|
+
**System Configuration:**
|
|
208
|
+
- Data dictionaries
|
|
209
|
+
- System parameters
|
|
210
|
+
- Enumeration management
|
|
211
|
+
- Scheduled tasks
|
|
212
|
+
|
|
213
|
+
**Monitoring & Operations:**
|
|
214
|
+
- Access statistics
|
|
215
|
+
- Operation logs
|
|
216
|
+
- System health info
|
|
217
|
+
- Deployment management
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## 🛡️ Security First
|
|
222
|
+
|
|
223
|
+
We take security seriously. Built-in protection at every layer:
|
|
224
|
+
|
|
225
|
+
### Access Control
|
|
226
|
+
- JWT Token authentication
|
|
227
|
+
- Session management with Redis
|
|
228
|
+
- Super admin mechanism
|
|
229
|
+
- Granular permission control
|
|
230
|
+
|
|
231
|
+
### Attack Prevention
|
|
232
|
+
- SQL injection protection
|
|
233
|
+
- XSS protection
|
|
234
|
+
- CSRF token validation
|
|
235
|
+
- Path traversal prevention
|
|
236
|
+
- User-Agent blacklisting (scanner detection)
|
|
237
|
+
- IP-based rate limiting
|
|
238
|
+
|
|
239
|
+
### Data Protection
|
|
240
|
+
- AES-128-CBC encryption
|
|
241
|
+
- Asymmetric encryption support
|
|
242
|
+
- Sensitive field encryption
|
|
243
|
+
- Salted password hashing
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## 🚀 Quick Start
|
|
248
|
+
|
|
249
|
+
### Prerequisites
|
|
297
250
|
|
|
298
251
|
- Node.js >= 10
|
|
299
252
|
- MySQL >= 5.7 / PostgreSQL >= 8 / SQL Server >= 11
|
|
300
253
|
- Redis >= 3.0
|
|
301
254
|
|
|
302
|
-
###
|
|
255
|
+
### Installation
|
|
303
256
|
|
|
304
257
|
```bash
|
|
258
|
+
# Clone the repository
|
|
259
|
+
git clone <repository-url>
|
|
260
|
+
cd midway-fatcms
|
|
261
|
+
|
|
262
|
+
# Install dependencies
|
|
305
263
|
npm install
|
|
306
264
|
```
|
|
307
265
|
|
|
308
|
-
###
|
|
266
|
+
### Configuration
|
|
309
267
|
|
|
310
|
-
1.
|
|
311
|
-
2.
|
|
312
|
-
3.
|
|
313
|
-
4.
|
|
268
|
+
1. Configure database connection in `src/config/config.default.ts`
|
|
269
|
+
2. Set up Redis connection
|
|
270
|
+
3. Configure OSS (optional)
|
|
271
|
+
4. Configure workbench information
|
|
314
272
|
|
|
315
|
-
###
|
|
273
|
+
### Database Setup
|
|
316
274
|
|
|
317
275
|
```sql
|
|
318
|
-
--
|
|
276
|
+
-- Run initialization SQL
|
|
319
277
|
source ddl/2025-12-20.sql
|
|
320
278
|
```
|
|
321
279
|
|
|
322
|
-
###
|
|
280
|
+
### Start Development
|
|
323
281
|
|
|
324
282
|
```bash
|
|
325
|
-
#
|
|
283
|
+
# Development mode with hot reload
|
|
326
284
|
npm run dev
|
|
327
285
|
|
|
328
|
-
#
|
|
286
|
+
# Build for production
|
|
329
287
|
npm run build
|
|
330
288
|
|
|
331
|
-
#
|
|
289
|
+
# Start production server
|
|
332
290
|
npm start
|
|
333
291
|
```
|
|
334
292
|
|
|
335
|
-
###
|
|
293
|
+
### Code Quality
|
|
336
294
|
|
|
337
295
|
```bash
|
|
338
|
-
#
|
|
296
|
+
# Check code style
|
|
339
297
|
npm run lint
|
|
340
298
|
|
|
341
|
-
#
|
|
299
|
+
# Auto-fix issues
|
|
342
300
|
npm run lint:fix
|
|
343
301
|
```
|
|
344
302
|
|
|
345
|
-
###
|
|
303
|
+
### Testing
|
|
346
304
|
|
|
347
305
|
```bash
|
|
348
|
-
#
|
|
306
|
+
# Run tests
|
|
349
307
|
npm test
|
|
350
308
|
|
|
351
|
-
#
|
|
309
|
+
# Generate coverage report
|
|
352
310
|
npm run cov
|
|
353
311
|
```
|
|
354
312
|
|
|
355
|
-
|
|
313
|
+
---
|
|
356
314
|
|
|
357
|
-
|
|
315
|
+
## 🏛️ Architecture
|
|
358
316
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
317
|
+
### Technology Stack
|
|
318
|
+
|
|
319
|
+
| Layer | Technology |
|
|
320
|
+
|-------|-----------|
|
|
321
|
+
| **Framework** | Midway.js 3.x (Enterprise Node.js) |
|
|
322
|
+
| **Web Server** | Koa |
|
|
323
|
+
| **Language** | TypeScript |
|
|
324
|
+
| **Database** | MySQL / PostgreSQL / SQL Server |
|
|
325
|
+
| **Cache** | Redis |
|
|
326
|
+
| **File Storage** | Alibaba Cloud OSS / S3-compatible |
|
|
327
|
+
|
|
328
|
+
### Core Middleware
|
|
329
|
+
|
|
330
|
+
**Global Middleware:**
|
|
331
|
+
- User session management
|
|
332
|
+
- Multi-tenant isolation
|
|
333
|
+
- Transaction management
|
|
334
|
+
- Request-level logging
|
|
335
|
+
- Unified response formatting
|
|
336
|
+
- Real IP extraction
|
|
337
|
+
|
|
338
|
+
**Security Middleware:**
|
|
339
|
+
- Login verification (`checkLogin`)
|
|
340
|
+
- Role verification (`checkRole`)
|
|
341
|
+
- Permission verification (`checkPermission`)
|
|
342
|
+
- Path blacklist (`Forbidden`)
|
|
343
|
+
- Distributed locking (`RedisLock`)
|
|
344
|
+
- Response caching (`RedisCache`)
|
|
362
345
|
|
|
363
|
-
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
## 📁 Project Structure
|
|
364
349
|
|
|
365
350
|
```
|
|
366
351
|
midway-fatcms/
|
|
367
352
|
├── src/
|
|
368
|
-
│ ├── config/ #
|
|
369
|
-
│ ├── controller/ #
|
|
370
|
-
│ │ ├── base/ #
|
|
371
|
-
│ │ ├── gateway/ #
|
|
372
|
-
│ │ ├── manage/ #
|
|
373
|
-
│ │ ├── myinfo/ #
|
|
374
|
-
│ │ └── render/ #
|
|
375
|
-
│ ├── filter/ #
|
|
376
|
-
│ ├── libs/ #
|
|
377
|
-
│ │ ├── crud-pro/ # CRUD-Pro
|
|
378
|
-
│ │ ├── global-config/ #
|
|
379
|
-
│ │ └── utils/ #
|
|
380
|
-
│ ├── middleware/ #
|
|
381
|
-
│ ├── models/ #
|
|
382
|
-
│ ├── schedule/ #
|
|
383
|
-
│ ├── service/ #
|
|
384
|
-
│ │ ├── anyapi/ #
|
|
385
|
-
│ │ ├── asyncTask/ #
|
|
386
|
-
│ │ ├── base/ #
|
|
387
|
-
│ │ ├── crudstd/ # CRUD
|
|
388
|
-
│ │ ├── curd/ # CRUD
|
|
389
|
-
│ │ ├── flow/ #
|
|
390
|
-
│ │ └── proxyapi/ #
|
|
391
|
-
│ └── views/ #
|
|
392
|
-
├── ddl/ #
|
|
393
|
-
├── scripts/ #
|
|
394
|
-
└── package.json #
|
|
353
|
+
│ ├── config/ # Configuration files
|
|
354
|
+
│ ├── controller/ # Controllers
|
|
355
|
+
│ │ ├── base/ # Base controllers
|
|
356
|
+
│ │ ├── gateway/ # Gateway APIs
|
|
357
|
+
│ │ ├── manage/ # Management APIs
|
|
358
|
+
│ │ ├── myinfo/ # Personal info APIs
|
|
359
|
+
│ │ └── render/ # Rendering APIs
|
|
360
|
+
│ ├── filter/ # Exception filters
|
|
361
|
+
│ ├── libs/ # Core libraries
|
|
362
|
+
│ │ ├── crud-pro/ # CRUD-Pro engine
|
|
363
|
+
│ │ ├── global-config/ # Global configuration
|
|
364
|
+
│ │ └── utils/ # Utilities
|
|
365
|
+
│ ├── middleware/ # Middleware
|
|
366
|
+
│ ├── models/ # Data models
|
|
367
|
+
│ ├── schedule/ # Scheduled tasks
|
|
368
|
+
│ ├── service/ # Business services
|
|
369
|
+
│ │ ├── anyapi/ # Dynamic API
|
|
370
|
+
│ │ ├── asyncTask/ # Async tasks
|
|
371
|
+
│ │ ├── base/ # Base services
|
|
372
|
+
│ │ ├── crudstd/ # Standard CRUD
|
|
373
|
+
│ │ ├── curd/ # CRUD services
|
|
374
|
+
│ │ ├── flow/ # Workflow
|
|
375
|
+
│ │ └── proxyapi/ # Proxy API
|
|
376
|
+
│ └── views/ # View templates
|
|
377
|
+
├── ddl/ # Database scripts
|
|
378
|
+
├── scripts/ # Utility scripts
|
|
379
|
+
└── package.json # Project configuration
|
|
395
380
|
```
|
|
396
381
|
|
|
397
|
-
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
## 🎯 Use Cases
|
|
385
|
+
|
|
386
|
+
### Enterprise Back-Office Systems
|
|
387
|
+
- Rapid admin dashboard creation
|
|
388
|
+
- Business system configuration hubs
|
|
389
|
+
- Internal tool platforms
|
|
390
|
+
|
|
391
|
+
### SaaS Platforms
|
|
392
|
+
- Multi-tenant applications
|
|
393
|
+
- White-label products
|
|
394
|
+
- Industry-specific solutions
|
|
395
|
+
|
|
396
|
+
### API Platforms
|
|
397
|
+
- API management & gateways
|
|
398
|
+
- Data open platforms
|
|
399
|
+
- Microservice aggregation
|
|
400
|
+
|
|
401
|
+
### Low-Code Development
|
|
402
|
+
- Rapid business system development
|
|
403
|
+
- Form-driven applications
|
|
404
|
+
- Data analysis platforms
|
|
405
|
+
|
|
406
|
+
### Content Management
|
|
407
|
+
- Document repositories
|
|
408
|
+
- Knowledge bases
|
|
409
|
+
- Content publishing platforms
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
413
|
+
## 🛠️ Utility Endpoints
|
|
414
|
+
|
|
415
|
+
### Encryption Helper
|
|
416
|
+
|
|
417
|
+
```
|
|
418
|
+
http://127.0.0.1:7002/ns/api/helpers/cryptoAes128CBC?input=123
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
---
|
|
422
|
+
|
|
423
|
+
## 📌 Version
|
|
424
|
+
|
|
425
|
+
Current Version: `0.0.1-beta.82`
|
|
426
|
+
|
|
427
|
+
---
|
|
428
|
+
|
|
429
|
+
## 📄 License
|
|
430
|
+
|
|
431
|
+
MIT License — Use it freely, contribute often.
|
|
432
|
+
|
|
433
|
+
---
|
|
398
434
|
|
|
399
|
-
|
|
435
|
+
## 👥 Contributing
|
|
400
436
|
|
|
401
|
-
|
|
437
|
+
We welcome contributions! Whether it's bug reports, feature requests, or pull requests, your input helps make Midway FatCMS better for everyone.
|
|
402
438
|
|
|
403
|
-
|
|
439
|
+
---
|
|
404
440
|
|
|
405
|
-
|
|
441
|
+
<p align="center">
|
|
442
|
+
<strong>Built with ❤️ by the Enterprise Low-Code Development Team</strong>
|
|
443
|
+
</p>
|
|
406
444
|
|
|
407
|
-
|
|
445
|
+
<p align="center">
|
|
446
|
+
Ready to ship faster? Let's build something amazing together.
|
|
447
|
+
</p>
|