Blueprints

on Vibecodr.Space

Share reusable backend functions, explain how they work, and deploy them as Pulses.

Reusable functions speed up trusted backend work. Blueprints are public Pulse starting points: copy the handler, adapt the behavior, put caller-safe config in env.pulse, and keep secrets or connections in private owner setup instead of public source.

Public blueprint code must not contain secrets, credentials, tokens, or external API keys. The crawler-facing directory mirrors the same public catalog humans browse in the app and links each item to its canonical detail page.

Vibecodr Blueprints page with Send Discord webhook Pulse source and deployment controls.
Blueprint previews show source shape, inputs, outputs, setup requirements, and deploy handoff without publishing secret values.
server/intake.ts TypeScript · Node 18
export const config = { style: "enhanced" };

function pulseStateEventKey(input, env) {
  const contextKey = env.event?.context?.trigger?.pulseStateMemory?.key;
  return String(contextKey || input?.pulseStateEventKey || input?.eventKey || input?.eventId || "")
    .trim()
    .slice(0, 160);
}

export default async function handler(input, env) {
  const channelId = String(env.pulse.DISCORD_CHANNEL_ID || "").trim();
  if (!/^\d{17,22}$/.test(channelId) || !env.secrets.has("DISCORD_BOT_TOKEN")) {
    return Response.json(
      { error: "Add DISCORD_CHANNEL_ID in .pulse and DISCORD_BOT_TOKEN in Pulse Secrets." },
      { status: 500 }
    );
  }

  const message = String(input?.message || "").trim();
  if (!message) {

Public Pulse starting points