diff --git a/README.md b/README.md index 2f188f2..dd96648 100644 --- a/README.md +++ b/README.md @@ -1,229 +1,75 @@ # Cloud Page -**Cloud Page** is a backend service in the Vault Web ecosystem for **user-specific file and folder management**. -It provides APIs for accessing, creating, editing, and deleting files securely, similar to a traditional file explorer. +Cloud Page is the backend service for file and folder management in the Vault Web ecosystem. It provides APIs for browsing, creating, updating, deleting, searching, sharing, and downloading files securely. -This service is designed to integrate seamlessly with **Vault Web**, sharing its **PostgreSQL database** and **pgAdmin setup**. +> **Note** +> +> This repository contains only the backend service. The Cloud user interface is part of the `vault-web` repository under `frontend/src/app/pages/cloud`. --- ## Features -- 🔹 **File Explorer-like API** for user files -- 🔹 **CRUD operations** on files and folders -- 🔹 **Secure access via JWT tokens** using Vault Web's master key -- 🔹 **Fuzzy file search** with metadata filters (type, MIME, size, modified date) and sort controls -- 🔹 **Streamed folder downloads** as structure-preserving ZIP archives -- 🔹 **Secure Send** links for expiring, optionally password-protected external downloads -- 🔹 **User-to-user sharing** for selected files and folders with explicit permissions +- File and folder management +- Search with metadata filters +- Inline file viewing +- Folder archive downloads +- Secure Send links +- User to user sharing ---- - -## Search - -`GET /api/folders/search` performs a fuzzy (Jaro-Winkler) name match and accepts optional metadata -filters and sort controls: - -``` -GET /api/folders/search?folderPath=/&query=report&type=file&minSize=1024&sortBy=size -``` - -| Param | Description | -|-------|-------------| -| `type` | `file` or `folder` | -| `mimeType` | MIME-type prefix, e.g. `image` matches `image/png` | -| `minSize` / `maxSize` | size bounds in bytes | -| `modifiedAfter` / `modifiedBefore` | last-modified bounds (epoch millis) | -| `sortBy` | `relevance` (default), `name`, `size`, or `lastModified` | -| `ascending` | sort direction; defaults to `false` (best / largest / newest first) | +For detailed feature documentation, see [`backend/README.md`](backend/README.md). --- -## Inline file viewing - -`GET /api/files/view?path=` serves a file for display in the browser. The -response keeps the file's detected MIME type, uses `Content-Disposition: inline`, and supports -HTTP byte-range requests for seeking in video, audio, and PDF files. Unknown file types use -`application/octet-stream`, allowing the client to show a download fallback. - -The endpoint uses the same authenticated user root and path validation as the other file APIs. -Viewer actions can reuse the existing endpoints: +## Quick Start -| Action | Endpoint | -|-------|----------| -| Rename or move | `PATCH /api/files/move?filePath=&newPath=` | -| Delete (move to trash) | `DELETE /api/files?filePath=` | -| Download | `GET /api/files/download?path=` | -| Next/previous source list | `GET /api/folders/content?path=&page=&size=` | +1. Clone this repository. +2. Start the required Vault Web services. +3. Configure the required environment variables. +4. Run the backend. -All requests require the existing bearer-token authentication. A frontend using native -`