- JavaScript 67.1%
- HTML 29.4%
- CSS 3.4%
- Dockerfile 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
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. |
||
| config | ||
| docs | ||
| lib/metadata | ||
| public | ||
| scripts | ||
| server | ||
| test-data | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| docker-compose.yml | ||
| Dockerfile | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| ROADMAP_STATUS.md | ||
| server.js | ||
| test-s3-routes.js | ||
| test-storage.js | ||
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
- Clone the repository:
git clone <repository-url>
cd social-filesystem
- Install dependencies:
npm install
- 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 servernpm 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 onbookworm-slim, production dependencies only, non-root uid 1000docker-compose.yml— oneappservice; the deploy tool adds ports, the data mount, and env.dockerignore— keepsnode_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