
MonitorManager
Administrative dashboard for Proxcop and Pokecop staff to configure the monitoring infrastructure. Follows a clear hierarchy: Websites → Products → Webhooks. Staff define which sites to monitor, configure each product (URL, keywords, variants), and assign Discord webhook destinations per product. Access is gated to Discord guild members via OAuth — no separate user system needed. Every CRUD operation fires an audit webhook to an admin Discord channel. Real-time updates between the dashboard and monitor processes run over Socket.io. Built with Vue 3, Ant Design Vue 4, Node.js, Express 5, and MongoDB.
Overview
MonitorManager is the administrative control plane for the Proxcop and Pokecop monitoring ecosystems. Staff, moderators, and admins use it to define which websites to monitor, configure the products tracked on each site, manage Discord webhook destinations, and control who has access to the system.
The system follows a clean hierarchy: Websites → Products → Webhooks. Each website is an independent monitoring target (e.g., a Shopify store or brand site). Each website contains products with their own configuration — keywords, URLs, variants. Webhook URLs determine where Discord notifications are sent when a monitor fires.
Authentication is Discord OAuth-based — only users who are members of the correct Discord guild can log in, making access control automatic and tied to existing community membership. Real-time updates between the dashboard and monitors run over Socket.io.
Screenshots
Key Features
Discord OAuth Auth
Login is gated to Discord guild members. No invite — no access. JWT cookies secure subsequent requests. No separate user database required.
Website Management
Full CRUD for monitoring targets. Each website is a named entity with its own product list, configuration, and webhook endpoints.
Product Configuration
Per-product settings including target URLs, variant keywords, and size filters. Each product can have multiple webhook destinations for different channels.
Webhook Management
Array input widget for managing multiple Discord webhook URLs per product. The MultipleInputWidget handles validation, addition, and deletion in one clean UI.
Real-Time Updates
Socket.io keeps the dashboard in sync with monitor processes. Product status changes, new detections, and configuration changes reflect instantly without page refresh.
Discord Audit Log
Every CRUD operation (product created, edited, deleted) fires a Discord webhook notification to an admin channel. Full audit trail of who changed what, when.
Tech Stack
API Endpoints
/user/discordLoginInitiate Discord OAuth flow — returns redirect URL/discord/callbackOAuth callback, exchange code for token, verify guild membership, issue JWT/checkDiscordCookieValidate JWT cookie before rendering protected routes/product/listFetch all products for a given website (filtered by headers)/product/addCreate product + fire Discord audit webhook/product/editUpdate product + fire Discord audit webhook/product/deleteRemove product + fire Discord audit webhook/websites/listReturn all configured monitoring targets/websites/addRegister a new website to monitor/websites/editUpdate website configuration/websites/delete/:idRemove website and all its productsArchitecture Highlights
Guild-Gated Access Control
Instead of a custom user management system, MonitorManager delegates access control entirely to Discord. When a user authenticates via Discord OAuth, the backend calls the Discord API to verify they are a member of the required guild. Non-members are rejected at the authentication layer — no admin UI needed to manage who has access.
Header-Based Multi-Tenancy
Products are scoped to websites using custom request headers (privateKey, websiteName, cookGroup). The same API instance serves multiple independent monitoring groups without separate deployments or databases.
Component-Per-Modal Pattern
Every CRUD action has its own dedicated modal component (CreateProduct, EditProduct, DeleteProduct, etc.). This avoids a single bloated form that handles all modes — each component has a single, clear purpose and can be modified without touching the others.