Skip to content

daemonXid/media-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ₯ Media Platform

AI-Powered Vision Analysis & Research Management System

🌐 Live Demo: https://mutsa.daemonx.cc

A comprehensive media analysis platform built on the DAEMON Stack. This platform integrates advanced computer vision capabilities with intelligent research paper management, providing a unified system for media ingestion, AI analysis, and knowledge management.

Python 3.12+ Django 5 HTMX License: MIT


✨ Features

1. πŸ‘οΈ Vision AI Analysis

  • Media Ingestion: Upload images and videos (including YouTube links via yt-dlp)
  • AI-Powered Analysis: Object detection, motion tracking, and visual data analysis
  • Computer Vision: Integration with MediaPipe and YOLO for advanced vision tasks
  • Interactive Viewer: Frame-by-frame video viewer with AI annotation overlay

2. πŸ“„ Smart Paper Management

  • PDF Parsing: Automatic metadata extraction from research papers
  • Knowledge Graph: Link related papers and build citation networks
  • Semantic Search: AI-powered search through research database
  • Annotation System: Highlight and annotate important sections

3. πŸ€– AI Chat Interface

  • Multi-Provider Support: HuggingFace (Free) β†’ DeepSeek (Quality) β†’ OpenRouter (Multi-Model)
  • Contextual Assistance: Get help analyzing media and understanding research
  • Streaming Responses: Real-time AI interaction with markdown support

πŸ› οΈ Technology Stack

This project uses the DAEMON Stack architecture:

Backend

  • Framework: Django 5 + Django Ninja (REST API)
  • Language: Python 3.12+ (Strict Type Hints)
  • Server: Granian (Rust-based ASGI)
  • Database: PostgreSQL with pgvector
  • Cache: Redis
  • Task Queue: Taskiq

Frontend

  • Hypermedia: HTMX (Server-driven interactivity)
  • Reactivity: Alpine.js (Client-side state)
  • Styling: Tailwind CSS
  • Components: Django Components

AI & Vision

  • Providers: HuggingFace, DeepSeek, OpenRouter
  • Vision: MediaPipe, OpenCV, YOLO
  • Framework: Pydantic AI, Instructor, Outlines

Infrastructure

  • Package Manager: uv (Python), bun (JavaScript)
  • Containerization: Docker + Docker Compose
  • Deployment: Coolify-ready
  • Monitoring: Logfire, Sentry

πŸš€ Quick Start

Prerequisites

  • Python 3.12+
  • uv (Python package manager): curl -LsSf https://astral.sh/uv/install.sh | sh
  • bun (JavaScript runtime): curl -fsSL https://bun.sh/install | bash
  • Docker & Docker Compose (for production)

Development Setup

# 1. Clone the repository
git clone https://github.com/daemonXid/media-platform.git
cd media-platform

# 2. Environment Configuration
cp .env.example .env
# Edit .env with your credentials (AI API keys, database settings, etc.)

# 3. Install Dependencies
just setup

# 4. Start Development Server
just dev

# 5. Access the Platform
# - Home: http://localhost:2120
# - Admin: http://localhost:2120/admin/
# - API Docs: http://localhost:2120/api/docs

Default Admin Credentials

Username: daemon
Password: daemonkorea2026

Change these immediately after first login!


🐳 Production Deployment

Docker Deployment

# Build and deploy the full stack
just deploy

# View logs
just deploy-logs

# Stop the stack
just deploy-down

Coolify Deployment

  1. Create a new service in Coolify
  2. Set the compose file to docker-compose.prod.yml
  3. Configure environment variables from .env.example
  4. Deploy!

πŸ“ Project Structure

media-platform/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ config/              # Django settings & URLs
β”‚   β”œβ”€β”€ modules/             # Modular application structure
β”‚   β”‚   β”œβ”€β”€ base/            # Core modules (auth, health, etc.)
β”‚   β”‚   β”œβ”€β”€ ai/              # AI provider abstraction & chatbot
β”‚   β”‚   └── custom/          # Project-specific modules
β”‚   β”‚       β”œβ”€β”€ vision/      # Vision AI analysis
β”‚   β”‚       └── smart_paper/ # Research paper management
β”‚   β”œβ”€β”€ templates/           # Global templates
β”‚   └── static/              # Static assets
β”œβ”€β”€ crates/                  # Rust performance modules (optional)
β”œβ”€β”€ scripts/                 # Utility scripts
β”œβ”€β”€ Dockerfile               # Production container
β”œβ”€β”€ docker-compose.yml       # Development infrastructure
β”œβ”€β”€ docker-compose.prod.yml  # Production stack
β”œβ”€β”€ Justfile                 # Task automation
β”œβ”€β”€ pyproject.toml           # Python dependencies
└── package.json             # JavaScript dependencies

πŸ“š Available Commands

# Development
just dev          # Start development server
just dev-lite     # Start without Docker (SQLite)
just build        # Build frontend assets
just mig          # Run database migrations
just superuser    # Create admin user

# Quality Assurance
just test         # Run tests
just test-cov     # Run tests with coverage
just lint         # Run linters
just fmt          # Format code

# Production
just prod         # Run production server locally
just deploy       # Deploy Docker stack
just deploy-logs  # View production logs

# Utilities
just shell        # Django shell
just modules      # List auto-discovered modules
just clean        # Clean build artifacts

πŸ”‘ Environment Variables

Key environment variables to configure in .env:

Core Application

  • SECRET_KEY - Django secret key (auto-generated during setup)
  • DEBUG - Debug mode (true/false)
  • ALLOWED_HOSTS - Allowed hostnames

Database

  • POSTGRES_DB - Database name
  • POSTGRES_USER - Database user
  • POSTGRES_PASSWORD - Database password
  • POSTGRES_HOST - Database host

AI Providers

  • AI_PROVIDER - Active provider (huggingface/deepseek/openrouter)
  • HUGGINGFACE_API_KEY - HuggingFace API token
  • DEEPSEEK_API_KEY - DeepSeek API key
  • OPENROUTER_API_KEY - OpenRouter API key

Monitoring (Optional)

  • SENTRY_DSN - Sentry error tracking
  • LOGFIRE_TOKEN - Logfire observability

See .env.example for the complete list.


🎯 Module Architecture

This project follows the DAEMON Stack modular monolith pattern:

  • Vertical Slicing: Each module contains its own models, views, templates, and logic
  • Auto-Discovery: Modules are automatically registered (no manual INSTALLED_APPS editing)
  • Interface Pattern: Modules communicate through well-defined interfaces
  • Self-Contained: Each module can be developed, tested, and deployed independently

Core Modules (Base)

  • accounts - User authentication & profiles
  • core - Homepage & global utilities
  • health - Health check endpoints
  • settings - Site-wide configuration

AI Modules

  • providers - AI provider abstraction layer
  • chatbot - AI chat interface

Custom Modules

  • vision - Vision AI analysis system
  • smart_paper - Research paper management

πŸ”’ Security Best Practices

  • βœ… Secret key rotation via environment variables
  • βœ… CSRF protection enabled
  • βœ… SQL injection prevention (ORM)
  • βœ… XSS protection (Django templates)
  • βœ… Secure headers (django-cors-headers)
  • βœ… Rate limiting (django-axes)
  • βœ… HTTPS redirect in production

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

Built with the DAEMON Stack philosophy:

  • Simple > Complex
  • Strict Modularity
  • Vertical Slicing
  • Modern Performance

Powered by:


Made with πŸŽ₯ by xid

About

media-platform, using mediapipe, openpose, pdf converter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published