@cloudgrid-io/mcp 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/corpus/capability-map.md +68 -7
- package/src/corpus/templates/_cloudgrid.yaml.reference +228 -0
- package/src/corpus/templates/admin-dashboard/cloudgrid.yaml +226 -8
- package/src/corpus/templates/admin-dashboard/index.md +3 -0
- package/src/corpus/templates/ai-app/cloudgrid.yaml +225 -11
- package/src/corpus/templates/ai-app/index.md +3 -11
- package/src/corpus/templates/ai-knowledge-base/AGENTS.md +254 -0
- package/src/corpus/templates/ai-knowledge-base/README.md +28 -0
- package/src/corpus/templates/ai-knowledge-base/cloudgrid.yaml +238 -0
- package/src/corpus/templates/ai-knowledge-base/index.md +81 -0
- package/src/corpus/templates/analytics-dashboard/README.md +85 -0
- package/src/corpus/templates/analytics-dashboard/cloudgrid.yaml +232 -0
- package/src/corpus/templates/analytics-dashboard/index.md +316 -0
- package/src/corpus/templates/analytics-dashboard/services/web/app/api/events/route.js +60 -0
- package/src/corpus/templates/analytics-dashboard/services/web/app/event-form.js +100 -0
- package/src/corpus/templates/analytics-dashboard/services/web/app/layout.js +41 -0
- package/src/corpus/templates/analytics-dashboard/services/web/app/page.js +54 -0
- package/src/corpus/templates/analytics-dashboard/services/web/lib/db.js +32 -0
- package/src/corpus/templates/analytics-dashboard/services/web/package.json +16 -0
- package/src/corpus/templates/api-dashboard/README.md +84 -0
- package/src/corpus/templates/api-dashboard/cloudgrid.yaml +233 -0
- package/src/corpus/templates/api-dashboard/index.md +310 -0
- package/src/corpus/templates/api-dashboard/services/web/app/api/requests/route.js +62 -0
- package/src/corpus/templates/api-dashboard/services/web/app/dashboard.js +156 -0
- package/src/corpus/templates/api-dashboard/services/web/app/layout.js +42 -0
- package/src/corpus/templates/api-dashboard/services/web/app/page.js +39 -0
- package/src/corpus/templates/api-dashboard/services/web/lib/db.js +32 -0
- package/src/corpus/templates/api-dashboard/services/web/package.json +16 -0
- package/src/corpus/templates/api-docs/cloudgrid.yaml +222 -4
- package/src/corpus/templates/api-docs/index.md +3 -5
- package/src/corpus/templates/api-service/cloudgrid.yaml +224 -9
- package/src/corpus/templates/api-service/index.md +3 -11
- package/src/corpus/templates/app-with-data/cloudgrid.yaml +226 -8
- package/src/corpus/templates/app-with-data/index.md +3 -8
- package/src/corpus/templates/appointment-booking/AGENTS.md +223 -0
- package/src/corpus/templates/appointment-booking/README.md +16 -0
- package/src/corpus/templates/appointment-booking/cloudgrid.yaml +250 -0
- package/src/corpus/templates/appointment-booking/index.md +72 -0
- package/src/corpus/templates/approval-workflow/AGENTS.md +170 -0
- package/src/corpus/templates/approval-workflow/README.md +12 -0
- package/src/corpus/templates/approval-workflow/cloudgrid.yaml +237 -0
- package/src/corpus/templates/approval-workflow/index.md +58 -0
- package/src/corpus/templates/billing-dashboard/AGENTS.md +199 -0
- package/src/corpus/templates/billing-dashboard/README.md +18 -0
- package/src/corpus/templates/billing-dashboard/cloudgrid.yaml +235 -0
- package/src/corpus/templates/billing-dashboard/index.md +87 -0
- package/src/corpus/templates/blog-cms/README.md +94 -0
- package/src/corpus/templates/blog-cms/cloudgrid.yaml +233 -0
- package/src/corpus/templates/blog-cms/index.md +358 -0
- package/src/corpus/templates/blog-cms/services/web/app/admin/admin-editor.js +133 -0
- package/src/corpus/templates/blog-cms/services/web/app/admin/page.js +33 -0
- package/src/corpus/templates/blog-cms/services/web/app/api/posts/route.js +84 -0
- package/src/corpus/templates/blog-cms/services/web/app/layout.js +47 -0
- package/src/corpus/templates/blog-cms/services/web/app/page.js +56 -0
- package/src/corpus/templates/blog-cms/services/web/app/posts/[slug]/page.js +45 -0
- package/src/corpus/templates/blog-cms/services/web/lib/db.js +32 -0
- package/src/corpus/templates/blog-cms/services/web/package.json +16 -0
- package/src/corpus/templates/booking-system/AGENTS.md +189 -0
- package/src/corpus/templates/booking-system/README.md +17 -0
- package/src/corpus/templates/booking-system/cloudgrid.yaml +248 -0
- package/src/corpus/templates/booking-system/index.md +86 -0
- package/src/corpus/templates/calendar-scheduler/AGENTS.md +226 -0
- package/src/corpus/templates/calendar-scheduler/README.md +25 -0
- package/src/corpus/templates/calendar-scheduler/cloudgrid.yaml +259 -0
- package/src/corpus/templates/calendar-scheduler/index.md +85 -0
- package/src/corpus/templates/changelog/cloudgrid.yaml +222 -4
- package/src/corpus/templates/changelog/index.md +3 -5
- package/src/corpus/templates/company-website/README.md +54 -0
- package/src/corpus/templates/company-website/cloudgrid.yaml +233 -0
- package/src/corpus/templates/company-website/index.html +309 -0
- package/src/corpus/templates/company-website/index.md +29 -0
- package/src/corpus/templates/course-platform/AGENTS.md +161 -0
- package/src/corpus/templates/course-platform/README.md +26 -0
- package/src/corpus/templates/course-platform/cloudgrid.yaml +237 -0
- package/src/corpus/templates/course-platform/index.md +70 -0
- package/src/corpus/templates/crm/cloudgrid.yaml +226 -8
- package/src/corpus/templates/crm/index.md +3 -0
- package/src/corpus/templates/dashboard/cloudgrid.yaml +228 -4
- package/src/corpus/templates/dashboard/index.md +3 -5
- package/src/corpus/templates/deck/cloudgrid.yaml +228 -4
- package/src/corpus/templates/deck/index.md +3 -5
- package/src/corpus/templates/directory/README.md +75 -0
- package/src/corpus/templates/directory/cloudgrid.yaml +233 -0
- package/src/corpus/templates/directory/index.md +334 -0
- package/src/corpus/templates/directory/services/web/app/api/entries/route.js +63 -0
- package/src/corpus/templates/directory/services/web/app/directory-list.js +146 -0
- package/src/corpus/templates/directory/services/web/app/layout.js +44 -0
- package/src/corpus/templates/directory/services/web/app/page.js +38 -0
- package/src/corpus/templates/directory/services/web/lib/db.js +32 -0
- package/src/corpus/templates/directory/services/web/package.json +16 -0
- package/src/corpus/templates/docs-site/cloudgrid.yaml +222 -4
- package/src/corpus/templates/docs-site/index.md +3 -5
- package/src/corpus/templates/erp/AGENTS.md +116 -0
- package/src/corpus/templates/erp/README.md +17 -0
- package/src/corpus/templates/erp/cloudgrid.yaml +235 -0
- package/src/corpus/templates/erp/index.md +81 -0
- package/src/corpus/templates/event-board/README.md +74 -0
- package/src/corpus/templates/event-board/cloudgrid.yaml +233 -0
- package/src/corpus/templates/event-board/index.md +299 -0
- package/src/corpus/templates/event-board/services/web/app/api/events/route.js +61 -0
- package/src/corpus/templates/event-board/services/web/app/event-form.js +118 -0
- package/src/corpus/templates/event-board/services/web/app/layout.js +39 -0
- package/src/corpus/templates/event-board/services/web/app/page.js +34 -0
- package/src/corpus/templates/event-board/services/web/lib/db.js +32 -0
- package/src/corpus/templates/event-board/services/web/package.json +16 -0
- package/src/corpus/templates/expense-tracker/README.md +76 -0
- package/src/corpus/templates/expense-tracker/cloudgrid.yaml +233 -0
- package/src/corpus/templates/expense-tracker/index.md +305 -0
- package/src/corpus/templates/expense-tracker/services/web/app/api/expenses/route.js +61 -0
- package/src/corpus/templates/expense-tracker/services/web/app/expense-form.js +145 -0
- package/src/corpus/templates/expense-tracker/services/web/app/layout.js +42 -0
- package/src/corpus/templates/expense-tracker/services/web/app/page.js +34 -0
- package/src/corpus/templates/expense-tracker/services/web/lib/db.js +32 -0
- package/src/corpus/templates/expense-tracker/services/web/package.json +16 -0
- package/src/corpus/templates/feature-request-board/README.md +87 -0
- package/src/corpus/templates/feature-request-board/cloudgrid.yaml +233 -0
- package/src/corpus/templates/feature-request-board/index.md +317 -0
- package/src/corpus/templates/feature-request-board/services/web/app/api/requests/route.js +92 -0
- package/src/corpus/templates/feature-request-board/services/web/app/board.js +91 -0
- package/src/corpus/templates/feature-request-board/services/web/app/layout.js +43 -0
- package/src/corpus/templates/feature-request-board/services/web/app/page.js +35 -0
- package/src/corpus/templates/feature-request-board/services/web/lib/db.js +32 -0
- package/src/corpus/templates/feature-request-board/services/web/package.json +16 -0
- package/src/corpus/templates/financial-dashboard/README.md +80 -0
- package/src/corpus/templates/financial-dashboard/cloudgrid.yaml +233 -0
- package/src/corpus/templates/financial-dashboard/index.md +326 -0
- package/src/corpus/templates/financial-dashboard/services/web/app/api/entries/route.js +63 -0
- package/src/corpus/templates/financial-dashboard/services/web/app/entry-board.js +130 -0
- package/src/corpus/templates/financial-dashboard/services/web/app/layout.js +46 -0
- package/src/corpus/templates/financial-dashboard/services/web/app/page.js +31 -0
- package/src/corpus/templates/financial-dashboard/services/web/lib/db.js +32 -0
- package/src/corpus/templates/financial-dashboard/services/web/package.json +16 -0
- package/src/corpus/templates/forum/AGENTS.md +196 -0
- package/src/corpus/templates/forum/README.md +12 -0
- package/src/corpus/templates/forum/cloudgrid.yaml +237 -0
- package/src/corpus/templates/forum/index.md +66 -0
- package/src/corpus/templates/hr-portal/AGENTS.md +174 -0
- package/src/corpus/templates/hr-portal/README.md +14 -0
- package/src/corpus/templates/hr-portal/cloudgrid.yaml +237 -0
- package/src/corpus/templates/hr-portal/index.md +56 -0
- package/src/corpus/templates/internal-tools-portal/AGENTS.md +201 -0
- package/src/corpus/templates/internal-tools-portal/README.md +17 -0
- package/src/corpus/templates/internal-tools-portal/cloudgrid.yaml +237 -0
- package/src/corpus/templates/internal-tools-portal/index.md +62 -0
- package/src/corpus/templates/inventory/README.md +71 -0
- package/src/corpus/templates/inventory/cloudgrid.yaml +233 -0
- package/src/corpus/templates/inventory/index.md +68 -0
- package/src/corpus/templates/inventory/services/web/app/api/items/route.js +88 -0
- package/src/corpus/templates/inventory/services/web/app/inventory-manager.js +101 -0
- package/src/corpus/templates/inventory/services/web/app/layout.js +36 -0
- package/src/corpus/templates/inventory/services/web/app/page.js +37 -0
- package/src/corpus/templates/inventory/services/web/lib/db.js +32 -0
- package/src/corpus/templates/inventory/services/web/package.json +16 -0
- package/src/corpus/templates/invoice/README.md +71 -0
- package/src/corpus/templates/invoice/cloudgrid.yaml +233 -0
- package/src/corpus/templates/invoice/index.md +68 -0
- package/src/corpus/templates/invoice/services/web/app/api/invoices/route.js +82 -0
- package/src/corpus/templates/invoice/services/web/app/invoice-manager.js +101 -0
- package/src/corpus/templates/invoice/services/web/app/layout.js +35 -0
- package/src/corpus/templates/invoice/services/web/app/page.js +34 -0
- package/src/corpus/templates/invoice/services/web/lib/db.js +32 -0
- package/src/corpus/templates/invoice/services/web/package.json +16 -0
- package/src/corpus/templates/job-board/README.md +71 -0
- package/src/corpus/templates/job-board/cloudgrid.yaml +233 -0
- package/src/corpus/templates/job-board/index.md +68 -0
- package/src/corpus/templates/job-board/services/web/app/api/jobs/route.js +66 -0
- package/src/corpus/templates/job-board/services/web/app/job-board.js +73 -0
- package/src/corpus/templates/job-board/services/web/app/layout.js +35 -0
- package/src/corpus/templates/job-board/services/web/app/page.js +32 -0
- package/src/corpus/templates/job-board/services/web/lib/db.js +32 -0
- package/src/corpus/templates/job-board/services/web/package.json +16 -0
- package/src/corpus/templates/kanban/cloudgrid.yaml +226 -8
- package/src/corpus/templates/kanban/index.md +3 -0
- package/src/corpus/templates/landing-page/cloudgrid.yaml +228 -4
- package/src/corpus/templates/landing-page/index.md +3 -5
- package/src/corpus/templates/lms/AGENTS.md +193 -0
- package/src/corpus/templates/lms/README.md +27 -0
- package/src/corpus/templates/lms/cloudgrid.yaml +237 -0
- package/src/corpus/templates/lms/index.md +79 -0
- package/src/corpus/templates/marketplace/AGENTS.md +208 -0
- package/src/corpus/templates/marketplace/README.md +22 -0
- package/src/corpus/templates/marketplace/cloudgrid.yaml +233 -0
- package/src/corpus/templates/marketplace/index.md +76 -0
- package/src/corpus/templates/membership-site/AGENTS.md +160 -0
- package/src/corpus/templates/membership-site/README.md +18 -0
- package/src/corpus/templates/membership-site/cloudgrid.yaml +236 -0
- package/src/corpus/templates/membership-site/index.md +66 -0
- package/src/corpus/templates/monitoring-dashboard/README.md +84 -0
- package/src/corpus/templates/monitoring-dashboard/cloudgrid.yaml +233 -0
- package/src/corpus/templates/monitoring-dashboard/index.md +328 -0
- package/src/corpus/templates/monitoring-dashboard/services/web/app/api/checks/route.js +76 -0
- package/src/corpus/templates/monitoring-dashboard/services/web/app/check-form.js +124 -0
- package/src/corpus/templates/monitoring-dashboard/services/web/app/layout.js +44 -0
- package/src/corpus/templates/monitoring-dashboard/services/web/app/page.js +49 -0
- package/src/corpus/templates/monitoring-dashboard/services/web/lib/db.js +32 -0
- package/src/corpus/templates/monitoring-dashboard/services/web/package.json +16 -0
- package/src/corpus/templates/online-store/AGENTS.md +153 -0
- package/src/corpus/templates/online-store/README.md +16 -0
- package/src/corpus/templates/online-store/cloudgrid.yaml +234 -0
- package/src/corpus/templates/online-store/index.md +81 -0
- package/src/corpus/templates/portfolio/cloudgrid.yaml +222 -4
- package/src/corpus/templates/portfolio/index.md +3 -5
- package/src/corpus/templates/product-catalog/README.md +74 -0
- package/src/corpus/templates/product-catalog/cloudgrid.yaml +232 -0
- package/src/corpus/templates/product-catalog/index.md +330 -0
- package/src/corpus/templates/product-catalog/services/web/app/api/products/route.js +69 -0
- package/src/corpus/templates/product-catalog/services/web/app/catalog.js +153 -0
- package/src/corpus/templates/product-catalog/services/web/app/layout.js +49 -0
- package/src/corpus/templates/product-catalog/services/web/app/page.js +36 -0
- package/src/corpus/templates/product-catalog/services/web/lib/db.js +32 -0
- package/src/corpus/templates/product-catalog/services/web/package.json +16 -0
- package/src/corpus/templates/product-launch/README.md +46 -0
- package/src/corpus/templates/product-launch/cloudgrid.yaml +234 -0
- package/src/corpus/templates/product-launch/index.html +320 -0
- package/src/corpus/templates/product-launch/index.md +34 -0
- package/src/corpus/templates/project-management/README.md +83 -0
- package/src/corpus/templates/project-management/cloudgrid.yaml +233 -0
- package/src/corpus/templates/project-management/index.md +346 -0
- package/src/corpus/templates/project-management/services/web/app/api/projects/route.js +48 -0
- package/src/corpus/templates/project-management/services/web/app/api/tasks/route.js +85 -0
- package/src/corpus/templates/project-management/services/web/app/board.js +182 -0
- package/src/corpus/templates/project-management/services/web/app/layout.js +45 -0
- package/src/corpus/templates/project-management/services/web/app/page.js +49 -0
- package/src/corpus/templates/project-management/services/web/lib/db.js +32 -0
- package/src/corpus/templates/project-management/services/web/package.json +16 -0
- package/src/corpus/templates/property-listings/README.md +76 -0
- package/src/corpus/templates/property-listings/cloudgrid.yaml +233 -0
- package/src/corpus/templates/property-listings/index.md +335 -0
- package/src/corpus/templates/property-listings/services/web/app/api/properties/route.js +73 -0
- package/src/corpus/templates/property-listings/services/web/app/layout.js +45 -0
- package/src/corpus/templates/property-listings/services/web/app/listings.js +152 -0
- package/src/corpus/templates/property-listings/services/web/app/page.js +53 -0
- package/src/corpus/templates/property-listings/services/web/lib/db.js +32 -0
- package/src/corpus/templates/property-listings/services/web/package.json +16 -0
- package/src/corpus/templates/quiz-platform/README.md +84 -0
- package/src/corpus/templates/quiz-platform/cloudgrid.yaml +233 -0
- package/src/corpus/templates/quiz-platform/index.md +313 -0
- package/src/corpus/templates/quiz-platform/services/web/app/api/questions/route.js +69 -0
- package/src/corpus/templates/quiz-platform/services/web/app/layout.js +47 -0
- package/src/corpus/templates/quiz-platform/services/web/app/page.js +37 -0
- package/src/corpus/templates/quiz-platform/services/web/app/quiz.js +188 -0
- package/src/corpus/templates/quiz-platform/services/web/lib/db.js +32 -0
- package/src/corpus/templates/quiz-platform/services/web/package.json +16 -0
- package/src/corpus/templates/report/cloudgrid.yaml +228 -4
- package/src/corpus/templates/report/index.md +3 -5
- package/src/corpus/templates/restaurant-reservations/AGENTS.md +258 -0
- package/src/corpus/templates/restaurant-reservations/README.md +17 -0
- package/src/corpus/templates/restaurant-reservations/cloudgrid.yaml +258 -0
- package/src/corpus/templates/restaurant-reservations/index.md +62 -0
- package/src/corpus/templates/revenue-dashboard/README.md +75 -0
- package/src/corpus/templates/revenue-dashboard/cloudgrid.yaml +233 -0
- package/src/corpus/templates/revenue-dashboard/index.md +307 -0
- package/src/corpus/templates/revenue-dashboard/services/web/app/api/sales/route.js +60 -0
- package/src/corpus/templates/revenue-dashboard/services/web/app/layout.js +40 -0
- package/src/corpus/templates/revenue-dashboard/services/web/app/page.js +87 -0
- package/src/corpus/templates/revenue-dashboard/services/web/app/sale-form.js +63 -0
- package/src/corpus/templates/revenue-dashboard/services/web/lib/db.js +32 -0
- package/src/corpus/templates/revenue-dashboard/services/web/package.json +16 -0
- package/src/corpus/templates/saas-marketing/cloudgrid.yaml +222 -4
- package/src/corpus/templates/saas-marketing/index.md +3 -5
- package/src/corpus/templates/status-page/cloudgrid.yaml +222 -4
- package/src/corpus/templates/status-page/index.md +3 -5
- package/src/corpus/templates/subscription-management/AGENTS.md +191 -0
- package/src/corpus/templates/subscription-management/README.md +21 -0
- package/src/corpus/templates/subscription-management/cloudgrid.yaml +236 -0
- package/src/corpus/templates/subscription-management/index.md +73 -0
- package/src/corpus/templates/task-manager/cloudgrid.yaml +226 -8
- package/src/corpus/templates/task-manager/index.md +3 -0
- package/src/corpus/templates/ticket-system/README.md +71 -0
- package/src/corpus/templates/ticket-system/cloudgrid.yaml +233 -0
- package/src/corpus/templates/ticket-system/index.md +68 -0
- package/src/corpus/templates/ticket-system/services/web/app/api/tickets/route.js +81 -0
- package/src/corpus/templates/ticket-system/services/web/app/layout.js +36 -0
- package/src/corpus/templates/ticket-system/services/web/app/page.js +35 -0
- package/src/corpus/templates/ticket-system/services/web/app/ticket-queue.js +112 -0
- package/src/corpus/templates/ticket-system/services/web/lib/db.js +32 -0
- package/src/corpus/templates/ticket-system/services/web/package.json +16 -0
- package/src/corpus/templates/time-tracking/README.md +81 -0
- package/src/corpus/templates/time-tracking/cloudgrid.yaml +233 -0
- package/src/corpus/templates/time-tracking/index.md +298 -0
- package/src/corpus/templates/time-tracking/services/web/app/api/entries/route.js +66 -0
- package/src/corpus/templates/time-tracking/services/web/app/entry-form.js +106 -0
- package/src/corpus/templates/time-tracking/services/web/app/layout.js +39 -0
- package/src/corpus/templates/time-tracking/services/web/app/page.js +30 -0
- package/src/corpus/templates/time-tracking/services/web/lib/db.js +32 -0
- package/src/corpus/templates/time-tracking/services/web/package.json +16 -0
- package/src/corpus/templates/travel-booking/AGENTS.md +207 -0
- package/src/corpus/templates/travel-booking/README.md +17 -0
- package/src/corpus/templates/travel-booking/cloudgrid.yaml +249 -0
- package/src/corpus/templates/travel-booking/index.md +88 -0
- package/src/corpus/templates/waitlist/cloudgrid.yaml +222 -4
- package/src/corpus/templates/waitlist/index.md +3 -5
- package/src/corpus/templates/web-app/cloudgrid.yaml +228 -4
- package/src/corpus/templates/web-app/index.md +3 -5
- package/src/corpus/workflows/ai-knowledge-base.md +137 -0
- package/src/corpus/workflows/analytics-dashboard.md +104 -0
- package/src/corpus/workflows/api-dashboard.md +102 -0
- package/src/corpus/workflows/appointment-booking.md +143 -0
- package/src/corpus/workflows/approval-workflow.md +124 -0
- package/src/corpus/workflows/billing-dashboard.md +120 -0
- package/src/corpus/workflows/blog-cms.md +104 -0
- package/src/corpus/workflows/booking-system.md +116 -0
- package/src/corpus/workflows/calendar-scheduler.md +134 -0
- package/src/corpus/workflows/company-website.md +46 -0
- package/src/corpus/workflows/course-platform.md +126 -0
- package/src/corpus/workflows/directory.md +101 -0
- package/src/corpus/workflows/erp.md +125 -0
- package/src/corpus/workflows/event-board.md +102 -0
- package/src/corpus/workflows/expense-tracker.md +102 -0
- package/src/corpus/workflows/feature-request-board.md +105 -0
- package/src/corpus/workflows/financial-dashboard.md +103 -0
- package/src/corpus/workflows/forum.md +128 -0
- package/src/corpus/workflows/hr-portal.md +115 -0
- package/src/corpus/workflows/internal-tools-portal.md +125 -0
- package/src/corpus/workflows/inventory.md +101 -0
- package/src/corpus/workflows/invoice.md +101 -0
- package/src/corpus/workflows/job-board.md +101 -0
- package/src/corpus/workflows/lms.md +113 -0
- package/src/corpus/workflows/marketplace.md +123 -0
- package/src/corpus/workflows/membership-site.md +128 -0
- package/src/corpus/workflows/monitoring-dashboard.md +104 -0
- package/src/corpus/workflows/online-store.md +114 -0
- package/src/corpus/workflows/product-catalog.md +105 -0
- package/src/corpus/workflows/product-launch.md +43 -0
- package/src/corpus/workflows/project-management.md +106 -0
- package/src/corpus/workflows/property-listings.md +101 -0
- package/src/corpus/workflows/quiz-platform.md +105 -0
- package/src/corpus/workflows/restaurant-reservations.md +123 -0
- package/src/corpus/workflows/revenue-dashboard.md +102 -0
- package/src/corpus/workflows/subscription-management.md +141 -0
- package/src/corpus/workflows/ticket-system.md +101 -0
- package/src/corpus/workflows/time-tracking.md +104 -0
- package/src/corpus/workflows/travel-booking.md +115 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: analytics-dashboard
|
|
3
|
+
when: analytics dashboard, usage analytics, metrics from stored events — a persistent app that records events and shows counts/sums plus a recent-events table. Needs a database → runtime → local edition.
|
|
4
|
+
needs: database
|
|
5
|
+
deploy: runtime
|
|
6
|
+
editions: local
|
|
7
|
+
capabilities_note: persistent — needs a database (Mongo). Runtime app, async build, local edition only. Declare the canonical `needs: { database: true }`; the deployer injects DATABASE_MONGODB_URL (+legacy MONGODB_URL).
|
|
8
|
+
summary: Build a persistent Next.js + Mongo analytics dashboard on the grid — an `events` collection ({ type, value:number, at:date }) with counts/sums metric cards, a recent-events table, and a POST to record events. Edition-gate first, scaffold, put the app under services/web/, wire process.env.DATABASE_MONGODB_URL (legacy MONGODB_URL fallback) lazily, declare needs:{database:true} (not requires:), deploy async, poll to a live URL.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Workflow: analytics-dashboard
|
|
12
|
+
|
|
13
|
+
The user wants a usage-analytics dashboard that **remembers** its data — it
|
|
14
|
+
records **events** and shows aggregate metrics (counts/sums) plus a recent-events
|
|
15
|
+
table, and the numbers survive refresh and are shared across sessions. That is a
|
|
16
|
+
**runtime app** backed by the grid's shared Mongo, not a static page. It is the
|
|
17
|
+
same proven shape as `app-with-data`, with an `events` domain
|
|
18
|
+
(`{ type, value:number, at:date }`) and a dashboard view: summary cards
|
|
19
|
+
(total count, total value, distinct types, top type) + a recent table, with a
|
|
20
|
+
form that POSTs a new event.
|
|
21
|
+
|
|
22
|
+
Follow this recipe. Be honest that a runtime deploy is async (not instant like a
|
|
23
|
+
static drop) and that it needs the local edition.
|
|
24
|
+
|
|
25
|
+
## 1. Edition check FIRST (hard gate)
|
|
26
|
+
|
|
27
|
+
A persistent app is a built + deployed container. It requires the **local
|
|
28
|
+
edition** (Claude Desktop / Claude Code) or the CLI.
|
|
29
|
+
|
|
30
|
+
- **Hosted edition (Claude Web / hosted MCP):** you CANNOT build a runtime app —
|
|
31
|
+
hosted is inline-only and can only publish static pages. Tell the user
|
|
32
|
+
plainly, offer a **static version** instead, and STOP the runtime path here.
|
|
33
|
+
- **Local edition:** continue.
|
|
34
|
+
|
|
35
|
+
## 2. Auth + grid
|
|
36
|
+
|
|
37
|
+
1. Ensure signed in: `gridctl_login_status`; if not, `gridctl_login`.
|
|
38
|
+
2. A grid is required. Respect the grid picker: if the user has more than one
|
|
39
|
+
grid, ask which to use; do not assume a target.
|
|
40
|
+
|
|
41
|
+
## 3. Scaffold
|
|
42
|
+
|
|
43
|
+
`gridctl_init` an app `<name>`. `init` creates the entity + `.cloudgrid/link.json`
|
|
44
|
+
and writes a `cloudgrid.yaml` with an EMPTY `services: {}`. `plug` needs a linked
|
|
45
|
+
directory, so run `init` FIRST. Then (a) write the app under **`services/web/`**,
|
|
46
|
+
and (b) fill `cloudgrid.yaml` to the shape below (`services.web` + `needs:
|
|
47
|
+
{ database: true }`).
|
|
48
|
+
|
|
49
|
+
## 4. Add the datastore + wire Mongo
|
|
50
|
+
|
|
51
|
+
1. Set `cloudgrid.yaml`. **App code MUST live under `services/<name>/`** —
|
|
52
|
+
`path:` is the URL mount, NOT the filesystem path.
|
|
53
|
+
```yaml
|
|
54
|
+
name: my-analytics
|
|
55
|
+
services:
|
|
56
|
+
web:
|
|
57
|
+
type: nextjs
|
|
58
|
+
path: /
|
|
59
|
+
needs:
|
|
60
|
+
database: true
|
|
61
|
+
```
|
|
62
|
+
**Declare the datastore with `needs: { database: true }`** — the canonical
|
|
63
|
+
shape. The deployer provisions Mongo and injects `DATABASE_MONGODB_URL` (plus
|
|
64
|
+
the legacy `MONGODB_URL` alias). `requires:` is the deprecated v1 alias; don't
|
|
65
|
+
author new yaml with it, and never set `needs:` and `requires:` together (the
|
|
66
|
+
validator rejects it).
|
|
67
|
+
2. Fetch the template for the Mongo wiring + aggregation shape:
|
|
68
|
+
`gridctl_fetch("template", "analytics-dashboard")`. It is a minimal, real
|
|
69
|
+
Next.js + `mongodb`-driver dashboard under `services/web/`: a lazy client in
|
|
70
|
+
`services/web/lib/db.js`, an App-Router GET/POST/DELETE route on an `events`
|
|
71
|
+
collection, a server-component page that reads the collection and computes
|
|
72
|
+
counts/sums, and a client form + recent-events table.
|
|
73
|
+
3. Adapt it (rename the collection, change fields, add aggregations). **Read the
|
|
74
|
+
DB from `process.env.DATABASE_MONGODB_URL`** (legacy `process.env.MONGODB_URL`
|
|
75
|
+
fallback) — the grid injects it at dev-time and runtime.
|
|
76
|
+
- **Put the DB connection behind a lazy getter — never read the connection
|
|
77
|
+
string at module top level, or `next build` fails.**
|
|
78
|
+
- Keep the page and API route `export const dynamic = "force-dynamic"` so the
|
|
79
|
+
metrics are always live.
|
|
80
|
+
|
|
81
|
+
## 5. (Optional) Run locally
|
|
82
|
+
|
|
83
|
+
Mention that the user can `grid dev` to run locally against the injected Mongo
|
|
84
|
+
before deploying. Don't require it.
|
|
85
|
+
|
|
86
|
+
## 6. Config
|
|
87
|
+
|
|
88
|
+
- API keys / secrets → `gridctl_secrets`. Non-secret config → `gridctl_env`.
|
|
89
|
+
- Do **NOT** set the DB connection vars yourself (`DATABASE_MONGODB_URL` or the
|
|
90
|
+
legacy `MONGODB_URL`) — the grid injects them.
|
|
91
|
+
|
|
92
|
+
## 7. Deploy (async)
|
|
93
|
+
|
|
94
|
+
Deploy the folder with `gridctl_plug`. A **runtime deploy is ASYNC**: the first
|
|
95
|
+
response is `status: "building"`, NOT a live URL yet.
|
|
96
|
+
- Poll `gridctl_status` (or the returned poll_url) until the entity is live.
|
|
97
|
+
- Surface a liveness signal while it builds — never a bare silent wait.
|
|
98
|
+
- Only once it is live, return the deployed app URL (NOT the build/log link).
|
|
99
|
+
|
|
100
|
+
## 8. Return the live URL + iterate
|
|
101
|
+
|
|
102
|
+
Give the user the live app URL — that is the deliverable. To iterate, re-plug the
|
|
103
|
+
SAME entity so it updates the same URL. Keep it honest: async build, local-edition
|
|
104
|
+
only, credentials injected by the grid.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: api-dashboard
|
|
3
|
+
when: API dashboard, API usage dashboard, API requests monitor — a persistent app that logs API requests and shows count / avg latency / error-rate metrics with a recent-requests table. Needs a database → runtime → local edition.
|
|
4
|
+
needs: database
|
|
5
|
+
deploy: runtime
|
|
6
|
+
editions: local
|
|
7
|
+
capabilities_note: persistent — needs a database (Mongo). Runtime app, async build, local edition only. Declare the canonical `needs: { database: true }`; the deployer injects DATABASE_MONGODB_URL (+legacy MONGODB_URL).
|
|
8
|
+
summary: Build a persistent Next.js + Mongo API dashboard on the grid — a `requests` collection (endpoint, status:number, ms:number, at) with a metrics header (count, avg ms, error rate), a record form, and a recent-requests table. Edition-gate first, scaffold, put the app under services/web/, wire process.env.DATABASE_MONGODB_URL (legacy MONGODB_URL fallback) lazily, declare needs:{database:true} (not requires:), deploy async, poll to a live URL.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Workflow: api-dashboard
|
|
12
|
+
|
|
13
|
+
The user wants an API usage dashboard that **remembers** its request log — a
|
|
14
|
+
monitor whose recorded requests survive refresh and are shared across sessions.
|
|
15
|
+
That is a **runtime app** backed by the grid's shared Mongo, not a static page.
|
|
16
|
+
It is the same proven shape as `app-with-data`, with a `requests` domain
|
|
17
|
+
(`endpoint`, `status:number`, `ms:number`, `at`), a metrics header (request
|
|
18
|
+
count, average latency, error rate), a record form, and a recent-requests table
|
|
19
|
+
with per-row delete.
|
|
20
|
+
|
|
21
|
+
Follow this recipe. Be honest that a runtime deploy is async (not instant like a
|
|
22
|
+
static drop) and that it needs the local edition.
|
|
23
|
+
|
|
24
|
+
## 1. Edition check FIRST (hard gate)
|
|
25
|
+
|
|
26
|
+
A persistent app is a built + deployed container. It requires the **local
|
|
27
|
+
edition** (Claude Desktop / Claude Code) or the CLI.
|
|
28
|
+
|
|
29
|
+
- **Hosted edition (Claude Web / hosted MCP):** you CANNOT build a runtime app —
|
|
30
|
+
hosted is inline-only and can only publish static pages. Tell the user
|
|
31
|
+
plainly, offer a **static version** instead, and STOP the runtime path here.
|
|
32
|
+
- **Local edition:** continue.
|
|
33
|
+
|
|
34
|
+
## 2. Auth + grid
|
|
35
|
+
|
|
36
|
+
1. Ensure signed in: `gridctl_login_status`; if not, `gridctl_login`.
|
|
37
|
+
2. A grid is required. Respect the grid picker: if the user has more than one
|
|
38
|
+
grid, ask which to use; do not assume a target.
|
|
39
|
+
|
|
40
|
+
## 3. Scaffold
|
|
41
|
+
|
|
42
|
+
`gridctl_init` an app `<name>`. `init` creates the entity + `.cloudgrid/link.json`
|
|
43
|
+
and writes a `cloudgrid.yaml` with an EMPTY `services: {}`. `plug` needs a linked
|
|
44
|
+
directory, so run `init` FIRST. Then (a) write the app under **`services/web/`**,
|
|
45
|
+
and (b) fill `cloudgrid.yaml` to the shape below (`services.web` + `needs:
|
|
46
|
+
{ database: true }`).
|
|
47
|
+
|
|
48
|
+
## 4. Add the datastore + wire Mongo
|
|
49
|
+
|
|
50
|
+
1. Set `cloudgrid.yaml`. **App code MUST live under `services/<name>/`** —
|
|
51
|
+
`path:` is the URL mount, NOT the filesystem path.
|
|
52
|
+
```yaml
|
|
53
|
+
name: my-api-dashboard
|
|
54
|
+
services:
|
|
55
|
+
web:
|
|
56
|
+
type: nextjs
|
|
57
|
+
path: /
|
|
58
|
+
needs:
|
|
59
|
+
database: true
|
|
60
|
+
```
|
|
61
|
+
**Declare the datastore with `needs: { database: true }`** — the canonical
|
|
62
|
+
shape. The deployer provisions Mongo and injects `DATABASE_MONGODB_URL` (plus
|
|
63
|
+
the legacy `MONGODB_URL` alias). `requires:` is the deprecated v1 alias; don't
|
|
64
|
+
author new yaml with it, and never set `needs:` and `requires:` together (the
|
|
65
|
+
validator rejects it).
|
|
66
|
+
2. Fetch the template for the Mongo wiring + CRUD shape:
|
|
67
|
+
`gridctl_fetch("template", "api-dashboard")`. It is a minimal, real Next.js +
|
|
68
|
+
`mongodb`-driver request monitor under `services/web/`: a lazy client in
|
|
69
|
+
`services/web/lib/db.js`, an App-Router GET/POST/DELETE route on a `requests`
|
|
70
|
+
collection, a server-component page that reads the log, and a client dashboard
|
|
71
|
+
that derives the metrics header (count, avg ms, error rate) and renders the
|
|
72
|
+
record form + recent table.
|
|
73
|
+
3. Adapt it (rename the collection, change fields, adjust the UI). **Read the DB
|
|
74
|
+
from `process.env.DATABASE_MONGODB_URL`** (legacy `process.env.MONGODB_URL`
|
|
75
|
+
fallback) — the grid injects it at dev-time and runtime.
|
|
76
|
+
- **Put the DB connection behind a lazy getter — never read the connection
|
|
77
|
+
string at module top level, or `next build` fails.**
|
|
78
|
+
|
|
79
|
+
## 5. (Optional) Run locally
|
|
80
|
+
|
|
81
|
+
Mention that the user can `grid dev` to run locally against the injected Mongo
|
|
82
|
+
before deploying. Don't require it.
|
|
83
|
+
|
|
84
|
+
## 6. Config
|
|
85
|
+
|
|
86
|
+
- API keys / secrets → `gridctl_secrets`. Non-secret config → `gridctl_env`.
|
|
87
|
+
- Do **NOT** set the DB connection vars yourself (`DATABASE_MONGODB_URL` or the
|
|
88
|
+
legacy `MONGODB_URL`) — the grid injects them.
|
|
89
|
+
|
|
90
|
+
## 7. Deploy (async)
|
|
91
|
+
|
|
92
|
+
Deploy the folder with `gridctl_plug`. A **runtime deploy is ASYNC**: the first
|
|
93
|
+
response is `status: "building"`, NOT a live URL yet.
|
|
94
|
+
- Poll `gridctl_status` (or the returned poll_url) until the entity is live.
|
|
95
|
+
- Surface a liveness signal while it builds — never a bare silent wait.
|
|
96
|
+
- Only once it is live, return the deployed app URL (NOT the build/log link).
|
|
97
|
+
|
|
98
|
+
## 8. Return the live URL + iterate
|
|
99
|
+
|
|
100
|
+
Give the user the live app URL — that is the deliverable. To iterate, re-plug the
|
|
101
|
+
SAME entity so it updates the same URL. Keep it honest: async build, local-edition
|
|
102
|
+
only, credentials injected by the grid.
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: appointment-booking
|
|
3
|
+
when: "appointment booking, clinic/salon booking, appointment scheduler"
|
|
4
|
+
needs: database
|
|
5
|
+
deploy: runtime
|
|
6
|
+
editions: local
|
|
7
|
+
kind: blueprint
|
|
8
|
+
capabilities_note: "persistent — needs a database (Mongo) plus auth and optional Stripe deposit secrets. Runtime app, async build, local edition only. Declare needs { database: true } (deployer injects DATABASE_MONGODB_URL / legacy MONGODB_URL) and a vault block mapping AUTH_PROVIDER_KEY (and optionally STRIPE_KEY / STRIPE_WEBHOOK_SECRET) to env vars. This is a BLUEPRINT — read AGENTS.md for the structure, then build. A reminder cron service is designed but cron deploy is PENDING platform issue #1543 (not yet deployable)."
|
|
9
|
+
summary: "Build an appointment / clinic / salon booking app on the grid — a Next.js app where a business defines providers and bookable services, publishes availability, and clients book an open slot, with auth so a provider owns their calendar, optional Stripe deposits, and grid-shared Mongo (providers, services, availability, appointments). This is a BLUEPRINT: fetch the template, read AGENTS.md for the file tree + slot/anti-double-booking rules + CloudGrid wiring (needs database true, vault for auth/Stripe secrets), build the app under services/web/, deploy async, poll to a live URL. Scheduled reminders are designed but PENDING platform issue #1543."
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Workflow: appointment-booking
|
|
13
|
+
|
|
14
|
+
The user wants an appointment scheduler — a clinic/salon/consultant booking app:
|
|
15
|
+
a business defines providers and bookable services, publishes availability, and
|
|
16
|
+
clients book an open time slot that no one else can take. That is a **persistent
|
|
17
|
+
runtime app** — a Next.js app backed by the grid's shared Mongo, with auth so a
|
|
18
|
+
provider owns their calendar and optional Stripe deposits.
|
|
19
|
+
|
|
20
|
+
This is a **blueprint**, not a fill-in template. There is no finished app to
|
|
21
|
+
copy — there is a `cloudgrid.yaml` and a structure guide (`AGENTS.md`). Read the
|
|
22
|
+
guide, then build the app following it. Be honest that a runtime deploy is async
|
|
23
|
+
(not instant like a static drop) and that it needs the local edition.
|
|
24
|
+
|
|
25
|
+
## 1. Edition check FIRST (hard gate)
|
|
26
|
+
|
|
27
|
+
A booking app is a built + deployed container. It requires the **local edition**
|
|
28
|
+
(Claude Desktop / Claude Code) or the CLI.
|
|
29
|
+
|
|
30
|
+
- **Hosted edition (Claude Web / hosted MCP):** you CANNOT build a runtime app —
|
|
31
|
+
hosted is inline-only and can only publish static pages. Tell the user plainly,
|
|
32
|
+
offer a static "book us" landing page instead, and STOP the runtime path here.
|
|
33
|
+
- **Local edition:** continue.
|
|
34
|
+
|
|
35
|
+
## 2. Auth + grid
|
|
36
|
+
|
|
37
|
+
1. Ensure signed in: `gridctl_login_status`; if not, `gridctl_login`.
|
|
38
|
+
2. A grid is required. Respect the grid picker: if the user has more than one
|
|
39
|
+
grid, ask which to use; do not assume a target.
|
|
40
|
+
|
|
41
|
+
## 3. Read the blueprint
|
|
42
|
+
|
|
43
|
+
Fetch the template and read its structure guide — this is the core of the
|
|
44
|
+
workflow:
|
|
45
|
+
|
|
46
|
+
- `gridctl_fetch("template", "appointment-booking")` — the `cloudgrid.yaml` +
|
|
47
|
+
**`AGENTS.md`**. AGENTS.md has the file tree, the Mongo collections
|
|
48
|
+
(`providers`, `services`, `availability`, `appointments`), the slot-computation
|
|
49
|
+
and anti-double-booking rules, the CloudGrid injection table, and the auth +
|
|
50
|
+
Stripe wiring. **Read it fully before building.**
|
|
51
|
+
- `gridctl_fetch("template", "app-with-data")` — the proven Next.js + Mongo
|
|
52
|
+
shape this blueprint extends (lazy db client in `lib/db.js`, App-Router
|
|
53
|
+
GET/POST route). Imitate its wiring.
|
|
54
|
+
|
|
55
|
+
## 4. Scaffold
|
|
56
|
+
|
|
57
|
+
`gridctl_init` an app `<name>`. `init` creates the entity + `.cloudgrid/link.json`
|
|
58
|
+
and writes a `cloudgrid.yaml` with an EMPTY `services: {}`. `plug` needs a linked
|
|
59
|
+
directory, so run `init` FIRST. Then write the app under **`services/web/`** and
|
|
60
|
+
set `cloudgrid.yaml` to the active shape below.
|
|
61
|
+
|
|
62
|
+
## 5. Build the app following AGENTS.md
|
|
63
|
+
|
|
64
|
+
Build the file tree from AGENTS.md under `services/web/`: the lazy Mongo client,
|
|
65
|
+
the slot-computation helper, the auth middleware, the providers/services/
|
|
66
|
+
availability/appointments API routes, the public booking pages, the gated
|
|
67
|
+
provider dashboard, and (optionally) the Stripe deposit checkout + webhook. Adapt
|
|
68
|
+
the providers, services, and availability rules to the user. Key non-negotiables:
|
|
69
|
+
|
|
70
|
+
- **App code under `services/web/`** — `path:` is the URL mount, NOT the
|
|
71
|
+
filesystem path. Root files fail with `Service directory not found`.
|
|
72
|
+
- **Read the DB LAZILY** from `process.env.DATABASE_MONGODB_URL` (legacy
|
|
73
|
+
`process.env.MONGODB_URL` fallback) inside the getter — never at module top
|
|
74
|
+
level, or `next build` fails.
|
|
75
|
+
- **Read secrets LAZILY** too — `process.env.AUTH_PROVIDER_KEY`,
|
|
76
|
+
`STRIPE_KEY`, `STRIPE_WEBHOOK_SECRET` — inside getters, never top-level.
|
|
77
|
+
- **No double-booking.** `appointments` is the source of truth for "taken".
|
|
78
|
+
Compute open slots as availability minus booked, re-check availability at write
|
|
79
|
+
time (never trust the client's slot), and guard the insert with a partial
|
|
80
|
+
unique index on `{ providerId, startAt }` for active statuses.
|
|
81
|
+
|
|
82
|
+
`cloudgrid.yaml` active shape:
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
name: my-appointment-booking
|
|
86
|
+
services:
|
|
87
|
+
web:
|
|
88
|
+
type: nextjs
|
|
89
|
+
path: /
|
|
90
|
+
needs:
|
|
91
|
+
database: true
|
|
92
|
+
vault:
|
|
93
|
+
AUTH_PROVIDER_KEY: auth-provider-key
|
|
94
|
+
STRIPE_KEY: stripe-live-key # only if taking deposits
|
|
95
|
+
STRIPE_WEBHOOK_SECRET: stripe-webhook-secret # only if taking deposits
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Declare the datastore with `needs: { database: true }`** — the canonical
|
|
99
|
+
shape. `requires:` is the deprecated v1 alias; don't author new yaml with it, and
|
|
100
|
+
never set `needs:` and `requires:` together (the validator rejects it).
|
|
101
|
+
|
|
102
|
+
## 6. Config / secrets
|
|
103
|
+
|
|
104
|
+
- Auth + Stripe secrets → `gridctl_secrets` (set the vault items `auth-provider-key`,
|
|
105
|
+
and if taking deposits `stripe-live-key`, `stripe-webhook-secret`, that the
|
|
106
|
+
`vault:` block maps from). The deployer injects each as its env var at runtime
|
|
107
|
+
and under `grid dev`.
|
|
108
|
+
- Non-secret config (auth publishable key `NEXT_PUBLIC_...`, Stripe price ids) →
|
|
109
|
+
`gridctl_env` / `services.web.env`.
|
|
110
|
+
- Do **NOT** set the DB connection vars yourself (`DATABASE_MONGODB_URL` / legacy
|
|
111
|
+
`MONGODB_URL`) — the grid injects them.
|
|
112
|
+
|
|
113
|
+
## 7. (Optional) Run locally
|
|
114
|
+
|
|
115
|
+
Mention that the user can `grid dev` to run locally against the injected Mongo
|
|
116
|
+
and vault secrets before deploying. Don't require it.
|
|
117
|
+
|
|
118
|
+
## 8. Reminders (cron) — PENDING platform issue #1543
|
|
119
|
+
|
|
120
|
+
The design wants a scheduled reminder job (notify clients ~24h before their
|
|
121
|
+
appointment, stamp `reminderSentAt` so each is reminded once). AGENTS.md § 7
|
|
122
|
+
documents the intended `reminders` cron service shape. **Cron deploy is a PENDING
|
|
123
|
+
platform issue (#1543) and is NOT yet deployable** — keep that service COMMENTED
|
|
124
|
+
in `cloudgrid.yaml`. Ship the booking app without automated reminders (or trigger
|
|
125
|
+
them manually / from an external scheduler) and tell the user plainly; do not
|
|
126
|
+
claim reminders are live.
|
|
127
|
+
|
|
128
|
+
## 9. Deploy (async)
|
|
129
|
+
|
|
130
|
+
Deploy the folder with `gridctl_plug`. A **runtime deploy is ASYNC**: the first
|
|
131
|
+
response is `status: "building"`, NOT a live URL yet.
|
|
132
|
+
- Poll `gridctl_status` (or the returned poll_url) until the entity is live.
|
|
133
|
+
- Surface a liveness signal while it builds — never a bare silent wait.
|
|
134
|
+
- If taking deposits, once live register the `/api/webhook` URL as the Stripe
|
|
135
|
+
webhook endpoint, copy the signing secret into the `stripe-webhook-secret`
|
|
136
|
+
vault item, and re-plug. Return the deployed app URL (NOT the build/log link).
|
|
137
|
+
|
|
138
|
+
## 10. Return the live URL + iterate
|
|
139
|
+
|
|
140
|
+
Give the user the live app URL — that is the deliverable. To iterate, re-plug the
|
|
141
|
+
SAME entity so it updates the same URL. Keep it honest: async build, local-edition
|
|
142
|
+
only, DB injected by the grid, secrets injected from the vault, and reminders
|
|
143
|
+
pending cron (#1543).
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: approval-workflow
|
|
3
|
+
when: approval workflow, request approvals, multi-step approval system — a persistent app where requests advance through an ordered chain of approver roles (approve/reject/delegate) with an audit log. Needs a database → runtime → local edition.
|
|
4
|
+
needs: database
|
|
5
|
+
deploy: runtime
|
|
6
|
+
editions: local
|
|
7
|
+
kind: blueprint
|
|
8
|
+
capabilities_note: BLUEPRINT — structure + cloudgrid.yaml, not shipped app code. Persistent Next.js + Mongo. Declare the canonical `needs: { database: true }`; the deployer injects DATABASE_MONGODB_URL (+legacy MONGODB_URL). Auth-provider roles + optional payments wired via a `vault:` secret block → env vars. Runtime app, async build, local edition only.
|
|
9
|
+
summary: Build a multi-step approval system on the grid — requests advance through an ordered chain of approval steps decided by assigned roles (approve/reject/delegate), with an append-only audit log and approver notifications. This is a BLUEPRINT: read AGENTS.md for the file tree, Mongo collections (users/requests/steps/audit), the state machine, and CloudGrid wiring (DB injection, vault: secrets, deploy), then build the Next.js + Mongo app under services/web/ following it. Edition-gate first, scaffold, declare needs:{database:true}, wire auth via a vault: secret, deploy async, poll to a live URL.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Workflow: approval-workflow
|
|
13
|
+
|
|
14
|
+
The user wants a **multi-step approval system**: a requester submits a request,
|
|
15
|
+
it advances through an ordered chain of approval steps, each step is decided
|
|
16
|
+
(approve / reject / delegate) by an assigned approver role, every action is
|
|
17
|
+
recorded in an audit log, and approvers are notified as their step activates.
|
|
18
|
+
That is a **persistent runtime app** backed by the grid's shared Mongo, with a
|
|
19
|
+
state machine, auth-provider roles, and notifications — the same proven shape as
|
|
20
|
+
`app-with-data`, extended.
|
|
21
|
+
|
|
22
|
+
**This is a BLUEPRINT.** The template ships the *structure* (an `AGENTS.md`
|
|
23
|
+
guide + a `cloudgrid.yaml`), not runnable app code. The recipe is: read the
|
|
24
|
+
blueprint, then build the app following it. Be honest that a runtime deploy is
|
|
25
|
+
async (not instant like a static drop) and that it needs the local edition.
|
|
26
|
+
|
|
27
|
+
## 1. Edition check FIRST (hard gate)
|
|
28
|
+
|
|
29
|
+
A persistent approval app is a built + deployed container. It requires the
|
|
30
|
+
**local edition** (Claude Desktop / Claude Code) or the CLI.
|
|
31
|
+
|
|
32
|
+
- **Hosted edition (Claude Web / hosted MCP):** you CANNOT build a runtime app —
|
|
33
|
+
hosted is inline-only and can only publish static pages. Tell the user
|
|
34
|
+
plainly, offer a **static mock** of the approval UI instead, and STOP the
|
|
35
|
+
runtime path here.
|
|
36
|
+
- **Local edition:** continue.
|
|
37
|
+
|
|
38
|
+
## 2. Auth + grid
|
|
39
|
+
|
|
40
|
+
1. Ensure signed in: `gridctl_login_status`; if not, `gridctl_login`.
|
|
41
|
+
2. A grid is required. Respect the grid picker: if the user has more than one
|
|
42
|
+
grid, ask which to use; do not assume a target.
|
|
43
|
+
|
|
44
|
+
## 3. Read the blueprint
|
|
45
|
+
|
|
46
|
+
Fetch the blueprint and read it before building:
|
|
47
|
+
`gridctl_fetch("template", "approval-workflow")`. Its **`AGENTS.md`** is the
|
|
48
|
+
structure guide — the file tree (under `services/web/`), the Mongo collections
|
|
49
|
+
(`users`, `requests`, `steps`, `audit`), the **state machine** (how a request
|
|
50
|
+
advances / is decided across its ordered steps), how CloudGrid injects the DB
|
|
51
|
+
and secrets, how to wire auth roles (and optional payments), and the deploy
|
|
52
|
+
steps. Also fetch the concrete CRUD shape to adapt from:
|
|
53
|
+
`gridctl_fetch("template", "app-with-data")` (lazy `lib/db.js`, App Router
|
|
54
|
+
route, server page).
|
|
55
|
+
|
|
56
|
+
## 4. Scaffold
|
|
57
|
+
|
|
58
|
+
`gridctl_init` an app `<name>`. `init` creates the entity + `.cloudgrid/link.json`
|
|
59
|
+
and writes a `cloudgrid.yaml` with an EMPTY `services: {}`. `plug` needs a linked
|
|
60
|
+
directory, so run `init` FIRST. Then (a) write the app under **`services/web/`**
|
|
61
|
+
following `AGENTS.md`, and (b) fill `cloudgrid.yaml` to the shape below.
|
|
62
|
+
|
|
63
|
+
## 5. Build the app + wire Mongo
|
|
64
|
+
|
|
65
|
+
1. Set `cloudgrid.yaml`. **App code MUST live under `services/<name>/`** —
|
|
66
|
+
`path:` is the URL mount, NOT the filesystem path.
|
|
67
|
+
```yaml
|
|
68
|
+
name: my-approvals
|
|
69
|
+
services:
|
|
70
|
+
web:
|
|
71
|
+
type: nextjs
|
|
72
|
+
path: /
|
|
73
|
+
needs:
|
|
74
|
+
database: true
|
|
75
|
+
```
|
|
76
|
+
**Declare the datastore with `needs: { database: true }`** — the canonical
|
|
77
|
+
shape. The deployer provisions Mongo and injects `DATABASE_MONGODB_URL` (plus
|
|
78
|
+
the legacy `MONGODB_URL` alias). `requires:` is the deprecated v1 alias; don't
|
|
79
|
+
author new yaml with it, and never set `needs:` and `requires:` together (the
|
|
80
|
+
validator rejects the combination).
|
|
81
|
+
2. Build the collections + state machine from `AGENTS.md`. **Read the DB from
|
|
82
|
+
`process.env.DATABASE_MONGODB_URL`** (legacy `process.env.MONGODB_URL`
|
|
83
|
+
fallback) inside a **lazy getter — never at module top level**, or
|
|
84
|
+
`next build` fails.
|
|
85
|
+
3. Keep the state machine (advance / decide across steps) in one module so the
|
|
86
|
+
API routes and the UI agree on legal transitions; guard every transition
|
|
87
|
+
server-side and never trust the client about which step is active.
|
|
88
|
+
|
|
89
|
+
## 6. Wire auth roles (and optional payments) via `vault:`
|
|
90
|
+
|
|
91
|
+
Approvals need to know who you are and their role. Add an auth-provider SDK
|
|
92
|
+
(Clerk / Auth0), gate routes in `middleware.js`, and read the user + `role` in
|
|
93
|
+
`lib/auth.js`. The provider secret is injected the CloudGrid-correct way — via
|
|
94
|
+
the **`vault:` block** in `cloudgrid.yaml` mapping a vault item to an env var:
|
|
95
|
+
|
|
96
|
+
```yaml
|
|
97
|
+
vault:
|
|
98
|
+
AUTH_PROVIDER_KEY: auth-provider-secret-key # → process.env.AUTH_PROVIDER_KEY
|
|
99
|
+
# STRIPE_KEY: stripe-live-key # only if an approved request charges
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Store the real value with `grid secrets set` (mapped by `vault:`); non-secret
|
|
103
|
+
config → `grid env`. Do **NOT** hardcode keys and do **NOT** set
|
|
104
|
+
`DATABASE_MONGODB_URL`/`MONGODB_URL` yourself — the grid injects the DB vars.
|
|
105
|
+
|
|
106
|
+
## 7. (Optional) Run locally
|
|
107
|
+
|
|
108
|
+
Mention that the user can `grid dev` to run locally against the injected Mongo
|
|
109
|
+
before deploying. Don't require it.
|
|
110
|
+
|
|
111
|
+
## 8. Deploy (async)
|
|
112
|
+
|
|
113
|
+
Deploy the folder with `gridctl_plug`. A **runtime deploy is ASYNC**: the first
|
|
114
|
+
response is `status: "building"`, NOT a live URL yet.
|
|
115
|
+
- Poll `gridctl_status` (or the returned poll_url) until the entity is live.
|
|
116
|
+
- Surface a liveness signal while it builds — never a bare silent wait.
|
|
117
|
+
- Only once it is live, return the deployed app URL (NOT the build/log link).
|
|
118
|
+
|
|
119
|
+
## 9. Return the live URL + iterate
|
|
120
|
+
|
|
121
|
+
Give the user the live app URL — that is the deliverable. To iterate, re-plug the
|
|
122
|
+
SAME entity so it updates the same URL. Keep it honest: this is a blueprint you
|
|
123
|
+
built out, an async runtime build, local-edition only, credentials injected by
|
|
124
|
+
the grid.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: billing-dashboard
|
|
3
|
+
when: billing dashboard, invoicing and payments dashboard, SaaS billing
|
|
4
|
+
needs: database
|
|
5
|
+
deploy: runtime
|
|
6
|
+
editions: local
|
|
7
|
+
kind: blueprint
|
|
8
|
+
capabilities_note: persistent + payments — needs a database (Mongo) and Stripe. Runtime app, async build, local edition only. This is a BLUEPRINT — read the template's AGENTS.md for the structure, then build the app. Declare the canonical `needs: { database: true }`; the deployer injects DATABASE_MONGODB_URL (+legacy MONGODB_URL). The Stripe key comes from the vault: block → STRIPE_KEY.
|
|
9
|
+
summary: Build a persistent Next.js + Mongo + Stripe SaaS billing dashboard on the grid — customers, invoices, charges, usage metering, a revenue view (MRR/outstanding), /api/checkout Stripe session to collect invoices, and a signature-verified Stripe webhook that marks invoices paid and records charges. This is a BLUEPRINT: edition-gate first, scaffold, fetch the template and read AGENTS.md for the file tree + wiring, put the app under services/web/, wire process.env.DATABASE_MONGODB_URL lazily and STRIPE_KEY from the vault, store money as integer cents, declare needs:{database:true} (not requires:), deploy async, poll to a live URL, register the webhook in Stripe.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Workflow: billing-dashboard
|
|
13
|
+
|
|
14
|
+
The user wants a **billing / invoicing / payments dashboard** for a SaaS — a place
|
|
15
|
+
to track customers, issue and collect invoices, record charges, meter usage, and
|
|
16
|
+
see revenue (MRR, outstanding, recent invoices). That is a **runtime app** backed
|
|
17
|
+
by the grid's shared Mongo (`customers`, `invoices`, `charges`, `usage_events`)
|
|
18
|
+
plus **Stripe** for payments: a `/api/checkout` route that creates a Stripe
|
|
19
|
+
Checkout Session to collect an invoice, and a signature-verified webhook that marks
|
|
20
|
+
it paid and records the charge. Not a static page — it must remember billing state.
|
|
21
|
+
|
|
22
|
+
**This is a BLUEPRINT.** The template ships the structure + `cloudgrid.yaml`, not
|
|
23
|
+
finished app code. The build shape is proven `app-with-data` (Next.js App Router,
|
|
24
|
+
lazy Mongo, app under `services/web/`) plus the billing collections and Stripe
|
|
25
|
+
wiring. Be honest that a runtime deploy is async (not instant) and needs the local
|
|
26
|
+
edition.
|
|
27
|
+
|
|
28
|
+
## 1. Edition check FIRST (hard gate)
|
|
29
|
+
|
|
30
|
+
A persistent billing dashboard is a built + deployed container. It requires the
|
|
31
|
+
**local edition** (Claude Desktop / Claude Code) or the CLI.
|
|
32
|
+
|
|
33
|
+
- **Hosted edition (Claude Web / hosted MCP):** you CANNOT build a runtime app —
|
|
34
|
+
hosted is inline-only and can only publish static pages. Say so plainly, offer a
|
|
35
|
+
**static revenue-view mockup** instead, and STOP the runtime path here.
|
|
36
|
+
- **Local edition:** continue.
|
|
37
|
+
|
|
38
|
+
## 2. Auth + grid
|
|
39
|
+
|
|
40
|
+
1. Ensure signed in: `gridctl_login_status`; if not, `gridctl_login`.
|
|
41
|
+
2. A grid is required. Respect the grid picker: if the user has more than one grid,
|
|
42
|
+
ask which to use; do not assume a target.
|
|
43
|
+
|
|
44
|
+
## 3. Scaffold
|
|
45
|
+
|
|
46
|
+
`gridctl_init` an app `<name>`. `init` creates the entity + `.cloudgrid/link.json`
|
|
47
|
+
and writes a `cloudgrid.yaml` with an EMPTY `services: {}`. `plug` needs a linked
|
|
48
|
+
directory, so run `init` FIRST.
|
|
49
|
+
|
|
50
|
+
## 4. Fetch the blueprint and read AGENTS.md
|
|
51
|
+
|
|
52
|
+
This is a blueprint — the structure guide is the deliverable, not copy-paste code.
|
|
53
|
+
|
|
54
|
+
1. `gridctl_fetch("template", "billing-dashboard")`.
|
|
55
|
+
2. **Read `AGENTS.md`** in the fetched template. It has: the file tree (app under
|
|
56
|
+
`services/web/`), the Mongo collections (`customers`, `invoices`, `charges`,
|
|
57
|
+
`usage_events`) and their fields, how the grid injects Mongo
|
|
58
|
+
(`DATABASE_MONGODB_URL`) and the Stripe key (the `vault:` block → `STRIPE_KEY`),
|
|
59
|
+
the checkout + webhook + usage wiring, and the deploy steps. Build the app
|
|
60
|
+
following it.
|
|
61
|
+
3. Set `cloudgrid.yaml` to the shape below. **App code MUST live under
|
|
62
|
+
`services/web/`** — `path:` is the URL mount, NOT the filesystem path.
|
|
63
|
+
```yaml
|
|
64
|
+
name: my-billing
|
|
65
|
+
vault:
|
|
66
|
+
STRIPE_KEY: stripe-live-key
|
|
67
|
+
services:
|
|
68
|
+
web:
|
|
69
|
+
type: nextjs
|
|
70
|
+
path: /
|
|
71
|
+
needs:
|
|
72
|
+
database: true
|
|
73
|
+
```
|
|
74
|
+
**Declare the datastore with `needs: { database: true }`** — the canonical shape.
|
|
75
|
+
The deployer provisions Mongo and injects `DATABASE_MONGODB_URL` (plus the legacy
|
|
76
|
+
`MONGODB_URL` alias). `requires:` is the deprecated v1 alias; never set `needs:`
|
|
77
|
+
and `requires:` together (the validator rejects it).
|
|
78
|
+
|
|
79
|
+
## 5. Build the app (following AGENTS.md)
|
|
80
|
+
|
|
81
|
+
- **Read the DB from `process.env.DATABASE_MONGODB_URL`** (legacy `MONGODB_URL`
|
|
82
|
+
fallback) inside a **lazy getter** — never at module top level, or `next build`
|
|
83
|
+
fails. Never hardcode a connection string.
|
|
84
|
+
- **Read the Stripe key from `process.env.STRIPE_KEY`** (injected by the `vault:`
|
|
85
|
+
block) lazily. **Store all money as integer cents.** Compute invoice totals
|
|
86
|
+
server-side from the stored line items — never trust an amount sent by the browser.
|
|
87
|
+
- The **webhook** reads the RAW request body (`await request.text()`), verifies the
|
|
88
|
+
Stripe signature, marks the invoice `paid`, and upserts a `charges` doc by the
|
|
89
|
+
Stripe payment id (idempotent) with the authoritative total from the verified event.
|
|
90
|
+
- Meter usage via `/api/usage` into `usage_events`; the revenue view aggregates
|
|
91
|
+
`charges` (revenue), `invoices` (outstanding), and `usage_events` per period.
|
|
92
|
+
- (Optional) `grid dev` to run locally against the injected Mongo + a Stripe test
|
|
93
|
+
key before deploying.
|
|
94
|
+
|
|
95
|
+
## 6. Config
|
|
96
|
+
|
|
97
|
+
- Stripe secrets → the vault: `gridctl_secrets` to set `stripe-live-key` (and a
|
|
98
|
+
`stripe-webhook-secret` if you map one). The `vault:` block turns them into env
|
|
99
|
+
vars. Non-secret config → `gridctl_env`.
|
|
100
|
+
- Do **NOT** set the DB connection vars yourself (`DATABASE_MONGODB_URL` /
|
|
101
|
+
`MONGODB_URL`) — the grid injects them.
|
|
102
|
+
|
|
103
|
+
## 7. Deploy (async)
|
|
104
|
+
|
|
105
|
+
Deploy the folder with `gridctl_plug`. A **runtime deploy is ASYNC**: the first
|
|
106
|
+
response is `status: "building"`, NOT a live URL yet.
|
|
107
|
+
- Poll `gridctl_status` (or the returned poll_url) until the entity is live.
|
|
108
|
+
- Surface a liveness signal while it builds — never a bare silent wait.
|
|
109
|
+
- Only once it is live, return the deployed app URL (NOT the build/log link).
|
|
110
|
+
|
|
111
|
+
## 8. Wire the Stripe webhook + return the live URL
|
|
112
|
+
|
|
113
|
+
1. Register `<live-url>/api/webhook` as a webhook endpoint in the Stripe dashboard,
|
|
114
|
+
copy its `whsec_…` secret into the vault, and re-`gridctl_plug` the SAME entity
|
|
115
|
+
if you changed the `vault:` mapping (same URL).
|
|
116
|
+
2. Give the user the live dashboard URL — that is the deliverable. To iterate,
|
|
117
|
+
re-plug the SAME entity so it updates the same URL.
|
|
118
|
+
|
|
119
|
+
Keep it honest: blueprint (build from AGENTS.md), async build, local-edition only,
|
|
120
|
+
Mongo + Stripe credentials injected by the grid / vault.
|