# Goondex **Fast, local-first media indexer for adult content.** Goondex ingests metadata from external sources (TPDB, etc.), normalizes it, and stores it in a small SQLite database for quick search via CLI/TUI and background daemon tasks. ## Version **v0.1.0-dev1** - Initial development release ## Features (v0.1.0-dev1) - SQLite database with WAL mode for performers, studios, scenes, and tags - CLI search commands for local database queries - Pluggable scraper architecture (TPDB client stubbed) - Configuration via YAML files - Stash-inspired metadata resolution strategies (coming soon) ## Architecture ``` Scrapers (TPDB, AE, etc.) ↓ Metadata Resolver (field strategies, merge rules) ↓ SQLite DB (performers, studios, scenes, tags) ↓ CLI/TUI + Daemon (search, identify, sync) ``` ## Installation ```bash # Clone the repository git clone https://git.leaktechnologies.dev/stu/Goondex.git cd Goondex # Build the CLI go build -o bin/goondex ./cmd/goondex # (Optional) Build the daemon go build -o bin/goondexd ./cmd/goondexd ``` ## Configuration Set your API keys as environment variables: ```bash export TPDB_API_KEY="your-tpdb-api-key" ``` Edit configuration files in `config/`: - `goondex.yml` - Runtime settings (database path, cache dir, timeouts) - `metadata.yml` - Field strategies (MERGE/OVERWRITE/IGNORE) - `source.yml` - Scraper sources and priorities ## Usage ### CLI Commands (v0.1.0-dev1) ```bash # Search performers in local DB ./bin/goondex performer-search "Riley Reid" # Search studios in local DB ./bin/goondex studio-search "Brazzers" # Search scenes in local DB ./bin/goondex scene-search "Some Title" # Show version ./bin/goondex version ``` ## Database Schema - **performers**: id, name, aliases, nationality, country, gender, images, bio - **studios**: id, name, parent_id, images, description - **tags**: id, name - **scenes**: id, title, code, date, studio_id, description, images, director, url - **scene_performers**: junction table for scenes ↔ performers - **scene_tags**: junction table for scenes ↔ tags ## Roadmap ### v0.1.x - [x] CLI search commands - [x] SQLite stores for all entities - [ ] TPDB scraper implementation - [ ] Basic metadata strategies - [ ] Image cache ### v0.2.x - [ ] Identify/import commands - [ ] TUI list + preview - [ ] Alias normalization - [ ] Full-text search (FTS5) ### v0.3.x - [ ] Daemon (goondexd) with schedules - [ ] Incremental updates - [ ] Duplicate scene detection - [ ] Preview sprite generation ### v0.4.x - [ ] Plugin scrapers - [ ] Headless HTTP API - [ ] Web UI ## Development ```bash # Run tests (when available) go test ./... # Build for development go build -o bin/goondex ./cmd/goondex # Run without installing go run ./cmd/goondex performer-search "test" ``` ## Contributing This is a personal project, but contributions are welcome! Please open an issue before submitting large changes. ## License [Your License Here] ## Acknowledgments Inspired by [Stash](https://github.com/stashapp/stash) and its metadata identification flow.