Maine Department of Corrections - MCC Radio/Equipment Management System
Copyright (c) 2025 Arthur Belanger (github.com/MusicalViking) All rights reserved.
🚀 Ready for Production Deployment | 🔒 Security Hardened | 📊 Enterprise Ready
RadioTrack is a mission-critical radio equipment inventory management system designed specifically for the Maine Department of Corrections. This enterprise-grade application ensures operational readiness, maintains strict accountability, and provides real-time visibility into radio equipment status across all DOC facilities.
- ✅ Compliance Ready - Meets DOC tool control requirements
- ✅ Zero Downtime Design - reliable 24/7 operation
- ✅ User-Friendly Interface - Intuitive for all staff levels
- ✅ Comprehensive Reporting - Professional PDF/Excel exports
- ✅ Automated Backups - Disaster recovery protection
# 1. Download and navigate to project
cd /path/to/RadioTrack
# 2. Start with Docker Compose
sudo docker-compose up -d --build
# 3. Access application
# Open: http://your-server:8501# 1. Install Python dependencies
pip install -r requirements.txt
# 2. Initialize database
python -c "from db_manager import initialize_db; initialize_db()"
# 3. Start application
streamlit run app.py- Username:
admin - Password:
Admin@123!
⚠️ IMPORTANT: Change the default password immediately after first login!
- 👨💼 Corrections Supervisors - Full system access, user management
- 👮♂️ officers/Staff - View inventory, update conditions, post messages
- 📦 Equipment Tracking - 12 categories, 18 locations
- 📊 Real-time Dashboard - Visual analytics and alerts
- 🔐 Enterprise Security - bcrypt hashing, session management
- 📧 Internal Communications - Post system for team coordination
- 📄 Professional Reports - PDF/Excel export capabilities
- 💾 Automated Backups - Daily database snapshots
- Portable Radios, Mobile Radios, Base Stations
- Antennas, Batteries, Microphones, Programming Equipment
- Test Equipment, Cables & Accessories
- Login as Corrections Supervisor
- Navigate to Admin Dashboard → Employee Management
- Click Add New Employee to create accounts
- Set appropriate roles (Employee/Supervisor)
- Add Equipment: Use Add New Radio form
- Update Status: Edit existing items via inventory table
- Monitor Conditions: Dashboard shows alerts for poor condition items
- Generate Reports: Export PDF/Excel reports as needed
- Automated Backups: Daily backups created automatically
- Manual Backups: Use Admin Dashboard → Create Backup
- Restore: Download and restore from backup files
- bcrypt Password Hashing - Military-grade encryption
- Account Lockout - 5 failed attempts triggers 15-minute lockout
- Session Management - 2-hour automatic timeout
- Password Policies - 8+ characters, mixed case, numbers, symbols
- Role-Based Permissions - Granular access by user type
- Audit Logging - All changes tracked with timestamps
- Data Validation - SQL injection prevention
- Encrypted Storage - Sensitive data properly secured
- Backup Encryption - Database backups are protected
- Access Logging - Failed login attempts monitored
- Condition Alerts - Automatic warnings for equipment needing attention
- System Health - Database performance and backup status
- User Activity - Login tracking and session monitoring
- 🚨 Critical: Equipment in s**: Highlight equipment requiring immediate action
- Executive Dashboard: Visual summary of inventory health
- Advanced Analytics: Equipment distribution and utilization analysis
- Professional Reporting: PDF reports with charts and graphs
- System Health Monitoring: Database and application performance metrics
- Automated Backups: Scheduled database backups with retention policies
- Schema Management: Seamless database updates and migrations
- Backup Recovery: Point-in-time restore capabilities
- System Monitoring: Real-time performance and resource tracking
- Operating System: Windows 10/11, macOS 10.15+, or Linux (Ubuntu 18.04+)
- Python Version: 3.8 or higher (3.11 recommended)
- RAM: 1GB minimum, 2GB recommended
- Storage: 500MB available space
- Network: Internet connection for initial setup
# Verify Python installation
python --version
# Should show: Python 3.8.0 or higher
# Verify pip installation
pip --version
# Should show: pip 22.0 or higher# Clone the repository
git clone <repository-url>
cd radiotrack
# Create virtual environment (recommended)
python -m venv radiotrack-env
source radiotrack-env/bin/activate # On Windows: radiotrack-env\Scripts\activate
# Install dependencies
pip install -r requirements.txt# Initialize the database
python -c "from db_manager import initialize_db; initialize_db()"# Start the application
streamlit run app.py
# Alternative: Run in background
nohup streamlit run app.py > radiotrack.log 2>&1 &- Docker Desktop 4.0+
- Docker Compose 2.0+
# Clone repository
git clone <repository-url>
cd radiotrack
# Configure environment (optional)
cp .env.example .env
# Edit .env with your settings
# Deploy with Docker Compose
docker-compose up -d --build
# View logs
docker-compose logs -f radiotrack
# Stop the application
docker-compose downSee DEPLOYMENT.md for detailed production deployment instructions including:
- Load balancing configuration
- SSL/TLS setup
- Database optimization
- Monitoring and logging
- Post Box: Internal messaging system for team communication
- Quick Stats: Real-time inventory overview
- Distribution Charts: Visual equipment analysis
- Recent Activity: Latest equipment updates
- System Overview: Comprehensive system health metrics
- Employee Management: Complete user administration
- Database Maintenance: Backup and system management tools
- Advanced Reporting: Professional compliance reports
- Advanced Search: Filter by category, location, condition
- Bulk Operations: Multi-item updates and exports
- Export Capabilities: PDF, Excel, and CSV formats
- Audit Trail: Complete change history
- Responsive Sidebar: Intuitive navigation for all screen sizes
- Role-Based Menus: Context-sensitive menu options
- Quick Actions: Fast access to common tasks
- Breadcrumb Navigation: Clear location awareness
- bcrypt Hashing: Industry-standard password encryption
- Session Management: Secure session handling with timeout
- Rate Limiting: Protection against brute force attacks
- Password Policies: Enforced complexity requirements
- SQL Injection Prevention: Parameterized queries throughout
- Input Validation: Comprehensive data validation
- Access Control: Role-based permission system
- Audit Logging: Complete activity tracking
- Automatic Backups: Regular database snapshots
- Data Integrity: Foreign key constraints and validation
- Error Handling: Secure error reporting without data leakage
- Environment Configuration: Secure credential management
employees (👥 Users & Authentication)
├── id, username, password_hash, role
├── first_name, last_name, position
├── email, phone, created_date
└── last_login, password_change_required
items (📦 Radio Equipment Inventory)
├── id, name, category, location
├── condition, notes, created_date
├── last_modified, created_by
└── assigned_to, serial_number
posts (📌 Internal Communications)
├── id, author_username, content
├── created_date, last_modified
└── priority, category
locations & categories (📍 Reference Data)
├── id, name, description
├── active, created_date
└── last_modified
- Users manage Items with full audit trail
- Locations and Categories provide structured organization
- Posts enable team communication and announcements
- All changes are tracked with timestamps and user attribution
radiotrack/
├── app.py # Main Streamlit application
├── auth.py # Authentication & authorization
├── db_manager.py # Database operations & management
├── models.py # Data models & business logic
├── ui_components.py # Reusable UI components
├── ui_dialogs.py # Modal dialogs & notifications
├── config.py # Configuration management
├── logging_config.py # Logging configuration
├── pdf_generator.py # PDF report generation
├── simple_backup.py # Database backup system
├── static/ # Images, CSS, and assets
├── backups/ # Database backup files
├── logs/ # Application log files
├── data/ # Database and data files
├── .env # Environment configuration
├── requirements.txt # Python dependencies
├── Dockerfile # Docker container definition
└── docker-compose.yml # Docker Compose configuration
- Categories & Locations: Modify
config.pyfor your facility - Security Policies: Adjust password and session settings
- UI Branding: Customize colors and styling in
ui_components.py - Reporting: Extend PDF reports in
pdf_generator.py - Authentication: Enhance security in
auth.py
# Check Python version
python --version
# Verify dependencies
pip list | grep streamlit
# Check for port conflicts
netstat -an | grep 8501
# Try alternative port
streamlit run app.py --server.port 8502# Check database file exists
ls -la data/inventory.db
# Verify permissions
chmod 644 data/inventory.db
# Reinitialize database
python -c "from db_manager import initialize_db; initialize_db()"# Reset admin password
python -c "
from auth import hash_password
from db_manager import DatabaseManager
import sqlite3
# Connect to database
conn = sqlite3.connect('data/inventory.db')
cursor = conn.cursor()
# Update admin password
hashed = hash_password('Admin@123!')
cursor.execute('UPDATE employees SET password_hash = ? WHERE username = ?', (hashed, 'admin'))
conn.commit()
conn.close()
print('Admin password reset to: Admin@123!')
"# Fix file permissions (Linux/macOS)
chmod -R 755 radiotrack/
chmod -R 644 radiotrack/data/
chmod -R 644 radiotrack/logs/
# Fix file permissions (Windows)
# Right-click folder → Properties → Security → Edit permissions# Check Docker status
docker ps -a
# Clean up containers
docker-compose down
docker system prune -f
# Rebuild containers
docker-compose build --no-cache
docker-compose up -d- Check Logs:
tail -f logs/radiotrack.log - Docker Logs:
docker-compose logs -f radiotrack - Database Status: Check
data/inventory.dbfile size and modification date - System Resources: Monitor memory and disk usage
- Database Size: Monitor growth in
data/inventory.db - Log Files: Regular review of
logs/directory - Backup Status: Verify backup creation in
backups/directory - Memory Usage: Monitor application resource consumption
- Regular Backups: Configure automated backup schedules
- Log Rotation: Implement log file rotation for long-term deployments
- Database Maintenance: Regular VACUUM operations for SQLite
- Cache Management: Clear Streamlit cache periodically
# Create .env file
cp .env.example .env
# Configure key settings
DEBUG_MODE=True
LOG_LEVEL=INFO
SESSION_EXPIRY_HOURS=2
PASSWORD_EXPIRY_DAYS=60Edit config.py to customize:
- Equipment categories specific to your facility
- Location names relevant to your operations
- Security policies and timeouts
- Branding and appearance settings
- Primary Support: Tool Control Sergeant, MCC Windham
- IT Support: Maine DOC IT Department
- Training: Available through internal training programs
- Documentation: Comprehensive user guides available
- Fork the repository for custom modifications
- Submit issues for bug reports and feature requests
- Follow development best practices for code contributions
- Maintain security standards for all changes
This software is proprietary to the Maine Department of Corrections.
- Copyright: © 2025 Maine Department of Corrections
- All Rights Reserved
- Authorized Use Only: Licensed for official DOC use
- Security Classification: Internal Use Only
Maine Department of Corrections MCC Windham Facility Tool Control Program
- Corrections Officers who provided operational requirements
- IT Department for infrastructure and technical support
- Development Team for creating this specialized solution
This application was conceived and developed by an individual who learned programming while incarcerated in the Maine Department of Corrections education program. What began as a journey of rehabilitation and skill-building has evolved into a successful career in software development.
The developer is now a full-time software engineer with MIT's Brave Behind Bars program - a groundbreaking initiative providing technology education, mentorship, and employment opportunities to formerly incarcerated individuals.
- Primary Contact: Tool Control Sergeant, MCC Windham
- IT Support: Maine DOC IT Department
- Emergency Support: Follow established incident response procedures
- Initial Training: Provided during system rollout
- Refresher Training: Available as needed
- Documentation: Available through internal DOC systems
RadioTrack - Professional radio equipment management for corrections professionals.
Last Updated: January 2025