Skip to content

feat(templates): add "Build it on Replit" button and replit-prompt section#87

Open
raoufchebri wants to merge 4 commits intodatabricks:mainfrom
raoufchebri:add-replit-template
Open

feat(templates): add "Build it on Replit" button and replit-prompt section#87
raoufchebri wants to merge 4 commits intodatabricks:mainfrom
raoufchebri:add-replit-template

Conversation

@raoufchebri
Copy link
Copy Markdown

@raoufchebri raoufchebri commented May 7, 2026

Summary

Adds a Build it on Replit action to DevHub templates and ships Replit-Agent prompts for the launch set of examples, cookbooks, and recipes.

Screenshot 2026-05-08 at 10 01 54 AM

When a template has a replit-prompt.md, the template usage banner renders a second action that opens replit.com with the prompt preloaded as an lz-string-compressed query param plus DevHub UTM tags. Templates without a replit-prompt.md are unchanged.

Screenshot 2026-05-08 at 10 02 09 AM

Plumbing

  • Examples (already wired in c191572): content/examples/<slug>/replit-prompt.md is read by content-markdown.ts and forwarded to TemplateUsageBanner from example-detail.tsx.
  • Cookbooks (new in 7de8fa3): added readCookbookReplitPrompt(), exposed replitPromptsBySlug from the cookbooks plugin, added a useCookbookReplitPrompt() hook, and threaded replitPrompt through useCookbookMarkdownCookbookDetailTemplateUsageBanner. validate-content.mjs now allows replit-prompt.md inside cookbook folders.
  • Recipes (new in 7de8fa3): the file plumbing already supported replit-prompt.md; added useRecipeSections() and forwarded sections.replitPrompt from recipe-detail.tsx to the banner.

Replit prompts added

Tier Slug
Example saas-tracker (updated to add Genie analytics)
Example vacation-rentals
Example inventory-intelligence
Example content-moderator
Cookbook genie-analytics-app
Cookbook operational-data-analytics
Recipe genie-conversational-analytics
Recipe genie-multi-space
Recipe medallion-architecture-from-cdc
Recipe volume-file-upload (Volume File Manager)

Each prompt follows the same structure: connector-first / PAT fallback decision tree, table or schema setup, app requirements, permission handling, build order, and scope notes.

Test plan

  • npm run fmt
  • npm run validate:content
  • npm run typecheck
  • npm run build
  • npm run dev — server compiles cleanly, all 10 template routes load
  • Manually click Build it on Replit on one example, one cookbook, and one recipe page and confirm the URL decompresses to the expected prompt
  • Verify pages without a replit-prompt.md still render only the Copy prompt action

raoufchebri and others added 4 commits May 7, 2026 15:17
…ction

Adds an optional replit-prompt.md content section for templates. When
present, the template usage banner renders a second action that opens
replit.com with the prompt preloaded (lz-string compressed, UTM-tagged).
Wires up the saas-tracker template as the first example.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…rt to cookbooks/recipes

Adds replit-prompt.md content for the SaaS Tracker, Vacation Rentals,
Inventory Intelligence, Content Moderator, Genie Analytics App,
Operational Data Analytics, Genie Conversational Analytics, Genie
Multi-Space, Medallion CDC, and Volume File Manager templates, and
extends the existing example-only "Build it on Replit" plumbing to
cookbook- and recipe-tier pages.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a one-line hint to the three Genie-focused Replit prompts
(genie-analytics-app cookbook, genie-conversational-analytics recipe,
genie-multi-space recipe) telling Replit Agent that users can list
their Genie spaces with `databricks api get /api/2.0/genie/spaces`
when configuring DATABRICKS_GENIE_SPACE_ID.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a "Build with > Replit Apps" checkbox in the templates filter
sidebar that narrows the grid to only templates that ship a
replit-prompt.md. The filter is computed at render time from plugin
data (examples + recipes section bodies, plus the cookbooks plugin's
replitPromptsBySlug), so authors don't need to mirror replit-prompt
status in recipes.ts. Active-filters chip, mobile sheet badge count,
and "Clear all" all participate in the new state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@raoufchebri raoufchebri marked this pull request as ready for review May 8, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant