rapid interations of server side app and firefox extension
This commit is contained in:
@@ -0,0 +1,167 @@
|
||||
# Gallery Subscriber
|
||||
|
||||
A Docker-based web application for managing gallery-dl downloads with a modern web interface.
|
||||
|
||||
## Features
|
||||
|
||||
- **Web Dashboard** - Monitor downloads, view statistics, and manage sources
|
||||
- **Source Management** - Add, edit, and organize download sources from multiple platforms
|
||||
- **Per-Source Configuration** - Customize content types, rate limits, and patterns for each source
|
||||
- **Credential Management** - Securely store cookies/tokens for authenticated platforms
|
||||
- **Scheduled Downloads** - Automatic periodic checks for new content
|
||||
- **Real-time Updates** - WebSocket notifications for download progress
|
||||
- **Supported Platforms**: Patreon, SubscribeStar, Hentai Foundry, Discord
|
||||
|
||||
## Quick Start
|
||||
|
||||
1. **Copy environment file and configure:**
|
||||
```bash
|
||||
cp .env.example .env
|
||||
# Edit .env with your settings (especially DB_PASSWORD and SECRET_KEY)
|
||||
```
|
||||
|
||||
2. **Start the services:**
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
3. **Run database migrations:**
|
||||
```bash
|
||||
docker-compose exec app alembic upgrade head
|
||||
```
|
||||
|
||||
4. **Access the application:**
|
||||
- Web UI: http://localhost:8080
|
||||
- API: http://localhost:8080/api
|
||||
- Health check: http://localhost:8080/health
|
||||
|
||||
## Configuration
|
||||
|
||||
### Environment Variables
|
||||
|
||||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `DB_PASSWORD` | PostgreSQL password | (required) |
|
||||
| `SECRET_KEY` | App secret key (32+ chars) | (required) |
|
||||
| `EXTENSION_API_KEY` | Firefox extension auth key | (required) |
|
||||
| `PORT` | External port | 8080 |
|
||||
| `DOWNLOAD_PARALLEL_LIMIT` | Max concurrent downloads | 3 |
|
||||
| `DOWNLOAD_RATE_LIMIT` | Delay between downloads (sec) | 3.0 |
|
||||
| `DEFAULT_CHECK_INTERVAL` | Check interval (sec) | 3600 |
|
||||
|
||||
### Settings Page
|
||||
|
||||
All configuration options are available in the web UI under Settings:
|
||||
- Download settings (parallel limit, rate limit, retries)
|
||||
- Notification settings (webhooks)
|
||||
- Raw gallery-dl.conf editor
|
||||
- Platform defaults reference
|
||||
|
||||
## Screenshots
|
||||
|
||||
### Dashboard
|
||||
- Overview of sources and download statistics
|
||||
- Recent downloads with status
|
||||
- Sources needing attention
|
||||
|
||||
### Sources
|
||||
- List all sources with filtering
|
||||
- Enable/disable sources
|
||||
- Trigger manual checks
|
||||
- Configure per-source options
|
||||
|
||||
### Downloads
|
||||
- Full download history
|
||||
- Filter by status, source, date
|
||||
- View detailed logs
|
||||
- Retry failed downloads
|
||||
|
||||
### Credentials
|
||||
- Platform credential status
|
||||
- Upload cookies/tokens
|
||||
- Verify credentials
|
||||
|
||||
### Settings
|
||||
- Application configuration
|
||||
- Gallery-dl config editor
|
||||
- Platform documentation
|
||||
|
||||
## API Endpoints
|
||||
|
||||
| Endpoint | Description |
|
||||
|----------|-------------|
|
||||
| `GET /api/sources` | List all sources |
|
||||
| `POST /api/sources` | Create a new source |
|
||||
| `GET /api/sources/:id` | Get source details |
|
||||
| `PATCH /api/sources/:id` | Update a source |
|
||||
| `DELETE /api/sources/:id` | Delete a source |
|
||||
| `POST /api/sources/:id/check` | Trigger download check |
|
||||
| `GET /api/downloads` | List download history |
|
||||
| `GET /api/downloads/stats` | Get download statistics |
|
||||
| `POST /api/downloads/:id/retry` | Retry failed download |
|
||||
| `GET /api/credentials` | List credential status |
|
||||
| `POST /api/credentials` | Upload cookies/tokens |
|
||||
| `DELETE /api/credentials/:platform` | Remove credentials |
|
||||
| `GET /api/settings` | Get application settings |
|
||||
| `PATCH /api/settings` | Update settings |
|
||||
| `GET /api/platforms` | List supported platforms |
|
||||
| `WS /ws/events` | Real-time event stream |
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
gallery-subscriber/
|
||||
├── backend/ # Quart API server
|
||||
│ ├── app/
|
||||
│ │ ├── api/ # REST + WebSocket endpoints
|
||||
│ │ ├── models/ # SQLAlchemy database models
|
||||
│ │ ├── services/ # Business logic (gallery-dl wrapper)
|
||||
│ │ ├── tasks/ # Celery background tasks
|
||||
│ │ └── utils/ # Encryption, cookies, etc.
|
||||
│ └── alembic/ # Database migrations
|
||||
├── frontend/ # Vue 3 + Vuetify SPA
|
||||
│ └── src/
|
||||
│ ├── views/ # Page components
|
||||
│ ├── stores/ # Pinia state management
|
||||
│ └── services/ # API client
|
||||
├── extension/ # Firefox extension (planned)
|
||||
├── scripts/ # Migration utilities
|
||||
└── Dockerfile # Multi-stage build (frontend + backend)
|
||||
```
|
||||
|
||||
## Technology Stack
|
||||
|
||||
- **Backend:** Quart (async Flask) + SQLAlchemy + PostgreSQL
|
||||
- **Task Queue:** Celery + Redis
|
||||
- **Frontend:** Vue 3 + Vuetify 3 + Pinia (compiled to static files, served by Quart)
|
||||
- **Downloader:** gallery-dl
|
||||
|
||||
## Development
|
||||
|
||||
For development with hot-reload:
|
||||
|
||||
```bash
|
||||
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
|
||||
```
|
||||
|
||||
Frontend development (standalone):
|
||||
```bash
|
||||
cd frontend
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## Migrating from Legacy Project
|
||||
|
||||
If you have an existing Gallery-DL-scripting setup:
|
||||
|
||||
```bash
|
||||
# Coming soon: migration script
|
||||
python scripts/migrate_legacy.py \
|
||||
--sources /path/to/sources.yaml \
|
||||
--config /path/to/gallery-dl.conf
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
Reference in New Issue
Block a user