Skip to content

satya-sudo/DRFT

Repository files navigation

DRFT

DRFT is a self-hosted photo and video cloud built as a single Go service with PostgreSQL metadata and SSD-backed file storage.

Today the repo includes:

  • a Go backend in backend/ with auth, media storage, streaming, and admin management
  • a web client built with React, Vite, JavaScript, and vanilla CSS
  • an Expo-based Android/mobile client for browsing, upload, and viewer flows
  • a user-facing landing site in site/ for GitHub Pages

Mobile roadmap note:

  • v0.1.0 ships with the current Expo-based Android client
  • v0.2.0 is planned to move Android to a native Kotlin app for stronger media, upload, and playback control

Landing page note:

  • site/ is the public-facing DRFT product site
  • it is intended for GitHub Pages deployment

Documentation

Full project documentation lives in docs/.

Start here:

Quick start

Node.js:

node -v

Expected:

v20.x

Backend:

make run

Frontend:

make frontend-dev

Mobile:

cd mobile
npm run start -- --clear

Docker full stack, development:

make docker-up
  • web: http://localhost:3000
  • api: http://localhost:8080

Note:

  • make docker-up uses docker-compose.dev.yml and builds from source
  • the Go service now lives under backend/
  • if your network uses a custom npm registry, proxy, or trusted CA, pass them through Docker build args via environment variables:
    • DRFT_NPM_REGISTRY
    • DRFT_NPM_STRICT_SSL
    • DRFT_EXTRA_CA_CERT_BASE64
    • HTTP_PROXY
    • HTTPS_PROXY
    • NO_PROXY

Docker production stack:

cp .env.prod.example .env.prod
make docker-prod-up
  • make docker-prod-up uses docker-compose.prod.yml
  • production compose expects published images:
    • dockermaninthehouse/drft-api
    • dockermaninthehouse/drft-web
  • production data is stored on explicit host paths from .env.prod:
    • DRFT_POSTGRES_DATA_PATH
    • DRFT_STORAGE_PATH
    • DRFT_BACKUPS_PATH

Publish images:

./scripts/publish-images.sh v0.1.0-rc

This pushes:

  • dockermaninthehouse/drft-api:v0.1.0-rc
  • dockermaninthehouse/drft-web:v0.1.0-rc

And, by default, also updates latest.

GitHub Actions image publishing:

  • workflow file: /.github/workflows/publish-images.yml
  • automatic publish on pushed git tags like v0.1.0-rc
  • manual publish through workflow_dispatch
  • required GitHub repository secrets:
    • DOCKERHUB_USERNAME
    • DOCKERHUB_TOKEN

Production backup and restore:

sh ./scripts/backup-prod-now.sh
  • manual restore from a backup directory:
sh ./scripts/restore-prod-backup.sh ./backups/<timestamp>

Current Highlights

  • first-admin bootstrap and JWT login
  • role-aware user management
  • password reset by email code and master CLI
  • image/video upload with metadata extraction
  • protected media preview and playback
  • per-user media libraries
  • storage usage stats
  • mobile server setup flow before login
  • mobile session persistence
  • mobile swipeable media viewer with local save and delete

About

A lightweight Media storage local server

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors