frappe-data-migration-generator
Generate data migration scripts for Frappe. Use when migrating data from legacy systems, transforming data structures, or importing large datasets.
Add a new microservice to dev-podman-compose.yml with proper configuration, dependencies, and networking.
Full skill instructions
Add a new microservice to dev-podman-compose.yml following the established patterns.
Add to dev-podman-compose.yml in the services: section:
# <Service Name> Microservice
<service-name>-service:
image: localhost/frappe-microservices-base:latest
ports:
- "<port>:8000" # Use next available port (8002, 8003, 8004, etc.)
environment:
- FRAPPE_SITE=dev.localhost
- FRAPPE_SITES_PATH=/app/sites
- PYTHONUNBUFFERED=1
- CENTRAL_SITE_URL=http://dev-frappe-ms-poc-dev-central-site-1:8000
# Database configuration (central site)
- DB_HOST=dev-frappe-ms-poc-dev-central-site-1
- DB_PORT=3306
- DB_NAME=_9079b9524fe5ca86
- DB_PASSWORD=687FNguLvKKbFH3T
- DB_TYPE=mariadb
# Redis configuration
- REDIS_HOST=dev-frappe-ms-poc-dev-central-site-1
- REDIS_PORT=6379
depends_on:
dev-central-site:
condition: service_started
networks:
- dev-frappe-network
volumes:
- ./<service-name>-service:/app/service
- ./<service-name>-service/entrypoint.py:/app/entrypoint.py
- dev_site_data:/app/sites:ro # Optional: if service needs site data
- ./frappe-microservice-lib/frappe_microservice:/opt/venv/lib/python3.11/site-packages/frappe_microservice:ro
Check existing ports and use next available:
Next available: 8007, 8008, etc.
<service-name>-service (kebab-case)./<service-name>-service/ (matches service name)dev-frappe-ms-poc-<service-name>-service-1All services depend on dev-central-site:
depends_on:
dev-central-site:
condition: service_started
If service depends on another microservice, add it:
depends_on:
dev-central-site:
condition: service_started
orders-service:
condition: service_started
Required volumes:
volumes:
- ./<service-name>-service:/app/service
- ./<service-name>-service/entrypoint.py:/app/entrypoint.py
- ./frappe-microservice-lib/frappe_microservice:/opt/venv/lib/python3.11/site-packages/frappe_microservice:ro
Optional volumes:
- dev_site_data:/app/sites:ro # If service needs site data (read-only)
Required:
FRAPPE_SITE=dev.localhostFRAPPE_SITES_PATH=/app/sitesPYTHONUNBUFFERED=1CENTRAL_SITE_URL=http://dev-frappe-ms-poc-dev-central-site-1:8000Service-specific (add as needed):
- SERVICE_SPECIFIC_VAR=value
Update kong.yml to add route for new service:
services:
- name: <service-name>-service
url: http://<service-name>-service:8000
routes:
- name: <service-name>-route
paths:
- /<service-name>
Then update dev-podman-compose.yml Kong service dependencies:
kong:
depends_on:
- auth-service
- signup-service
- subscription-service
- company-service
- orders-service
- <service-name>-service # Add here
For a new inventory-service on port 8007:
# Inventory Microservice
inventory-service:
image: localhost/frappe-microservices-base:latest
ports:
- "8007:8000"
environment:
- FRAPPE_SITE=dev.localhost
- FRAPPE_SITES_PATH=/app/sites
- PYTHONUNBUFFERED=1
- CENTRAL_SITE_URL=http://dev-frappe-ms-poc-dev-central-site-1:8000
- DB_HOST=dev-frappe-ms-poc-dev-central-site-1
- DB_PORT=3306
- DB_NAME=_9079b9524fe5ca86
- DB_PASSWORD=687FNguLvKKbFH3T
- DB_TYPE=mariadb
- REDIS_HOST=dev-frappe-ms-poc-dev-central-site-1
- REDIS_PORT=6379
depends_on:
dev-central-site:
condition: service_started
networks:
- dev-frappe-network
volumes:
- ./inventory-service:/app/service
- ./inventory-service/entrypoint.py:/app/entrypoint.py
- ./frappe-microservice-lib/frappe_microservice:/opt/venv/lib/python3.11/site-packages/frappe_microservice:ro
After adding service:
Check syntax:
podman compose -f dev-podman-compose.yml config
Start service:
podman compose -f dev-podman-compose.yml up -d <service-name>-service
Check logs:
podman compose -f dev-podman-compose.yml logs <service-name>-service
Test endpoint:
curl http://localhost:<port>/health
dev-frappe-network for all servicesGenerate data migration scripts for Frappe. Use when migrating data from legacy systems, transforming data structures, or importing large datasets.
Generate API documentation, user guides, and technical documentation for Frappe apps. Use when documenting APIs, creating user guides, or generating OpenAPI specs.
Generate Containerfile for Frappe apps using the official frappe/erpnext images with Gunicorn. The recommended pattern copies app source into the bench layout and runs Gunicorn directly.
Enforce the Iron Law of TDD for Frappe apps. Red-Green-Refactor cycle for DocTypes and Controllers.
Generate Frappe-style DocType controllers with lifecycle methods for microservices.
Canonical folder structure produced by `bench new-app` for modern Frappe (v14/v15+). Use this as the ground truth for any Frappe app file tree — includes pyproject.toml and module management.
Generate whitelisted API methods and REST endpoints for standard Frappe and microservices.
Validate code follows frappe-microservice-lib patterns, security best practices, and framework conventions.
Generate tenant-isolated database queries using TenantAwareDB to prevent cross-tenant access.
Generate secure, tenant-aware API endpoints with authentication and tenant isolation.
Generate Frappe Web Forms for public-facing forms. Use when creating customer portals, registration forms, surveys, or public data collection forms.
Generate comprehensive unit tests for Frappe DocTypes, controllers, and API methods. Use when creating test files, writing test cases, or setting up test infrastructure for Frappe/ERPNext applications.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience