OSINT Hub follows Django’s standard project structure with modular apps for each OSINT tool.
Overview
OSINT Hub is built with Django 5.2 and follows a modular architecture where each OSINT tool is implemented as a separate Django app. This design makes it easy to add, remove, or modify tools independently.Root Directory Structure
Core Configuration (osint_hub/)
The main Django project configuration directory.
settings.py
Main Django settings including:
- Database configuration
- Installed apps
- Middleware stack
- Security settings (CSP, HSTS)
- Static files configuration
- Celery configuration
urls.py
Root URL configuration that routes to:
- Home page
- Each tool’s URLs
- SEO files (robots.txt, sitemap.xml)
- Security files (security.txt)
celery.py
Celery configuration for asynchronous task processing (used by PhoneSearch)
wsgi.py / asgi.py
WSGI and ASGI application entry points for production deployment
Django Apps
Each OSINT tool is implemented as a separate Django app with a consistent structure.App Structure Pattern
Every tool app follows this structure:Individual Apps
email_holehe/
email_holehe/
Email Search ToolSearches for email addresses across multiple platforms using Holehe.Key Files:
views.py: Handles email search logic with 60s timeoutforms.py: Email validation form- Templates for search and results display
/email/ExifTool/
ExifTool/
EXIF Metadata ExtractionExtracts EXIF, XMP, and IPTC metadata from images, videos, and PDFs.Key Features:
- File upload handling (max 50 MB)
- GPS coordinate extraction
- OpenStreetMap integration
- Supports: JPEG, PNG, GIF, TIFF, MP4, PDF
views.py: File upload and metadata extraction logicforms.py: File upload form with validation- Uses PyExifTool library
/exiftool/HashTool/
HashTool/
Hash Generation and VerificationGenerates and verifies cryptographic hashes for text and files.Supported Algorithms:
- MD5
- SHA1
- SHA224
- SHA256
- SHA384
- SHA512
views.py: Hash generation and verification logicforms.py: Input forms for text/file hashing
/hash/IPLookup/
IPLookup/
IP Address GeolocationLooks up geolocation and network information for IP addresses.Information Retrieved:
- City and country
- Timezone
- Coordinates
- ASN (Autonomous System Number)
- Network block
views.py: IP lookup logic with 15s timeoutforms.py: IP address validation
/ip/PhoneSearch/
PhoneSearch/
Phone Number SearchSearches for phone numbers across platforms asynchronously.Key Features:
- Async processing with Celery
- International format support
- Uses phonenumbers library
views.py: Search form and results displaytasks.py: Celery tasks for async processingmodels.py: Database models for storing search results
/phone/UsernameSearch/
UsernameSearch/
Username Search ToolSearches for usernames across 300+ websites using Sherlock.Key Features:
- 300+ platform search
- CSV export functionality
- 300s timeout for comprehensive search
views.py: Username search and CSV export logicforms.py: Username input form
/user/Templates Directory
Global templates used across the application.Main Templates
base.html
Base template with:
- Bootstrap 5 integration
- Common header and footer
- CSP nonce support
- Dark/light mode toggle
home.html
Homepage template displaying:
- Hero section
- Tool cards
- Features overview
- Disclaimer
404.html / 500.html
Custom error pages for:
- 404 Not Found
- 500 Server Error
Includes Directory
Reusable template components:Static Files Directory
Organization of CSS, JavaScript, and images.In production, static files are collected to
staticfiles/ using python manage.py collectstatic and served by WhiteNoise.Utils Directory
Shared utility functions and validators.Test Directory
Integration tests for the application.Configuration Files
requirements.txt
Python dependencies including:
- Django 5.2
- Celery 5.6
- Holehe 1.61
- Sherlock 0.16.0
- PyExifTool 0.5.6
- phonenumbers 9.0
- Gunicorn, WhiteNoise
- django-csp, redis
.env.example
Environment variables template:
- SECRET_KEY
- DEBUG
- ALLOWED_HOSTS
- CSRF_TRUSTED_ORIGINS
- DATABASE_URL
manage.py
Django management script for:
- Running dev server
- Database migrations
- Collecting static files
- Creating superuser
.cz.toml
Commitizen configuration for standardized commit messages
Database
- Development
- Production
SQLite 3
- File:
db.sqlite3(in root directory) - Location:
BASE_DIR / "db.sqlite3" - Ideal for development and testing
- No additional setup required
Middleware Stack
The application uses the following middleware (in order):- SecurityMiddleware - Django security features
- WhiteNoiseMiddleware - Static file serving
- SessionMiddleware - Session management
- CommonMiddleware - Common utilities
- CsrfViewMiddleware - CSRF protection
- CSPMiddleware - Content Security Policy
- AuthenticationMiddleware - User authentication
- MessageMiddleware - Message framework
- XFrameOptionsMiddleware - Clickjacking protection
Key Dependencies
Backend Libraries
- Django 5.2 - Web framework
- Celery 5.6 - Async task queue
- Redis - Message broker
- Gunicorn 23.0 - WSGI server
- WhiteNoise 6.8 - Static file serving
- django-csp 3.8 - Content Security Policy
OSINT Tools
- Holehe 1.61 - Email search
- Sherlock 0.16.0 - Username search
- PyExifTool 0.5.6 - Metadata extraction
- phonenumbers 9.0 - Phone number parsing
Frontend
- Bootstrap 5 - CSS framework
- Bootstrap Icons - Icon library
- Vanilla JavaScript - Client-side interactivity
Security Architecture
Input Validation
- Django form validation
- Custom validators in utils/
- File type and size checks
- Path traversal prevention
Security Headers
- CSRF protection
- Content Security Policy
- HSTS (production)
- XSS protection
- X-Frame-Options
Process Timeouts
- Holehe: 60s
- Sherlock: 300s
- IP Lookup: 15s
- Prevents resource exhaustion
Environment Config
- .env file for secrets
- No hardcoded credentials
- Separate dev/prod settings
- Secure defaults
Deployment Structure
Development
- DEBUG = True
- SQLite database
- Django dev server
- Hot reload enabled
Production
- DEBUG = False
- PostgreSQL database
- Gunicorn WSGI server
- Static files via WhiteNoise
- Security headers enabled
- HTTPS recommended
Best Practices
Understanding this structure will help you navigate the codebase and contribute effectively to OSINT Hub.
