How onicyborg/bilcode-project-monitoring-be works
Bilcode Monitoring Backend is a NestJS API for operator authentication, persistent Bilcode project monitoring, chat, and bid workflows. The main path is operator/API client → controllers → monitoring or bid services → Bilcode and PostgreSQL, with optional GOWA notifications and Hermes-assisted bid generation. The graph also preserves attachment review, chat uploads, and audit logging. Relationships are limited to those visible in excerpts or stated in the README; unsampled implementation details are not inferred.
Main entry points: bids.ts Bid management · controllers.ts API controllers · monitor.ts Monitor worker · upstream.ts Bilcode and GOWA client
Components 27
API and access
- API bootstrap
src/main.ts - API controllers
src/controllers.ts - Panel authentication
src/auth.ts - Request validation
src/dto.ts
Monitoring and chat
- Monitor worker
src/monitor.ts - Chat service
src/chat.ts - Chat uploads
src/chat-upload.ts - Attachment download
src/chat-download.ts
Bid workflow
- Bid management
src/bids.ts - Attachment collection
src/attachments.ts - Attachment analysis
src/attachment-analysis.ts - Public reference fetch
src/public-reference.ts - Proposal style
src/proposal-style.ts - Bid response parsing
src/bid-response.ts - Draft failure handling
src/draft-failure.ts - Generation logs
src/bid-generation-log.ts - Notification summary
src/notification-summary.ts - Hermes bid integration
src/hermes-bid.ts
Persistence and integrations
- Bilcode and GOWA client
src/upstream.ts - Secret management
src/secrets.ts - Prisma database
src/database.ts - Audit logging
src/audit.ts
Messaging operations
- VPS WhatsApp transport
deploy/hermes/ops/whatsapp.py
Other components
- Operator / client
- Bilcode API
- GOWA gateway
- Hermes service
Connections 38
- Operator / client → API controllers: sends requests
README.md - API bootstrap → API controllers: registers routes
- API controllers → Panel authentication: authenticates
src/controllers.ts - API controllers → Monitor worker: dispatches monitoring
src/controllers.ts - API controllers → Bid management: dispatches bids
src/controllers.ts - API controllers → Chat uploads: handles uploads
src/controllers.ts - API controllers → Attachment download: downloads attachment
src/controllers.ts - API controllers → Request validation: validates input
src/controllers.ts - API bootstrap → Audit logging: records requests
src/main.ts - Panel authentication → Prisma database: stores sessions
src/auth.ts - Monitor worker → Prisma database: reads and writes
src/monitor.ts - Monitor worker → Bilcode and GOWA client: calls upstream
src/monitor.ts - Monitor worker → Bid management: coordinates bids
src/monitor.ts - Monitor worker → Chat service: uses chat helpers
src/monitor.ts - Monitor worker → Chat uploads: checks uploads
src/monitor.ts - Monitor worker → Audit logging: records activity
README.md - Chat service → Prisma database: reads and writes
src/chat.ts - Chat service → Bilcode and GOWA client: requests chat data
src/chat.ts - Chat uploads → Request validation: uses upload metadata
src/chat-upload.ts - Bid management → Prisma database: persists bid state
src/bids.ts - Bid management → Attachment collection: collects references
src/bids.ts - Bid management → Attachment analysis: analyzes attachments
src/bids.ts - Bid management → Proposal style: uses style guidance
src/bids.ts - Bid management → Bid response parsing: parses responses
src/bids.ts - Bid management → Draft failure handling: records draft failures
src/bids.ts - Bid management → Generation logs: records generation
src/bids.ts - Bid management → Notification summary: builds summaries
src/bids.ts - Bid management → Hermes bid integration: requests generation
src/bids.ts - Attachment collection → Public reference fetch: fetches references
src/attachments.ts - Attachment collection → Prisma database: uses attachment cache
src/attachments.ts - Attachment collection → Bilcode and GOWA client: validates references
src/attachments.ts - Bilcode and GOWA client → Secret management: decrypts credentials
src/upstream.ts - Bilcode and GOWA client → Bilcode API: sends API requests
src/upstream.ts - Bilcode and GOWA client → GOWA gateway: sends notifications
README.md - Audit logging → Prisma database: writes event logs
src/audit.ts - VPS WhatsApp transport → GOWA gateway: sends WhatsApp
deploy/hermes/ops/whatsapp.py - Hermes bid integration → Hermes service: requests bid generation
- Generation logs → Draft failure handling: uses failure details
src/bid-generation-log.ts