create-creek-app 0.2.0 → 0.3.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/dist/fetch.js CHANGED
@@ -1,7 +1,14 @@
1
1
  import { downloadTemplate } from "giget";
2
2
  import { join } from "node:path";
3
3
  import { existsSync, readFileSync } from "node:fs";
4
- const TEMPLATE_REPO = "github:solcreek/templates";
4
+ /**
5
+ * Default source for built-in templates. Points at the monorepo's
6
+ * `examples/` directory so the templates ARE the examples we actually
7
+ * dogfood and test — no separate `solcreek/templates` repo to drift
8
+ * out of sync. Third-party templates (`github:user/repo`) pass
9
+ * through unchanged; see isThirdParty() below.
10
+ */
11
+ const TEMPLATE_REPO = "github:solcreek/creek/examples";
5
12
  /**
6
13
  * Download a template into `dest`.
7
14
  *
@@ -1,11 +1,20 @@
1
1
  /**
2
- * Template catalog — used for --list, interactive prompt, and gallery.
2
+ * Built-in template catalog — each entry maps to a real project in
3
+ * this monorepo's `examples/` directory. If an entry here can't be
4
+ * scaffolded + deployed, the catalog is wrong.
3
5
  *
4
- * Four types by output:
5
- * site — Visual pages (deploy shareable URL)
6
- * app — Interactive UI + backend logic
7
- * workflow — Background process (no/minimal UI), trigger + steps
8
- * connector Data bridge pattern (ingestion → storage)
6
+ * Replaced a 25-entry aspirational catalog with only templates that
7
+ * actually exist as tested code, per the "templates are real starter
8
+ * code, not form-fill Mad Libs" principle. New entries land here only
9
+ * after the example passes `creek doctor` cleanly and has
10
+ * local-dev/deploy-creek docs.
11
+ *
12
+ * Third-party templates (`--template github:user/repo`) bypass this
13
+ * catalog via fetch.ts:isThirdParty. The catalog is just the
14
+ * discoverable-via-prompt set.
15
+ *
16
+ * Gallery at templates.creek.dev aggregates this list + curated
17
+ * community templates, but that layer lives outside the CLI.
9
18
  */
10
19
  export interface Template {
11
20
  name: string;
package/dist/templates.js CHANGED
@@ -1,38 +1,43 @@
1
1
  /**
2
- * Template catalog — used for --list, interactive prompt, and gallery.
2
+ * Built-in template catalog — each entry maps to a real project in
3
+ * this monorepo's `examples/` directory. If an entry here can't be
4
+ * scaffolded + deployed, the catalog is wrong.
3
5
  *
4
- * Four types by output:
5
- * site — Visual pages (deploy shareable URL)
6
- * app — Interactive UI + backend logic
7
- * workflow — Background process (no/minimal UI), trigger + steps
8
- * connector Data bridge pattern (ingestion → storage)
6
+ * Replaced a 25-entry aspirational catalog with only templates that
7
+ * actually exist as tested code, per the "templates are real starter
8
+ * code, not form-fill Mad Libs" principle. New entries land here only
9
+ * after the example passes `creek doctor` cleanly and has
10
+ * local-dev/deploy-creek docs.
11
+ *
12
+ * Third-party templates (`--template github:user/repo`) bypass this
13
+ * catalog via fetch.ts:isThirdParty. The catalog is just the
14
+ * discoverable-via-prompt set.
15
+ *
16
+ * Gallery at templates.creek.dev aggregates this list + curated
17
+ * community templates, but that layer lives outside the CLI.
9
18
  */
10
19
  export const TEMPLATES = [
11
- // --- Sites (Level 4 deploy → shareable) ---
12
- { name: "landing", description: "Landing page with hero and CTA", type: "site", capabilities: [] },
13
- { name: "blog", description: "Blog with image uploads", type: "site", capabilities: ["database", "storage"] },
14
- { name: "link-in-bio", description: "Social links page", type: "site", capabilities: [] },
15
- { name: "waitlist", description: "Waitlist with AI user segmentation", type: "site", capabilities: ["database", "ai"] },
16
- // --- Apps (Level 3 — working data pipeline + UI) ---
17
- { name: "form", description: "Form collector with admin dashboard", type: "app", capabilities: ["database"] },
18
- { name: "dashboard", description: "Data dashboard with scheduled refresh", type: "app", capabilities: ["database", "realtime", "cron"] },
19
- { name: "chatbot", description: "AI chatbot with conversation history", type: "app", capabilities: ["database", "ai"] },
20
- { name: "survey", description: "Survey with AI-powered analysis", type: "app", capabilities: ["database", "ai"] },
21
- { name: "knowledge-base", description: "Knowledge base with AI search", type: "app", capabilities: ["database", "ai", "storage"] },
22
- { name: "status-page", description: "Service status page with uptime monitoring", type: "app", capabilities: ["database", "realtime", "cron", "cache"] },
23
- { name: "file-share", description: "File upload/download with expiring links", type: "app", capabilities: ["database", "storage"] },
24
- { name: "todo", description: "Realtime todo app (learning example)", type: "app", capabilities: ["database", "realtime"] },
25
- // --- Workflows (Level 2-3 — trigger + steps, no/minimal UI) ---
26
- { name: "approval-flow", description: "Approval workflow — leave, expense, procurement", type: "workflow", capabilities: ["database", "realtime", "queue"], trigger: "webhook" },
27
- { name: "invoice-processor", description: "Email invoice AI extract → DB → notify", type: "workflow", capabilities: ["database", "ai", "storage", "email"], trigger: "email" },
28
- { name: "scheduled-report", description: "Scheduled query → AI summary → PDF report", type: "workflow", capabilities: ["database", "ai", "storage", "cron"], trigger: "cron" },
29
- { name: "data-sync", description: "Scheduled API pull → diff → DB → notify", type: "workflow", capabilities: ["database", "cron"], trigger: "cron" },
30
- { name: "ai-classifier", description: "Input AI classify route to queue", type: "workflow", capabilities: ["database", "ai", "queue"], trigger: "webhook" },
31
- // --- Connectors (Level 2 — pure platform wiring) ---
32
- { name: "api", description: "REST API with Hono", type: "connector", capabilities: ["database"], trigger: "http" },
33
- { name: "webhook-receiver", description: "Receive and process external webhooks", type: "connector", capabilities: ["database", "queue"], trigger: "webhook" },
34
- { name: "email-to-db", description: "Email → parse → attachments to R2 → DB", type: "connector", capabilities: ["database", "storage", "email"], trigger: "email" },
35
- { name: "ftp-sync", description: "Scheduled FTP/SFTP pull → parse → DB", type: "connector", capabilities: ["database", "storage", "cron", "ftp"], trigger: "cron" },
36
- // --- Developer ---
37
- { name: "blank", description: "Minimal Creek project (empty canvas)", type: "developer", capabilities: [] },
20
+ // Flagship full-stack portable example. Dual-driver Drizzle:
21
+ // better-sqlite3 locally, D1 on Workers. Zero @solcreek/* in runtime.
22
+ {
23
+ name: "vite-react-drizzle",
24
+ description: "Vite + React + Hono + Drizzle portable full-stack todo (D1)",
25
+ type: "app",
26
+ capabilities: ["database"],
27
+ },
28
+ // Minimal Vite + React SPA. Starting point for anyone who just
29
+ // wants a static app on the edge.
30
+ {
31
+ name: "vite-react",
32
+ description: "Vite + React minimal SPA starter",
33
+ type: "site",
34
+ capabilities: [],
35
+ },
36
+ // TanStack Start SSR on Workers. Real framework-backed template.
37
+ {
38
+ name: "tanstack-start-ssr",
39
+ description: "TanStack Start with SSR on Cloudflare Workers",
40
+ type: "app",
41
+ capabilities: [],
42
+ },
38
43
  ];
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "create-creek-app",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Create a new Creek project from a template",
5
5
  "type": "module",
6
6
  "bin": {
7
- "create-creek-app": "./dist/index.js"
7
+ "create-creek-app": "dist/index.js"
8
8
  },
9
9
  "main": "./dist/index.js",
10
10
  "files": [
@@ -30,7 +30,7 @@
30
30
  "homepage": "https://creek.dev",
31
31
  "repository": {
32
32
  "type": "git",
33
- "url": "https://github.com/solcreek/creek.git",
33
+ "url": "git+https://github.com/solcreek/creek.git",
34
34
  "directory": "packages/create-creek-app"
35
35
  },
36
36
  "dependencies": {