mediacamel

MediaCamel - Modern Media Management System

๐ŸŒ A complete, containerized media management system with WebDAV and S3 support, Apache Camel integration, and a modern web interface.

๐ŸŒŸ Features

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                      Client Applications                        โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚  Web App    โ”‚  โ”‚  Mobile App  โ”‚  โ”‚  3rd Party Clients  โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚        โ”‚                   โ”‚                     โ”‚              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                   โ”‚                     โ”‚
         โ–ผ                   โ–ผ                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                      API Gateway (Nginx)                       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ”‚
                  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                  โ”‚                             โ”‚
                  โ–ผ                             โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   WebDAV Server         โ”‚     โ”‚   Backend API           โ”‚
โ”‚  (Nginx + WebDAV)       โ”‚     โ”‚  (Node.js + Express)    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ”‚                                 โ”‚
            โ”‚                                 โ”‚
            โ–ผ                                 โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Storage Backend       โ”‚     โ”‚   Database (PostgreSQL)  โ”‚
โ”‚  โ€ข Local Filesystem     โ”‚     โ”‚   - User accounts       โ”‚
โ”‚  โ€ข S3-Compatible        โ”‚     โ”‚   - File metadata       โ”‚
โ”‚  โ€ข WebDAV Mounts        โ”‚     โ”‚   - Access controls     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

License: MIT Docker WebDAV

๐Ÿš€ Quick Start

Prerequisites

Installation

  1. Clone the repository
    git clone https://github.com/yourusername/mediacamel.git
    cd mediacamel
    
  2. Setup the environment
    make setup
    

    This will:

    • Create a .env file from .env.example if it doesnโ€™t exist
    • Create necessary directories
    • Set up file permissions
  3. Configure (optional) Edit the .env file to customize your setup:
    cp .env.example .env
    nano .env
    

    Key settings to review:

    • WEBDAV_USER and WEBDAV_PASSWORD
    • MINIO_ROOT_USER and MINIO_ROOT_PASSWORD for S3 access
    • Port configurations if you need to change defaults
    • Storage paths and S3 bucket settings
  4. Build and start the services
    make build
    make up
    
  5. Access the services
    • Web Interface: http://localhost:9083
    • MinIO Console: http://localhost:9001 (default credentials: minioadmin/minioadmin)
    • API Documentation: http://localhost:9084/api-docs
    • WebDAV Access: http://localhost:9081/webdav
  6. Verify the installation Check the logs to ensure all services are running:
    make logs
    
    make status
    

    This will show all running services and their status.

  7. Access the services
    • Web Dashboard: http://localhost:8085
    • WebDAV Server: http://localhost:8081
    • Filestash Client: http://localhost:8082
    • API: http://localhost:8084/health

๐Ÿ› ๏ธ Makefile Commands

make setup       # Setup project environment
make build      # Build all Docker containers
make up         # Start all services
make down       # Stop and remove all containers
make restart    # Restart all services
make logs       # Show logs for all services
make clean      # Remove all containers, networks, and volumes
make status     # Show service status and URLs
make test-webdav # Test WebDAV connection
make test-api   # Test API endpoints

๐ŸŒŸ Features

๐Ÿ—๏ธ System Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Web Users     โ”‚    โ”‚  Filestash Web   โ”‚    โ”‚   Apache Camel  โ”‚    โ”‚   MedaVault      โ”‚
โ”‚                 โ”‚โ”€โ”€โ”€โ–ถโ”‚     Client       โ”‚    โ”‚   Integration   โ”‚โ”€โ”€โ”€โ–ถโ”‚   Photo Vault    โ”‚
โ”‚  (Upload files) โ”‚    โ”‚  (WebDAV GUI)    โ”‚    โ”‚   (Processing)  โ”‚    โ”‚   (Storage)      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ”‚                        โ”‚
                                โ–ผ                        โ–ผ
                       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                       โ”‚   WebDAV Server  โ”‚    โ”‚   PostgreSQL    โ”‚
                       โ”‚   (nginx)        โ”‚    โ”‚   Database      โ”‚
                       โ”‚   Port: 8081     โ”‚    โ”‚   (Metadata)    โ”‚
                       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”Œ Service Ports

Service Port Description
WebDAV Server 8081 WebDAV file access
Filestash Client 8082 Web-based file manager
Status Endpoint 8084 WebDAV server status
MedaVault Backend 8084 REST API and business logic
Web Dashboard 8085 Admin dashboard and monitoring

๐Ÿ› ๏ธ Prerequisites

๐Ÿงฉ System Components

1. WebDAV Server (nginx)

2. Filestash Web Client

3. Apache Camel Integration

4. MedaVault Backend API

5. Web Dashboard

5. Web Dashboard - Port 8085

๐Ÿš€ Quick Start

Prerequisites

1. Clone and Setup

# Clone the repository
git clone https://github.com/wronai/mediacamel.git
cd mediacamel

# Copy and configure environment variables
cp .env.example .env
# Edit .env file if needed

# Make setup script executable
chmod +x setup.sh

2. Start the System

# Build and start all services
./setup.sh

3. Access the Services

4. WebDAV Credentials

URL: http://localhost:8081
Username: webdav
Password: medavault123

5. Test the Connection

# Run the test script
./scripts/test-webdav.sh

๐Ÿ“ค File Upload Methods

1. Using Filestash (Easiest)

  1. Open http://localhost:8082
  2. Select โ€œWebDAVโ€ as storage type
  3. Enter WebDAV credentials:
    • URL: http://webdav-server
    • Username: webdav
    • Password: medavault123
  4. Drag and drop files to upload

2. Direct WebDAV Access

Using curl:

curl -u webdav:medavault123 \
     -T your-file.jpg \
     "http://localhost:8081/your-file.jpg"

Using rclone:

  1. Configure rclone:
    rclone config create webdav webdav \
      url=http://localhost:8081 \
      vendor=other \
      user=webdav \
      pass=medavault123
    
  2. Copy files:
    rclone copy local-folder/ webdav:
    

3. Mount as Network Drive

Linux (davfs2):

# Install davfs2
sudo apt install davfs2

# Add user to davfs2 group
sudo usermod -aG davfs2 $(whoami)

# Mount WebDAV
sudo mount -t davfs http://localhost:8081 /mnt/webdav

Windows:

  1. Open File Explorer
  2. Right-click โ€œThis PCโ€ and select โ€œMap network driveโ€
  3. Enter: \\localhost@8081\
  4. Enter credentials when prompted

macOS:

  1. In Finder, press Cmd+K
  2. Enter: http://localhost:8081
  3. Use โ€œConnect Asโ€ with username/password

๐Ÿ”„ Processing Pipeline

  1. Upload: User uploads file via WebDAV
  2. Detection: Camel integration detects new file
  3. Download: File is downloaded for processing
  4. Processing:
    • Images: Generate thumbnails, extract metadata
    • Videos: Extract metadata, generate previews
    • Documents: Index content, extract text
  5. Storage: File is stored in MedaVault
  6. Cleanup: Optional removal from WebDAV after processing

๐Ÿ“ Project Structure

mediacamel/
โ”œโ”€โ”€ docker-compose.yml          # Main Docker Compose configuration
โ”œโ”€โ”€ .env                       # Environment variables
โ”œโ”€โ”€ config/                    # Configuration files
โ”‚   โ”œโ”€โ”€ nginx/                # Nginx configurations
โ”‚   โ”œโ”€โ”€ filestash/            # Filestash configuration
โ”‚   โ””โ”€โ”€ medavault/            # MedaVault application configs
โ”œโ”€โ”€ camel-integration/         # Apache Camel integration
โ”‚   โ”œโ”€โ”€ Dockerfile
โ”‚   โ”œโ”€โ”€ CamelWebDAVProcessor.groovy
โ”‚   โ””โ”€โ”€ lib/                   # Custom Java/Groovy libraries
โ”œโ”€โ”€ medavault-backend/         # Node.js API
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ””โ”€โ”€ Dockerfile
โ”œโ”€โ”€ web-dashboard/             # React/Vue dashboard
โ”‚   โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ package.json
โ”œโ”€โ”€ storage/                   # Persistent storage
โ”‚   โ”œโ”€โ”€ incoming/             # New uploads
โ”‚   โ”œโ”€โ”€ processed/            # Successfully processed files
โ”‚   โ””โ”€โ”€ failed/               # Failed processing attempts
โ”œโ”€โ”€ scripts/                   # Utility scripts
โ”‚   โ”œโ”€โ”€ setup.sh              # Initial setup
โ”‚   โ”œโ”€โ”€ test-webdav.sh        # WebDAV connection test
โ”‚   โ””โ”€โ”€ backup.sh             # Backup utilities
โ””โ”€โ”€ logs/                     # Application logs

๐Ÿ”„ Storage Configuration

S3 Storage

MedaVault uses MinIO as an S3-compatible object storage backend. Files can be accessed using any S3-compatible client.

Configuration Options:

Example using AWS CLI:

aws --endpoint-url http://localhost:9000 s3 ls s3://medavault

WebDAV Integration

WebDAV is fully supported for both client access and as a storage backend.

Configuration Options:

Mounting WebDAV on Linux:

sudo apt install davfs2
sudo mkdir /mnt/medavault
sudo mount -t davfs http://localhost:9081/webdav /mnt/medavault

๐Ÿš€ Apache Camel Integration

MedaVault includes Apache Camel routes for advanced file processing and integration:

Key Features

Example Route: WebDAV to S3 Sync

from("webdav://:?username=&password=&recursive=true")
    .routeId("webdav-to-s3")
    .log("Processing file: ${header.CamelFileName}")
    .process(exchange -> {
        // Add custom processing logic here
        String fileName = exchange.getIn().getHeader("CamelFileName", String.class);
        exchange.getIn().setHeader("CamelAwsS3Key", "processed/" + fileName);
    })
    .to("aws2-s3://?accessKey=&secretKey=ยฎion=")
    .log("Successfully uploaded ${header.CamelFileName} to S3");

Running Camel Routes

  1. Place your Camel route files in the camel-routes directory
  2. Configure the routes in application.yml
  3. Restart the backend service:
    make restart backend
    

๐Ÿ› ๏ธ System Management

Monitoring Services

# View logs for all services
docker-compose logs -f

# View logs for specific service
docker-compose logs -f service_name

# Check service status
docker-compose ps

Common Tasks

# Restart a specific service
docker-compose restart service_name

# Rebuild and restart a service
docker-compose up -d --build service_name

# Access container shell
docker-compose exec service_name sh

Maintenance

# Backup database
docker-compose exec medavault-db pg_dump -U postgres medavault > backup.sql

# Clean up old files
# Clean processed files older than 7 days
find storage/processed -type f -mtime +7 -delete

# Stop all services
docker-compose down

โš™๏ธ Configuration

Environment Variables

Edit the .env file to configure:

WebDAV Authentication

To change WebDAV credentials:

  1. Edit the .env file:
    WEBDAV_USER=newuser
    WEBDAV_PASSWORD=newpassword
    
  2. Rebuild the WebDAV server:
    docker-compose up -d --build webdav-server
    

Storage Configuration

By default, files are stored in the storage directory. To change this:

  1. Update .env:
    STORAGE_PATH=/path/to/your/storage
    
  2. Ensure the directory exists and has proper permissions
  3. Restart the services

Logging

Logs are stored in the logs directory by default. You can configure log rotation and levels in the respective service configurations.

Camel Processing Rules

Edit config/application.properties to configure processing rules:

# WebDAV connection
webdav.url=http://webdav-server
webdav.username=${WEBDAV_USER}
webdav.password=${WEBDAV_PASSWORD}

# Processing rules
camel.poll.delay=5000
camel.cleanup.processed=true

# MedaVault API
medavault.api.url=http://medavault-backend:8084/api

๐Ÿ›ก๏ธ Security

1. Default Credentials

Change default credentials in the .env file before deploying to production.

2. HTTPS in Production

Always use HTTPS with a valid SSL certificate in production environments.

3. Firewall Rules

Restrict access to ports:

4. Regular Updates

Keep all components updated:

docker-compose pull
docker-compose up -d

๐Ÿค Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development Setup

  1. Install development dependencies:
    # Install Node.js dependencies
    cd medavault-backend
    npm install
       
    # Install frontend dependencies
    cd ../web-dashboard
    npm install
    
  2. Start development servers:
    # Backend with hot-reload
    cd medavault-backend
    npm run dev
       
    # Frontend with hot-reload
    cd ../web-dashboard
    npm run serve
    

๐Ÿ› Troubleshooting

Common Issues

WebDAV Connection Issues

Database Connection Issues

File Permission Issues

If you encounter permission errors:

# Set correct permissions on storage directories
sudo chown -R 1000:1000 storage/
sudo chmod -R 775 storage/

๐Ÿ“„ License

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

๐Ÿ“ง Contact

For issues and feature requests, please open an issue in the repository.


Made with โค๏ธ by the MedaVault Team

๐Ÿ”ง API Endpoints

Authentication

Login

POST /api/auth/login
Content-Type: application/json

{
  "username": "admin",
  "password": "yourpassword"
}

Refresh Token

POST /api/auth/refresh-token
Authorization: Bearer <refresh_token>

Media Management

List Media

GET /api/media
Authorization: Bearer <token>

Upload File

POST /api/media/upload
Authorization: Bearer <token>
Content-Type: multipart/form-data

# Form Data:
# file: <file>
# metadata: {"title":"My File","description":"Description"}

Get Media

GET /api/media/{id}
Authorization: Bearer <token>

User Management

List Users

GET /api/users
Authorization: Bearer <token>

Create User

POST /api/users
Authorization: Bearer <token>
Content-Type: application/json

{
  "username": "newuser",
  "password": "securepassword",
  "email": "user@example.com",
  "role": "user"
}

System Status

Health Check

GET /api/health

System Info

GET /api/system/info
Authorization: Bearer <token>

๐Ÿ“š Additional Resources

WebDAV Clients

Linux

Windows

macOS

Monitoring

Prometheus Metrics

GET /metrics

Log Files

Backup and Restore

Database Backup

# Create backup
docker-compose exec medavault-db pg_dump -U postgres medavault > backup_$(date +%Y%m%d).sql

# Restore from backup
cat backup_file.sql | docker-compose exec -T medavault-db psql -U postgres medavault

File Storage Backup

# Backup storage directory
tar -czvf medavault_storage_backup_$(date +%Y%m%d).tar.gz storage/

# Restore
mkdir -p storage
tar -xzvf medavault_storage_backup.tar.gz

๐Ÿš€ Deployment

Production Deployment

  1. Environment Setup
    # Set production environment
    echo "NODE_ENV=production" >> .env
       
    # Update API URL
    echo "API_URL=https://yourdomain.com/api" >> .env
       
    # Set secure secrets
    openssl rand -base64 32 | sed 's/[^a-zA-Z0-9]//g' | head -c 32
    echo "JWT_SECRET=generated_secret_here" >> .env
    
  2. Start in Production Mode
    docker-compose -f docker-compose.prod.yml up -d
    
  3. Set Up Reverse Proxy (Nginx Example)
    server {
        listen 80;
        server_name yourdomain.com;
        return 301 https://$host$request_uri;
    }
    
    server {
        listen 443 ssl http2;
        server_name yourdomain.com;
    
        ssl_certificate /path/to/cert.pem;
        ssl_certificate_key /path/to/key.pem;
    
        location / {
            proxy_pass http://localhost:8085;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection 'upgrade';
            proxy_set_header Host $host;
            proxy_cache_bypass $http_upgrade;
        }
    
    
        location /api {
            proxy_pass http://localhost:8084;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
        }
    }
    

๐Ÿงช Testing

Run Tests

# Backend tests
cd medavault-backend
npm test

# Frontend tests
cd ../web-dashboard
npm test

Test Coverage

# Backend coverage
cd medavault-backend
npm run test:coverage

# Frontend coverage
cd ../web-dashboard
npm run test:coverage

๐ŸŒŸ Features

Core Features

Advanced Features

๐Ÿ“ˆ Monitoring & Analytics

Built-in Metrics

Integration

๐Ÿ”„ Upgrade Guide

Version 1.0.0 to 2.0.0

  1. Backup your data
  2. Update the repository
  3. Run database migrations
  4. Update environment variables
  5. Restart services

๐Ÿค Community & Support

Getting Help

Contributing

We welcome contributions! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.

๐Ÿ“œ Changelog

[2.0.0] - 2025-06-13

Added

[1.0.0] - 2025-01-01

Added

๐Ÿ“„ License

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

๐Ÿ“ง Contact

For issues and feature requests, please open an issue in the repository.


Made with โค๏ธ by the MedaVault Team

MedaVault API (Port 8084)

# Get all media
GET /api/media

# Get media by type
GET /api/media?type=image&limit=10

# Get specific media
GET /api/media/{id}

# Download media
GET /api/media/{id}/download

# Get thumbnail
GET /api/media/{id}/thumbnail

# System statistics
GET /api/stats

# Health check
GET /health

WebDAV API (Port 8081)

# List files
PROPFIND /webdav/

# Upload file
PUT /webdav/filename.jpg

# Download file
GET /webdav/filename.jpg

# Delete file
DELETE /webdav/filename.jpg

# Create directory
MKCOL /webdav/newfolder/

๐Ÿšจ Troubleshooting

Camel nie wykrywa plikรณw

# Sprawdลบ logi Camel
docker-compose logs camel-integration

# Zweryfikuj poล‚ฤ…czenie z WebDAV
curl -u webdav:medavault123 \
     -X PROPFIND \
     "http://localhost:8081/webdav/"

Filestash nie ล‚ฤ…czy siฤ™ z WebDAV

  1. Sprawdลบ czy WebDAV server dziaล‚a: http://localhost:8081/status
  2. Zweryfikuj dane logowania
  3. Sprawdลบ CORS headers w nginx config

Upload fails

# Check WebDAV permissions
docker-compose exec webdav-server ls -la /var/www/webdav

# Check storage space
df -h storage/

Database connection issues

# Restart database
docker-compose restart medavault-db

# Check database logs
docker-compose logs medavault-db

๐Ÿ“Š Performance & Scaling

File Processing Performance

Storage Recommendations

Scaling Options

  1. Horizontal: Multiple Camel instances
  2. Storage: External S3/MinIO backend
  3. Database: PostgreSQL cluster
  4. Load Balancing: nginx upstream

๐Ÿ”’ Security

Production Deployment

  1. HTTPS: Enable SSL certificates
  2. Authentication: Replace basic auth with OAuth/LDAP
  3. Network: Firewall rules, VPN access
  4. Backup: Regular database and storage backups

Security Headers

add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";

๐Ÿ“ˆ Monitoring & Alerting

Metrics to Monitor

Log Aggregation

# Centralized logging with ELK stack
docker-compose logs | logstash -f logstash.conf

๐Ÿค Contributing

  1. Fork the repository
  2. Create feature branch
  3. Make changes
  4. Test thoroughly
  5. Submit pull request

๐Ÿ“ WebDAV Connection Instructions and Usage Guide

Connecting to WebDAV

To connect to the WebDAV server, use the following URL: http://localhost:8081/webdav/

Uploading Files

To upload a file, use the PUT method with the file path as the request body. For example:

curl -u webdav:medavault123 \
     -T test.txt \
     "http://localhost:8081/webdav/test.txt"

Downloading Files

To download a file, use the GET method with the file path as the request URL. For example:

curl -u webdav:medavault123 \
     "http://localhost:8081/webdav/test.txt"

Deleting Files

To delete a file, use the DELETE method with the file path as the request URL. For example:

curl -u webdav:medavault123 \
     -X DELETE \
     "http://localhost:8081/webdav/test.txt"

๐Ÿ“„ License

This project is licensed under the Apache 2.0 License.

๐Ÿ†˜ Support


๐ŸŽ‰ Enjoy your WebDAV + Camel + MedaVault system!

Built with โค๏ธ using: