How slywalker2006/dsh-passwords works
dsh-passwords is a server-side authentication and authorization gateway that adds secure multi-user access to DeepSeek Harness (DSH). The main workflow is browser request → setup/login → authenticated gateway session → permission-filtered HTTP/WebSocket proxy to DSH. Separate domain capabilities cover workspace/session grants and quotas, chat and media, administration, and encrypted audit/storage. The browser plugin exposes account, permissions, update, and chat interfaces; ACME supplies automatic HTTPS. Some subsystem links reflect README-documented capabilities because their implementation was not sampled.
Main entry points: gateway.ts Auth gateway · db.ts Platform database · proxy.ts HTTP/WS proxy · index.tsx DSH plugin UI
Components 21
Gateway and identity
- Auth gateway
src/gateway.ts - Authentication
src/auth.ts - Platform config
src/config.ts - HTTP/WS proxy
src/proxy.ts
Authorization and storage
- Access policy
src/permissions.ts - Platform database
src/db.ts - Field encryption
src/encrypt.ts
User capabilities
- Account management
src/admin.ts - Chat messages
src/messages.ts - Chat media
src/media.ts
DSH client
- DSH plugin UI
src/client/index.tsx - Settings card
src/client/card.tsx - Chat interface
src/client/chat.tsx - Workspace deletion UI
src/client/picker-delete.ts
TLS and updates
- ACME certificates
src/acme.ts - Update engine
src/update.ts - DSH patching
src/patch.ts
Other components
- Browser user
- DSH service
- Let's Encrypt
- GitHub and npm
Connections 29
- Browser user → Auth gateway: requests
- Auth gateway → Platform config: loads settings
- Auth gateway → Authentication: authenticates
- Authentication → Platform database: reads/writes
- Auth gateway → Access policy: checks access
- Auth gateway → Platform database: reads/writes
- Platform database → Field encryption: encrypts fields
- Auth gateway → HTTP/WS proxy: dispatches
- HTTP/WS proxy → Access policy: filters access
- HTTP/WS proxy → DSH service: proxies HTTP/WS
- HTTP/WS proxy → Platform database: records grants
- Auth gateway → Account management: serves management
- Account management → Platform database: updates accounts
- Auth gateway → Chat messages: serves chat APIs
- Chat messages → Platform database: stores messages
- Auth gateway → Chat media: serves media APIs
- Chat media → Platform database: tracks media
- DSH plugin UI → Settings card: registers card
- DSH plugin UI → Chat interface: registers overlay
- DSH plugin UI → Workspace deletion UI: starts enhancement
- Settings card → Auth gateway: calls APIs
- Chat interface → Auth gateway: calls APIs
- Workspace deletion UI → Auth gateway: deletes directory
- Auth gateway → ACME certificates: manages TLS
- ACME certificates → Let's Encrypt: requests certificates
- Auth gateway → Update engine: exposes update API
- Settings card → Auth gateway: requests patch reload
- Auth gateway → DSH patching: reloads patch
- Update engine → GitHub and npm: checks/downloads