How normuhammadovich/v2run-adminpanel works
This repository is an Xray VPN administration panel: a React dashboard manages accounts, inbounds, server settings, logs, and Xray operations, with an Express reference backend for authentication, users, and Xray control. The main user workflow is sign in, enter the protected admin area, manage users or server configuration, and invoke Xray actions through the API client. The store coordinates frontend state and backend requests; user provisioning also generates VLESS connection links and QR codes. Backend implementation details beyond the sampled routes and services are not fully verified.
Main entry points: App.tsx App routing · store.ts Application state · api.ts HTTP API client · xray.ts Xray routes
Components 19
Admin interface
- App routing
src/App.tsx - Admin layout
src/components/layout/AdminLayout.tsx - Sign-in page
src/pages/Login.tsx - Dashboard
src/pages/Dashboard.tsx - User management
src/pages/Users.tsx - Inbound view
src/pages/Inbounds.tsx - Server settings
src/pages/Settings.tsx - System logs
src/pages/Logs.tsx
Client state and API
- Application state
src/lib/store.ts - HTTP API client
src/lib/api.ts - VLESS formatting
src/lib/format.ts
Reference backend
- HTTP server
server-reference/src/index.ts - Authentication routes
server-reference/src/routes/auth.ts - JWT middleware
server-reference/src/middleware/auth.ts - User routes
server-reference/src/routes/users.ts
Xray operations
- Xray routes
server-reference/src/routes/xray.ts - SSH service
server-reference/src/services/ssh.ts - Config builder
server-reference/src/services/xray-builder.ts
Other components
- Administrator
Connections 30
- Administrator → App routing: uses
- App routing → Sign-in page: routes to
src/App.tsx - App routing → Admin layout: protects with
src/App.tsx - App routing → Dashboard: routes to
src/App.tsx - App routing → User management: routes to
src/App.tsx - App routing → Inbound view: routes to
src/App.tsx - App routing → Server settings: routes to
src/App.tsx - App routing → System logs: routes to
src/App.tsx - Admin layout → Application state: loads users
src/components/layout/AdminLayout.tsx - Admin layout → HTTP API client: logs out via
src/components/layout/AdminLayout.tsx - Sign-in page → Application state: updates state
src/lib/store.ts - Sign-in page → HTTP API client: authenticates via
src/lib/api.ts - Dashboard → Application state: reads state
src/pages/Dashboard.tsx - Dashboard → HTTP API client: requests Xray actions
src/pages/Dashboard.tsx - User management → Application state: manages accounts
src/pages/Users.tsx - User management → VLESS formatting: generates links
src/pages/Users.tsx - Inbound view → Application state: reads state
src/pages/Inbounds.tsx - Server settings → Application state: updates settings
src/pages/Settings.tsx - System logs → Application state: reads logs
src/pages/Logs.tsx - Application state → HTTP API client: requests user data
src/lib/store.ts - HTTP API client → Authentication routes: sends auth requests
- HTTP API client → User routes: sends user requests
- HTTP API client → Xray routes: sends Xray requests
- HTTP server → Authentication routes: registers routes
server-reference/src/index.ts - HTTP server → User routes: registers routes
server-reference/src/index.ts - HTTP server → Xray routes: registers routes
server-reference/src/index.ts - User routes → JWT middleware: guards requests
server-reference/src/routes/users.ts - Xray routes → JWT middleware: guards requests
server-reference/src/routes/xray.ts - Xray routes → SSH service: runs operations
server-reference/src/routes/xray.ts - Xray routes → Config builder: builds config
server-reference/src/routes/xray.ts