-
Notifications
You must be signed in to change notification settings - Fork 0
Developer Guide
This guide is intended for developers who want to understand, contribute to, or extend MailIntel AI.
The project follows modern Python development practices with a strong emphasis on maintainability, modularity, automated testing, and reproducible builds.
- Python 3.13+
- Git
- Docker Desktop (optional)
- VS Code (recommended)
git clone https://github.com/Litap-AI/mailintel-ai.git
cd mailintel-aipython -m venv .venvActivate:
source .venv/bin/activate.venv\Scripts\activatepip install -e ".[dev]"python -m streamlit run src/mailintel/ui/app.pymailintel-ai/
├── src/
│ └── mailintel/
│ ├── ai/
│ ├── intelligence/
│ ├── parsers/
│ ├── reporting/
│ ├── scoring/
│ ├── ui/
│ └── workflows/
│
├── tests/
│
├── docs/
│
├── samples/
│
├── Dockerfile
├── docker-compose.yml
├── pyproject.toml
└── README.md
Typical workflow:
Feature Branch
↓
Implementation
↓
Unit Tests
↓
Ruff
↓
MyPy
↓
Pre-commit
↓
GitHub Actions
↓
Merge
Every contribution should pass all quality checks before merging.
MailIntel AI follows these principles.
All public functions should include explicit type annotations.
Example:
def analyze(email: EmailMessage) -> Investigation:
...Each module should have one primary responsibility.
Avoid combining:
- Parsing
- Intelligence
- Reporting
- UI
within the same module.
Prefer descriptive identifiers.
Good:
investigation_report
risk_score
authentication_result
Avoid:
data
temp
obj
value
Every public class and function should include a concise docstring.
MailIntel AI uses Pytest.
Run all tests:
pytestTests are organized by component.
tests/
ai/
intelligence/
parsers/
reporting/
scoring/
workflows/
New features should include corresponding tests.
Run Ruff:
ruff check .
ruff format . --checkRun MyPy:
mypy srcRun all quality checks:
pre-commit run --all-filesBuild:
docker compose buildRun:
docker compose upStop:
docker compose downDocker ensures a consistent development environment across machines.
GitHub Actions automatically performs:
- Ruff
- Ruff Format
- MyPy
- Pytest
Every pull request is validated before merge.
To add a new intelligence component:
- Create a new module inside
src/mailintel/intelligence/. - Implement the analysis logic.
- Return structured evidence.
- Integrate with the investigation workflow.
- Add unit tests.
- Update documentation if applicable.
This modular approach keeps new capabilities isolated and easy to maintain.
Before creating a release:
- Run all tests.
- Verify Docker builds successfully.
- Review documentation.
- Update the changelog.
- Create a Git tag.
- Publish a GitHub Release.
Each release should represent a stable, reproducible version of the project.
Before opening a pull request:
- Follow the coding standards.
- Ensure tests pass.
- Add tests for new functionality.
- Update documentation if behavior changes.
Contributions that improve quality, maintainability, or documentation are always welcome.
MailIntel AI is built with the following priorities:
- Simplicity over unnecessary complexity.
- Explainability over opaque automation.
- Modular design over tightly coupled systems.
- Reproducibility over convenience.
- Maintainability over rapid but fragile development.
These principles guide architectural and implementation decisions throughout the project.