David - Enhanced WebDAV Server

Project Status License Go Version Forks Stars

Executive Summary

David is an enhanced fork of the original Dave WebDAV server, extending its functionality while maintaining the simplicity that made the original project popular. This fork addresses evolving requirements for modern web-based file management systems, providing additional security, logging, and administrative capabilities.

Project Background

Motivation

The original Dave project was archived by its maintainers, leaving users without a path for ongoing development and support. This fork was created to:

  1. Preserve Development: Continue active development of a valuable open-source tool
  2. Enhance Functionality: Add features needed for production environments
  3. Learn from Quality Code: Study and extend well-structured Go implementations

Core Enhancements

Feature Original Dave Enhanced David Rationale
Advanced Logging Limited Comprehensive NDJSON/TEXT logging Production debugging capabilities
Live Configuration Reload Manual restart Runtime configuration updates Zero-downtime changes
CORS Support Not included Configurable CORS policies Web application compatibility
Enhanced User Management Basic Directory jailing + admin hierarchy Multi-tenant security
Proxy Support Basic Reverse proxy configuration Enterprise deployment

Architecture Overview

Technology Stack

System Components

┌─────────────────┐
│   HTTP Server │
├─────────────────┤
│   Auth Layer  │
├─────────────────┤
│  File System  │
├─────────────────┤
│    Logging     │
└─────────────────┘

Development Approach

Modern Development Practices

This project utilizes contemporary development methodologies including:

Technology Integration

The implementation incorporates several production-ready technologies:

Code Quality Philosophy

The development follows these principles:

Installation Guide

Prerequisites

Quick Start

  1. Clone the repository:

    git clone https://github.com/audstanley/david
    cd david
    
  2. Build the application:

    go build -o david ./cmd/david
    
  3. Create configuration file:

    # Basic configuration
    cp examples/config.yaml config.yaml
    
  4. Run the server:

    ./david --config=config.yaml
    

Docker Deployment

# Build Docker image
docker build -t david .

# Run with Docker
docker run -dp 8080:8080 -v $(pwd)/config:/app/config david

Configuration Reference

Basic Configuration

address: "127.0.0.1"
port: 8080
dir: "/home/user/webdav"
prefix: "/webdav"
users:
  user:
    password: "$2a$10$yITzSSNJZAdDZs8iVBQzkuZCzZ49PyjTiPIrmBUKUpB0pwX7eySvW"
    subdir: "/user"
    permissions: "r"
  admin:
    password: "$2a$10$DaWhagZaxWnWAOXY0a55.eaYccgtMOL3lGlqI3spqIBGyM0MD.EN6"
    permissions: "crud"

TLS Configuration

tls:
  keyFile: "/path/to/private.key"
  certFile: "/path/to/certificate.pem"

CORS Configuration

cors:
  origin: "*"  # All origins (configure for production)
  credentials: true  # Allow credentials

Advanced Logging

log:
  production: true  # NDJSON format for structured logging
  debug: true
  error: true
  create: true
  read: true
  update: true
  delete: true

Development Setup

Environment Requirements

Build Commands

# Development build
go build -race -o david ./cmd/david

# Cross-platform compilation
GOOS=linux GOARCH=amd64 go build -o david-linux-amd64 ./cmd/david
GOOS=windows GOARCH=amd64 go build -o david-windows-amd64.exe ./cmd/david
GOOS=darwin GOARCH=amd64 go build -o david-darwin-amd64 ./cmd/david

Password Management

Generate bcrypt hashes using the included CLI tool:

./bcpt passwd

Comparison with Original Dave

Feature Dave David Improvement
Project Status Archived Actively Maintained Ongoing development
Logging Basic file logging Structured NDJSON/TEXT logging Production-ready
Configuration Static reload only Live configuration reloads Zero downtime
Security Basic auth Enhanced auth + TLS + CORS Enterprise-ready
Deployment Manual setup Docker + proxy support DevOps friendly

Use Cases

Personal Cloud Storage

Mount personal files across devices, replace commercial cloud services with self-hosted solution, and maintain data privacy and control.

Enterprise File Server

Departmental file sharing with user permissions, integration with existing authentication systems, and audit logging for access control.

Development Environment

Local development server for web applications, testing environment for WebDAV clients, and educational platform for distributed systems.

Contributing

Contribution Areas

Development Guidelines

  1. Fork the repository
  2. Create feature branch: git checkout -b feature-name
  3. Implement changes with comprehensive testing
  4. Submit pull request with clear description
  5. Follow Go coding standards and best practices

Roadmap

Planned Enhancements

License

This project is licensed under the Apache 2.0 License.


Note: This is an enhanced fork of the original Dave project, maintained independently. For the original archived project, see micromata/dave.