Skip to content

zuck30/sentinel-v1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,047 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sentinel v1

GitHub Actions License Status Automation GUI CLI

A sophisticated automated system for continuous repository maintenance, metrics collection, and activity simulation with intelligent scheduling patterns.

Sentinel Banner

🎯 Quick Overview

Sentinel v1 is an automated GitHub Actions workflow that:

  • 🕐 Runs 24/7 with strategic scheduling patterns
  • 📈 Collects structured metrics in time-series format
  • 📝 Maintains documentation with real-time updates
  • 🖥️ Provides monitoring tools (GUI, CLI, Web)
  • 🛡️ Operates securely with minimal permissions

🖥️ Monitoring Tools

📊 GUI Desktop Application

A comprehensive desktop dashboard to monitor your Sentinel system in real-time:

# Navigate to GUI directory and install dependencies
cd GUI
pip install -r requirements.txt

# Run the GUI monitor
python sentinel_monitor.py

Features:

  • Real-time repository statistics
  • Schedule visualization
  • File explorer with metrics browser
  • Workflow run monitor
  • Live activity logs
  • Interactive controls

GUI Dashboard Preview

💻 Command Line Interface

A lightweight CLI tool for quick monitoring and management:

# Navigate to CLI directory
cd CLI

# Run the CLI tool
python sentinel_cli.py

Features:

  • Dashboard view with real-time stats
  • Today's metrics browser
  • Schedule configuration viewer
  • Activity log tailing
  • File explorer for metrics

💻 ** Python GUI Interface**

# Navigate to CLI directory
cd GUI
# Install dependencies
pip install -r requirements.txt
# Run the App
python sentinel_monitor.py

🌐 Web Dashboard

A Flask-based web interface for remote monitoring:

# Navigate to WEB directory
cd WEB
# Run the web server
python dashboard.py

# Open browser to: http://localhost:5000

Features:

  • RESTful API endpoints
  • Real-time JSON data
  • Repository statistics API
  • Activity tracking
  • File structure browser

📊 Real-time Status

Next Scheduled Runs:

  • Business Hours (9 AM - 5 PM): Every 30 minutes at :15 and :45 past the hour
  • Evening Hours (7 PM - 11 PM): Every 20 minutes
  • Night/Morning: Strategic check-ins at critical hours
  • Manual Triggers: Push to main/master or workflow_dispatch

🏗️ Architecture Overview

Technologies

Python, Bash, GitHub Actions, JSON, YAML, Git, Flask, Tkinter

🚀 Getting Started

1. Clone the Repository

git clone https://github.com/zuck30/sentinel-v1.git
cd sentinel-v1

2. Enable Automation

  • Go to your repository Settings → Actions → General
  • Ensure "Workflow permissions" are set to "Read and write permissions"
  • The workflow will auto-enable on push to main

3. Set Up Monitoring Tools

For GUI (Desktop Application):

# Install GUI dependencies
cd GUI
pip install -r requirements.txt

# For Mac users with Tkinter issues:
brew install python-tk

# Run the GUI
python sentinel_monitor.py

For CLI (Command Line):

cd CLI
python sentinel_cli.py

For Web Dashboard:

cd WEB
pip install -r requirements.txt
python dashboard.py
# Open http://localhost:5000 in your browser

4. Monitor Activity

Use any of these interfaces to monitor your system:

  • 🖥️ GUI Desktop App: Full-featured visual dashboard
  • 💻 CLI Tool: Quick terminal-based monitoring
  • 🌐 Web Dashboard: Remote monitoring via browser
  • 📱 GitHub Actions: Native GitHub interface

2. Smart Execution Pattern

# Phase 1: Data Collection
metrics/daily/YYYY/MM/DD/HHMM.json
{
  "timestamp": "2026-02-10T10:15:00Z",
  "type": "automated_snapshot",
  "workflow": "sentinel-v1",
  "run_id": "123456789",
  "system": {
    "time_unix": 1739189700,
    "random_sample": 4271
  }
}

# Phase 2: Documentation Update
README.md gets timestamp update
CHANGELOG_AUTO.md gets new entry

# Phase 3: Activity Logging
.github/logs/activity.csv records each execution

# Phase 4: Intelligent Committing
Context-aware commit messages based on time of day

📊 Monitoring Features

GUI Desktop Application

  • Real-time Dashboard: Live statistics and metrics
  • Schedule Visualization: Visual timeline of automation
  • File Explorer: Browse generated metrics files
  • Workflow Monitor: Track GitHub Actions executions
  • Log Console: Live tail of activity logs
  • Control Panel: Manual triggers and configuration

Command Line Interface

  • Interactive Dashboard: Terminal-based UI
  • Quick Stats: Instant repository statistics
  • File Navigation: Browse metrics without GUI
  • Log Viewer: Tail activity logs in terminal
  • Schedule Viewer: Display cron configuration

Web Dashboard

  • API Endpoints: RESTful access to data
  • JSON Responses: Machine-readable statistics
  • Remote Access: Monitor from anywhere
  • Lightweight: Minimal resource usage

🛠️ Technical Details

GUI Dependencies (GUI/requirements.txt)

requests>=2.31.0          # GitHub API communication
matplotlib>=3.8.0         # Data visualization
python-dotenv>=1.0.0      # Environment management

Web Dependencies (WEB/requirements.txt)

Flask>=3.0.0              # Web framework
requests>=2.31.0          # API requests
python-dotenv>=1.0.0      # Configuration

Platform Support

Platform GUI CLI Web
Windows
macOS ✅ (brew install python-tk)
Linux
GitHub Codespaces

📊 Sample Data Output

Metrics File (metrics/daily/2026/02/10/1015.json)

{
  "timestamp": "2026-02-10T10:15:00Z",
  "type": "automated_snapshot",
  "workflow": "sentinel-v1",
  "run_id": "987654321",
  "system": {
    "time_unix": 1739189700,
    "random_sample": 7428
  }
}

Activity Log (.github/logs/activity.csv)

2026-02-10T10:15:00Z,987654321,scheduled_update
2026-02-10T09:45:00Z,987654320,scheduled_update
2026-02-10T09:15:00Z,987654319,scheduled_update

🔍 Use Cases

For Developers & DevOps

  • CI/CD Learning: Real-world GitHub Actions patterns
  • Automation Testing: Experiment with scheduling strategies
  • Monitoring Practice: Build custom monitoring tools

For Organizations

  • Activity Simulation: Demonstrate ongoing development
  • Compliance: Automated audit trails and documentation
  • Monitoring: Track workflow execution patterns
  • Best Practices: Example of secure automation

For Educators & Students

  • Teaching Tool: Practical CI/CD implementation
  • Research Data: Generate software process metrics

⚙️ Configuration Options

Adjust Schedule

# In commit.yaml, modify cron patterns:
schedule:
  - cron: "0 9-17 * * 1-5"    # Business hours, weekdays
  - cron: "0 */2 * * *"       # Every 2 hours
  - cron: "@hourly"           # Every hour

Customize Monitoring Tools

# In GUI/sentinel_monitor.py, modify:
self.repo_owner = "your-username"  # Change repository
self.refresh_interval = 60          # Change refresh rate (seconds)

🛡️ Security & Best Practices

Built-in Protections

  1. Timeout: 5-minute maximum runtime
  2. Permissions: Only contents: write, no admin access
  3. Transparency: All automated actions clearly marked

Monitoring Security

  • Local Tools Only: GUI/CLI tools run locally, no external data transmission
  • Optional API: GitHub API integration requires explicit token
  • No Sensitive Data: Only public repository information
  • Open Source: Full transparency of all monitoring code

🚨 Troubleshooting

Common Issues

GUI Tkinter Issues (macOS):

# If you get "_tkinter is not found" error:
brew install python-tk

# Or use system Python:
/usr/bin/python3 sentinel_monitor.py

Dependency Issues:

# Update pip and install dependencies:
pip install --upgrade pip
pip install -r requirements.txt

Permission Issues:

# Ensure you have write permissions in the repo
git status  # Should show clean working directory

Web Dashboard Not Starting:

# Check if port 5000 is in use
lsof -i :5000  # macOS/Linux
netstat -ano | findstr :5000  # Windows

# Or use a different port:
python dashboard.py --port 8080

📄 License

MIT License. See LICENSE file for details.

🙏 Acknowledgments

  • GitHub for the Actions platform
  • Open source community for inspiration and tools
  • All contributors who help improve the system
  • Tkinter & Flask communities for GUI/web frameworks

📊 System Status
Automation
Schedule
GUI
CLI

📫 Connect with the Creator

Timothy Zucker Passionate Fullstack Developer from Tanzania

Email Portfolio


📈 Project Statistics

Repository Analytics

# Run these commands to see project stats:
cd CLI
python sentinel_cli.py

# Or use the GUI for visual stats:
cd GUI
python sentinel_monitor.py

Automation Metrics

  • Daily Commits: ~75-85 automated commits
  • File Generation: ~85 JSON files/day
  • Storage Growth: ~15-20KB/day
  • Uptime: 99.8% (GitHub Actions dependent)
  • Monitoring Options: 3 interfaces (GUI, CLI, Web)

Last automated update: 2026-02-15T22:55:08Z Last run: #280 (attempt 1)

About

Automated repository guardian with smart scheduling patterns (9 cron schedules), real-time metrics collection, dynamic documentation updates, and comprehensive monitoring tools including GUI desktop app, CLI dashboard, and web interface.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors