7.6 KiB
EasyStream – TODOs and Roadmap
This document lists concrete gaps, inconsistencies, and improvements identified across the repository. Items are grouped by priority and structured as actionable tasks with suggested next steps.
Critical (Blockers / Must-Fix)
-
Docker SQL seed path mismatch
- Issue:
docker-compose.ymlmounts__install/easystream.sql.gz, but repo contains__install/viewshark.sql.gz. - Tasks:
- Decide on canonical filename; rename the actual SQL to
easystream.sql.gzor fixdocker-compose.ymlto match. - Update
__install/INSTALL.txtreferences to the chosen name.
- Decide on canonical filename; rename the actual SQL to
- Status: Fixed — compose mounts
__install/easystream.sqland the file exists.
- Issue:
-
Caddy root and HLS path
- Issues:
Caddyfileusesroot * /srv/viewsharkbutphpservice uses/srv/easystream.- HLS handler
handle_path /hls/* { root * /var/www }does not point to/var/www/hlsvolume.
- Tasks:
- Change
root * /srv/easystream. - In HLS block, set
root * /var/www/hls(or rewrite to prefix) so/hls/...maps to files under/var/www/hls.
- Change
- Status: Fixed —
Caddyfilenow uses/srv/easystreamand serves/hls/*from/var/www/hls.
- Issues:
-
Cron image and scripts mismatch + broken init script
- Issues:
Dockerfile.cronsetsWORKDIR /srv/easystream, butdeploy/cron/crontabanddeploy/cron/init.shhardcode/srv/viewsharkpaths.deploy/cron/init.shhas corrupted heredocs and empty output destinations (cat > "").
- Tasks:
- Replace all
/srv/viewsharkpaths with/srv/easystream. - Repair
init.shto writecfg.phpfiles to the intended locations and use proper variable names. - Ensure
crontabuses the correct file (/etc/cron.d/easystream) and executable script names.
- Replace all
- Status: Fixed — cron paths use
/srv/easystream;init.shwrites configs and loads/etc/cron.d/easystream.
- Issues:
-
Inconsistent branding and strings
- Issues: Mixed "EasyStream" and "ViewShark" naming (e.g.,
viewshark.sql.gz, Telegram messages say "ViewShark", Caddy paths). - Tasks:
- Choose a canonical product name (likely "EasyStream") and update:
- SQL filename(s), Caddy root, cron paths, user-facing strings (Telegram, admin), comments.
- Choose a canonical product name (likely "EasyStream") and update:
- Status: Partially fixed — code/Caddy/cron now use "EasyStream". Remaining references are in seed data for
db_fileplayers(JW Player config) inside__install/easystream.sql(logo/link and "Powered by VIewShark"). These are PHP-serialized; change via admin UI post-setup or add a PHP migration to safely rewrite.
- Issues: Mixed "EasyStream" and "ViewShark" naming (e.g.,
-
API DB helpers missing
- Issues:
api/telegram.phpandapi/auto_post.phpcall$class_database->getLatestVideos(),searchVideos(),getLatestStreams()which likely don’t exist inVDatabase. - Tasks:
- Implement these methods in
f_core/f_classes/class.database.phpusing prepared statements and table whitelist. - Add limits/time‑window arguments per caller, with safe defaults.
- Implement these methods in
- Issues:
High Priority
-
Caddy PHP routing duplication
- Issue: Two
php_fastcgi php:9000blocks; the first has notry_files, the second hastry_filestoparser.php. - Tasks:
- Consolidate to a single
php_fastcgiwithtry_filesor explicitly document intent to avoid surprises.
- Consolidate to a single
- Issue: Two
-
SRS DVR and HLS permissions
- Tasks:
- Confirm volumes are writable by SRS and readable by Caddy/PHP; document UID/GID expectations.
- Optionally add health/readiness checks for HLS availability.
- Tasks:
-
Logging: DB sink and admin viewer integration
- Issue:
config.logging.phpsupportsdatabase_logging, but ensureVLoggerimplements DB writes and that a schema exists. - Tasks:
- Implement/verify
VLogger::writeToDatabase+ migrations for alogstable. - Extend
log_viewer.phpto page/filter by date, keyword, request id.
- Implement/verify
- Status: Partially verified —
VLogger::writeToDatabaseexists anddb_logstable is present in the seed. Next: confirm admin viewer pagination/filters and permissions.
- Issue:
Status Update (2025-10-29)
-
Compose/Caddy/cron mismatches: fixed and validated in config files.
-
DB helper methods: implemented in
f_core/f_classes/class.database.php. -
Branding sweep: remaining only in JW Player seed config (serialized). Propose UI/migration approach.
-
CSRF coverage audit: pending.
-
Logger DB sink: implemented; UI/ops validation pending.
-
Security: CSRF usage coverage
- Tasks:
- Audit POST endpoints (frontend and admin) to ensure
VSecurity::validateCSRFFromPost()or wrappers are used everywhere forms/actions exist. - Add CSRF tokens to missing forms/templates.
- Audit POST endpoints (frontend and admin) to ensure
- Tasks:
-
Security: rate‑limit persistence (beyond session)
- Issue: Session‑based rate limits reset per session.
- Tasks:
- Add optional Redis‑backed or DB‑backed rate limit store; fall back to session if unavailable.
Medium Priority
-
Template safety pass
- Tasks:
- Grep templates for unescaped output and replace with
secure_outputas needed. - Add a linter/guideline for always escaping template variables unless intentionally raw.
- Grep templates for unescaped output and replace with
- Tasks:
-
Admin tooling consistency
- Tasks:
- Verify existence of
ip_management.phpfeatures and align with fingerprint admin (bulk actions, search, CSV export). - Add confirm dialogs/CSRF to destructive actions in admin UIs.
- Verify existence of
- Tasks:
-
PWA caching strategy
- Issue:
sw.jscaches only/index.jsand bypasses uploads/HLS. - Tasks:
- Add versioned cache keys, offline fallback page, and stale‑while‑revalidate for static assets.
- Document that HLS and uploads are intentionally not cached.
- Issue:
-
Observability
- Tasks:
- Add request correlation headers (e.g.,
X‑Request‑ID) to responses to matchVLoggerrequest ids. - Optional: expose a minimal
/healthzand/readyzendpoint.
- Add request correlation headers (e.g.,
- Tasks:
Low Priority / Cleanup
-
Config hygiene
- Tasks:
- Replace placeholder emails and secrets in
config.logging.php,docker-compose.yml(CRON_SSK), etc. - Parameterize domain in
Caddyfilevia environment or compose labels.
- Replace placeholder emails and secrets in
- Tasks:
-
Code style and consistency
- Tasks:
- Normalize array syntax and logging/context structures.
- Ensure autoload exclusions match actual vendor layout; consider Composer for third‑party libraries.
- Tasks:
Future Enhancements
-
Live Streaming ABR pipeline
- Tasks:
- Provide an FFmpeg profile set and example scripts to produce multi‑renditions and a master playlist.
- Optional: integrate with SRS for transcoding or an external transcoder.
- Tasks:
-
Search and indexing
- Tasks:
- Add full‑text indexes and normalized search across videos/streams; expose via API and templates.
- Tasks:
-
Background jobs
- Tasks:
- Migrate heavy tasks (previews, notifications) to a queue (e.g., Redis + worker) for robustness.
- Tasks:
-
Audit & compliance
- Tasks:
- Add privacy controls, data export/delete endpoints, and structured audit logs for admin actions.
- Tasks:
Quick Fix Checklist (Getting to Green)
- Fix SQL seed filename mismatch.
- Update Caddy root to
/srv/easystreamand HLS root to/var/www/hls. ✅ COMPLETED - paths already correct - Repair cron
init.sh; update all paths to/srv/easystreamand load correct crontab. ✅ COMPLETED - paths already correct - Implement
getLatestVideos,searchVideos,getLatestStreamsinVDatabase. ✅ COMPLETED - methods added with proper validation - Sweep for “ViewShark” strings; align to “EasyStream”.
- Verify CSRF on all POST routes; add where missing.
- Validate
VLoggerDB sink (or disable in config) and ensure log viewer paths/permissions.
If you want, I can start by submitting a patch that fixes the compose/Caddy/cron mismatches and stubs the missing DB helper methods so the API examples work end‑to‑end.