From 10c3e85d2c89c340306e3cf07e434e7a90ca7922 Mon Sep 17 00:00:00 2001 From: defangdevs <126856790+defangdevs@users.noreply.github.com> Date: Thu, 23 Jul 2026 13:25:16 +0000 Subject: [PATCH] Point 1-click-deploy badges at Portal deploy flow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 1-click-deploy badges linked to `portal.defang.dev/redirect?url=…github.com/new?template_name=…`, which bounced straight to GitHub's template-creation page and skipped the Defang Portal deploy flow (create project + stack + cloud connection). Repoint every badge at `https://portal.defang.io/sample/` — the same deploy flow the sample cards on defang.io use. The slug is the sample's directory name, which is the canonical sample identifier used to build the Portal/docs samples index (`prep-samples.js` keys entries by `directoryName`). - Update the badge URL in all 82 sample READMEs that had one. - Add the badge to the 3 samples that were missing it (crewai, defang-provider-handoff, platformatic). - Update starter-sample/README.md so new samples scaffold the correct link. - Update CLAUDE.md docs (template block + badge note; the note claiming the URL was auto-managed by template-manager.js was stale). Also fixes a stray `<` left in the arduino-wifi badge URL. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_017FZuuw58Axb7zWN9Typi22 --- CLAUDE.md | 4 ++-- samples/agentic-autogen/README.md | 2 +- samples/agentic-langgraph/README.md | 2 +- samples/agentic-strands/README.md | 2 +- samples/angular-express/README.md | 2 +- samples/arduino-wifi/README.md | 2 +- samples/bullmq-bullboard-redis/README.md | 2 +- samples/crewai/README.md | 2 ++ samples/csharp-dotnet/README.md | 2 +- samples/defang-provider-handoff/README.md | 2 ++ samples/django-celery/README.md | 2 +- samples/django-postgres/README.md | 2 +- samples/django-railpack/README.md | 2 +- samples/django-redis-postgres/README.md | 2 +- samples/django/README.md | 2 +- samples/elysia/README.md | 2 +- samples/fastapi-postgres-pubsub/README.md | 2 +- samples/fastapi-postgres/README.md | 2 +- samples/fastapi/README.md | 2 +- samples/feathersjs/README.md | 2 +- samples/flask-railpack/README.md | 2 +- samples/flask/README.md | 2 +- samples/golang-http-form/README.md | 2 +- samples/golang-http/README.md | 2 +- samples/golang-mongodb/README.md | 2 +- samples/golang-openai/README.md | 2 +- samples/golang-railpack/README.md | 2 +- samples/golang-rest-api/README.md | 2 +- samples/golang-s3/README.md | 2 +- samples/golang-slackbot/README.md | 2 +- samples/google-adk/README.md | 2 +- samples/hasura/README.md | 2 +- samples/html-css-js/README.md | 2 +- samples/huginn/README.md | 2 +- samples/imgproxy/README.md | 2 +- samples/javalin/README.md | 2 +- samples/jupyter-postgres/README.md | 2 +- samples/langchain/README.md | 2 +- samples/managed-llm-provider/README.md | 2 +- samples/managed-llm/README.md | 2 +- samples/mastra-extended/README.md | 2 +- samples/mastra-nextjs/README.md | 2 +- samples/mcp/README.md | 2 +- samples/metabase/README.md | 2 +- samples/n8n/README.md | 2 +- samples/nextjs-blog/README.md | 2 +- samples/nextjs-claude/README.md | 2 +- samples/nextjs-cv/README.md | 2 +- samples/nextjs-documentation/README.md | 2 +- samples/nextjs-postgres/README.md | 2 +- samples/nextjs-railpack/README.md | 2 +- samples/nextjs/README.md | 2 +- samples/nocodb/README.md | 2 +- samples/nodejs-chatroom/README.md | 2 +- samples/nodejs-express/README.md | 2 +- samples/nodejs-form/README.md | 2 +- samples/nodejs-http/README.md | 2 +- samples/nodejs-openai/README.md | 2 +- samples/nodejs-react-postgres/README.md | 2 +- samples/nodejs-rest-api/README.md | 2 +- samples/nodejs-s3/README.md | 2 +- samples/nounly/README.md | 2 +- samples/ollama/README.md | 2 +- samples/phoenix-postgres/README.md | 2 +- samples/platformatic/README.md | 2 ++ samples/pulumi-remix-postgres/README.md | 2 +- samples/pulumi/README.md | 2 +- samples/python-form/README.md | 2 +- samples/python-implicit-gpu/README.md | 2 +- samples/python-minimal/README.md | 2 +- samples/python-openai/README.md | 2 +- samples/python-rest-api/README.md | 2 +- samples/python-s3/README.md | 2 +- samples/rails/README.md | 2 +- samples/react-vite-railpack/README.md | 2 +- samples/react/README.md | 2 +- samples/redis-js/README.md | 2 +- samples/rocket/README.md | 2 +- samples/sailsjs-postgres/README.md | 2 +- samples/sailsjs/README.md | 2 +- samples/self-improving-mastra/README.md | 2 +- samples/svelte-mysql/README.md | 2 +- samples/sveltekit-mongodb/README.md | 2 +- samples/sveltekit/README.md | 2 +- samples/vllm/README.md | 2 +- samples/vuejs/README.md | 2 +- starter-sample/README.md | 2 +- 87 files changed, 91 insertions(+), 85 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index cd7fb0b2c..8eea6d475 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -80,7 +80,7 @@ Must follow the established template structure: ```markdown # Sample Title -[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample--template%26template_owner%3DDefangSamples) +[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.io/sample/) Description of what this sample does. @@ -124,7 +124,7 @@ Languages: python, nodejs, golang, etc. - `Tags:` -- Comma-separated; frameworks, tools, categories (NOT programming languages) - `Languages:` -- Comma-separated programming languages/runtimes -The 1-click deploy badge URL must use `sample--template` as the `template_name` (this is auto-managed by `template-manager.js`). +The 1-click deploy badge must link to `https://portal.defang.io/sample/` (where `` is the sample's directory name). This opens the Defang Portal deploy flow (create project + stack + clone) instead of jumping straight to GitHub's template-creation page. ### 3. Source code directory (required) diff --git a/samples/agentic-autogen/README.md b/samples/agentic-autogen/README.md index c9b15eb8f..c41cc2681 100644 --- a/samples/agentic-autogen/README.md +++ b/samples/agentic-autogen/README.md @@ -1,6 +1,6 @@ # Agentic Autogen -[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-agentic-autogen-template%26template_owner%3DDefangSamples) +[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.io/sample/agentic-autogen) This sample shows an agentic Autogen application using Mistral and FastAPI, deployed with Defang. For demonstration purposes, it will require a [Mistral AI](https://mistral.ai/) API key (see [Configuration](#configuration) for more details). However, you are free to modify it to use a different LLM, say the [Defang OpenAI Access Gateway](https://github.com/DefangLabs/openai-access-gateway/) service, as an alternative. Note that the Vite React frontend is served through the FastAPI backend so that they can be treated as one service in production. diff --git a/samples/agentic-langgraph/README.md b/samples/agentic-langgraph/README.md index 38904eb3c..ec71f5210 100644 --- a/samples/agentic-langgraph/README.md +++ b/samples/agentic-langgraph/README.md @@ -1,6 +1,6 @@ # Agentic LangGraph -[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-agentic-langgraph-template%26template_owner%3DDefangSamples) +[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.io/sample/agentic-langgraph) This sample demonstrates a LangGraph Agent application deployed with Defang. You can customize the agent's tools as needed. For example, it includes a Tavily Search tool for performing search queries, which requires a `TAVILY_API_KEY` (see [Configuration](#configuration) for setup details). diff --git a/samples/agentic-strands/README.md b/samples/agentic-strands/README.md index 72304594d..a1d8bfe43 100644 --- a/samples/agentic-strands/README.md +++ b/samples/agentic-strands/README.md @@ -1,6 +1,6 @@ # Agentic Strands -[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-agentic-strands-template%26template_owner%3DDefangSamples) +[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.io/sample/agentic-strands) This sample demonstrates a Strands Agent application, deployed with Defang. This [Strands](https://strandsagents.com/latest/) Agent can use tools, and is compatible with the [Defang OpenAI Access Gateway](https://github.com/DefangLabs/openai-access-gateway/). diff --git a/samples/angular-express/README.md b/samples/angular-express/README.md index 3c2471c0e..0c3886702 100644 --- a/samples/angular-express/README.md +++ b/samples/angular-express/README.md @@ -1,6 +1,6 @@ # Angular & Node.js -[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-angular-express-template%26template_owner%3DDefangSamples) +[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.io/sample/angular-express) This sample demonstrates how to deploy a full-stack Angular and Node.js application with Defang. It uses Socket.IO for real-time communication. The Docker setup ensures the app can be easily built and deployed. diff --git a/samples/arduino-wifi/README.md b/samples/arduino-wifi/README.md index 3a14ecd9d..657515212 100644 --- a/samples/arduino-wifi/README.md +++ b/samples/arduino-wifi/README.md @@ -1,6 +1,6 @@ # Arduino Flask Wifi Server -[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample--template%26template_owner%3DDefangSamples) +[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.io/sample/) This is a sample that shows the rough structure of an actual Defang sample. This top paragraph should give a bit of context about the project and what it does. The rest of the README should be a guide on how to use the sample. #REMOVE_ME_AFTER_EDITING