Skip to content

FireFighter - Architecture Overviewยค

๐Ÿ”ฅ Project Descriptionยค

FireFighter is ManoMano's internal Incident Management Tool. It's a Django platform that automates and facilitates incident management by automatically creating Slack channels for communication and much more.

๐Ÿข Repository Structureยค

Two distinct repositories:

  1. impact/ (GitLab - Private ManoMano)

    • ๐Ÿ“‚ Custom project for ManoMano
    • ๐Ÿ”ง Specific configurations, deployments, customizations
    • ๐Ÿ” Contains secrets and environment configurations
    • ๐Ÿ“ Location: /Users/nicolas.lafitte/workspace/impact/
  2. firefighter-oss/ (GitHub - Open Source)

    • ๐ŸŒ Open source version of the codebase
    • ๐Ÿ“ฆ Application core, modules, tests
    • ๐Ÿ”— Git submodule in the impact/ project
    • ๐Ÿ“ Location: /Users/nicolas.lafitte/workspace/impact/firefighter-oss/
    • ๐Ÿ”— GitHub: ManoManoTech/firefighter-incident

Hybrid architecture:

impact/ (GitLab - Private)
โ”œโ”€โ”€ firefighter-oss/ (Git submodule โ†’ GitHub Open Source)
โ”‚   โ”œโ”€โ”€ src/firefighter/        # Main source code
โ”‚   โ”œโ”€โ”€ tests/                  # Unit tests
โ”‚   โ”œโ”€โ”€ docs/                   # Documentation
โ”‚   โ””โ”€โ”€ pyproject.toml         # Package configuration
โ”œโ”€โ”€ deploy/                     # ManoMano deployment scripts
โ”œโ”€โ”€ config/                     # Environment configuration
โ””โ”€โ”€ secrets/                    # Sensitive environment variables

This approach allows ManoMano to:

  • ๐ŸŽ Contribute to open source with the main codebase
  • ๐Ÿ”’ Keep private specific configurations and secrets
  • ๐Ÿ”„ Easily synchronize improvements between both repositories

๐Ÿ—๏ธ Main Architectureยค

Key Technologies:

  • Backend: Django 4.2 + Django REST Framework
  • Database: PostgreSQL
  • Cache/Queue: Redis + Celery
  • Frontend: Django templates + HTMX
  • Integrations: Slack Bot, JIRA, PagerDuty, Confluence
  • Monitoring: Datadog (ddtrace)

Main Modules:

src/firefighter/
โ”œโ”€โ”€ incidents/          # ๐Ÿ“‹ Incident management (models, views, business logic)
โ”œโ”€โ”€ slack/              # ๐Ÿ’ฌ Slack integration (bot, events, notifications)
โ”œโ”€โ”€ raid/               # ๐ŸŽซ RAID module - JIRA ticket management for incidents
โ”œโ”€โ”€ jira_app/           # ๐Ÿ”— JIRA client and synchronization
โ”œโ”€โ”€ pagerduty/          # ๐Ÿ“Ÿ PagerDuty integration for on-call
โ”œโ”€โ”€ confluence/         # ๐Ÿ“š Post-mortem and documentation management
โ”œโ”€โ”€ api/                # ๐ŸŒ REST API for external integrations
โ”œโ”€โ”€ firefighter/        # โš™๏ธ Django configuration and utilities
โ””โ”€โ”€ components/         # ๐Ÿงฉ Reusable UI components

๐Ÿš€ Key Featuresยค

Incident Managementยค

  • Automatic creation of dedicated Slack channels per incident
  • Classification by priority, severity, business impact
  • Time tracking with milestones and costs
  • Role assignment (Incident Commander, Communications Lead, etc.)
  • Automatic updates with complete history

Integrationsยค

  • Slack: Interactive bot, slash commands, modals
  • JIRA: Automatic ticket creation via RAID module
  • PagerDuty: Automatic on-call triggering
  • Confluence: Post-mortem generation

RAID Module (Recent Feature)ยค

  • Intelligent routing of JIRA tickets by team
  • Business impact validation and priorities
  • Automatic attachment management
  • Custom workflows per project

๐Ÿ†• Recently Added Featuresยค

Component โ†’ IncidentCategory Migrationยค

  • Major refactoring: Renaming "Component" to "IncidentCategory"
  • Updates to all models, views, templates
  • Database migration for terminological consistency

Slack Improvementsยค

  • Error handling for private messages (messages_tab_disabled)
  • New commands and bot interactions
  • Optimization of notifications and reminders

Bidirectional Synchronization Systemยค

  • Impact โ†” JIRA sync: Status, priority, assignee, title, description
  • Loop prevention: Cache-based mechanism to prevent infinite sync loops
  • Field mapping: Comprehensive mapping between Impact and JIRA field types
  • Error handling: Graceful handling of sync failures with detailed logging

๐Ÿงช Testing Architectureยค

Test Configurationยค

  • Test database: PostgreSQL (POSTGRES_DB=ff_dev)
  • Environment variables: Complete test isolation with FF_SLACK_SKIP_CHECKS
  • Coverage tracking: pytest-cov with HTML reporting
  • Parallelized execution: pytest-randomly for test order randomization

Test Structureยค

tests/
โ”œโ”€โ”€ test_incidents/     # Incident management tests
โ”œโ”€โ”€ test_slack/         # Slack integration tests
โ”œโ”€โ”€ test_raid/          # RAID module tests
โ”œโ”€โ”€ test_jira_app/      # JIRA client tests
โ”œโ”€โ”€ test_api/           # API endpoint tests
โ””โ”€โ”€ test_firefighter/   # Core utilities tests

๐ŸŽฏ Current Objectivesยค

  • Improve test coverage to reach 60%+
  • Strengthen robustness of external integrations
  • Optimize performance of Celery tasks
  • Document architecture to facilitate contribution