Docs home / HareAdmin Handbook
Architecture
Overview
MVC on ThinkPHP 8 multi-app: admin / index / api / common (plus optional apps such as store).
Tree
addons/
app/{admin,api,common,index,…}
config/ # includes yetuadmin.php
public/assets/{css,js,libs,vendor}
public/index.php
runtime/ vendor/ think
Static assets ship under public/assets; PHP deps via Composer.
Apps
admin— back officeindex— site + member centerapi— App / mini-program / public APIscommon— shared libraries (not web-facing)
Typical feature files
app/admin/controller/Example.php
app/admin/model/Example.php
app/admin/view/example/index.html
UI strings → yt_lang. Addons → addons/{name}/.
Versioning
Keep three concerns separate:
- Product SemVer —
config/yetuadmin.php→yetuadmin.version(e.g.5.0.1). Used for upgrades, storefaversion, and “System version” in admin. - Asset cache stamp — DB key
asset_version(aliased tosite.versionfor legacy JS/templates). Updated automatically on wipe-cache / System config save; hidden from System config UI (not the product version). - App client force-update — not in core. Install the App Version addon and call
/addons/appversion/api/check.
Do not treat the editable/legacy “Version” field as the framework release number. After git pull, product version comes from git; asset stamps and DB may still differ per environment until you wipe cache or save System config.
Core tables
Core table COMMENT values are English by default. CRUD / generators read them from information_schema. Prefer the same for addon-owned tables so generated titles stay language-neutral. Do not put market-region framing in comments.
| Table | Purpose |
|---|---|
yt_admin | Admin accounts |
yt_admin_log | Admin operation log |
yt_auth_group | Admin groups |
yt_auth_group_access | Admin group access |
yt_auth_rule | Auth rules / menu nodes |
yt_config | System config |
yt_attachment | Attachments |
yt_lang / yt_lang_list | Language strings / languages |
yt_content_lang | Content translations |
yt_user / yt_user_group / yt_user_rule | Members / groups / rules |
yt_user_token / yt_user_third | Member tokens / third-party bindings |
yt_user_money_log / yt_user_score_log | Money / score ledgers |
yt_sms / yt_ems | SMS / email verification codes |
yt_region / yt_currency | Regions / currencies |
yt_addon_config | Addon config |