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:
-
impact/
(GitLab - Private ManoMano)- ๐ Custom project for ManoMano
- ๐ง Specific configurations, deployments, customizations
- ๐ Contains secrets and environment configurations
- ๐ Location:
/Users/nicolas.lafitte/workspace/impact/
-
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