https://github.com/simplicityguy/apollonia
https://github.com/simplicityguy/apollonia
amqp catalog catalogue docker docker-image machine-learning music neo4j postgresql python3 video
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/simplicityguy/apollonia
- Owner: SimplicityGuy
- License: mit
- Created: 2023-06-25T16:30:41.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-12-30T19:08:35.000Z (6 months ago)
- Last Synced: 2026-01-03T16:39:23.881Z (6 months ago)
- Topics: amqp, catalog, catalogue, docker, docker-image, machine-learning, music, neo4j, postgresql, python3, video
- Language: Python
- Homepage:
- Size: 1.64 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Apollonia - Intelligent Media Catalog System
## ๐ CI/CD Status
[](https://github.com/SimplicityGuy/apollonia/actions/workflows/ci.yml)
[](https://github.com/SimplicityGuy/apollonia/actions/workflows/benchmarks.yml)
[](https://github.com/SimplicityGuy/apollonia/actions/workflows/dependencies.yml)
## ๐ฆ Project Info

[](https://www.python.org/downloads/release/python-3120/)
[](https://nodejs.org/)
[](https://www.docker.com/)
## ๐ ๏ธ Code Quality
[](https://github.com/pre-commit/pre-commit)
[](https://github.com/astral-sh/ruff)
[](http://mypy-lang.org/)
[](https://github.com/astral-sh/ruff)
[](https://github.com/astral-sh/uv)
## ๐งช Testing & Security
[](https://docs.pytest.org/)
[](https://vitest.dev/)
[](https://bandit.readthedocs.io/)
[](https://pypi.org/project/pip-audit/)
[](https://trivy.dev/)
## ๐ Project Metrics
[](https://github.com/SimplicityGuy/apollonia/issues)
[](https://github.com/SimplicityGuy/apollonia/pulls)
[](https://github.com/SimplicityGuy/apollonia/commits/main)
[](https://github.com/SimplicityGuy/apollonia)
[](https://codecov.io/gh/SimplicityGuy/apollonia)
Pronunciation: _aยทpolยทlonยทia_
## Overview
Apollonia is a comprehensive media catalog system that automatically detects, classifies, and
analyzes audio and video files using machine learning. Built with a modern microservices
architecture, it provides real-time processing, advanced analytics, and a responsive web interface
for managing large media collections.
## Key Features
- **Automatic Media Detection**: Monitors directories and automatically processes new media files
- **ML-Powered Analysis**: Uses TensorFlow and Essentia for audio/video feature extraction
- **Real-time Processing**: Event-driven architecture with AMQP message queuing
- **Comprehensive API**: RESTful and GraphQL APIs with JWT authentication
- **Modern Web Interface**: React-based UI with real-time updates and analytics
- **Scalable Architecture**: Microservices design with Docker containerization
- **Multi-format Support**: Handles various audio (MP3, WAV, FLAC) and video (MP4, AVI, MOV) formats
## ๐ ๏ธ Technologies & Tools
### Core Technologies
- **Backend**: [Python 3.12](https://www.python.org/) | [FastAPI](https://fastapi.tiangolo.com/) |
[Strawberry GraphQL](https://strawberry.rocks/)
- **Frontend**: [React 18](https://react.dev/) | [TypeScript](https://www.typescriptlang.org/) |
[Vite](https://vitejs.dev/) | [Tailwind CSS](https://tailwindcss.com/)
- **Machine Learning**: [TensorFlow](https://www.tensorflow.org/) |
[Essentia](https://essentia.upf.edu/) | [Librosa](https://librosa.org/)
- **Databases**: [PostgreSQL](https://www.postgresql.org/) | [Neo4j](https://neo4j.com/) |
[Redis](https://redis.io/)
- **Message Queue**: [RabbitMQ](https://www.rabbitmq.com/) |
[aio-pika](https://aio-pika.readthedocs.io/)
### Development Tools
- **Package Management**: [uv](https://github.com/astral-sh/uv) | [npm](https://www.npmjs.com/)
- **Task Runner**: [Just](https://just.systems/) | [Taskipy](https://github.com/illBeRoy/taskipy)
- **Code Quality**: [Ruff](https://docs.astral.sh/ruff/) | [mypy](http://mypy-lang.org/) |
[ESLint](https://eslint.org/) | [Prettier](https://prettier.io/)
- **Testing**: [pytest](https://docs.pytest.org/) | [Vitest](https://vitest.dev/) |
[Testing Library](https://testing-library.com/)
- **Git Hooks**: [pre-commit](https://pre-commit.com/)
### Infrastructure & DevOps
- **Containerization**: [Docker](https://www.docker.com/) |
[Docker Compose](https://docs.docker.com/compose/)
- **CI/CD**: [GitHub Actions](https://github.com/features/actions)
- **Container Registry**:
[GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry)
- **Monitoring**: [Prometheus](https://prometheus.io/) | [Grafana](https://grafana.com/) |
[Jaeger](https://www.jaegertracing.io/)
### Frontend Libraries
- **UI Components**: [Radix UI](https://www.radix-ui.com/) | [Headless UI](https://headlessui.com/)
| [Heroicons](https://heroicons.com/)
- **State Management**: [Zustand](https://github.com/pmndrs/zustand) |
[TanStack Query](https://tanstack.com/query/)
- **Data Visualization**: [Recharts](https://recharts.org/) |
[Framer Motion](https://www.framer.com/motion/)
- **Forms**: [React Hook Form](https://react-hook-form.com/) | [Zod](https://zod.dev/)
### Media Processing
- **Audio Analysis**: [xxhash](https://github.com/Cyan4973/xxHash) | [NumPy](https://numpy.org/) |
[MoviePy](https://zulko.github.io/moviepy/)
- **File Monitoring**: [watchdog](https://github.com/gorakhargosh/watchdog)
- **Data Serialization**: [orjson](https://github.com/ijl/orjson)
## Architecture
The system consists of several specialized services:
- **[Media Ingestor](docs/services/ingestor.md)**: Monitors directories and detects media files
- **[ML Analyzer](docs/services/analyzer.md)**: Extracts features using TensorFlow/Essentia models
- **[Database Populator](docs/services/populator.md)**: Stores metadata in PostgreSQL and Neo4j
- **[API Service](docs/services/api.md)**: Provides REST and GraphQL endpoints
- **[Frontend](frontend/README.md)**: React-based web application
## Requirements
- Python 3.12 (for TensorFlow/Essentia compatibility)
- Docker and Docker Compose for containerized deployment
- PostgreSQL for primary data storage
- RabbitMQ for message queuing
- Redis for caching
- Neo4j for graph relationships (optional)
- Node.js 22+ for frontend development
## Quick Start
### Prerequisites
- Docker and Docker Compose (v2.0+)
- Git
- 8GB RAM minimum (16GB recommended for ML features)
- 20GB free disk space
### Installation
1. **Clone the repository**:
```bash
git clone https://github.com/SimplicityGuy/apollonia.git
cd apollonia
```
1. **Start the services**:
```bash
docker-compose up -d
```
This will start:
- PostgreSQL database
- RabbitMQ message broker
- Redis cache
- Neo4j graph database
- All microservices
- Frontend web application
1. **Monitor the logs**:
```bash
docker-compose logs -f
```
1. **Access the web interface**:
Open http://localhost:3000 in your browser
Default credentials:
- Username: `admin`
- Password: `admin123`
1. **Add media files**:
```bash
# Copy files to monitored directories
cp your-music/* ./data/music/
cp your-videos/* ./data/videos/
# Or use the web interface upload feature
```
The system will automatically:
- Detect new files
- Extract metadata
- Analyze content using ML models
- Index for searching
- Generate thumbnails and previews
## Development
For detailed development instructions, see the
[Development Guide](docs/development/development-guide.md).
### Quick Development Setup
The project uses [Just](https://just.systems/) as a command runner for all development tasks.
```bash
# Install Just (if not already installed)
cargo install just
# Or on macOS
brew install just
# Set up development environment
just install
# Start all services
just up
# Run tests
just test
# Run quality checks
just check
# See all available commands
just --list
```
### Alternative Setup (without Just)
```bash
# Install uv package manager
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
uv sync --all-extras
# Install pre-commit hooks
uv run task install-hooks
# Run quality checks
uv run task check
```
### Development Tools Overview
- **๐ Package Manager**: [uv](https://github.com/astral-sh/uv) - Ultra-fast Python package installer
and resolver
- **๐ฏ Task Runner**: [Just](https://just.systems/) - Command runner for development workflows
- **๐งน Code Formatter**: [Ruff](https://docs.astral.sh/ruff/) - Extremely fast Python linter and
formatter
- **๐ Type Checker**: [mypy](http://mypy-lang.org/) - Static type checker for Python
- **๐งช Testing**: [pytest](https://docs.pytest.org/) for Python | [Vitest](https://vitest.dev/) for
Frontend
- **๐ก๏ธ Security**: [Bandit](https://bandit.readthedocs.io/) |
[pip-audit](https://pypi.org/project/pip-audit/) | [Trivy](https://trivy.dev/)
- **๐ช Git Hooks**: [pre-commit](https://pre-commit.com/) - Multi-language pre-commit framework
- **๐ฆ Containerization**: [Docker](https://www.docker.com/) with multi-stage builds and health
checks
## Documentation
- **Getting Started**
- [Quick Start Guide](docs/getting-started.md) - Initial setup and usage
- [Architecture Overview](docs/architecture/overview.md) - System design and components
- [API Documentation](docs/api/api-reference.md) - REST and GraphQL reference
- **Development**
- [Development Guide](docs/development/development-guide.md) - Setup and workflow instructions
- [Python Version Notes](docs/development/python-version-notes.md) - Python version strategy
- [Frontend Development](frontend/README.md) - React application guide
- [Testing Guide](docs/development/testing.md) - Unit, integration, and E2E tests
- **Services**
- [Media Ingestor](docs/services/ingestor.md) - File monitoring service
- [ML Analyzer](docs/services/analyzer.md) - Machine learning analysis
- [Database Populator](docs/services/populator.md) - Data persistence service
- [API Service](docs/services/api.md) - REST and GraphQL endpoints
- **Operations**
- [Docker Deployment](docs/operations/docker-deployment.md) - Container deployment guide
- [Configuration](docs/operations/configuration.md) - Environment variables and settings
- [Performance Tuning](docs/operations/performance.md) - Optimization guide
- [Monitoring](docs/operations/monitoring.md) - Metrics and observability
- **CI/CD**
- [GitHub Workflows](docs/development/github-workflows.md) - CI/CD pipeline documentation
- [Composite Actions](docs/development/composite-actions.md) - Reusable workflow components
- [Emoji Logging Convention](docs/development/logging-convention.md) - Standardized logging with
emojis
- [Justfile Commands](docs/development/justfile-guide.md) - Development task runner reference
- **Contributing**
- [Contributing Guide](CONTRIBUTING.md) - How to contribute
- [Claude Code Guide](CLAUDE.md) - Instructions for AI-assisted development
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Author
Robert Wlodarczyk - [robert@simplicityguy.com](mailto:robert@simplicityguy.com)