Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add digitalocean-labs/do-app-platform-skills --skill "app-platform-designer"
Install specific skill from multi-skill repository
# Description
Transform natural language application descriptions into production-ready DigitalOcean App Platform specifications. Use when designing apps, creating app specs, generating deploy.template.yaml, or architecting multi-component applications.
# SKILL.md
name: app-platform-designer
version: 1.0.0
min_doctl_version: "1.82.0"
description: Transform natural language application descriptions into production-ready DigitalOcean App Platform specifications. Use when designing apps, creating app specs, generating deploy.template.yaml, or architecting multi-component applications.
related_skills: [deployment, networking, postgres, managed-db-services]
deprecated: false
App Platform Designer Skill
Transform natural language descriptions into production-ready App Platform specifications.
Primary question: "I want to build [description]. What should my App Platform architecture look like?"
Produces:
- .do/app.yaml β App Platform specification
- .do/deploy.template.yaml β Deploy to DO button (public repos)
- .env.example β Environment variable template
Quick Decision
What do you need?
βββ Design new app from description β Workflow 1
βββ Analyze repo and create spec β Workflow 2
βββ Add Deploy to DO button β Workflow 3
βββ Multi-environment setup β Workflow 4
Workflow 1: Natural Language β App Spec
Trigger: "I need a web app with [description]"
- Gather requirements:
- What does the app do?
- Language/framework?
- Database needs?
-
Background processing?
-
Decompose into components:
- HTTP-facing β
services - Background processors β
workers - One-time/scheduled β
jobs - Static frontends β
static_sites -
Data stores β
databases -
Generate spec with health checks, env vars, routing
-
Validate:
doctl apps spec validate .do/app.yaml
Full guide: See architecture-patterns.md
Workflow 2: Analyze Repository β App Spec
Trigger: "Here's my repo, create an app spec"
Check for:
βββ Dockerfile β Use dockerfile build
βββ package.json β Node.js app
βββ requirements.txt / pyproject.toml β Python app
βββ go.mod β Go app
βββ Multiple directories with above β Monorepo
Full guide: See component-types.md
Workflow 3: Deploy to DO Button
Trigger: "Add Deploy to DigitalOcean button"
Requirements: Public GitHub repository
- Create
.do/deploy.template.yaml(wraps spec inspec:key, usesgit:block) - Add button to README
[](https://cloud.digitalocean.com/apps/new?repo=https://github.com/OWNER/REPO/tree/BRANCH)
Full guide: See deploy-to-do-button.md
Opinionated Defaults
| Decision | Default | Rationale |
|---|---|---|
| Instance size | apps-s-1vcpu-1gb |
Good starting point |
| Instance count | 1 | Start minimal |
| Database | Dev database | Cost-effective |
| Cache | Valkey (not Redis) | Redis is EOL |
| Build | Dockerfile if present | More control |
| Health check | /health or /healthz |
Industry standard |
| Deploy on push | true |
GitOps workflow |
| Region | nyc |
Good default |
| Source format | git: block |
Required for deploy.template.yaml |
Component Summary
| Type | Use Case | Example |
|---|---|---|
services |
HTTP workloads | APIs, web apps |
workers |
Background processing | Queue consumers, internal APIs |
jobs |
One-time/scheduled | Migrations, reports |
static_sites |
Frontend/docs | React, Vue, marketing |
databases |
Data storage | PostgreSQL, Valkey |
Full guide: See component-types.md
Pattern Selection
What are you building?
βββ Simple app (1 service)? β Pattern 1
βββ Frontend + API? β Pattern 2
βββ Need background processing? β Pattern 3
βββ Monorepo? β Pattern 4
βββ Complex SaaS? β Pattern 5
Full patterns: See architecture-patterns.md
Quick Start: Single Service + DB
name: my-app
region: nyc
services:
- name: web
git:
repo_clone_url: https://github.com/owner/repo.git
branch: main
http_port: 8080
instance_size_slug: apps-s-1vcpu-1gb
health_check:
http_path: /health
envs:
- key: DATABASE_URL
scope: RUN_TIME
value: ${db.DATABASE_URL}
databases:
- name: db
engine: PG
production: false
Quick Start: API + Frontend
name: fullstack-app
region: nyc
services:
- name: api
git:
repo_clone_url: https://github.com/owner/repo.git
branch: main
source_dir: /api
http_port: 8080
health_check:
http_path: /health
envs:
- key: DATABASE_URL
scope: RUN_TIME
value: ${db.DATABASE_URL}
static_sites:
- name: frontend
git:
repo_clone_url: https://github.com/owner/repo.git
branch: main
source_dir: /frontend
build_command: npm run build
output_dir: dist
envs:
- key: VITE_API_URL
scope: BUILD_TIME
value: /api
databases:
- name: db
engine: PG
production: false
ingress:
rules:
- match:
path:
prefix: /api
component:
name: api
- match:
path:
prefix: /
component:
name: frontend
Environment-Portable Design
All code must work in: local dev, Docker Compose, AND App Platform.
| Principle | Implementation |
|---|---|
Bind to $PORT |
process.env.PORT \|\| 3000 |
| Public services | Listed in ingress.rules |
| Internal services | Not in ingress, use ${name.PRIVATE_URL} |
| Never hardcode | Use env vars with defaults |
// Portable port binding
const port = process.env.PORT || 3000
server.listen({ port, host: '0.0.0.0' })
Database Quick Reference
| Engine | Slug | Dev DB? | Notes |
|---|---|---|---|
| PostgreSQL | PG |
Yes | Recommended |
| Valkey | VALKEY |
Yes | Use instead of Redis |
| MySQL | MYSQL |
No | Managed only |
| MongoDB | MONGODB |
No | Managed only |
Full guide: See database-configuration.md
Environment Variables Quick Reference
| Scope | Use Case |
|---|---|
RUN_TIME |
Secrets, DB URLs |
BUILD_TIME |
Public API URLs, feature flags |
RUN_AND_BUILD_TIME |
NPM tokens, shared config |
| Placeholder | Resolves To |
|---|---|
${db.DATABASE_URL} |
Database connection string |
${service.PRIVATE_URL} |
Internal service URL |
${service.PUBLIC_URL} |
Public service URL |
Full guide: See environment-variables.md
Ingress (Routing)
ingress:
rules:
- match:
path:
prefix: /api
component:
name: api
- match:
path:
prefix: /
component:
name: frontend
For advanced routing: See networking skill
Validation
doctl apps spec validate .do/app.yaml
doctl apps spec validate .do/deploy.template.yaml
| Error | Fix |
|---|---|
invalid component name |
Use lowercase, hyphens only |
unknown instance size |
Check instance-sizes.yaml |
invalid database reference |
Verify database name matches |
routes is deprecated |
Use ingress.rules |
Instance Sizes
| Slug | CPU | RAM | Price | Use Case |
|---|---|---|---|---|
apps-s-1vcpu-0.5gb |
1 shared | 512 MiB | $5/mo | Workers, jobs |
apps-s-1vcpu-1gb |
1 shared | 1 GiB | $12/mo | Default |
apps-d-1vcpu-2gb |
1 dedicated | 2 GiB | $39/mo | Production |
Full list: See shared/instance-sizes.yaml
Reference Files
- component-types.md β Services, workers, jobs, static sites
- architecture-patterns.md β All 5 patterns with YAML
- environment-variables.md β Scopes, types, placeholders
- deploy-to-do-button.md β Template conversion, button HTML
- database-configuration.md β Dev vs managed, bindable vars
Shared References
- AppSpec-Reference.md β Field-level syntax, constraints
- instance-sizes.yaml β All instance sizes and pricing
- regions.yaml β Available regions
- bindable-variables.md β All bindable variable patterns
Integration with Other Skills
- β deployment: Deploy the generated app spec via GitHub Actions
- β devcontainers: Create local dev environment with prod parity
- β postgres: Advanced database configuration
- β networking: Custom domains, CORS, VPC
- β migration: Convert from other platforms
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.