Digital Diet is an offline-first YouTube intake app designed to reduce doomscrolling. It removes feed/recommendation loops and enforces a constrained local queue: you must finish the current downloaded videos before requesting a new batch.
- No algorithmic feed in the app.
- You provide explicit source URLs (video/channel/playlist).
- Videos are downloaded locally for offline playback.
- Queue is locked while pending videos exist.
- Any video duration is allowed.
- Backend: Python, FastAPI,
yt-dlp, SQLite - Frontend: Tauri v2, React (Vite), HTML5
<video>
/digital-diet-app
├── docs # Architecture, setup, API specs
├── progress # Iteration logs and updates
├── issues # Known issues and tracked items
├── skills_and_tools # Dev helpers and scripts
├── src-backend # FastAPI + yt-dlp + SQLite
│ ├── api
│ ├── core
│ ├── db
│ └── data
└── src-frontend # Tauri React app
├── src-tauri
├── src
└── public
- Frontend sends intake request with sources and
max_videos. - Backend checks queue lock:
- If pending videos exist (
downloaded/in_progress), new intake is rejected.
- If pending videos exist (
- Backend uses
yt-dlpto resolve and download videos locally. - Frontend plays local files via backend stream endpoint.
- Progress updates mark videos
in_progressand thencompleted. - When all pending videos are completed, queue unlocks for the next batch.
- Python 3.11+
- Node.js 20+
- Rust toolchain (for Tauri)
ffmpegin PATH (recommended)
cd src-backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --host 0.0.0.0 --port 8000 --reloadcd src-frontend
npm install
npm run dev -- --host 0.0.0.0 --port 5173cd src-frontend
npm install
npm run tauri devUse the helper script:
./skills_and_tools/expose_mobile_access.shOr run both backend + frontend with one command:
./skills_and_tools/expose_mobile_access.sh --run-allThen:
- Open the printed frontend URL on your phone.
- In the app, set Backend URL to the printed backend URL.
Base URL: http://127.0.0.1:8000/api/v1
POST /intake/downloadGET /queue/statusGET /videos?status=pending|completed|allGET /videos/{id}GET /videos/{id}/streamPOST /videos/{id}/progressPOST /videos/{id}/complete
Implemented:
- End-to-end intake/download/playback flow
- Queue lock enforcement
- Progress tracking and completion transitions
- Per-source skip diagnostics in download responses
- LAN-friendly CORS for mobile testing
Planned improvements:
- Better retry/error surfacing for failed downloads
- Stream range optimization for smoother seeking
- Test coverage for queue and downloader edge cases