$ show linagora/twake-drive
Twake Drive is a full-featured file management web application built on the Cozy platform. It provides a React-based single-page application for browsing, uploading, downloading, sharing, and editing files. Key features include shared drives, real-time collaborative whiteboarding with Excalidraw, document editing via OnlyOffice, PDF annotation, file versioning, a file picker service for external app integration, and comprehensive sharing capabilities (by link, by email, with permissions). The application communicates with a Cozy Stack backend via the cozy-client library and supports multi-instance sharing between Cozy users. Architecture is a frontend SPA with React, Redux for upload state, and numerous React context providers for sharing, selection, clipboard, and view settings. External dependencies include cozy-ui, cozy-sharing, twake-i18n, and cozy-flags. The codebase is well-structured with modular components, extensive unit and E2E tests, and demonstrates high craftsmanship in areas such as conflict resolution, virtualized file lists, and real-time collaboration.
The LLM identified 4 files worth highlighting for reuse:
Handles file upload conflicts (409) by computing statistics per path, offering replace/keep-both/cancel strategies, and handling folder-vs-file collisions. Contains retry logic and is fully parameterized, making it reusable in any upload pipeline with minimal adaptation.
A composable modal component for selecting destination folders across multiple backends (Cozy, Nextcloud, Shared Drives, Public links). It provides a consistent UI with breadcrumbs, list items, and add-folder capability, and can be extracted for any application needing folder selection from heterogeneous sources.
A hook that registers global keyboard shortcuts (Ctrl+C/X/V, F2, Delete, Ctrl+A) with awareness of shared-drive permissions and selection context. Demonstrates a clean pattern for decoupling key bindings from UI components, reusable in any application requiring keyboard navigation.
A client-side fuzzy search utility that matches paths against a query string, with diacritics removal and ranking. It is self-contained (no external dependencies) and can be extracted into any JavaScript project needing lightweight fuzzy path or filename search.