How dontmint/chatemployeebot works
Main Components
a) Core Service Layer:
• Employee management system (derived from employee.go and manager.go)
• Broadcast system (from broadcast.go)
• Menu handling system (from menu.go)
b) Data Layer:
• PostgreSQL Database (indicated by postgresql.go and database/postgresql.sql)
• Data models for employees, locations, and check-in/checkout records
c) API Layer:
• REST/API endpoints (from api.go)
• Interaction points for external systems
d) Configuration:
• Config management (from config.yaml)
• Environment settings
Component Relationships
• Bot Service → PostgreSQL Database (data persistence)
• API Layer → Bot Service (service interactions)
• Bot Service → Broadcast System (notifications)
• Configuration → All Components (settings distribution)
Architectural Pattern Representation
Use these symbols and layouts:
• Hexagons for API endpoints
Detailed Component Breakdown
Bot Service (Core):
┌─────────────────────────┐
• Bot Service Core │
• ┤
• Employee Management │
• Location Tracking │
• Check-in/out Logic │
• Menu Handling │
• ┘
Database Layer:
┌─────────────────────────┐
• PostgreSQL Layer │
• ┤
• Employee Records │
• Location Data │
• Check-in/out Logs │
• ┘
Implementation Details
a) Helper Functions Layer:
• Utility functions (from helper.go)
• Functionality (from map.go)
• Report generation (from report.go)
b) Infrastructure Elements:
• Docker container (from Dockerfile)
• Azure Pipeline integration (from azure-pipelines.yml)
Data Flow Representation
Following flows: