Project Pitch Hello: Leveraging CRUD of scripts.acequia.io to WebDAV service
Problem:
Our current system at scripts.acequia.io
allows users to create and edit HTML, JavaScript, and other file types, then deploy them as URLs under the scripts.acequia.io
domain. This functionality could be extended to any domain where update/delete is offered for existing URLs and Create for 404's.
Opportunity:
We have an opportunity to refactor this functionality to work with any WebDAV server. A "WebDAV server" is any Acequia node that supports WebDAV api. The server can be:
- a service worker
- file system access api to local file directory
- a shared worker
- a webRTC peer
- a local https server (DENO, Node, Python, etc)
- a cloud https server
By doing so, users can edit and deploy files directly on their own domains, leveraging their existing WebDAV setups. This expands our user base and enhances the versatility of our tool.
Solution:
We propose to refactor our current editing functionality into a service worker (SW) that can be deployed on any WebDAV server. This service worker will intercept fetch requests and provide an editing interface for various file types (HTML, JavaScript, images, audio, etc.) based on the file type and the presence of an ?edit
query parameter.
Details:
- Service Worker Integration: Develop a flexible service worker script that can be easily added to any WebDAV server. The SW will handle fetch events and determine the appropriate editor based on file type and URL parameters.
- File Type Handling: Extend our current editor modules to support more file types and ensure compatibility with the service worker architecture.
- Deployment Flexibility: Allow users to create, edit, and deploy files directly on their WebDAV server without relying on our specific domain setup.
Key Features:
- HTML Editor: Inline HTML editor using CKEditor or TinyMCE.
- JavaScript Editor: Code editor using Ace Editor or CodeMirror.
- Image Editor: Drawing tools using Fabric.js.
- Audio Editor: Audio tools using WaveSurfer.js.
Risks and Mitigations:
- Compatibility Issues: Ensure comprehensive testing across different WebDAV servers and environments to guarantee compatibility.
- Performance Overhead: Optimize the service worker and editor modules to minimize performance impact on the server.
- User Adoption: Provide clear documentation and tutorials to help users integrate the service worker into their WebDAV servers.
Next Steps:
- Research: Investigate different WebDAV server implementations to understand commonalities and differences.
- Development: Refactor current functionality into a modular service worker script.
- Testing: Conduct extensive testing across various WebDAV environments.
- Documentation: Create detailed documentation and guides for users.
- Deployment: Release the service worker script and support materials for public use.
By refactoring our editing functionality to support any WebDAV server, we can significantly enhance the flexibility and utility of our tool, providing a valuable resource for a wider audience.