vibecoded multiplayer apache fileserver knockoff
  • JavaScript 67.1%
  • HTML 29.4%
  • CSS 3.4%
  • Dockerfile 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
whisper a471d0a34c add a route test that checks the bucket, not just the responses
Three bugs in a row shipped because "the route returned 200" was the only
thing anyone checked: ensureDirectoryExists missing on the base class,
createReadStream on fs.promises, and a route that reported success while
swallowing per-file errors. None of them were visible from a response.

test-s3-routes.js drives the HTTP routes against a real bucket and asserts the
object listing as well as the API. It found both sidecar leaks on its first
run. It refuses to run unless the bucket name looks like a test bucket, since
the destructive cases delete real objects, and it also proves /library/* is
served by the storage proxy rather than express.static by asserting the
absence of Last-Modified.

Run with: npm start, then npm run test:s3.
2026-11-12 11:20:51 -08:00
config fix uploads: stream from fs, not fs.promises, and report per-file failures 2026-11-12 00:00:53 -08:00
docs sharing and other architectural improvements 2025-11-02 13:45:37 -08:00
lib/metadata upgrade dependencies and clear audit advisories 2026-10-26 14:37:42 -07:00
public collapse archive rename onto ADMIN_USERS 2026-11-11 23:24:02 -08:00
scripts holy smokes, metadata refactor lfg 2025-11-02 14:37:10 -08:00
server initialize the scene-states folder after storage, not at module load 2026-11-12 11:20:51 -08:00
test-data big cleanup from digital ocean and setting up dev and production environments 2025-07-15 12:34:30 -07:00
.dockerignore add a route test that checks the bucket, not just the responses 2026-11-12 11:20:51 -08:00
.env.example add a route test that checks the bucket, not just the responses 2026-11-12 11:20:51 -08:00
.gitignore bring the container definitions back into the app repo 2026-10-26 14:37:46 -07:00
docker-compose.yml bring the container definitions back into the app repo 2026-10-26 14:37:46 -07:00
Dockerfile bring the container definitions back into the app repo 2026-10-26 14:37:46 -07:00
package-lock.json add a Garage/S3 storage backend behind STORAGE_TYPE 2026-11-11 23:23:52 -08:00
package.json add a route test that checks the bucket, not just the responses 2026-11-12 11:20:51 -08:00
README.md bring the container definitions back into the app repo 2026-10-26 14:37:46 -07:00
ROADMAP_STATUS.md it looks like yjs works, collaborative text editing is here! 2025-11-02 16:05:58 -08:00
server.js initialize the scene-states folder after storage, not at module load 2026-11-12 11:20:51 -08:00
test-s3-routes.js add a route test that checks the bucket, not just the responses 2026-11-12 11:20:51 -08:00
test-storage.js big cleanup from digital ocean and setting up dev and production environments 2025-07-15 12:34:30 -07:00

Temporary Archive

A friendly multiplayer archive system for collaborative file sharing and management. Built with Node.js, Express, and Socket.IO for real-time collaboration.

Features

File Management

  • File Upload: Drag-and-drop or click to upload files and folders
  • File Download: Download individual files or entire folders as ZIP
  • Directory Management: Create, rename, and navigate directories
  • File Operations: Rename files, delete items via context menu
  • Text Files: Create and edit text files directly in the browser
  • Link Data Type: Upload links as a special data type with custom metadata

Views

  • Table View: Traditional file browser with sortable columns and customizable visibility
  • Grid View: Are.na-style responsive grid layout (2-4 columns based on screen size)
  • Full-Page Viewer: Image/media viewer with navigation, zoom, and metadata editing
  • Mobile Responsive: Grid view automatically uses GridViewer on narrow screens

Real-Time Collaboration

  • Live Cursors: See other users' mouse cursors in real-time
  • User Presence: View who's currently browsing and in which directory
  • Live Chat: Chat with other users in a separate window
  • Real-Time Updates: File changes sync instantly across all connected clients

Metadata & Organization

  • Custom Metadata: Edit title, description, tags, alt text, contributor
  • Inline Editing: Click any metadata field to edit directly
  • Tag System: Add and manage tags for files
  • Column Visibility: Show/hide metadata columns in table view
  • Search & Filter: (Future feature)

Media Support

  • Images: View with zoom, EXIF data extraction
  • Videos: Built-in video player
  • Audio: Audio playback controls
  • PDFs: PDF viewer
  • 3D Models: GLB/GLTF support via model-viewer
  • Text Files: Syntax highlighting and editing

Getting Started

Prerequisites

  • Node.js 22+ (the container image uses Node 24 LTS)
  • npm or yarn

Installation

  1. Clone the repository:
git clone <repository-url>
cd social-filesystem
  1. Install dependencies:
npm install
  1. Configure environment (optional):
cp .env.example .env
# Edit .env if needed (defaults work for local development)

Running the Application

Development mode (with auto-reload):

npm run dev

Production mode:

npm start

The server will start on http://localhost:3000 (or the port specified in your .env file).

A fresh checkout has no public/library/. The server creates the directory and an empty library.json on first boot, so an empty archive is usable immediately.

Running in Docker

Build the image, then run it with the data directory bind-mounted:

mkdir -p library
docker build -t temporary-archive .
docker run --rm -p 3000:3000 -v "$PWD/library:/app/public/library" temporary-archive

Everything persistent lives under /app/public/library (library.json, config.json, uploaded files, .yjs state). The container runs as uid/gid 1000:1000, so the host directory must be writable by that user. Temporary uploads go to /tmp and are discarded with the container.

The committed docker-compose.yml is deliberately deployment-agnostic: one service, no ports, no volumes, no env file. The deploy tooling layers a compose override on top. Use docker run (above) or a local override if you want to reach it from the host.

Project Structure

social-filesystem/
├── config/
│   └── storage.js          # Storage configuration
├── public/
│   ├── css/
│   │   └── main.css        # All styles
│   ├── js/
│   │   ├── api/            # API client modules
│   │   ├── components/     # UI components (CursorManager, GridViewer, etc.)
│   │   ├── utils/          # Utility functions
│   │   └── views/          # View implementations (TableView, GridView)
│   ├── library/            # File storage directory
│   ├── index.html          # Main application page
│   └── chat.html           # Chat window
├── server.js               # Express server and Socket.IO
├── package.json            # Dependencies
├── Dockerfile              # Container image (Node 24 LTS, uid 1000)
├── docker-compose.yml      # One-service, deployment-agnostic compose file
├── .env.example            # Local environment template
└── README.md               # This file

Usage

Uploading Files

  • Click the + button in the header and select "Upload"
  • Or drag and drop files/folders directly onto the page
  • Supports uploading entire folder structures

Creating Items

Click the + button to:

  • Upload files
  • Create a new directory
  • Create a new text file
  • Create a new link

Viewing Files

  • Table View: Double-click a file to open in MediaViewer
  • Grid View: Click a file to open in GridViewer (full-page overlay)
  • Use arrow keys to navigate between files in the viewer
  • Press Escape to close viewers

Editing Metadata

  • Click any metadata field (title, description, tags, etc.) to edit inline
  • Changes save automatically
  • Tags can be added/removed by clicking

Collaboration

  • Set your name in the top-right corner
  • Other users' cursors will appear in real-time
  • Click the chat icon (💬) to open the chat window
  • File changes sync automatically to all users

Architecture

The application uses a modular architecture:

  • Components: Reusable UI components (CursorManager, GridViewer, MetadataEditor, etc.)
  • Views: Different display modes (TableView, GridView) managed by ViewManager
  • API Layer: Separated API calls for files, metadata, and Socket.IO
  • Utils: Shared utility functions for formatting, path manipulation, local storage

Storage

Files are stored locally in public/library/ directory. Metadata is stored in public/library/library.json.

Development

Scripts

  • npm start - Run production server
  • npm run dev - Run development server with nodemon (auto-reload)
  • npm run test:storage - Test storage functionality

Code Style

  • ES6 modules for client-side code
  • Modular component architecture
  • Custom CSS (no framework dependencies)
  • Socket.IO for real-time features

Deployment

Container definitions live in this repository:

  • Dockerfile — Node 24 LTS on bookworm-slim, production dependencies only, non-root uid 1000
  • docker-compose.yml — one app service; the deploy tool adds ports, the data mount, and env
  • .dockerignore — keeps node_modules, .env, public/library, and docs out of the image

Real hostnames, ports, Caddy configs, and secrets stay out of the repo. Deployment itself is owned by the dust-deploy tooling (ssc app new temporary-archive), which renders the compose override, creates the data directory as 1000:1000, and waits for GET / to return 200.

Troubleshooting

Port Already in Use

Change the PORT in your .env file or stop the process using that port.

Files Not Appearing

  • Check that public/library/ directory exists and is writable by the server user
  • Check server logs for errors

Real-Time Features Not Working

  • Ensure Socket.IO connection is established (check browser console)
  • Verify no firewall is blocking WebSocket connections
  • Check that server is running and accessible