This service is responsible for detecting and locating real-world events (e.g., disasters, crimes, major happenings) from raw social media messages using an AI-powered processing pipeline. It is part of the SAS (Situational Awareness System) platform.
SAS.DetectionService/
├── assets/ # Additional resources (e.g., models, configs)
├── src/
│ ├── app/
│ │ ├── core/ # Core logic (configs, models, services)
│ │ │ ├── configs/ # App configuration (env, constants)
│ │ │ ├── models/ # Pydantic data models
│ │ │ └── services/ # Application services (location inference, messaging, storage, etc.)
│ │ ├── detection/ # Event detection base components
│ │ ├── kafka/ # Kafka producer and consumer wrappers
│ │ ├── pipeline/ # Modular processing pipeline for event detection
│ │ │ ├── stages/ # Individual processing stages (locating, summarizing, publishing)
│ │ │ ├── pipeline.py # Pipeline runner
│ │ │ └── registry.py # Stage registry and configuration
│ │ ├── main.py # Entry point
│ │ └── __init__.py
│ └── tests/ # Unit and integration tests
├── .env # Environment variables (DO NOT COMMIT SECRETS)
├── .gitignore
├── Dockerfile # Container configuration
├── Jenkinsfile # CI/CD build instructions
├── Makefile # Task shortcuts (build, test, etc.)
├── README.md
└── requirements.txt # Python dependencies
- ✅ Kafka Integration for scalable messaging
- 🧩 Modular Pipeline Architecture using dynamically registered stages
- 🌍 Location Inference from text using NLP
- 🧵 Event Summarization & Deduplication
- 📤 Publishing Detected Events to downstream services or databases
- 🔧 Easily extendable with new stages, models, or event types
git clone https://github.com/HasanKhadd0ur/SAS.DetectionService.git
cd SAS.DetectionServicepython -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activatepip install -r requirements.txtpython src/app/main.pyThe service will start consuming messages from the Kafka topic, apply the event detection pipeline, and publish the results.
pytest src/tests/This project uses Jenkins for automated build and testing. See Jenkinsfile for pipeline stages.
MIT License. See LICENSE (to be added).
Hasan Khaddour — @HasanKhadd0ur