How lolmaobruhhh/dpsk-2-api works
DeepSeek2API is a stateless OpenAI-compatible proxy to DeepSeek’s web chat API, with an admin dashboard for managing accounts, keys, models, and browser-assisted login. The main request path authenticates an API key, starts a new upstream chat, prepares proof-of-work and model settings, then translates the upstream stream into OpenAI-style SSE. The graph includes documented capabilities whose full implementation was not sampled; edges are limited to relationships shown in excerpts or the README.
Main entry points: index.js HTTP Gateway · deepseekClient.js DeepSeek Client · page.js Admin Dashboard · database.js Database API
Components 16
Proxy Gateway
- HTTP Gateway
index.js - API Key Auth
index.js - Completion Flow
index.js - SSE Translation
index.js
DeepSeek Integration
- DeepSeek Client
lib/deepseekClient.js - PoW Solver
lib/deepseekClient.js - SHA3 WASM
sha3_wasm_bg.wasm
Administration
- Admin Dashboard
lib/page.js - Admin Routes
index.js - Interactive Login
lib/browser_controller.js - Automated Login
lib/playwrightLogin.js
Persistence
- Database API
lib/database.js - SQLite Store
lib/database.js
Other components
- API Client
- Admin Operator
- DeepSeek Chat
Connections 19
- API Client → HTTP Gateway: sends requests
README.md - HTTP Gateway → API Key Auth: authenticates keys
index.js - API Key Auth → Database API: checks keys
index.js - HTTP Gateway → Completion Flow: routes completions
index.js - Completion Flow → DeepSeek Client: creates chat
index.js - Completion Flow → PoW Solver: prepares PoW
index.js - Completion Flow → DeepSeek Client: streams completion
index.js - DeepSeek Client → DeepSeek Chat: calls chat API
lib/deepseekClient.js - PoW Solver → SHA3 WASM: solves challenge
lib/deepseekClient.js - Completion Flow → SSE Translation: translates events
index.js - SSE Translation → API Client: streams SSE
README.md - Admin Operator → Admin Dashboard: uses dashboard
README.md - HTTP Gateway → Admin Dashboard: serves page
index.js - Admin Dashboard → Admin Routes: calls admin APIs
lib/page.js - HTTP Gateway → Admin Routes: handles admin routes
index.js - Admin Routes → Database API: manages records
index.js - Admin Routes → Interactive Login: launches browser
index.js - Interactive Login → SQLite Store: saves credentials
lib/browser_controller.js - Database API → SQLite Store: reads and writes
lib/database.js