A comprehensive IP address tracking and management system built with Streamlit, featuring a dark mode interface with orange theming, PostgreSQL database integration, and Docker/Podman deployment support.
Repository: https://github.com/CaptainASIC/IPDB
- π IP Address Management: Track and manage IP addresses across multiple network sites
- π’ Site Management: Organize IP addresses by physical locations or network sites
- π Subnet Management: Define and manage network subnets with VLAN support
- π Advanced Search: Search by IP address, hostname, role, or owner with filtering options
- π₯ Import/Export: Bulk operations with CSV files including validation and templates
- π Analytics Dashboard: Visual insights into network utilization and IP allocation
- π¨ Dark Mode UI: Modern dark theme with orange accents and smooth animations
- π³ Container Ready: Docker and Podman deployment configurations included
- π RFC-1918 Compliance: Enforces private IP address ranges with CIDR notation
- Docker or Podman
- Git (for cloning the repository)
# Clone the repository
git clone https://github.com/CaptainASIC/IPDB.git
cd IPDB
# Deploy with Docker
./scripts/docker-deploy.sh# Clone the repository
git clone https://github.com/CaptainASIC/IPDB.git
cd IPDB
# Deploy with Podman
./scripts/podman-deploy.sh# Clone the repository
git clone https://github.com/CaptainASIC/IPDB.git
cd IPDB
# Install dependencies
pip install -r requirements.txt
# Set up environment variables
cp .env.example .env
# Run the application
cd app
streamlit run main.pyip-tracker/
βββ app/ # Main application code
β βββ components/ # UI components and styling
β β βββ enhanced_styles.py # Advanced CSS with animations
β β βββ __init__.py
β βββ models/ # Database models
β β βββ database.py # SQLAlchemy models and connection
β β βββ __init__.py
β βββ pages/ # Streamlit pages
β β βββ dashboard.py # Main dashboard with metrics
β β βββ search.py # Search and filtering functionality
β β βββ settings.py # Site and IP management
β β βββ import_export.py # CSV import/export features
β β βββ __init__.py
β βββ utils/ # Utility functions
β β βββ import_export.py # Import/export logic and validation
β β βββ __init__.py
β βββ main.py # Main Streamlit application
βββ database/ # Database configuration
β βββ schema.sql # Database schema definition
β βββ seeds/
β βββ sample_data.sql # Sample data for testing
βββ scripts/ # Deployment scripts
β βββ docker-deploy.sh # Docker deployment script
β βββ podman-deploy.sh # Podman deployment script
βββ docker-compose.yml # Docker Compose configuration
βββ Dockerfile # Docker image definition
βββ Dockerfile.podman # Podman-specific Dockerfile
βββ requirements.txt # Python dependencies
βββ .env.example # Environment variables template
βββ test_app.py # Application test suite
- Network Overview: Total IPs, active devices, sites, and subnets
- Visual Analytics: Charts showing IP distribution and subnet utilization
- Recent Activity: Latest IP address additions and modifications
- Quick Stats: Real-time metrics with color-coded status indicators
- Advanced Search: Multi-criteria search with IP, hostname, role, and owner filters
- Site Filtering: Filter results by specific sites or view all
- Export Results: Download search results as CSV files
- Detailed Views: Expandable details for each IP address entry
- Site Management: Add, edit, and delete network sites
- Subnet Configuration: Define network subnets with VLAN support
- IP Assignment: Manual IP address assignment with validation
- Bulk Operations: Import/export functionality for large datasets
- CSV Import: Bulk upload with data validation and error reporting
- Template Downloads: Pre-formatted CSV templates for easy data entry
- Export Options: Download data filtered by site or export all
- Data Validation: RFC-1918 compliance checking and format validation
# Database Configuration
DATABASE_URL=postgresql://iptracker:iptracker123@postgres:5432/iptracker
POSTGRES_DB=iptracker
POSTGRES_USER=iptracker
POSTGRES_PASSWORD=iptracker123
# Streamlit Configuration
STREAMLIT_SERVER_PORT=8501
STREAMLIT_SERVER_ADDRESS=0.0.0.0
STREAMLIT_THEME_BASE=dark
STREAMLIT_THEME_PRIMARY_COLOR=#FF6B35
# Application Configuration
APP_NAME=IP Address Tracker
APP_VERSION=1.0.0
DEBUG=falseThe application uses PostgreSQL with the following main tables:
- sites: Network sites/locations
- ip_addresses: IP address records with CIDR notation
- subnets: Network subnet definitions
All IP addresses are stored in CIDR notation following RFC-1918 standards.
site_name,ip_address,hostname,gateway,role,system_owner,description,status
Headquarters,192.168.1.10,server-01,192.168.1.1,Server,IT Team,Main server,active
Branch Office,192.168.10.20,workstation-05,192.168.10.1,Workstation,John Doe,User workstation,activename,description,location
Headquarters,Main office location,New York NY
Branch Office,Secondary office,Los Angeles CAsite_name,subnet_cidr,name,description,vlan_id
Headquarters,192.168.1.0/24,HQ-LAN,Headquarters LAN,10
Branch Office,192.168.10.0/24,BRANCH-LAN,Branch office LAN,20Run the included test suite to verify application functionality:
python3 test_app.pyThe test suite validates:
- Module imports and dependencies
- IP address validation logic
- CSS generation and styling
- Database model definitions
- postgres: PostgreSQL 15 database with automatic schema initialization
- app: Streamlit application with health checks and auto-restart
- postgres_data: Persistent database storage
- app: Application code (development mode)
- ip-tracker-network: Isolated bridge network for service communication
- RFC-1918 Compliance: Only private IP address ranges allowed
- Input Validation: Comprehensive validation for all user inputs
- SQL Injection Protection: SQLAlchemy ORM with parameterized queries
- Container Security: Non-root user execution in containers
- Dark Mode: Professional dark theme with orange accents
- Responsive Design: Works on desktop and mobile devices
- Smooth Animations: Hover effects and micro-interactions
- Accessibility: Proper focus indicators and keyboard navigation
- Modern Typography: Inter font family for improved readability
- Primary: #FF6B35 (Orange)
- Secondary: #FF8C42 (Light Orange)
- Accent: #FFA500 (Gold)
- Background: #0F0F0F (Dark)
- Text: #FFFFFF (White)
- Lazy Loading: Efficient data loading with pagination
- Caching: Streamlit caching for improved performance
- Database Indexing: Optimized queries with proper indexes
- Responsive UI: Fast rendering with minimal resource usage
-
Database Connection Failed
- Verify PostgreSQL is running
- Check database credentials in .env file
- Ensure network connectivity between containers
-
Import Validation Errors
- Download and use provided CSV templates
- Verify IP addresses are in RFC-1918 ranges
- Check for duplicate entries
-
Permission Issues (Podman)
- Use the Podman-specific Dockerfile
- Ensure proper volume mounting permissions
- Run without --user flag in rootless mode
# Docker logs
docker-compose logs -f
# Podman logs
podman logs -f ip-tracker-app
podman logs -f ip-tracker-dbThe application uses SQLAlchemy models for database operations:
- Site: Network site management
- IPAddress: IP address tracking with CIDR support
- Subnet: Network subnet definitions
- ImportExportManager: CSV import/export functionality
- Enhanced Styles: Advanced CSS generation
- Fork the repository
- Create a feature branch
- Make your changes
- Run the test suite
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For technical support or feature requests:
- Check the troubleshooting section
- Review the application logs
- Create an issue in the repository
- Contact your system administrator
- Initial release
- Complete IP address tracking functionality
- Dark mode UI with orange theme
- Docker/Podman deployment support
- CSV import/export capabilities
- Advanced search and filtering
- Analytics dashboard
Built with β€οΈ using Streamlit, PostgreSQL, and modern web technologies