Goondex/docs/INDEX.md
Team Goon f7d82cd207 v0.1.0-dev2: Full TPDB integration with auto-fetch and comprehensive docs
Major Features:
-  Complete TPDB scraper implementation with real API calls
-  Auto-fetch on cache miss: search commands now automatically import from TPDB when not found locally
-  Comprehensive documentation (5 markdown files for Bookstack)
-  Import commands for performers, studios, and scenes
-  Fixed JSON type mismatches (aliases array, studio numeric IDs)

Changes:
1. TPDB Scraper (internal/scraper/tpdb/):
   - types.go: Full API response structures with correct types
     - PerformerResponse.Aliases: string → []string (TPDB returns array)
     - StudioResponse.ID: string → int (TPDB returns numeric IDs)
     - SiteInfo.ID: string → int (scenes reference studios by number)
   - mapper.go: Maps TPDB responses to internal models
     - Converts aliases array to comma-separated string
     - Converts numeric studio IDs to strings using strconv.Itoa()
   - scraper.go: Real HTTP client with Bearer token auth
     - SearchPerformers, SearchStudios, SearchScenes implemented
     - GetPerformerByID, GetStudioByID, GetSceneByID implemented

2. CLI Auto-Fetch (cmd/goondex/main.go):
   - performer-search: Auto-fetches from TPDB if local DB empty
   - studio-search: Auto-fetches from TPDB if local DB empty
   - scene-search: Auto-fetches basic metadata (no relationships)
   - Graceful handling of missing TPDB_API_KEY
   - Import → search again to get local IDs

3. Documentation (docs/):
   - INDEX.md: Documentation overview and navigation
   - ARCHITECTURE.md: System design, data flow, component diagrams
   - DATABASE_SCHEMA.md: Complete schema with relationships and indexes
   - CLI_REFERENCE.md: All commands with examples
   - TPDB_INTEGRATION.md: API guide, data mapping, best practices

4. Fixes:
   - .gitignore: Fixed pattern to allow cmd/goondex/* and cmd/goondexd/*
   - README: Updated to reflect TPDB integration and auto-fetch

Testing:
-  performer-search "Riley Reid" - auto-fetched 2 performers, cached
-  studio-search "Brazzers" - auto-fetched 12 studios, cached
-  Aliases now display correctly as comma-separated list
-  Studio IDs properly converted from numeric to string

API Integration:
- Base URL: https://api.theporndb.net
- Authentication: Bearer token via TPDB_API_KEY env var
- Endpoints: /performers, /sites, /scenes
- Rate limiting handled with warnings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 22:04:23 -05:00

75 lines
2.5 KiB
Markdown

# Goondex Documentation
**Version**: v0.1.0-dev2
**Last Updated**: 2025-11-14
## Welcome to Goondex
Goondex is a fast, local-first media indexer for adult content. It ingests metadata from external sources (like ThePornDB), normalizes it, and stores it in a lightweight SQLite database for quick search and retrieval.
## Documentation Structure
### Getting Started
- [Installation Guide](INSTALLATION.md) - Setup and installation
- [Quick Start](QUICKSTART.md) - Get up and running in 5 minutes
- [CLI Reference](CLI_REFERENCE.md) - Complete command-line interface documentation
### Core Concepts
- [Architecture Overview](ARCHITECTURE.md) - System design and components
- [Database Schema](DATABASE_SCHEMA.md) - SQLite database structure
- [Data Models](DATA_MODELS.md) - Internal data structures
### Integration
- [TPDB Integration](TPDB_INTEGRATION.md) - ThePornDB API integration guide
- [Scraper System](SCRAPER_SYSTEM.md) - How scrapers work
- [Adding New Sources](ADDING_SOURCES.md) - Implementing new data sources
### Development
- [Development Guide](DEVELOPMENT.md) - Setting up a development environment
- [Contributing](CONTRIBUTING.md) - How to contribute to Goondex
- [API Design](API_DESIGN.md) - Internal API design principles
- [Testing](TESTING.md) - Testing strategies and tools
### Configuration
- [Configuration Reference](CONFIGURATION.md) - All configuration options
- [Metadata Strategies](METADATA_STRATEGIES.md) - Field merge strategies (Stash-inspired)
### Roadmap
- [Roadmap](ROADMAP.md) - Future plans and versioning
- [Changelog](CHANGELOG.md) - Version history and changes
## Key Features
### Current (v0.1.0-dev2)
- ✅ SQLite database with WAL mode
- ✅ Full CRUD operations for performers, studios, scenes, and tags
- ✅ TPDB scraper with real API integration
- ✅ CLI search commands (local database)
- ✅ CLI import commands (fetch from TPDB)
- ✅ Relationship management (scenes ↔ performers, scenes ↔ tags)
### Planned
- ⏳ Stash-style metadata resolution (field strategies)
- ⏳ Image caching and management
- ⏳ TUI (Terminal UI) browser
- ⏳ Background daemon (goondexd)
- ⏳ Web UI
## Quick Links
- **GitHub**: [Your Repo URL]
- **Issue Tracker**: [Your Repo URL]/issues
- **ThePornDB**: https://theporndb.net
- **API Documentation**: https://api.theporndb.net/docs
## Support
For help and support:
1. Check the [Troubleshooting Guide](TROUBLESHOOTING.md)
2. Search [existing issues](issues)
3. Create a new issue if needed
## License
[Your License]