- This Repo Includes Our Backend & Frontend Code
- This also includes the code for our whole video processing pipeline that includes the YOLOv8 model.
- The pipeline code is at ot.py (object_tracker) and can be executed standalone with designated command line arguments. For the ot.py to run via the online architecture, tg.py (telegram.py) is there to handle it. tg.py also handles all the other sub files individually.
Deployable Website Documentation
All runtime secrets are now loaded from a single external .env file.
- Create a real env file from the template:
cp .env.example .env- Fill required values in
.env:
TELEGRAM_BOT_TOKENJWT_SECRET_KEYGITHUB_ACCESS_TOKEN(and/orGITHUB_PATforweb_server_public.py)GITHUB_USERNAMEGITHUB_REPO_NAME
- Keep
.envprivate. It is ignored by git via.gitignore.
├── index.html # Main web interface (frontend)
├── admin.html # Admin login page
├── admin_tracker.html # Admin dashboard for tracking processed videos and request origins and other analytics like uptime, etc.
├── manifest.json # PWA: Web App Manifest for installability
├── service-worker.js # PWA: Service Worker for offline capabilities and caching
├── images/
└── project-glyph-motion.ico # Favicon for the website
└── project-glyph-motion.png # Project logo
└── project-glyph-motion-192x192.png # PWA icon (192x192)
└── project-glyph-motion-512x512.png # PWA icon (512x512)
└── project-glyph-motion-maskable.png # PWA maskable icon
└── thumbnail_fallback.jpg # Fallback thumbnail for videos
├── input/ # Directory for uploaded video files (processed by the backend)
├── output/ # Directory for processed video files (generated by the backend)
├── yolov8m.pt # Actual Pre-trained YOLOv8(m) model file (for object tracking) : Ultralytics YOLOv8(m) model file
├── tg.py (telegram.py) # Backend orchestrator: handles web requests, triggers `ot.py`, integrates GitHub/Drive, and powers the Telegram bot.
├── ot.py (object_tracker.py) # Core video processor: performs object tracking with YOLOv8(m).
├── gh.py (github.py) # Manages GitHub commits and Google Drive integration.
├── client_secret.json # Google Drive API credentials (for authenticated access)
├── config.yml # Configuration file for the backend (Paths and endpoints, etc.) [See the actual project config.yml for details]
├── admin_auth.py # Handles secure admin authentication (stores bcrypt hashes)
├── admin_hash_gen.py # Script to generate and update admin credentials directly in admin_auth.py
├── documentation.html # This documentation file
├── requirements.txt # Lists all Python dependencies
├── web_server_public.py # Python script to run the Flask web server and Cloudflare Tunnel (Automation of the whole backend)
├── token.json # Google Drive API token file (for authenticated access)
├── videos.json # JSON file containing metadata for processed videos (links, titles, etc.)
├── tracking_data.json # JSON file containing detailed tracking data for each processed video (object counts, timestamps, etc.)
├── benchmark.html # Benchmarking results and performance metrics for the object tracking system
├── changelogs.html # Detailed changelogs documenting updates, improvements, and fixes across different versions of the project
├── .gitignore # Specifies files and directories to ignore in Git
├── README.md # Project overview and setup instructions
└──LICENSE # Project license file