From 641dd4d2e874dff9e8990e4cf52baaea21de704e Mon Sep 17 00:00:00 2001 From: paul43210 <31411417+paul43210@users.noreply.github.com> Date: Wed, 21 Jan 2026 14:36:46 -0500 Subject: [PATCH 1/5] Create ai-assisted-dev Guide on how to do vibe coding. A walkthrough using Claude AI. --- docs/ocis/guides/ai-assisted-dev | 423 +++++++++++++++++++++++++++++++ 1 file changed, 423 insertions(+) create mode 100644 docs/ocis/guides/ai-assisted-dev diff --git a/docs/ocis/guides/ai-assisted-dev b/docs/ocis/guides/ai-assisted-dev new file mode 100644 index 00000000000..9346852e929 --- /dev/null +++ b/docs/ocis/guides/ai-assisted-dev @@ -0,0 +1,423 @@ +--- +title: "Building oCIS Web Extensions with AI-Assisted Development" +date: 2026-01-21T16:00:00+02:00 +weight: 9 +geekdocRepo: https://github.com/owncloud/web-extensions +geekdocEditPath: edit/master/docs/guides +geekdocFilePath: ai-assisted-development.md +geekdocCollapseSection: true +--- + +{{< toc >}} + +## Introduction + +This guide demonstrates how to build oCIS web extensions using AI-assisted development (sometimes called "vibe coding") with Claude AI. By following this approach, you can create production-ready extensions without writing code manually—the AI handles syntax, boilerplate, and implementation while you focus on architecture and user experience. + +**What you'll learn:** +- Setting up MCP connectors so Claude can access your server +- Using Claude to install development tools and manage your environment +- The five-phase workflow for AI-assisted extension development +- Practical tips for supervising AI-generated code +- How to contribute your extensions back to the oCIS community + +**Time investment:** ~10-14 hours per extension (concept to production-ready) + +**Cost:** ~$70 CAD for two extensions (using Claude Max Pro subscription) + +## Background + +When Google started pushing notifications telling my family we were at or close to our storage limits—with helpful suggestions to upgrade to a paid plan—I decided to solve the problem by enhancing our self-hosted oCIS instance with better photo browsing capabilities. + +The existing oCIS file browser shows thumbnails, which is functional, but I wanted what Google Photos gave us: timeline views organised by capture date, camera metadata at a glance, and a map showing where photos were taken. + +Using AI-assisted development, I built two fully functional web extensions and contributed backend changes to oCIS core—all without writing a single line of code by hand. + +## Prerequisites + +Before starting, ensure you have the following: + +- A running oCIS instance +- Claude Max Pro subscription (~$140 CAD/month) +- SSH access to your server (for MCP connectivity) +- Full root access to the server unless Claude Code, Claude MCP connector, oCIS and other tools all run as another user + +That's it. Claude will help you install everything else. + +## Step 1: Configure MCP Connector + +{{< hint type=important title="This Is the Hardest Part" >}} +Setting up the MCP connector is the most challenging step. Once this is done, Claude handles everything else—including installing development tools, managing git, and building your extension. +{{< /hint >}} + +MCP (Model Context Protocol) allows Claude to connect directly to your server, enabling both the Claude web interface and Claude Code to access files, run commands, and debug your oCIS deployment. + +### Installation + +Follow the official MCP documentation to set up your connector: + +- **MCP Quickstart Guide**: https://modelcontextprotocol.io/quickstart +- **Connect to Local Servers**: https://modelcontextprotocol.io/docs/develop/connect-local-servers +- **Claude Desktop MCP Setup**: https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop + +### Verify Connection + +Once configured, verify Claude can access your server by asking: + +``` +Can you list the contents of /home on my server? +``` + +If Claude successfully lists your directories, you're ready to proceed. + +## Step 2: Let Claude Set Up Your Environment + +With MCP connected, Claude can install the development tools you need. Simply ask: + +``` +Please install Claude Code and Git on my server. I'll need these for +developing an oCIS web extension. +``` + +Claude will: +- Detect your operating system +- Install Claude Code using the appropriate method +- Install Git if not already present +- Configure any necessary paths or permissions + +## The Five-Phase Workflow + +This workflow has been refined over several projects and consistently produces production-ready code. + +### Phase 1: Architecture (~15-30 minutes) + +Start in the Claude web interface (not Claude Code). Describe your project and have a conversation: + +``` +I want to build an oCIS web extension that displays photos in a timeline +grouped by their EXIF capture date. It should have infinite scroll starting +from today and going backwards, show camera metadata when you click on a photo, +and include an interactive map view showing where photos were taken. + +What questions do you have about the requirements? +``` + +Claude will ask clarifying questions about scope, user experience, and technical constraints. This back-and-forth shapes the architecture before any code is written. + +### Phase 2: Deep Research (~30 minutes) + +Ask Claude to research the existing oCIS architecture: + +``` +Please research how oCIS web extensions work. I need to understand: +- The extension manifest format +- How extensions integrate with the oCIS web UI +- What APIs are available (Graph API, WebDAV, etc.) +- How existing extensions like json-viewer are structured +- The AMD module format requirements + +Examine the oCIS documentation and existing extensions to synthesise +a technical approach for my photo gallery extension. +``` + +Claude reads documentation, examines code patterns, and produces an architectural plan. + +### Phase 3: Scaffolding (~15 minutes) + +Now ask Claude to create the project structure on your server: + +``` +Please create the project structure for my photo-addon extension: +- Git repository initialised +- Build configuration (Vite with AMD output) +- TypeScript configuration +- manifest.json for oCIS +- Basic Vue 3 component structure +- A starter CLAUDE.md file documenting the project for future sessions +``` + +By the end of this phase, you have a working (empty) extension. + +### Phase 4: Implementation (~5-6 hours) + +Login to your server and changes the folder where the new project was created, and run: +``` +claude "Please review the claude.md project file, build the web exention, and deploy it to our server. Install and configure any dependencies required. Use 'sudo' where needed to modify or configure the oCIS environment." +``` +Once complete, work through features incrementally. Example prompts: + +**Feature requests:** +``` +Please adjust the logic to start by searching for today's date (unless +overwritten by the dropdowns at the top), then display them on the screen. +If the images don't fill the screen, load up another day, until the screen +is filled plus some buffer. Then when I scroll, bring in more images. +``` + +``` +In the map view, when I hover over a dot, the thumbnail shows up above +off the screen. Can you fix the positioning? +``` + +**Bug fixes:** +``` +I'm seeing this error in the console: +[paste error here] + +Can you investigate and fix it? +``` + +### Phase 5: Polish (~3 hours) + +Once core features work, request comprehensive cleanup. Here are the prompts I used: + +**Performance optimisation:** +``` +Are there any performance improvements that we can make? +``` + +**Bug hunting:** +``` +Are there any memory leaks or bugs that can be found? +``` + +**Code quality:** +``` +Are there any inefficiencies we can improve on? Unused variables? +Duplicate functions? Excessive if statements? Overwriting CSS styles? +Overly complex logic? +``` + +**Error handling:** +``` +Are there any error handling gaps or functions that may fall through +without handling all scenarios? +``` + +**Documentation:** +``` +Are there any missing comments? Or complex code that could use +clear documentation? +``` + +**Internationalisation:** +``` +Are there any visible text strings that are not yet set up for translation? +``` + +**Comprehensive cleanup:** +``` +Pulling from the backlog list, can you do a good code refactor to simplify, +add all required unit tests, and add i18n support, then commit and push the +code with the right comments. +``` + +## Active Supervision + +{{< hint type=warning title="This is NOT 'Set It and Forget It'" >}} +While no coding is required, this approach demands active supervision. You cannot just give Claude a prompt and walk away. +{{< /hint >}} + +### When to Intervene + +There were times when Claude Code would: +- Deviate from requirements (with good intentions) +- Undo something it had just done +- Go down a path that didn't match the architecture + +The decisions were always logical, but sometimes the harder path is required. I estimate intervening to redirect maybe 3-5% of the time. + +**Watch for:** +- Changes that don't match your architectural decisions +- Unnecessary complexity being added +- Repeated undo/redo cycles +- Deviation from oCIS extension patterns + +### Code Cleanup Is Essential + +AI-generated code works, but it can accumulate: +- Redundant logic +- Unused variables +- Overly complex conditionals +- Duplicate CSS styles + +Explicitly asking for refactoring and optimisation catches these issues. + +### UI Testing Is On You + +The AI can write unit tests, but exploratory testing requires human judgment: +- Click around the interface +- Try unexpected inputs +- Test with different user accounts (search in oCIS is space-scoped!) +- Check mobile layouts +- Look for edge cases + +## Debugging Techniques + +When issues arise, these techniques help Claude understand and fix problems: + +### Console Output + +Open Chrome DevTools, copy console errors, and paste into Claude: + +``` +I'm seeing this error in the console: +[paste error here] + +Can you investigate and fix it? +``` + +### HAR Files + +For performance issues, export HAR files (network traffic captures): + +1. Open DevTools > Network tab +2. Reproduce the issue +3. Right-click > Save all as HAR +4. Share the HAR file with Claude for analysis + +### HTML/CSS Inspection + +Copy specific HTML/CSS snippets from DevTools: + +``` +The thumbnail hover popup is positioned incorrectly. Here's the current +CSS and HTML structure: +[paste code here] + +Can you fix the positioning so the popup appears above the cursor +but stays within the viewport? +``` + +{{< hint type=tip title="Chrome Extension Limitations" >}} +Claude has a Chrome extension, but I found it primitive for this use case. Manually copying console output and HTML/CSS snippets into Claude was more effective. +{{< /hint >}} + +## What I Built + +### Photo Gallery Extension (web-app-photos) + +Features: +- **Timeline View**: Photos grouped by EXIF capture date with infinite scroll +- **Pinch-to-zoom calendar**: Navigate between day, month, and year views +- **EXIF Metadata Panel**: Camera make/model, aperture, ISO, focal length +- **Map View**: Interactive Leaflet map with marker clustering +- **Lightbox**: Full-screen viewer with keyboard navigation + +Tech stack: Vue 3 Composition API, TypeScript, Leaflet.js, AMD module format + +### Advanced Search Extension (web-app-advanced-search) + +Features: +- **Photo Metadata Filters**: Search by camera, date range, aperture, ISO +- **Filter Chips**: Visual indicators with one-click removal +- **Search Saving**: Save and retrieve search queries +- **KQL Search**: Direct advanced query editing +- **Index Statistics**: View indexing status and configuration + +### Backend Changes (PR #11912) + +To enable photo metadata search, I contributed changes to oCIS core: +- Photo field mappings in the KQL parser +- `Store=true` configuration in Bleve for field retrieval +- WebDAV properties for photo metadata + +This was the trickiest part—understanding why searches returned empty results. The answer: Bleve was indexing fields but not storing them for retrieval. + +## Tips for oCIS Development + +### 1. Start with Conversation, Then Architecture + +Don't jump straight into implementation. Spend ~30-60 minutes in regular chat, discussing the problem space and having Claude research the codebase. I still don't fully understand all of the oCIS source code—Claude figured that out. But those early conversations shaped the architecture that made implementation smooth. + +### 2. Work Incrementally + +Ask for one feature at a time. Get it working, then move to the next. This creates natural checkpoints and makes debugging much easier. + +### 3. Use Browser DevTools Liberally + +Console errors, network requests, and performance profiles are incredibly valuable context. Copy and paste them into your AI conversation. + +### 4. Understand oCIS Extension Requirements + +Extensions must: +- Use AMD module format (not ES modules) +- Have a proper `manifest.json` +- Use the oCIS web SDK for API access + +Claude learns these constraints during the research phase and applies them consistently. + +### 5. Test with Multiple Accounts + +Search in oCIS is space-scoped. What works for your admin account might not work for regular users. I spent more time on this than I'd like to admit. + +### 6. Read Maintainer Feedback Carefully + +PR reviews teach you things no documentation mentions. The oCIS team's suggestions improved my code significantly. + +## Contributing to oCIS + +Once your extension is ready, Claude can handle the entire contribution workflow. I used Claude to: + +- Install and configure Git +- Create forks of the oCIS repositories +- Create feature branches +- Generate commits with appropriate messages +- Push changes to GitHub +- Create pull requests with descriptions and screenshots + +Example prompts: + +``` +Please fork the owncloud/web-extensions repository to my GitHub account +and clone it to my server. +``` + +``` +Create a new branch called feat/web-app-photo-addon and commit our +extension with an appropriate commit message. +``` + +``` +Please create a pull request for our photo-addon extension. Include +screenshots from the /screenshots directory and a clear description +of what the extension does. +``` + +**My contributions:** +- **PR #11912** (oCIS core): Photo metadata search backend — **Merged** +- **PR #305** (web-extensions): Photo gallery extension — Under review +- **PR #306** (web-extensions): Advanced search extension — Under review + +{{< hint type=note title="CLA Requirement" >}} +You'll need to sign the ownCloud Contributor License Agreement (CLA) for your PRs to be accepted. Claude can help you find the CLA link and remind you of the process. +{{< /hint >}} + +## Summary + +**Not a single line of code was written by hand. Not a single git command was typed manually. Nor a single pnpm command.** + +Every commit, every push, every PR—all generated through AI assistance. The backend changes to oCIS core were approved and merged. The web extensions are currently under review. + +The barrier to entry for meaningful open source contribution just got a lot lower. If you're interested in contributing to oCIS but feel intimidated by the codebase, consider trying AI-assisted development. It will surprise you. + +And if you're sceptical? Good. Try it yourself and see. + +--- + +## Resources + +| Resource | URL | +|----------|-----| +| My Extensions | https://github.com/paul43210/web-extensions | +| MCP Quickstart | https://modelcontextprotocol.io/quickstart | +| MCP Local Servers | https://modelcontextprotocol.io/docs/develop/connect-local-servers | +| Claude Desktop MCP | https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop | +| oCIS Web Extensions | https://github.com/owncloud/web-extensions | +| oCIS Documentation | https://doc.owncloud.com/ocis/ | + +--- + +*Paul Faure is a computer engineer based in Ottawa, Canada. He runs a family oCIS instance that he now enjoys using for photos.* + +*Full disclosure: this guide was also written with AI assistance. But a human reviewed it for accuracy—I promise.* From c117c5513f893e9fdea5ae69adbe6b8d1c686b4c Mon Sep 17 00:00:00 2001 From: paul43210 <31411417+paul43210@users.noreply.github.com> Date: Mon, 26 Jan 2026 22:27:14 -0500 Subject: [PATCH 2/5] Update ai-assisted-dev Background section: Removed entirely - was too personal/motivational Throughout: Changed personal pronouns ("I", "my", "we") to neutral language ("the developer", "contributors", passive voice) "What I Built": Renamed to "Example Extensions Built with This Approach" "My contributions": Changed to "Contributions made by this approach" and removed status indicators (Merged/Under review) Resources table: Removed "My Extensions" row (personal fork link) Author bio: Removed the personal bio ("Paul Faure is a computer engineer...") Disclosure: Simplified to just "This guide was written with AI assistance and reviewed for accuracy." --- docs/ocis/guides/ai-assisted-dev | 93 ++++++++++++++------------------ 1 file changed, 40 insertions(+), 53 deletions(-) diff --git a/docs/ocis/guides/ai-assisted-dev b/docs/ocis/guides/ai-assisted-dev index 9346852e929..84ec4c2e7bb 100644 --- a/docs/ocis/guides/ai-assisted-dev +++ b/docs/ocis/guides/ai-assisted-dev @@ -12,27 +12,19 @@ geekdocCollapseSection: true ## Introduction -This guide demonstrates how to build oCIS web extensions using AI-assisted development (sometimes called "vibe coding") with Claude AI. By following this approach, you can create production-ready extensions without writing code manually—the AI handles syntax, boilerplate, and implementation while you focus on architecture and user experience. +This guide demonstrates how to build oCIS web extensions using AI-assisted development (sometimes called "vibe coding") with Claude AI. By following this approach, production-ready extensions can be created without writing code manually—the AI handles syntax, boilerplate, and implementation while the developer focuses on architecture and user experience. **What you'll learn:** - Setting up MCP connectors so Claude can access your server - Using Claude to install development tools and manage your environment - The five-phase workflow for AI-assisted extension development - Practical tips for supervising AI-generated code -- How to contribute your extensions back to the oCIS community +- How to contribute extensions back to the oCIS community **Time investment:** ~10-14 hours per extension (concept to production-ready) **Cost:** ~$70 CAD for two extensions (using Claude Max Pro subscription) -## Background - -When Google started pushing notifications telling my family we were at or close to our storage limits—with helpful suggestions to upgrade to a paid plan—I decided to solve the problem by enhancing our self-hosted oCIS instance with better photo browsing capabilities. - -The existing oCIS file browser shows thumbnails, which is functional, but I wanted what Google Photos gave us: timeline views organised by capture date, camera metadata at a glance, and a map showing where photos were taken. - -Using AI-assisted development, I built two fully functional web extensions and contributed backend changes to oCIS core—all without writing a single line of code by hand. - ## Prerequisites Before starting, ensure you have the following: @@ -42,19 +34,19 @@ Before starting, ensure you have the following: - SSH access to your server (for MCP connectivity) - Full root access to the server unless Claude Code, Claude MCP connector, oCIS and other tools all run as another user -That's it. Claude will help you install everything else. +That's it. Claude will help install everything else. ## Step 1: Configure MCP Connector {{< hint type=important title="This Is the Hardest Part" >}} -Setting up the MCP connector is the most challenging step. Once this is done, Claude handles everything else—including installing development tools, managing git, and building your extension. +Setting up the MCP connector is the most challenging step. Once this is done, Claude handles everything else—including installing development tools, managing git, and building extensions. {{< /hint >}} -MCP (Model Context Protocol) allows Claude to connect directly to your server, enabling both the Claude web interface and Claude Code to access files, run commands, and debug your oCIS deployment. +MCP (Model Context Protocol) allows Claude to connect directly to a server, enabling both the Claude web interface and Claude Code to access files, run commands, and debug oCIS deployments. ### Installation -Follow the official MCP documentation to set up your connector: +Follow the official MCP documentation to set up a connector: - **MCP Quickstart Guide**: https://modelcontextprotocol.io/quickstart - **Connect to Local Servers**: https://modelcontextprotocol.io/docs/develop/connect-local-servers @@ -62,17 +54,17 @@ Follow the official MCP documentation to set up your connector: ### Verify Connection -Once configured, verify Claude can access your server by asking: +Once configured, verify Claude can access the server by asking: ``` Can you list the contents of /home on my server? ``` -If Claude successfully lists your directories, you're ready to proceed. +If Claude successfully lists directories, proceed to the next step. ## Step 2: Let Claude Set Up Your Environment -With MCP connected, Claude can install the development tools you need. Simply ask: +With MCP connected, Claude can install the development tools needed. Simply ask: ``` Please install Claude Code and Git on my server. I'll need these for @@ -80,7 +72,7 @@ developing an oCIS web extension. ``` Claude will: -- Detect your operating system +- Detect the operating system - Install Claude Code using the appropriate method - Install Git if not already present - Configure any necessary paths or permissions @@ -91,7 +83,7 @@ This workflow has been refined over several projects and consistently produces p ### Phase 1: Architecture (~15-30 minutes) -Start in the Claude web interface (not Claude Code). Describe your project and have a conversation: +Start in the Claude web interface (not Claude Code). Describe the project and have a conversation: ``` I want to build an oCIS web extension that displays photos in a timeline @@ -124,7 +116,7 @@ Claude reads documentation, examines code patterns, and produces an architectura ### Phase 3: Scaffolding (~15 minutes) -Now ask Claude to create the project structure on your server: +Ask Claude to create the project structure on the server: ``` Please create the project structure for my photo-addon extension: @@ -136,13 +128,13 @@ Please create the project structure for my photo-addon extension: - A starter CLAUDE.md file documenting the project for future sessions ``` -By the end of this phase, you have a working (empty) extension. +By the end of this phase, a working (empty) extension exists. ### Phase 4: Implementation (~5-6 hours) -Login to your server and changes the folder where the new project was created, and run: +Login to the server and change to the folder where the new project was created, then run: ``` -claude "Please review the claude.md project file, build the web exention, and deploy it to our server. Install and configure any dependencies required. Use 'sudo' where needed to modify or configure the oCIS environment." +claude "Please review the claude.md project file, build the web extension, and deploy it to our server. Install and configure any dependencies required. Use 'sudo' where needed to modify or configure the oCIS environment." ``` Once complete, work through features incrementally. Example prompts: @@ -169,7 +161,7 @@ Can you investigate and fix it? ### Phase 5: Polish (~3 hours) -Once core features work, request comprehensive cleanup. Here are the prompts I used: +Once core features work, request comprehensive cleanup: **Performance optimisation:** ``` @@ -215,20 +207,20 @@ code with the right comments. ## Active Supervision {{< hint type=warning title="This is NOT 'Set It and Forget It'" >}} -While no coding is required, this approach demands active supervision. You cannot just give Claude a prompt and walk away. +While no coding is required, this approach demands active supervision. Developers cannot simply give Claude a prompt and walk away. {{< /hint >}} ### When to Intervene -There were times when Claude Code would: +There are times when Claude Code may: - Deviate from requirements (with good intentions) - Undo something it had just done -- Go down a path that didn't match the architecture +- Go down a path that doesn't match the architecture -The decisions were always logical, but sometimes the harder path is required. I estimate intervening to redirect maybe 3-5% of the time. +The decisions are always logical, but sometimes the harder path is required. Expect to intervene and redirect approximately 3-5% of the time. **Watch for:** -- Changes that don't match your architectural decisions +- Changes that don't match architectural decisions - Unnecessary complexity being added - Repeated undo/redo cycles - Deviation from oCIS extension patterns @@ -243,7 +235,7 @@ AI-generated code works, but it can accumulate: Explicitly asking for refactoring and optimisation catches these issues. -### UI Testing Is On You +### UI Testing Is Manual The AI can write unit tests, but exploratory testing requires human judgment: - Click around the interface @@ -290,12 +282,12 @@ but stays within the viewport? ``` {{< hint type=tip title="Chrome Extension Limitations" >}} -Claude has a Chrome extension, but I found it primitive for this use case. Manually copying console output and HTML/CSS snippets into Claude was more effective. +Claude has a Chrome extension, but it may be limited for this use case. Manually copying console output and HTML/CSS snippets into Claude is often more effective. {{< /hint >}} -## What I Built +## Example Extensions Built with This Approach -### Photo Gallery Extension (web-app-photos) +### Photo Gallery Extension (web-app-photo-addon) Features: - **Timeline View**: Photos grouped by EXIF capture date with infinite scroll @@ -317,7 +309,7 @@ Features: ### Backend Changes (PR #11912) -To enable photo metadata search, I contributed changes to oCIS core: +To enable photo metadata search, changes were contributed to oCIS core: - Photo field mappings in the KQL parser - `Store=true` configuration in Bleve for field retrieval - WebDAV properties for photo metadata @@ -328,7 +320,7 @@ This was the trickiest part—understanding why searches returned empty results. ### 1. Start with Conversation, Then Architecture -Don't jump straight into implementation. Spend ~30-60 minutes in regular chat, discussing the problem space and having Claude research the codebase. I still don't fully understand all of the oCIS source code—Claude figured that out. But those early conversations shaped the architecture that made implementation smooth. +Don't jump straight into implementation. Spend ~30-60 minutes in regular chat, discussing the problem space and having Claude research the codebase. Those early conversations shape the architecture that makes implementation smooth. ### 2. Work Incrementally @@ -336,7 +328,7 @@ Ask for one feature at a time. Get it working, then move to the next. This creat ### 3. Use Browser DevTools Liberally -Console errors, network requests, and performance profiles are incredibly valuable context. Copy and paste them into your AI conversation. +Console errors, network requests, and performance profiles are incredibly valuable context. Copy and paste them into AI conversations. ### 4. Understand oCIS Extension Requirements @@ -349,15 +341,15 @@ Claude learns these constraints during the research phase and applies them consi ### 5. Test with Multiple Accounts -Search in oCIS is space-scoped. What works for your admin account might not work for regular users. I spent more time on this than I'd like to admit. +Search in oCIS is space-scoped. What works for an admin account might not work for regular users. ### 6. Read Maintainer Feedback Carefully -PR reviews teach you things no documentation mentions. The oCIS team's suggestions improved my code significantly. +PR reviews teach things no documentation mentions. The oCIS team's suggestions can significantly improve code quality. ## Contributing to oCIS -Once your extension is ready, Claude can handle the entire contribution workflow. I used Claude to: +Once an extension is ready, Claude can handle the entire contribution workflow: - Install and configure Git - Create forks of the oCIS repositories @@ -384,24 +376,22 @@ screenshots from the /screenshots directory and a clear description of what the extension does. ``` -**My contributions:** -- **PR #11912** (oCIS core): Photo metadata search backend — **Merged** -- **PR #305** (web-extensions): Photo gallery extension — Under review -- **PR #306** (web-extensions): Advanced search extension — Under review +**Contributions made by this approach:** +- **PR #11912** (oCIS core): Photo metadata search backend +- **PR #312** (web-extensions): Photo gallery extension +- **PR #313** (web-extensions): Advanced search extension {{< hint type=note title="CLA Requirement" >}} -You'll need to sign the ownCloud Contributor License Agreement (CLA) for your PRs to be accepted. Claude can help you find the CLA link and remind you of the process. +Contributors need to sign the ownCloud Contributor License Agreement (CLA) for PRs to be accepted. Claude can help find the CLA link and explain the process. {{< /hint >}} ## Summary -**Not a single line of code was written by hand. Not a single git command was typed manually. Nor a single pnpm command.** +Using this approach, complete extensions can be built without writing code manually. No git commands need to be typed manually. No pnpm commands either. -Every commit, every push, every PR—all generated through AI assistance. The backend changes to oCIS core were approved and merged. The web extensions are currently under review. +Every commit, every push, every PR—all generated through AI assistance. The backend changes to oCIS core were approved and merged. The web extensions demonstrate the viability of this development approach. -The barrier to entry for meaningful open source contribution just got a lot lower. If you're interested in contributing to oCIS but feel intimidated by the codebase, consider trying AI-assisted development. It will surprise you. - -And if you're sceptical? Good. Try it yourself and see. +The barrier to entry for meaningful open source contribution is significantly lower with AI-assisted development. For those interested in contributing to oCIS but feeling intimidated by the codebase, this approach is worth considering. --- @@ -409,7 +399,6 @@ And if you're sceptical? Good. Try it yourself and see. | Resource | URL | |----------|-----| -| My Extensions | https://github.com/paul43210/web-extensions | | MCP Quickstart | https://modelcontextprotocol.io/quickstart | | MCP Local Servers | https://modelcontextprotocol.io/docs/develop/connect-local-servers | | Claude Desktop MCP | https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop | @@ -418,6 +407,4 @@ And if you're sceptical? Good. Try it yourself and see. --- -*Paul Faure is a computer engineer based in Ottawa, Canada. He runs a family oCIS instance that he now enjoys using for photos.* - -*Full disclosure: this guide was also written with AI assistance. But a human reviewed it for accuracy—I promise.* +*This guide was written with AI assistance and reviewed for accuracy.* From 6bcc23328238f64ca058c9597ac039b9bbbb5d3b Mon Sep 17 00:00:00 2001 From: paul43210 <31411417+paul43210@users.noreply.github.com> Date: Mon, 26 Jan 2026 22:28:19 -0500 Subject: [PATCH 3/5] Add files via upload --- .../unreleased/enhancement-ai-assisted-dev-guide.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 changelog/unreleased/enhancement-ai-assisted-dev-guide.md diff --git a/changelog/unreleased/enhancement-ai-assisted-dev-guide.md b/changelog/unreleased/enhancement-ai-assisted-dev-guide.md new file mode 100644 index 00000000000..83157cf08c5 --- /dev/null +++ b/changelog/unreleased/enhancement-ai-assisted-dev-guide.md @@ -0,0 +1,11 @@ +Enhancement: Add AI-assisted development guide + +A new guide has been added to the oCIS documentation demonstrating how to build +web extensions using AI-assisted development with Claude AI. The guide covers +MCP connector setup, a five-phase development workflow, debugging techniques, +and contribution workflows. + +This approach has been validated through real contributions including PR #11912 +(photo metadata search backend) and web extensions PRs #305 and #306. + +https://github.com/owncloud/ocis/pull/11941 From 68fb545935876248b35d8b7f6708dc35fd1f8ee5 Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 4 Feb 2026 09:38:16 +0100 Subject: [PATCH 4/5] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/ocis/guides/ai-assisted-dev | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/ocis/guides/ai-assisted-dev b/docs/ocis/guides/ai-assisted-dev index 84ec4c2e7bb..47791af23ab 100644 --- a/docs/ocis/guides/ai-assisted-dev +++ b/docs/ocis/guides/ai-assisted-dev @@ -2,9 +2,9 @@ title: "Building oCIS Web Extensions with AI-Assisted Development" date: 2026-01-21T16:00:00+02:00 weight: 9 -geekdocRepo: https://github.com/owncloud/web-extensions -geekdocEditPath: edit/master/docs/guides -geekdocFilePath: ai-assisted-development.md +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/ocis/guides +geekdocFilePath: ai-assisted-dev.md geekdocCollapseSection: true --- @@ -134,7 +134,7 @@ By the end of this phase, a working (empty) extension exists. Login to the server and change to the folder where the new project was created, then run: ``` -claude "Please review the claude.md project file, build the web extension, and deploy it to our server. Install and configure any dependencies required. Use 'sudo' where needed to modify or configure the oCIS environment." +claude "Please review the CLAUDE.md project file, build the web extension, and deploy it to our server. Install and configure any dependencies required. Use 'sudo' where needed to modify or configure the oCIS environment." ``` Once complete, work through features incrementally. Example prompts: From d81e26b1f6b5ac06153e1d892428a60ffd153ed5 Mon Sep 17 00:00:00 2001 From: Martin Mattel Date: Thu, 5 Feb 2026 11:55:44 +0100 Subject: [PATCH 5/5] document review --- .../{ai-assisted-dev => ai_assisted_dev.md} | 120 +++++++++++------- 1 file changed, 72 insertions(+), 48 deletions(-) rename docs/ocis/guides/{ai-assisted-dev => ai_assisted_dev.md} (77%) diff --git a/docs/ocis/guides/ai-assisted-dev b/docs/ocis/guides/ai_assisted_dev.md similarity index 77% rename from docs/ocis/guides/ai-assisted-dev rename to docs/ocis/guides/ai_assisted_dev.md index 47791af23ab..50cdba2e961 100644 --- a/docs/ocis/guides/ai-assisted-dev +++ b/docs/ocis/guides/ai_assisted_dev.md @@ -4,7 +4,7 @@ date: 2026-01-21T16:00:00+02:00 weight: 9 geekdocRepo: https://github.com/owncloud/ocis geekdocEditPath: edit/master/docs/ocis/guides -geekdocFilePath: ai-assisted-dev.md +geekdocFilePath: ai_assisted_dev.md geekdocCollapseSection: true --- @@ -12,7 +12,7 @@ geekdocCollapseSection: true ## Introduction -This guide demonstrates how to build oCIS web extensions using AI-assisted development (sometimes called "vibe coding") with Claude AI. By following this approach, production-ready extensions can be created without writing code manually—the AI handles syntax, boilerplate, and implementation while the developer focuses on architecture and user experience. +This guide demonstrates how to build Infinite Scale (oCIS) web extensions using AI-assisted development (sometimes called "vibe coding") with Claude AI. By following this approach, review-ready extensions can be created without writing code manually—the AI handles syntax, boilerplate, and implementation while the developer focuses on architecture and user experience. **What you'll learn:** - Setting up MCP connectors so Claude can access your server @@ -21,16 +21,16 @@ This guide demonstrates how to build oCIS web extensions using AI-assisted devel - Practical tips for supervising AI-generated code - How to contribute extensions back to the oCIS community -**Time investment:** ~10-14 hours per extension (concept to production-ready) +**Time investment:** ~10-14 hours per extension (concept to review-ready) -**Cost:** ~$70 CAD for two extensions (using Claude Max Pro subscription) +**Cost:** ~$100 USD for two extensions (using the Claude Max subscription) ## Prerequisites Before starting, ensure you have the following: -- A running oCIS instance -- Claude Max Pro subscription (~$140 CAD/month) +- A running oCIS instance, see the [Admin Docs](https://doc.owncloud.com/ocis/latest/depl-examples/ubuntu-compose/ubuntu-compose-prod.html) for a deployment example +- [Claude Max subscription](https://claude.com/pricing/max) (starts with $100 US/month at the time of writing, other plans availabe) - SSH access to your server (for MCP connectivity) - Full root access to the server unless Claude Code, Claude MCP connector, oCIS and other tools all run as another user @@ -48,15 +48,15 @@ MCP (Model Context Protocol) allows Claude to connect directly to a server, enab Follow the official MCP documentation to set up a connector: -- **MCP Quickstart Guide**: https://modelcontextprotocol.io/quickstart -- **Connect to Local Servers**: https://modelcontextprotocol.io/docs/develop/connect-local-servers -- **Claude Desktop MCP Setup**: https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop +- **[MCP Quickstart Guide](https://modelcontextprotocol.io/quickstart)** +- **[Connect to Local Servers](https://modelcontextprotocol.io/docs/develop/connect-local-servers)** +- **[Claude Desktop MCP Setup](https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop)** ### Verify Connection Once configured, verify Claude can access the server by asking: -``` +```text Can you list the contents of /home on my server? ``` @@ -66,7 +66,7 @@ If Claude successfully lists directories, proceed to the next step. With MCP connected, Claude can install the development tools needed. Simply ask: -``` +```text Please install Claude Code and Git on my server. I'll need these for developing an oCIS web extension. ``` @@ -79,13 +79,13 @@ Claude will: ## The Five-Phase Workflow -This workflow has been refined over several projects and consistently produces production-ready code. +This workflow has been refined over several projects and consistently produces review-ready code. ### Phase 1: Architecture (~15-30 minutes) Start in the Claude web interface (not Claude Code). Describe the project and have a conversation: -``` +```text I want to build an oCIS web extension that displays photos in a timeline grouped by their EXIF capture date. It should have infinite scroll starting from today and going backwards, show camera metadata when you click on a photo, @@ -100,7 +100,7 @@ Claude will ask clarifying questions about scope, user experience, and technical Ask Claude to research the existing oCIS architecture: -``` +```text Please research how oCIS web extensions work. I need to understand: - The extension manifest format - How extensions integrate with the oCIS web UI @@ -118,7 +118,7 @@ Claude reads documentation, examines code patterns, and produces an architectura Ask Claude to create the project structure on the server: -``` +```text Please create the project structure for my photo-addon extension: - Git repository initialised - Build configuration (Vite with AMD output) @@ -132,27 +132,32 @@ By the end of this phase, a working (empty) extension exists. ### Phase 4: Implementation (~5-6 hours) -Login to the server and change to the folder where the new project was created, then run: -``` -claude "Please review the CLAUDE.md project file, build the web extension, and deploy it to our server. Install and configure any dependencies required. Use 'sudo' where needed to modify or configure the oCIS environment." +Login to the server and change to the folder where the new project was created, then run: + +```text +claude "Please review the CLAUDE.md project file, build the web extension, +and deploy it to our server. Install and configure any dependencies required. +Use 'sudo' where needed to modify or configure the oCIS environment." ``` Once complete, work through features incrementally. Example prompts: **Feature requests:** -``` + +```text Please adjust the logic to start by searching for today's date (unless overwritten by the dropdowns at the top), then display them on the screen. If the images don't fill the screen, load up another day, until the screen is filled plus some buffer. Then when I scroll, bring in more images. ``` -``` +```text In the map view, when I hover over a dot, the thumbnail shows up above off the screen. Can you fix the positioning? ``` **Bug fixes:** -``` + +```text I'm seeing this error in the console: [paste error here] @@ -164,41 +169,48 @@ Can you investigate and fix it? Once core features work, request comprehensive cleanup: **Performance optimisation:** -``` + +```text Are there any performance improvements that we can make? ``` **Bug hunting:** -``` + +```text Are there any memory leaks or bugs that can be found? ``` **Code quality:** -``` + +```text Are there any inefficiencies we can improve on? Unused variables? Duplicate functions? Excessive if statements? Overwriting CSS styles? Overly complex logic? ``` **Error handling:** -``` + +```text Are there any error handling gaps or functions that may fall through without handling all scenarios? ``` **Documentation:** -``` + +```text Are there any missing comments? Or complex code that could use clear documentation? ``` **Internationalisation:** -``` + +```text Are there any visible text strings that are not yet set up for translation? ``` **Comprehensive cleanup:** -``` + +```text Pulling from the backlog list, can you do a good code refactor to simplify, add all required unit tests, and add i18n support, then commit and push the code with the right comments. @@ -217,7 +229,7 @@ There are times when Claude Code may: - Undo something it had just done - Go down a path that doesn't match the architecture -The decisions are always logical, but sometimes the harder path is required. Expect to intervene and redirect approximately 3-5% of the time. +The decisions are always logical, but sometimes the harder path is required. Expect to intervene and redirect approximately ~5% of the time. **Watch for:** - Changes that don't match architectural decisions @@ -232,8 +244,10 @@ AI-generated code works, but it can accumulate: - Unused variables - Overly complex conditionals - Duplicate CSS styles +- Missing good practice for the orders of directives +- Missing the definition of required interactive handlers -Explicitly asking for refactoring and optimisation catches these issues. +When submitting a pull request (PR), issues highlighted during CI steps, such as linting, can be resolved by explicitly asking for code refactoring and optimisation. ### UI Testing Is Manual @@ -252,7 +266,7 @@ When issues arise, these techniques help Claude understand and fix problems: Open Chrome DevTools, copy console errors, and paste into Claude: -``` +```text I'm seeing this error in the console: [paste error here] @@ -272,7 +286,7 @@ For performance issues, export HAR files (network traffic captures): Copy specific HTML/CSS snippets from DevTools: -``` +```text The thumbnail hover popup is positioned incorrectly. Here's the current CSS and HTML structure: [paste code here] @@ -285,7 +299,7 @@ but stays within the viewport? Claude has a Chrome extension, but it may be limited for this use case. Manually copying console output and HTML/CSS snippets into Claude is often more effective. {{< /hint >}} -## Example Extensions Built with This Approach +## Example Web Extensions Built with This Approach ### Photo Gallery Extension (web-app-photo-addon) @@ -307,7 +321,7 @@ Features: - **KQL Search**: Direct advanced query editing - **Index Statistics**: View indexing status and configuration -### Backend Changes (PR #11912) +### Backend Changes in oCIS To enable photo metadata search, changes were contributed to oCIS core: - Photo field mappings in the KQL parser @@ -333,7 +347,7 @@ Console errors, network requests, and performance profiles are incredibly valuab ### 4. Understand oCIS Extension Requirements Extensions must: -- Use AMD module format (not ES modules) +- Use CJS module format (not ES modules) - Have a proper `manifest.json` - Use the oCIS web SDK for API access @@ -347,9 +361,9 @@ Search in oCIS is space-scoped. What works for an admin account might not work f PR reviews teach things no documentation mentions. The oCIS team's suggestions can significantly improve code quality. -## Contributing to oCIS +## Contributing to oCIS or web-extensions -Once an extension is ready, Claude can handle the entire contribution workflow: +Once a web-extension is ready, Claude can handle the entire contribution workflow: - Install and configure Git - Create forks of the oCIS repositories @@ -360,39 +374,48 @@ Once an extension is ready, Claude can handle the entire contribution workflow: Example prompts: -``` +```text Please fork the owncloud/web-extensions repository to my GitHub account and clone it to my server. ``` -``` +```text Create a new branch called feat/web-app-photo-addon and commit our extension with an appropriate commit message. ``` -``` +```text Please create a pull request for our photo-addon extension. Include screenshots from the /screenshots directory and a clear description of what the extension does. ``` **Contributions made by this approach:** -- **PR #11912** (oCIS core): Photo metadata search backend -- **PR #312** (web-extensions): Photo gallery extension -- **PR #313** (web-extensions): Advanced search extension +- **oCIS core**: Photo metadata search backend +- **web-extensions**: Photo gallery extension +- **web-extensions**: Advanced search extension {{< hint type=note title="CLA Requirement" >}} Contributors need to sign the ownCloud Contributor License Agreement (CLA) for PRs to be accepted. Claude can help find the CLA link and explain the process. {{< /hint >}} +## Notes + +Additional steps can be required in the oCIS repository for changes in the web-extensions repository, in particular: + +- If the web extension requires it, add proposals to the back-end code in the oCIS codebase. +- In order to make the new web extension more easily accessible to the public, the `ocis_full` deployment example in the oCIS repository should be updated. The new oCIS version will then reference it automatically and the documentation team will update the release notes and documentation accordingly. + ## Summary -Using this approach, complete extensions can be built without writing code manually. No git commands need to be typed manually. No pnpm commands either. +Using this approach, complete web-extensions can be built without writing code manually. No git commands need to be typed manually. No pnpm commands either. -Every commit, every push, every PR—all generated through AI assistance. The backend changes to oCIS core were approved and merged. The web extensions demonstrate the viability of this development approach. +Every commit, every push, every PR—all generated through AI assistance. The backend changes to oCIS core were approved and merged. The web-extensions demonstrate the viability of this development approach. The barrier to entry for meaningful open source contribution is significantly lower with AI-assisted development. For those interested in contributing to oCIS but feeling intimidated by the codebase, this approach is worth considering. +Please note that, as with all contributions, this approach requires a full review process from the code maintainers, with iterations required to finalise all steps. To ensure stability and maintainability, all feedback must be incorporated into the proposed changes. + --- ## Resources @@ -403,8 +426,9 @@ The barrier to entry for meaningful open source contribution is significantly lo | MCP Local Servers | https://modelcontextprotocol.io/docs/develop/connect-local-servers | | Claude Desktop MCP | https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop | | oCIS Web Extensions | https://github.com/owncloud/web-extensions | -| oCIS Documentation | https://doc.owncloud.com/ocis/ | - +| oCIS Admin Documentation | https://doc.owncloud.com/ocis/ | +| oCIS Developer Documentation | https://owncloud.dev | --- -*This guide was written with AI assistance and reviewed for accuracy.* +*This guide was written with AI assistance and reviewed by the ownCloud documentation team for accuracy.* +