No description
Find a file
vrubelroman 44f81f0f0d Show channel counts in the left CategoryNav sidebar (Feed/Channels/Saved)
Same "channels per category" counts as the categories management page,
now next to each button in the sidebar used across all three pages.
Categories already carry channel_count; "Все"/"Без категории" counts are
derived client-side from one extra unfiltered channels query, reused
across the three pages via a shared ['channels', 'all-for-counts'] key.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 20:38:06 +00:00
backend Hide unsubscribed channels from the channels list, add a Saved tab 2026-09-16 20:23:33 +00:00
frontend Show channel counts in the left CategoryNav sidebar (Feed/Channels/Saved) 2026-09-16 20:38:06 +00:00
migrations Add delete-downloaded-video and real YouTube unsubscribe 2026-09-16 19:47:35 +00:00
tests Hide unsubscribed channels from the channels list, add a Saved tab 2026-09-16 20:23:33 +00:00
.dockerignore Implement Phases 1-5: skeleton, OAuth, categories, video sync/feed, playback 2026-09-16 18:44:30 +00:00
.env.example Implement Phases 1-5: skeleton, OAuth, categories, video sync/feed, playback 2026-09-16 18:44:30 +00:00
.gitignore Implement Phases 1-5: skeleton, OAuth, categories, video sync/feed, playback 2026-09-16 18:44:30 +00:00
AGENTS.md Implement Phase 6: MeTube download integration 2026-09-16 18:56:17 +00:00
alembic.ini Implement Phases 1-5: skeleton, OAuth, categories, video sync/feed, playback 2026-09-16 18:44:30 +00:00
compose.yml Implement Phases 1-5: skeleton, OAuth, categories, video sync/feed, playback 2026-09-16 18:44:30 +00:00
Dockerfile Implement Phases 1-5: skeleton, OAuth, categories, video sync/feed, playback 2026-09-16 18:44:30 +00:00
entrypoint.sh Implement Phases 1-5: skeleton, OAuth, categories, video sync/feed, playback 2026-09-16 18:44:30 +00:00
pyproject.toml Implement Phase 6: MeTube download integration 2026-09-16 18:56:17 +00:00
README.md Implement Phases 1-5: skeleton, OAuth, categories, video sync/feed, playback 2026-09-16 18:44:30 +00:00
UI_UX_spec.md Implement Phases 1-5: skeleton, OAuth, categories, video sync/feed, playback 2026-09-16 18:44:30 +00:00
youtube_categories_metube_TZ.md Implement Phases 1-5: skeleton, OAuth, categories, video sync/feed, playback 2026-09-16 18:44:30 +00:00

MyYouTube

Персональный YouTube-клиент с категориями подписок и интеграцией с существующим MeTube. Полное техническое задание: youtube_categories_metube_TZ.md.

Текущий статус: Phase 1 — skeleton (FastAPI backend, PostgreSQL, Alembic, React frontend, Docker Compose, healthcheck).

Стек

  • Backend: Python 3.13, FastAPI, SQLAlchemy 2.x, Alembic, Pydantic Settings
  • Frontend: React, TypeScript, Vite, React Router, TanStack Query
  • DB: PostgreSQL 16
  • Deployment: Docker Compose

Запуск в production (Docker Compose)

  1. Скопируй .env.example в .env и заполни значения (Google OAuth credentials, секреты, MeTube URLs).

  2. Собери и запусти:

    docker compose up -d --build
    
  3. Проверь health:

    curl http://localhost:8080/api/health
    

Миграции Alembic применяются автоматически при старте контейнера app (см. entrypoint.sh).

Локальная разработка

Backend

cd backend
uv venv .venv
uv pip install -p .venv -r requirements-dev.txt
source .venv/bin/activate
cd ..
DATABASE_URL=postgresql+psycopg://youtube_app:password@localhost:5432/youtube_app \
APP_SECRET_KEY=dev APP_SECRET_KEY=dev TOKEN_ENCRYPTION_KEY=dev \
  alembic upgrade head
uvicorn app.main:app --reload --app-dir backend --port 8080

Тесты:

backend/.venv/bin/python -m pytest tests/ -v

Frontend

cd frontend
npm install
npm run dev

Dev-сервер Vite проксирует /api/* на http://127.0.0.1:8080 (см. vite.config.ts).

Миграции

alembic revision -m "описание"
alembic upgrade head

alembic.ini и папка migrations/ находятся в корне проекта и подключают модели из backend/app.

Структура проекта

myyoutube/
├── backend/      # FastAPI приложение
├── frontend/     # React SPA
├── migrations/   # Alembic migrations
├── tests/        # backend tests (pytest)
├── Dockerfile
├── compose.yml
├── .env / .env.example
└── youtube_categories_metube_TZ.md

Секреты

.env в .gitignore, не коммитится. Обязательные секреты: APP_SECRET_KEY, TOKEN_ENCRYPTION_KEY, GOOGLE_CLIENT_SECRET, POSTGRES_PASSWORD.