SkillAgentSearch skills...

Samples

Samples to show you how to create and deploy apps with Defang.

Install / Use

/learn @DefangLabs/Samples
About this skill

Quality Score

0/100

Category

Operations

Supported Platforms

Universal

README

Defang Samples

Samples to show you how to develop, deploy, and debug cloud applications with Defang.

Browse through the ./samples directory, or search and browse in the docs.

Adding Samples

To start working on a new sample, run . ./scripts/new-sample from the root of the repository. This will create a new sample directory, with some basic scaffolding to get you started. Look for #REMOVE_ME_AFTER_EDITING in your new project to look for things that you should probably be changing/checking per sample. Feel free to remove files, like compose.dev.yaml if they aren't necessary for your sample.

Testing Samples

When you add a new sample, make sure to add any config vals to the deploy-changed-samples.yml workflow. They need to be prefixed with TEST_ and those values need to be set in the repo secrets. NOTE at the moment test break if we have a config value that only shows up in string interpolation in a longer string, for example in ENV_NAME: proto://user:${PASSWORD}@host if PASSWORD only ever shows up in that longer string, it will break the test. A workaround is to just add a line with PASSWORD: in the environment section, so the test can pick it up. Ugly, but works for now.

<!-- SAMPLES_LIST_START -->

Available Samples

| Sample | Description | Tags | Languages | |--------|-------------|------|-----------| | Agentic Autogen | An Autogen agent application using Mistral and FastAPI, deployed with Defang. | Agent, Autogen, Mistral, FastAPI, Vite, React, Python, JavaScript, AI | Python, JavaScript | | Agentic LangGraph | A LangGraph Agent application that can use tools, deployed with Defang. | Agent, LangGraph, LangChain, AI, OpenAI, Tavily | TypeScript | | Agentic Strands | A Strands Agent application, deployed with Defang. | Python, Flask, Strands, AI, Agent | Python | | Angular & Node.js | A full-stack application using Angular for the frontend and Node.js with Socket.IO for the backend, containerized with Docker. | Angular, Node.js, Socket.IO, TypeScript, JavaScript | nodejs | | Arduino Flask Wifi Server | An Arduino wifi server built with Flask. | Arduino, Flask, Python, IoT, Wifi, Serial | python | | BullMQ & BullBoard & Redis | A sample project with BullMQ, BullBoard, and Redis. | BullMQ, BullBoard, Redis, Express, Node.js, Message Queue, JavaScript | nodejs | | Crew.ai Django Sample | A sample application that uses Crew.ai to summarize text in a background task, streamed to the user in real-time. | Django, Celery, Redis, Postgres, AI, ML | Python | | C# & ASP.NET Core | A simple task manager application using C# and ASP.NET Core. | ASP.NET Core, JavaScript, C# | C# | | Django | A simple Django app that uses SQLite as the database. | Django, SQLite, Python | python | | Django Celery | A Django application that uses Celery for background tasks, Postgres as the database, and Redis as the message broker. | Django, Celery, Postgres, Redis | python, sql | | Django Channels & Redis & Postgres | A basic configuration of Django Channels with Redis and Postgres demonstrating a simple chat application. | Django, Channels, Redis, Postgres, Chat, Application | Python | | Django & PostgreSQL | A customer relationship management list project developed using the Python Django framework, offering a starting point to help you quickly build your customer management system. | Django, PostgreSQL, Python, SQL | python | | Django | A simple Django app that uses SQLite as the database. | Django, SQLite, Python, Railpack | python | | Elysia & Bun | A basic Elysia app running on Bun with Defang. | Bun, Elysia, TypeScript, JavaScript | nodejs | | FastAPI | A sample project demonstrating how to deploy FastAPI with Defang. | FastAPI, OpenAPI, Python | python | | FastAPI & PostgreSQL | A sample project with FastAPI and PostgreSQL. | FastAPI, PostgreSQL, Python, SQL | python | | FastAPI Postgres Pub/Sub | FastAPI sample that stores messages in Postgres and streams them to two app instances via LISTEN/NOTIFY. | FastAPI, PostgreSQL, WebSockets, PubSub | Python, SQL | | Feathers.js | A sample project demonstrating how to deploy a Feathers.js application using Defang. The application displays "DefangxFeathersjs" on the webpage. | Feathers.js, Node.js, JavaScript | nodejs | | Flask | A basic Flask to-do app. | Flask, Python | python | | Flask | A basic Flask to-do app. | Flask, Python, Railpack | python | | Go HTTP Server | A simple Go application that echoes back the request. | Go, HTTP | golang | | Go HTTP Form | A simple Go application that demonstrates form submission using the net/http library. | Go, HTTP | golang | | Go HTTP Form | A simple Go application that demonstrates form submission using the net/http library. | Go, HTTP, Railpack | golang | | Go & MongoDB | A simple Go application that manages tasks with MongoDB. | Go, MongoDB, Atlas, Task Manager | golang | | Go & OpenAI | A simple Go application that interacts with the OpenAI API. | Go, OpenAI, ChatGPT | golang | | Go & REST API | A simple Go application that fetches fiscal data from an API. | Go, HTTP, Fiscal Data, REST API | golang | | Go & S3 | A simple Go application that uploads and downloads files from AWS S3. | Go, S3, AWS | golang | | Go & Slack API | A simple Slackbot that posts messages to a Slack channel. | Go, Slack, Bot | golang | | Google ADK | A simple sample demonstrating how to deploy agents build with Google ADK to Defang. | Google ADK, Python, Agents | python | | Hasura & PostgreSQL | A sample project demonstrating how to deploy Hasura with Defang and connect it to a PostgreSQL database. | Hasura, GraphQL, PostgreSQL, Database | SQL, GraphQL | | HTML & CSS & JavaScript | A simple HTML, CSS and JavaScript website running on Defang. | HTML, CSS, JavaScript, Frontend | nodejs | | Huginn | A system for building agents that perform automated tasks for you online. | Huginn, Agents, Automation | Dockerfile | | ImgProxy | A fast and secure standalone server for resizing and converting remote images | Imgproxy, Images, Server | N/A | | Javalin | A short hello world application demonstrating how to deploy Javalin onto Defang. | Javalin, Java, Maven | java | | Jupyter & Postgres | This sample shows you how to spin up a postgres database and a Jupyter notebook server. | Jupyter, Postgres, Database | Python, SQL | | LangChain & Flask | A sample project demonstrating how to deploy LangChain with Flask on Defang. | LangChain, Flask, AI, Python | python | | Managed LLM | An app using Managed LLMs with Defang's OpenAI Access Gateway. | LLM, OpenAI, Python, Bedrock, Vertex | Python | | Managed LLM with Docker Model Provider | An app using Managed LLMs with a Docker Model Provider, deployed with Defang. | LLM, Python, Bedrock, Vertex, Docker Model Provider | Python | | Mastra & Next.js | An AI-powered tool for chatting with GitHub repositories using Mastra and Google Gemini. | AI, GitHub, Mastra, Next.js, PostgreSQL, TypeScript | TypeScript, JavaScript, Docker | | Model Context Protocol (MCP) Chatbot | An MCP (Model Context Protocol) chatbot assistant built with Next.js, Python, and Anthropic Claude. | MCP, Next.js, Python, Quart, Claude, AI, Anthropic, TypeScript, React, JavaScript | nodejs, python | | Metabase & PostgreSQL | A simple Metabase configuration with a PostgreSQL database. | Metabase, PostgreSQL, Analytics, Database | SQL | | n8n | A n8n app running on Defang. | n8n, PostgreSQL, Docker | Docker, Shell | | Next.js | A basic Next.js app. | Next.js, React, Docker, Node.js, TypeScript, JavaScript, Static | nodejs | | Next.js Blog | A starter project developed using Next.js designed to make it easy to launch a blog. | Next.js, Blog, Node.js, React, MDX, TypeScript, JavaScript | nodejs | | Next.js & Claude | A fun chatbot created with Next.js and Claude. | Next.js, TypeScript, React, JavaScript, Chatbot, Claude, AI, Anthropic | TypeScript | | Next.js CV | A Next.js web app that displays a minimalist CV. | Next.js, React, TypeScript, JavaScript | nodejs | | Nextra | A documentation starter project developed using Nextra designed to streamline the creation of your documentation. | Next.js, Documentation, Nextra, Knowledgebase, Node.js, JavaScript, TypeScript | nodejs | | Next.js & Postgres | A sample Next.js application that uses Postgres as a database. | Next.js, Postgres, Database, Node.js | TypeScript, JavaScript | | Next.js | A basic Next.js app. | Next.js, React, Node.js, TypeScript, JavaScript, Static, Railpack | nodejs | | NocoDB | An open source alternative to AirTable. | NocoDB | Dockerfile | | Node.js & SocketIO | A minimal chat applica

View on GitHub
GitHub Stars11
CategoryOperations
Updated2d ago
Forks26

Languages

Go

Security Score

90/100

Audited on Apr 7, 2026

No findings