One codebase, multiple ends
Vue pages compile to H5, mini programs and apps. Platform differences are isolated in adapters and conditional compilation.
About 650 wordsAbout 2 min
uniapp-middle-platform is a reusable multi-end middle platform based on an improved unibest template. A new module's backend is built in TG-boot; its admin, mini program and app screens can share one front-end foundation instead of being rebuilt three times.
Vue pages compile to H5, mini programs and apps. Platform differences are isolated in adapters and conditional compilation.
It sits between TG-boot services and the UI: login, permissions, requests, layout, shared components, uploads and configuration.
Not a one-off project. New products start from the same structure and platform capabilities, then add only their own business surface.
The base provides Vue 3, TypeScript, Vite, conventional routing, layouts, request wrappers, login interception, UnoCSS and i18n. This edition adds:
v-auth button permissions;/mgt request layer and unified error handling;manage shell plus manage_ability domains, designed for module-by-module expansion.| End | Development | Output | Typical use |
|---|---|---|---|
| H5 | pnpm dev:h5 | dist/build/h5 | admin, operations, browser |
| WeChat mini program | pnpm dev:mp | dist/build/mp-weixin | user-facing mobile |
| App | pnpm dev:app | dist/build/app | native mobile capabilities |
The project also keeps build scripts for other mini program targets. Enable the ones you actually ship.
Current default
This repository currently runs primarily as the admin H5 console. The uni-app multi-end build entries remain available; new business products should use it as a template and compile for their target ends.
*-api / *-biz).src/pages/manage_ability/{module}/./mgt API under src/pages/manage/api/{module}.ts.src/pages/manage_ability/{module}/
├── index.vue
├── {entity}/
│ ├── index.vue
│ └── components/
src/pages/manage/api/{module}.ts| Without a shared platform | With uniapp-middle-platform |
|---|---|
| Every module rebuilds login, layout, requests and permissions | Reuse one platform layer |
| Each end gets a separate front-end | Shared pages + platform adapters |
| Permissions and menus drift | Feature map + v-auth |
| Business teams spend time on infrastructure | Business teams focus on business |
The goal is simple: reuse the platform, focus the module.
Scope
The current repository carries core platform capabilities, not every business back-office. New business products should use it as a template rather than adding all business pages back into the shared platform.