An automated system that tracks and displays the current U.S. flag status (full-staff or half-staff) based on official government sources. The system updates every 6 hours and provides a visual representation of the current flag position.
Visit the live flag status monitor at: https://jacob-booth.github.io/flag-status-monitor
- 🔄 Automated status updates from multiple authoritative sources
- 🎌 Real-time animated flag display
- 📱 Mobile-responsive design
- ⚡ Fast, reliable updates via GitHub Actions
- 🔒 Secure manual override system
flag-status-monitor/
├── index.html # Main webpage
├── styles.css # Styles and animations
├── app.js # Frontend logic
├── flag_status.json # Current flag status
├── _config.yml # GitHub Pages configuration
├── src/
│ └── api/
│ └── check_status.py # Status checker script
├── docs/ # Documentation
│ ├── index.md
│ └── ...
├── scripts/
│ └── dev_server.py # Local development server
└── .github/
└── workflows/
└── update-flag-status.yml # GitHub Actions workflow
- Python 3.9+
- GitHub account with Actions enabled
- API keys for data sources
- Clone the repository:
git clone https://github.com/jacob-booth/flag-status-monitor.git
cd flag-status-monitor
- Install Python dependencies:
pip install -r requirements.txt
-
Configure API keys:
- Copy
config.example.json
toconfig.json
- Add your API keys and configuration
- Copy
-
Run the development server:
python scripts/dev_server.py
- Go to your repository settings
- Navigate to "Pages" under "Code and automation"
- Under "Build and deployment":
- Source: "GitHub Actions"
- Branch: "main"
- Configure repository secrets:
- Go to Settings > Secrets and variables > Actions
- Add the following secrets:
OPM_API_KEY
: Your OPM API keyTHIRD_PARTY_API_KEY
: Your third-party API key
The site will automatically deploy when:
- Changes are pushed to main branch
- Flag status is updated (every 6 hours)
- Manual deployment is triggered
Comprehensive documentation is available in the docs directory:
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- U.S. Office of Personnel Management
- State Government APIs
- Flag Status API providers
For issues and feature requests:
- Check existing issues
- Create a new issue
- Provide detailed reproduction steps