How imkaihong1015/yuindex works
YuIndex is a command-driven browser homepage and reusable web terminal. Users enter commands in the terminal; the command engine matches and parses them, dispatches command actions, and the terminal displays their results. The command set spans search, navigation, saved web links, user accounts, terminal customization, productivity, and entertainment. A supporting Express backend exposes account, music, translation, and background endpoints. Edges are limited to excerpted relationships or README-documented capabilities; unsampled wiring is omitted.
Main entry points: YuTerminal.vue Terminal UI · commandRegister.ts Command registry · routes.js API routes · commandExecutor.ts Command executor
Components 24
Web terminal
- Homepage
src/pages/IndexPage.vue - Terminal UI
src/components/yu-terminal/YuTerminal.vue - Output renderer
src/components/yu-terminal/ContentOutput.vue - Command history
src/components/yu-terminal/history.ts - Keyboard shortcuts
src/components/yu-terminal/shortcuts.ts - Input hints
src/components/yu-terminal/hint.ts
Command engine
- Command executor
src/core/commandExecutor.ts - Command registry
src/core/commandRegister.ts
Command capabilities
- Platform search
src/core/commands/search/searchCommands.ts - Web navigation
src/core/commands/gotoCommand.ts - Saved web space
src/core/commands/space/spaceStore.ts - Account commands
src/core/commands/user/userCommands.ts
Backend services
- Account API
server/src/controller/userController.js - Account service
server/src/service/userService.js - User records
server/src/model/user.js - Music API
server/src/controller/musicController.js - Music service
server/src/service/musicService.js - Translation API
server/src/controller/fanyiController.js - Background API
server/src/controller/backgroundController.js - API routes
server/src/routes.js
External integrations
- Baidu translation
server/src/thirdpart/baiduFanYi/baiduFanYiApi.js - Wallpaper provider
server/src/thirdpart/backgroundApi.js - Netease music provider
server/src/thirdpart/neteaseMusicApi.js
Other components
- User
Connections 21
- User → Terminal UI: enters commands
README.md - Terminal UI → Output renderer: renders results
src/components/yu-terminal/YuTerminal.vue - Terminal UI → Command history: uses history
src/components/yu-terminal/YuTerminal.vue - Terminal UI → Keyboard shortcuts: registers shortcuts
src/components/yu-terminal/YuTerminal.vue - Terminal UI → Input hints: requests hints
src/components/yu-terminal/YuTerminal.vue - Homepage → Command executor: invokes commands
src/pages/IndexPage.vue - Command executor → Command registry: matches commands
src/core/commandExecutor.ts - Command registry → Platform search: registers search
src/core/commandRegister.ts - Command registry → Web navigation: registers navigation
src/core/commandRegister.ts - Command registry → Saved web space: registers space commands
src/core/commandRegister.ts - Command registry → Account commands: registers account commands
src/core/commandRegister.ts - API routes → Account API: routes account requests
server/src/routes.js - API routes → Music API: routes music requests
server/src/routes.js - API routes → Translation API: routes translation requests
server/src/routes.js - API routes → Background API: routes background requests
server/src/routes.js - Account API → Account service: calls account service
server/src/controller/userController.js - Account service → User records: queries users
server/src/service/userService.js - Music API → Music service: calls music service
server/src/controller/musicController.js - Music service → Netease music provider: uses music provider
server/src/service/musicService.js - Translation API → Baidu translation: requests translation
server/src/controller/fanyiController.js - Background API → Wallpaper provider: requests wallpaper
server/src/controller/backgroundController.js