{"id":47777070,"url":"https://github.com/divin/tana","last_synced_at":"2026-04-03T12:03:25.552Z","repository":{"id":347773498,"uuid":"1195200001","full_name":"divin/tana","owner":"divin","description":"A lightweight Rust CLI tool for tracking movies, TV series, and books consumed.","archived":false,"fork":false,"pushed_at":"2026-03-29T13:21:02.000Z","size":126,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-29T15:32:19.126Z","etag":null,"topics":["books","cli","command-line-tool","media-tracker","movies","rust","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/divin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-29T11:15:40.000Z","updated_at":"2026-03-29T13:21:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/divin/tana","commit_stats":null,"previous_names":["divin/tana"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/divin/tana","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divin%2Ftana","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divin%2Ftana/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divin%2Ftana/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divin%2Ftana/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/divin","download_url":"https://codeload.github.com/divin/tana/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divin%2Ftana/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31349561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T08:03:20.796Z","status":"ssl_error","status_checked_at":"2026-04-03T08:00:37.834Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["books","cli","command-line-tool","media-tracker","movies","rust","sqlite"],"created_at":"2026-04-03T12:03:24.945Z","updated_at":"2026-04-03T12:03:25.547Z","avatar_url":"https://github.com/divin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🗄️ Tana - Media Tracking CLI Tool\n\nTana (Japanese: 棚 for \"shelf\") is a Rust-powered media tracker featuring a lightweight CLI, REST API server, and modern SvelteKit web dashboard. Built with SQLite for persistent storage and designed with extensibility in mind. Includes containerized deployment with Docker and automated CI/CD via GitHub Actions for testing and GHCR releases. I built it mainly for myself to keep track of my media consumption, but it's open source and contributions are welcome!\n\n## 🎯 Multi-Interface Design\n\nTana is designed to work seamlessly across multiple interfaces. The command-line interface is the primary way to interact with your media library, offering full power and flexibility. The modern SvelteKit web interface is an optional companion that provides a visual, browser-based way to manage your collection. The REST API enables programmatic access and custom integrations. Whether you prefer the terminal, web browser, or API—Tana adapts to your workflow.\n\n- **Lightweight CLI**: Fast, scriptable, and perfect for automation\n- **Modern Web UI**: Browse and manage your media with a SvelteKit-powered interface\n- **REST API**: Programmatic access for custom integrations and tools\n- **Your Choice**: Use any combination—they all work together seamlessly\n\n## 🚀 Quick Start\n\n### Installation\n```bash\ncargo install --path .\n```\n\n### Basic Usage\n```bash\n# Add a movie\ntana add movie \"The Matrix\" --rating 9.0\n\n# Add a book\ntana add book \"1984\" --rating 8.5\n\n# Show all movies\ntana show movies\n\n# Show all books\ntana show books\n\n# Edit an entry\ntana edit movie 1 --rating 9.5\n```\n\nFor more detailed commands and options, run:\n```bash\ntana --help\n```\n\n## 📸 Screenshots\n\nGet a glimpse of Tana's web interface:\n\n### Dashboard\n![Dashboard Overview](assets/dashboard.png)\nView your entire media collection at a glance with statistics and quick access.\n\n### Movies Library\n![Movies View](assets/movies.png)\nBrowse and organize your movie collection with filters and sorting options.\n\n### Search \u0026 Filter\n![Search \u0026 Filter](assets/search.png)\nQuickly find what you're looking for with powerful search and filtering capabilities.\n\n### Item Details\n![Item Details](assets/details.png)\nView comprehensive information about each media item including ratings and descriptions.\n\n### Edit Entry\n![Edit Entry](assets/edit.png)\nEasily update media details with an intuitive editing interface.\n\n## 🛠️ Technology Stack\n\nTana is built with modern, production-ready technologies:\n\n**Backend:**\n- **Rust** - Fast, safe, and reliable systems programming\n- **Axum** - Ergonomic and modular web framework\n- **SQLite** - Lightweight, serverless database\n- **Tokio** - Async runtime for high performance\n\n**Frontend:**\n- **SvelteKit** - Modern, full-stack framework with SSR support\n- **Svelte 5** - Reactive, component-driven UI\n- **TypeScript** - Type-safe development\n- **Vite** - Lightning-fast build tool\n\n**DevOps \u0026 Deployment:**\n- **Docker \u0026 Docker Compose** - Containerized deployment\n- **GitHub Actions** - Automated testing and CI/CD\n- **GitHub Container Registry (GHCR)** - Container image hosting\n\n## 🐳 Docker Deployment\n\n### Two Docker Compose Configurations\n\nTana includes two Docker Compose files for different use cases:\n\n- **`docker-compose.yml`** (Production): Uses pre-built images from GitHub Container Registry (GHCR). Recommended for running released versions.\n- **`docker-compose.dev.yml`** (Development): Builds images locally from source code. Use this if you're developing or running from the latest code.\n\n### Quick Start with Released Images (Production)\n\nFor the easiest way to run a released version of Tana:\n\n```bash\n# Copy the example environment file\ncp .env.example .env\n\n# Start the application\ndocker-compose up\n```\n\nThis command will:\n- Pull pre-built Docker images from GitHub Container Registry\n- Start the API server on `http://localhost:8080`\n- Start the web interface on `http://localhost:3000`\n- Persist your data locally\n\n### Quick Start with Local Build (Development)\n\nTo build and run from the latest source code:\n\n```bash\ndocker-compose -f docker-compose.dev.yml up\n```\n\nThis command will:\n- Build optimized Docker images locally from source code\n- Start the API server on `http://localhost:8080`\n- Start the web interface on `http://localhost:3000`\n- Create and persist data locally\n\n### Access the Application\n\nOnce the services are running:\n- **Web Interface**: http://localhost:3000\n- **REST API**: http://localhost:8080/api\n- **API Documentation**: http://localhost:8080/api/docs (Swagger UI with interactive testing)\n- **Health Check**: http://localhost:8080/api/health\n\n### REST API Features\n\nThe REST API provides full programmatic access to manage your media library:\n- **CRUD Operations**: Create, read, update, and delete media entries\n- **Search \u0026 Filtering**: Query your collection by title, type, rating, and more\n- **Image Management**: Upload and serve media images\n- **Health Monitoring**: Monitor service status and availability\n- **Swagger UI**: Interactive API documentation and testing interface at `/api/docs`\n\nYou can use the REST API with tools like `curl`, Postman, or any HTTP client in your preferred programming language.\n\n### Data Persistence\n\nBoth the database and media images are automatically persisted in a Docker named volume called `tana-data`. This means your data will survive container restarts and updates.\n\nTo view the current data location:\n```bash\ndocker volume inspect tana-data\n```\n\nTo completely remove all data:\n```bash\ndocker-compose down -v\n```\n\n### Build Individual Services\n\nIf you want to build the Docker images separately:\n\n```bash\n# Build backend API\ndocker build -t tana-api backend/\n\n# Build frontend web interface\ndocker build -t tana-web frontend/\n\n# Run backend\ndocker run -p 8080:8080 -v tana-data:/home/tana/.local/share/tana tana-api\n\n# Run frontend (in another terminal)\ndocker run -p 3000:3000 tana-web\n```\n\n### Environment Variables\n\nBoth Docker Compose configurations support the following environment variables:\n\n**Available Variables:**\n- `TANA_VERSION`: Version of Docker images to use (default: `latest`). Can be a specific release like `v0.1.0` or `latest`.\n- `RUST_LOG`: Logging level for the backend API (default: `info`, options: `trace`, `debug`, `info`, `warn`, `error`)\n\n**Configuration:**\n\nA `.env.example` file is provided as a template. To customize settings:\n\n```bash\ncp .env.example .env\n# Edit .env with your desired values\ndocker-compose up\n```\n\nExample `.env` file:\n```bash\nTANA_VERSION=latest\nRUST_LOG=info\n```\n\nTo pin a specific release version:\n```bash\nTANA_VERSION=v0.1.0\nRUST_LOG=debug\n```\n\n### Health Checks\n\nBoth services include health checks that run every 10 seconds. You can view the health status with:\n\n```bash\ndocker-compose ps\n```\n\nLook for the `(healthy)` or `(unhealthy)` status indicators.\n\n### Stop and Clean Up\n\n```bash\n# Stop all services\ndocker-compose down\n\n# Stop and remove volumes (delete all data)\ndocker-compose down -v\n\n# Remove images\ndocker-compose down --rmi all\n```\n\n### Troubleshooting Docker\n\n**API service won't start:**\n- Check logs: `docker-compose logs api`\n- Ensure port 8080 is available\n- Verify the database volume has write permissions\n\n**Web interface won't load:**\n- Check logs: `docker-compose logs web`\n- Ensure port 3000 is available\n- Verify the API service is running and healthy\n\n**Permission denied on data volume:**\n```bash\ndocker-compose down -v\ndocker-compose up\n```\n\n**Port already in use:**\nModify the port mappings in `docker-compose.yml`:\n```yaml\napi:\n  ports:\n    - \"8081:8080\"  # Map to 8081 instead\nweb:\n  ports:\n    - \"3001:3000\"  # Map to 3001 instead\n```\n\n## 🤖 AI Disclaimer\n\nThis project was developed with the assistance of GitHub Copilot, an AI code generation tool. I know this is a controversial topic. While Copilot helped me speed up development and provided useful suggestions, all code was reviewed and edited by me to ensure quality and correctness. The final implementation reflects my design choices and coding style. Below is a bit of my take on using AI tools in software development, if you're interested.\n\n\u003cdetails\u003e\n  \u003csummary\u003eMy Take on AI Assistance\u003c/summary\u003e\n  \n  \u003e I started programming in 2018 and have therefore been coding for nearly 10 years in various languages (mainly Python, Lua, C++, and Rust). I'm still learning every day, but I would argue I have a fairly good understanding of programming concepts, design patterns, and best practices. I'm not particularly interested in vibe-coding (specifically the part where AI writes code without human review), but I see AI tools like Copilot as powerful assistants that can help with boilerplate code, suggest solutions, and speed up development. As long as the developer maintains control, reviews the code, and ensures it meets quality standards, I think AI can be a valuable tool in the software development process. It's not about replacing developers but augmenting their capabilities. In this project, I used Copilot to generate code snippets, but I made sure to review and edit everything to ensure it aligned with my vision for the project. The end result is a product of both human creativity and AI assistance.\n  \n\u003c/details\u003e\n\n## 📜 License\n\nLicensed under either of\n\n * Apache License, Version 2.0\n   ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license\n   ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## 🔧 Troubleshooting\n\n### Database Not Found\nIf you get a \"database not found\" error, the database will be created automatically on the first run. Make sure the `~/.local/share/tana/` directory exists and is writable.\n\n### Permission Denied\n```bash\nchmod 755 ~/.local/share/tana/\n```\n\n### Clear All Data\n```bash\nrm ~/.local/share/tana/tana.db\n```\n\nThe database will be recreated with a fresh schema on the next run.\n\n### Debug Information\nRun with the `--debug` flag to see detailed logs:\n```bash\ntana --debug show movies\n```\n\n## 🤝 Contributing\n\nContributions are welcome! Please ensure:\n- All tests pass: `cargo test`\n- No warnings: `cargo build`\n- Code is formatted: `cargo fmt`\n- Clippy is happy: `cargo clippy`\n\n---\n\nMade with ❤️ in Rust with support from GitHub Copilot. Happy tracking! 📚🎥","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivin%2Ftana","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivin%2Ftana","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivin%2Ftana/lists"}