Prepare the 3.0.0 release: - Bump the version in openapi.yaml and frontend/package.json to 3.0.0. - Document the existing GET /health endpoint in openapi.yaml (served at the root, outside /api/v1) and refine the auth note. - Add docs/REQUIREMENTS.md (product requirements, in English) and docs/ARCHITECTURE.md (system overview); remove the old Russian docs/Описание.md. - Rewrite GO_PROJECT_STRUCTURE.md and FRONTEND_STRUCTURE.md to match the current code (dedup CLI, imagehash, real components/stores, Tailwind v4). - Fix stale counts and references in CLAUDE.md and link the new docs from README.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
6.7 KiB
Tanabata File Manager — Requirements
Product requirements for Tanabata File Manager (TFM). Architecture and code layout are described separately in ARCHITECTURE.md, GO_PROJECT_STRUCTURE.md and FRONTEND_STRUCTURE.md.
Overview
Tanabata File Manager (TFM) is a multi-user, tag-based web file manager. It runs on a client–server architecture and is operated entirely through a web interface. Its goal is centralized, server-side storage of files with access and management from both desktop and mobile browsers. The application is primarily oriented toward images and video.
The app is a PWA that can be installed on a desktop or a phone. Files managed by Tanabata are stored flat in a single directory; each file's on-disk name equals its UUID in the database.
Support for additional database engines is planned for future versions.
Core Concepts
- File — a single file on the server. It may carry any number of tags and belong to any number of pools. It has a creator and optional access settings (a user — which may be null, making the file public — plus read and edit permission flags). It has an original name and metadata (key–value, including all EXIF data).
- Tag — a label on a file. It may be attached to any number of files and belong to at most one category. It has a name, a description, key–value metadata, and may define auto-tag rules.
- Auto-tag (tag rule) — a rule stating that when tag A is attached to a file, tag B is attached to the same file automatically.
- Category — an entity that logically groups several tags. It has a name, a description, and key–value metadata.
- Pool — a logical grouping of files. It has a name, a description, and key–value metadata. Files in a pool can be sorted automatically or arranged in a user-defined manual order.
Functional Requirements
1. File management
- Browse the file list (lazy load, pagination).
- Filter files by tags and metadata.
- View and edit sort settings (persisted per user).
- Multi-select files (Ctrl, Shift) and act on the selection:
- Attach / detach tags.
- Copy / paste tags.
- Add to a pool.
- View and edit access settings.
- Delete (with a confirmation prompt).
- View a single file.
- Single-file actions:
- Attach / detach tags.
- Copy / paste tags.
- Add to a pool.
- View and edit access settings.
- Replace the file (upload new content under the same ID).
- Delete (with a confirmation prompt).
- Browse files gallery-style (prev/next paging through the viewer).
- Upload new files through the web UI (form or drag-and-drop onto the list).
- Import new files from a folder on the server.
- Near-duplicate detection for images and video:
- Show groups (clusters) of duplicates.
- Dismiss false duplicates (the app remembers that file A is not a duplicate of file B).
- Choose which duplicate to keep and which to delete.
- Choose, per field, which duplicate the surviving file inherits it from.
- Trash:
- Browse trashed files.
- Restore from trash.
- Delete permanently.
2. Tag management
- Browse the tag list (lazy load, pagination).
- Search by name.
- View and edit sort settings (persisted per user).
- Multi-select tags (Ctrl, Shift) and act on the selection:
- Assign auto-tag rules.
- Change category.
- Delete (with a confirmation prompt).
- View a single tag.
- Single-tag actions:
- Edit name, description, and metadata (key–value).
- Change category.
- Assign auto-tag rules.
- Delete (with a confirmation prompt).
- Create a tag:
- Enter name, description, and metadata (key–value).
- Assign a category (optional).
- Assign auto-tag rules.
3. Category management
- Browse the category list (lazy load, pagination).
- Search by name.
- View and edit sort settings (persisted per user).
- Multi-select categories (Ctrl, Shift) and act on the selection:
- View shared tags and tags attached to some (but not all) of them.
- Attach / detach tags.
- Delete (with a confirmation prompt).
- View a single category.
- Single-category actions:
- Edit name, description, and metadata (key–value).
- View attached tags.
- Attach / detach tags.
- Delete (with a confirmation prompt).
- Create a category:
- Enter name, description, and metadata (key–value).
- Attach tags.
4. Pool management
- Browse the pool list (lazy load, pagination).
- Search by name.
- View and edit sort settings (persisted per user).
- Multi-select pools (Ctrl, Shift) and act on the selection:
- View and edit access settings.
- Delete (with a confirmation prompt).
- View a single pool.
- Single-pool actions:
- Edit name, description, and metadata (key–value).
- View and edit access settings.
- View all files in the pool.
- Filter the pool's files by tags.
- Change the file sort setting (including disabling automatic sorting).
- Reorder files manually (when automatic sorting is disabled).
- Delete (with a confirmation prompt).
- Create a pool:
- Enter name, description, and metadata (key–value).
- Attach files.
5. User settings
- Username.
- Password.
- Sessions:
- Terminate a session.
- Path to the server folder scanned during file import.
6. Server administration (admin panel)
- Users:
- Browse the list.
- View a single user.
- Create.
- Delete.
- Block / unblock.
- Set role (reader / editor).
7. Audit logging (in the database)
Log the following user actions:
- File views.
- Changes to file access settings.
- Create / edit / delete of a file, tag, category, pool, or file–tag relation.
- Create / block / unblock / delete of a user.
- User role changes.
- User login / logout.
- Session termination.
Non-Functional Requirements
- The interface must be as simple and convenient as possible: everything needed should be at hand, reachable in the fewest possible actions.
- The interface must adapt to both desktop and mobile devices.
- The interface must offer dark and light themes.
- Use PWA technology, including a button that fully resets the PWA (except the cache) and reloads it from the server.
- Allow selected files to be cached and viewed offline in the installed PWA.
- First-run setup must require minimal effort: automatic database migration, a
ready-made Docker Compose file, and a
.envfile with the configurable installation parameters. - Use a Domain-Driven Design approach on the API server.
- Reject files whose MIME type is not present in the database (no DB entry — no support).