Initial commit of YouTube Downloader application, including core functionality for downloading videos, user authentication, and Docker support. Added configuration files, environment setup, and basic UI components using Astro.js and Tailwind CSS.
This commit is contained in:
152
README.md
152
README.md
@@ -1,2 +1,152 @@
|
||||
# yt
|
||||
# YouTube Downloader
|
||||
|
||||
Eine einfache Web-Anwendung zum Herunterladen von YouTube-Videos mit Astro.js und yt-dlp.
|
||||
|
||||
## Features
|
||||
|
||||
- Einfache Login-Seite
|
||||
- YouTube URL Download-Interface
|
||||
- yt-dlp Integration für Video-Downloads (läuft innerhalb der App über npm-Package)
|
||||
- Tailwind CSS für modernes Design
|
||||
- Docker-Support
|
||||
|
||||
## Voraussetzungen
|
||||
|
||||
- Node.js 20 oder höher
|
||||
- Docker (optional, für Container-Deployment)
|
||||
|
||||
## Installation
|
||||
|
||||
**Für unerfahrene Nutzer:** Siehe [INSTALLATION.md](./INSTALLATION.md) für eine detaillierte Schritt-für-Schritt-Anleitung.
|
||||
|
||||
### Schnellstart
|
||||
|
||||
1. **Dependencies installieren:**
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
2. **yt-dlp installieren:**
|
||||
```bash
|
||||
# macOS
|
||||
brew install yt-dlp
|
||||
|
||||
# Linux
|
||||
sudo apt-get install yt-dlp
|
||||
|
||||
# Windows oder mit pip
|
||||
pip install yt-dlp
|
||||
```
|
||||
|
||||
3. **Environment-Variablen einrichten:**
|
||||
|
||||
Erstelle eine `.env` Datei im Projektordner:
|
||||
```env
|
||||
LOGIN_USERNAME=admin
|
||||
LOGIN_PASSWORD=dein-passwort
|
||||
DOWNLOAD_DIR=./downloaded
|
||||
SESSION_SECRET=dein-session-secret
|
||||
```
|
||||
|
||||
4. **Development-Server starten:**
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Die Anwendung läuft dann auf `http://localhost:4321`
|
||||
|
||||
### Mit Docker
|
||||
|
||||
1. Docker Image bauen und starten:
|
||||
```bash
|
||||
docker-compose up --build
|
||||
```
|
||||
|
||||
Die Anwendung läuft dann auf `http://localhost:4321`
|
||||
|
||||
### Als Desktop-App (Electron)
|
||||
|
||||
**Für macOS:**
|
||||
```bash
|
||||
npm run electron:build:mac
|
||||
```
|
||||
|
||||
**Für Windows:**
|
||||
```bash
|
||||
npm run electron:build:win
|
||||
```
|
||||
|
||||
Die fertige App wird in `dist-electron/` erstellt:
|
||||
- **macOS**: `.dmg` Installer oder `.zip` Portable Version
|
||||
- **Windows**: `.exe` Installer oder Portable `.exe`
|
||||
|
||||
Siehe [BUILD-MACOS.md](./BUILD-MACOS.md) für detaillierte Anleitung.
|
||||
|
||||
## Verwendung
|
||||
|
||||
1. Öffne die Anwendung im Browser
|
||||
2. Melde dich mit den konfigurierten Credentials an (siehe Environment-Variablen)
|
||||
3. Gib eine YouTube URL in das Eingabefeld ein
|
||||
4. Klicke auf "Download"
|
||||
5. Das Video wird in den konfigurierten Ordner heruntergeladen (Standard: `/downloaded`)
|
||||
|
||||
## Konfiguration
|
||||
|
||||
### Environment-Variablen
|
||||
|
||||
- `LOGIN_USERNAME`: Benutzername für den Login (erforderlich wenn `LOGIN` nicht auf `false` gesetzt ist)
|
||||
- `LOGIN_PASSWORD`: Passwort für den Login (erforderlich wenn `LOGIN` nicht auf `false` gesetzt ist)
|
||||
- `LOGIN`: Wenn auf `false` gesetzt, wird der Login deaktiviert und alle Seiten sind ohne Authentifizierung zugänglich (Standard: `true`)
|
||||
- `DOWNLOAD_DIR`: Verzeichnis für Downloads (Standard: `./downloaded`)
|
||||
- `SESSION_SECRET`: Secret für Session-Cookies (Standard: `default-secret-change-in-production`)
|
||||
- `STREAM_ONLY`: Wenn auf `true` gesetzt, werden Dateien nicht physisch gespeichert, sondern direkt als Download-Stream angeboten (Standard: `false`)
|
||||
- `LOCALE`: Sprache der Anwendung - `de` für Deutsch oder `en` für Englisch (Standard: `de`)
|
||||
|
||||
**Beispiel `.env` Datei mit Login:**
|
||||
```
|
||||
LOGIN_USERNAME=admin
|
||||
LOGIN_PASSWORD=mein-sicheres-passwort
|
||||
LOGIN=true
|
||||
DOWNLOAD_DIR=./downloaded
|
||||
SESSION_SECRET=mein-geheimes-session-secret
|
||||
STREAM_ONLY=false
|
||||
LOCALE=de
|
||||
```
|
||||
|
||||
**Beispiel `.env` Datei ohne Login:**
|
||||
```
|
||||
LOGIN=false
|
||||
DOWNLOAD_DIR=./downloaded
|
||||
STREAM_ONLY=false
|
||||
LOCALE=de
|
||||
```
|
||||
|
||||
**Hinweis zu `LOGIN`:**
|
||||
- Wenn `LOGIN=false`: Keine Login-Seite, alle Seiten sind öffentlich zugänglich. `LOGIN_USERNAME` und `LOGIN_PASSWORD` werden ignoriert.
|
||||
- Wenn `LOGIN=true` oder nicht gesetzt: Login ist aktiviert. `LOGIN_USERNAME` und `LOGIN_PASSWORD` müssen gesetzt sein.
|
||||
|
||||
**Hinweis zu `STREAM_ONLY`:**
|
||||
- Wenn `STREAM_ONLY=true`: Dateien werden temporär gespeichert, direkt als Download-Stream angeboten und danach automatisch gelöscht. Keine Dateien bleiben auf der Festplatte.
|
||||
- Wenn `STREAM_ONLY=false` oder nicht gesetzt: Dateien werden im `DOWNLOAD_DIR` Verzeichnis gespeichert und können später über die Dateiliste abgerufen werden.
|
||||
|
||||
## Projektstruktur
|
||||
|
||||
```
|
||||
/
|
||||
├── src/
|
||||
│ ├── components/ # Astro-Komponenten
|
||||
│ ├── layouts/ # Layout-Templates
|
||||
│ ├── lib/ # Utility-Funktionen
|
||||
│ └── pages/ # Seiten und API-Routes
|
||||
├── Dockerfile # Docker-Konfiguration
|
||||
├── docker-compose.yml # Docker Compose Setup
|
||||
└── package.json # Dependencies
|
||||
```
|
||||
|
||||
## Hinweise
|
||||
|
||||
- Die Login-Credentials müssen in den Environment-Variablen `LOGIN_USERNAME` und `LOGIN_PASSWORD` gesetzt werden
|
||||
- Für Produktionsumgebungen sollte ein starkes Passwort verwendet werden
|
||||
- yt-dlp läuft innerhalb der App über das npm-Package `yt-dlp-wrap`
|
||||
- Im Docker-Container wird yt-dlp automatisch installiert
|
||||
- Für lokale Entwicklung muss yt-dlp separat installiert sein (siehe Installation)
|
||||
|
||||
Reference in New Issue
Block a user