How manomanotech/firefighter-incident works
Based on our analysis of the file structure and README, FireFighter is a full-stack, incident management web application built in Python (with a Django-based structure) that integrates with several external services (such as Slack, Jira, PagerDuty, Confluence, and Raid). It is designed to help manage incident lifecycles—including the automatic creation of communication channels on Slack—and to serve as ManoMano’s in-house Incident Management Tool.
Main Components
• Web/API Server: Represent the core backend application (located in src/manage.py and the firefighter module [src/firefighter/firefighter/]) that includes Django or similar web framework settings (ASGI/WGSI, middleware, settings modules, etc.). This is responsible for routing requests, rendering templates (admin, web pages), and providing APIs.
• Domain Logic – Incident Management: Capture the business logic for incidents within the “incidents” module (src/firefighter/incidents/), which includes models, forms, views, templates, and tasks related to incident creation and management.
• API Endpoints: The “api” component (src/firefighter/api/) exposes endpoints (with serializers, models, and views) for administrative functions and integrations.
• Integration Modules:
• Slack Integration: Under src/firefighter/slack, this module manages communication with Slack’s API including events, modals, messages, and commands. It automates actions like creating Slack channels and sending notifications.
• Confluence Integration: Found in src/firefighter/confluence, which helps synchronise incident or postmortem information with Confluence pages.
• Jira Integration: The module in src/firefighter/jira_app handles interactions with Jira to perhaps create or manage issues related to incidents.
• PagerDuty Integration: The module in src/firefighter/pagerduty configures the integration for on-call alerts and incident escalations.
• Raid Integration: Located under src/firefighter/raid, supporting additional incident management features or integrations.
• Background/Asynchronous Processing: Indicate that some modules (e.g., tasks within incidents, confluence, pagerduty, slack, and jira_app) are executed asynchronously, likely using a task queue (as hinted by files like celery_client.py and command scripts).
Relationships and Data Flow
• The core web/API server (the Django-based monolith) acts as the central hub.
• Incident creation and management flows from the web server to the “incidents” module, which then triggers downstream processes.
• When an incident is raised or updated:
• The Slack module is engaged to automatically create a Slack channel or send notifications.
• The Confluence module synchronizes data to corresponding Confluence pages.
• The Jira module may create or update Jira issues.
• The PagerDuty module interacts with PagerDuty’s API to manage on-call alerts.
• The Raid module processes additional incident-specific logic.
• Background tasks are triggered (via Celery or an equivalent task/job scheduling mechanism) for operations that are asynchronous, so mark connections between components where tasks invoke external API calls.
Architectural Patterns and Design Principles
• Modular Monolithic Design: Although it’s a single integrated codebase, the architecture is organized into distinct packages for each integration and domain feature.
• Separation of Concerns: Each folder (incidents, slack, confluence, etc.) represents a clear separation in functionality.
• API-Driven Interactions: All interactions (internal or external) use well-defined APIs and endpoints.
• Containerization and CI/CD: Dockerfile and GitHub workflows indicate an emphasis on containerized deployment and automated testing/CI pipelines.
Technologies/Frameworks
• Python (with Django or a similar framework)
• Celery (or similar for background task processing) as indicated by celery_client.py and task directories
• External integration libraries for Slack, Jira, PagerDuty, and Confluence
• Docker for containerization
• GitHub Actions for CI/CD (referenced in .github/workflows)
• Testing frameworks (presence of tests directory)