Modern Svelte web UI for copyparty file server
  • Svelte 76.1%
  • TypeScript 19.1%
  • HTML 1.7%
  • JavaScript 1.6%
  • CSS 1%
  • Other 0.5%
Find a file
2026-02-10 20:14:09 -05:00
.vscode Initial commit - Copyparty Svelte UI 2026-02-05 22:05:23 -05:00
public Initial commit - Copyparty Svelte UI 2026-02-05 22:05:23 -05:00
src Revert "Fix auth: use Basic Auth instead of PW header for copyparty compatibility" 2026-02-10 20:14:09 -05:00
.gitignore Initial commit - Copyparty Svelte UI 2026-02-05 22:05:23 -05:00
ADVANCED_SEARCH_FEATURES.md Fix critical auth bug and add new features 2026-02-06 12:48:37 -05:00
ADVANCED_SEARCH_TEST.html Fix critical auth bug and add new features 2026-02-06 12:48:37 -05:00
AUDIT.md Initial commit - Copyparty Svelte UI 2026-02-05 22:05:23 -05:00
AUTH_FIX_FINAL.md fix: Combine username and password in PW header for copyparty auth 2026-02-08 13:17:31 -05:00
AUTH_FIX_SUMMARY.md Fix critical auth bug and add new features 2026-02-06 12:48:37 -05:00
AUTH_INVESTIGATION_REPORT.md fix: Combine username and password in PW header for copyparty auth 2026-02-08 13:17:31 -05:00
BUG_DIAGRAM.txt Fix critical auth bug and add new features 2026-02-06 12:48:37 -05:00
CHANGES_SUMMARY.md Fix directory navigation to use /files as root instead of / 2026-02-10 20:03:37 -05:00
CODE_CHANGES.md Fix directory navigation to use /files as root instead of / 2026-02-10 20:03:37 -05:00
DEBUG_CLICK_TEST.html Fix critical auth bug and add new features 2026-02-06 12:48:37 -05:00
DEBUG_REPORT.md Fix critical auth bug and add new features 2026-02-06 12:48:37 -05:00
DUPLICATE_BADGE_VISIBILITY_CHANGES.md Fix directory navigation to use /files as root instead of / 2026-02-10 20:03:37 -05:00
DUPLICATE_FIX_SUMMARY.md Fix directory navigation to use /files as root instead of / 2026-02-10 20:03:37 -05:00
FINAL_REPORT.md Fix critical auth bug and add new features 2026-02-06 12:48:37 -05:00
FIXES_APPLIED.md Fix directory navigation to use /files as root instead of / 2026-02-10 20:03:37 -05:00
FIXES_COMPLETED.md Fix directory navigation to use /files as root instead of / 2026-02-10 20:03:37 -05:00
IMPLEMENTATION_COMPLETE.md Add implementation completion summary 2026-02-06 18:45:43 -05:00
IMPLEMENTATION_REPORT.md docs: Add implementation report for UI features group 2 2026-02-06 18:28:36 -05:00
index.html Initial commit - Copyparty Svelte UI 2026-02-05 22:05:23 -05:00
LOCAL_NETWORK_BYPASS.md Fix directory navigation to use /files as root instead of / 2026-02-10 20:03:37 -05:00
LOGIN_FIX_COMPLETE.md Fix critical auth bug and add new features 2026-02-06 12:48:37 -05:00
MISSION_COMPLETE.md Fix directory navigation to use /files as root instead of / 2026-02-10 20:03:37 -05:00
package-lock.json Initial commit - Copyparty Svelte UI 2026-02-05 22:05:23 -05:00
package.json Initial commit - Copyparty Svelte UI 2026-02-05 22:05:23 -05:00
postcss.config.js Initial commit - Copyparty Svelte UI 2026-02-05 22:05:23 -05:00
QUICK_REFERENCE.txt Fix critical auth bug and add new features 2026-02-06 12:48:37 -05:00
README.md Initial commit - Copyparty Svelte UI 2026-02-05 22:05:23 -05:00
START_COPYPARTY.md Fix ban prevention: use --dont-ban any instead of --no-acode 2026-02-10 19:35:37 -05:00
SUBAGENT_TASK_COMPLETE.md fix: Combine username and password in PW header for copyparty auth 2026-02-08 13:17:31 -05:00
svelte.config.js Initial commit - Copyparty Svelte UI 2026-02-05 22:05:23 -05:00
tailwind.config.js Initial commit - Copyparty Svelte UI 2026-02-05 22:05:23 -05:00
TASK_COMPLETION_REPORT.md Fix critical auth bug and add new features 2026-02-06 12:48:37 -05:00
test-auth-fix.cjs fix: Combine username and password in PW header for copyparty auth 2026-02-08 13:17:31 -05:00
test-auth-fix.mjs Fix critical auth bug and add new features 2026-02-06 12:48:37 -05:00
test-auth-integration.mjs Fix critical auth bug and add new features 2026-02-06 12:48:37 -05:00
test-auth-manual.sh fix: Combine username and password in PW header for copyparty auth 2026-02-08 13:17:31 -05:00
test-auth.cjs fix: Combine username and password in PW header for copyparty auth 2026-02-08 13:17:31 -05:00
test-auth.html Fix critical auth bug and add new features 2026-02-06 12:48:37 -05:00
test-bypass.sh Fix directory navigation to use /files as root instead of / 2026-02-10 20:03:37 -05:00
TEST_RESULTS.md Apply default lifetime setting to new uploads 2026-02-06 18:44:25 -05:00
TESTING_PLAN.md Fix directory navigation to use /files as root instead of / 2026-02-10 20:03:37 -05:00
tsconfig.app.json Initial commit - Copyparty Svelte UI 2026-02-05 22:05:23 -05:00
tsconfig.json Initial commit - Copyparty Svelte UI 2026-02-05 22:05:23 -05:00
tsconfig.node.json Initial commit - Copyparty Svelte UI 2026-02-05 22:05:23 -05:00
UI_FEATURES_REPORT.md feat: Add M3U playlist import via drag-and-drop 2026-02-06 18:27:49 -05:00
UPLOAD_SYSTEM_IMPLEMENTATION.md Add implementation documentation for Upload System Phase 3.1 & 3.2 2026-02-06 18:45:10 -05:00
VISUAL_GUIDE.md Fix critical auth bug and add new features 2026-02-06 12:48:37 -05:00
vite.config.ts Initial commit - Copyparty Svelte UI 2026-02-05 22:05:23 -05:00

Copyparty WebUI

A modern, beautiful web interface for Copyparty with a GNOME Files (Nautilus) aesthetic.

![Theme: Light/Dark]

Features

  • 🎨 GNOME Files Aesthetic - Clean, modern design inspired by Nautilus
  • 🌙 Dark/Light Theme - Toggle between themes with system preference support
  • 📁 Grid & List Views - Switch between icon grid and compact list
  • 🔍 Search - Quick file search (ready for API integration)
  • 🧭 Navigation - Breadcrumbs, back/forward, sidebar shortcuts
  • 📱 Responsive - Works on desktop and mobile

Tech Stack

  • Svelte + TypeScript - Fast, reactive UI
  • Vite - Lightning fast dev server and build
  • Tailwind CSS - Utility-first styling with custom GNOME color palette
  • Lucide Icons - Beautiful, consistent icons

Getting Started

Prerequisites

  • Node.js 18+
  • npm or pnpm
  • Copyparty backend running (for API calls)

Installation

# Clone the repository (if standalone)
git clone <repo-url>
cd copyparty-ui

# Install dependencies
npm install

# Start development server
npm run dev

The UI will be available at http://localhost:5173

Development with Copyparty Backend

  1. Start Copyparty:

    python3 copyparty-sfx.py -v /srv/files:/files:r
    

    (Default port: 3923)

  2. The Vite dev server proxies API calls to localhost:3923 automatically.

Build for Production

npm run build

Output will be in the dist/ directory.

Project Structure

copyparty-ui/
├── src/
│   ├── lib/
│   │   ├── api/           # Copyparty API client
│   │   ├── components/    # Svelte components
│   │   │   └── layout/    # AppShell, Sidebar, TopBar, MainContent
│   │   ├── stores/        # Svelte stores (theme, navigation, viewMode)
│   │   └── types/         # TypeScript types for API
│   ├── App.svelte         # Root component
│   ├── main.ts            # Entry point
│   └── app.css            # Global styles & Tailwind
├── tailwind.config.js     # Tailwind with GNOME color palette
├── vite.config.ts         # Vite config with API proxy
└── package.json

Design System

Colors

Based on GNOME Files / Adwaita theme:

Token Light Dark Usage
gnome-blue-500 #3584e4 #3584e4 Primary accent, folder icons
gnome-blue-600 #1c71d8 #1c71d8 Hover states
gnome-sidebar #f6f5f4 #303030 Sidebar background
gnome-surface #ffffff #242424 Card backgrounds
gnome-background #fafafa #1e1e1e Page background
gnome-border #deddda #4a4a4a Borders

Typography

  • Primary Font: SF Pro Display / SF Pro Text (Apple)
  • Fallbacks: Inter, -apple-system, BlinkMacSystemFont, Segoe UI

Components

  • .btn-gnome - Standard button
  • .btn-gnome-primary - Primary (blue) button
  • .sidebar-item - Sidebar navigation item
  • .grid-item - File/folder in grid view
  • .list-item - File/folder in list view
  • .search-input - Search input field
  • .icon-btn - Icon-only button
  • .card-gnome - Card container

API Integration

The API client (src/lib/api/client.ts) wraps Copyparty's HTTP API:

import { api } from './lib/api';

// List directory
const listing = await api.listDirectory('/path');

// Search
const results = await api.search('query');

// Upload file
await api.uploadFile('/path', file);

// Create directory
await api.createDirectory('/parent', 'new-folder');

// Delete
await api.delete('/path/to/file');

// Move/rename
await api.move('/old/path', '/new/path');

Roadmap

  • Phase 1: Design system & layout skeleton
  • Phase 2: API integration for file browsing
  • Phase 3: File operations (copy, move, delete)
  • Phase 4: Upload system (basic + up2k resumable)
  • Phase 5: Media viewers (image, video, audio)
  • Phase 6: Search implementation
  • Phase 7: Shares & permissions
  • Phase 8: Admin features

License

MIT (or match Copyparty's license)


Built with ❤️ for the Copyparty project

CORS Configuration

Development

The Vite dev server is configured to proxy requests to copyparty and strip the Origin header. This is necessary because:

  1. Copyparty 1.6.0+ requires CORS validation for POST/PUT/DELETE operations
  2. Browser's fetch() automatically includes Origin header for cross-origin requests
  3. The default CORS config only allows GET/HEAD methods

The fix is implemented in vite.config.ts using the proxy's configure callback to remove the Origin header before forwarding to copyparty.

Production Deployment

For production, you have several options:

Option A: Reverse proxy (recommended) Use nginx/caddy to serve both the frontend and proxy to copyparty. Configure the proxy to strip Origin headers:

location /files {
    proxy_pass http://copyparty-backend:3923;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    # Don't forward Origin header to avoid CORS issues
    proxy_set_header Origin "";
}

Option B: Configure copyparty CORS Start copyparty with CORS flags to allow your frontend origin:

python3 -m copyparty \
  --acao 'https://your-frontend.com' \
  --acam 'GET,HEAD,POST,PUT,DELETE'

Option C: Disable CORS protection (dev only)

python3 -m copyparty --allow-csrf

⚠️ This disables all CORS protections and should NOT be used in production.