create-omg 0.4.41 → 0.4.43

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.
Files changed (81) hide show
  1. package/README.md +16 -6
  2. package/dist/index.mjs +71 -12
  3. package/dist/{template → templates/react-ts}/AGENTS.md +22 -0
  4. package/dist/templates/react-ts/_gitignore +24 -0
  5. package/dist/{template → templates/react-ts}/bun.lock +105 -58
  6. package/dist/templates/react-ts/components.json +25 -0
  7. package/dist/templates/react-ts/eslint.config.js +23 -0
  8. package/dist/templates/react-ts/functions/.gitkeep +0 -0
  9. package/dist/{template → templates/react-ts}/package.json +5 -0
  10. package/dist/templates/react-ts/public/favicon.svg +1 -0
  11. package/dist/templates/react-ts/public/icons/apple-touch-icon.png +0 -0
  12. package/dist/templates/react-ts/public/icons/pwa-192x192.png +0 -0
  13. package/dist/templates/react-ts/public/icons/pwa-512x512-maskable.png +0 -0
  14. package/dist/templates/react-ts/public/icons/pwa-512x512.png +0 -0
  15. package/dist/templates/react-ts/public/icons.svg +24 -0
  16. package/dist/templates/react-ts/schema.ts +5 -0
  17. package/dist/templates/react-ts/server/db.ts +103 -0
  18. package/dist/templates/react-ts/src/App.tsx +128 -0
  19. package/dist/templates/react-ts/src/components/ui/animated-number.tsx +102 -0
  20. package/dist/templates/react-ts/src/components/ui/animated-text.tsx +109 -0
  21. package/dist/templates/react-ts/src/components/ui/bottom-nav.tsx +131 -0
  22. package/dist/templates/react-ts/src/components/ui/button.tsx +84 -0
  23. package/dist/templates/react-ts/src/components/ui/card.tsx +70 -0
  24. package/dist/templates/react-ts/src/components/ui/otp-input.tsx +179 -0
  25. package/dist/templates/react-ts/src/components/ui/scroll-affordance.tsx +106 -0
  26. package/dist/templates/react-ts/src/components/ui/sound.ts +182 -0
  27. package/dist/templates/react-ts/src/components/ui/transitions.tsx +419 -0
  28. package/dist/templates/react-ts/src/components/ui/vibes-ui-styles.ts +388 -0
  29. package/dist/templates/react-ts/src/db.drizzle.ts +5 -0
  30. package/dist/templates/react-ts/src/index.css +168 -0
  31. package/dist/templates/react-ts/src/lib/utils.ts +6 -0
  32. package/dist/templates/react-ts/src/main.tsx +22 -0
  33. package/dist/templates/react-ts/src/routeTree.gen.ts +59 -0
  34. package/dist/templates/react-ts/src/routes/__root.tsx +7 -0
  35. package/dist/templates/react-ts/src/routes/index.tsx +9 -0
  36. package/dist/templates/react-ts/tsconfig.app.json +30 -0
  37. package/dist/templates/react-ts/tsconfig.json +10 -0
  38. package/dist/templates/react-ts/tsconfig.node.json +24 -0
  39. package/dist/{template → templates/react-ts}/vite.config.ts +9 -1
  40. package/dist/templates/react-ts-start/AGENTS.md +75 -0
  41. package/dist/templates/react-ts-start/README.md +58 -0
  42. package/dist/templates/react-ts-start/bun.lock +1688 -0
  43. package/dist/templates/react-ts-start/package.json +58 -0
  44. package/dist/templates/react-ts-start/src/routeTree.gen.ts +68 -0
  45. package/dist/templates/react-ts-start/src/router.tsx +18 -0
  46. package/dist/templates/react-ts-start/src/routes/__root.tsx +40 -0
  47. package/dist/templates/react-ts-start/src/routes/index.tsx +7 -0
  48. package/dist/templates/react-ts-start/vite.config.ts +29 -0
  49. package/package.json +3 -3
  50. package/dist/template/src/main.tsx +0 -10
  51. /package/dist/{template → templates/react-ts}/README.md +0 -0
  52. /package/dist/{template → templates/react-ts}/index.html +0 -0
  53. /package/dist/{template → templates/react-ts-start}/_gitignore +0 -0
  54. /package/dist/{template → templates/react-ts-start}/components.json +0 -0
  55. /package/dist/{template → templates/react-ts-start}/eslint.config.js +0 -0
  56. /package/dist/{template → templates/react-ts-start}/functions/.gitkeep +0 -0
  57. /package/dist/{template → templates/react-ts-start}/public/favicon.svg +0 -0
  58. /package/dist/{template → templates/react-ts-start}/public/icons/apple-touch-icon.png +0 -0
  59. /package/dist/{template → templates/react-ts-start}/public/icons/pwa-192x192.png +0 -0
  60. /package/dist/{template → templates/react-ts-start}/public/icons/pwa-512x512-maskable.png +0 -0
  61. /package/dist/{template → templates/react-ts-start}/public/icons/pwa-512x512.png +0 -0
  62. /package/dist/{template → templates/react-ts-start}/public/icons.svg +0 -0
  63. /package/dist/{template → templates/react-ts-start}/schema.ts +0 -0
  64. /package/dist/{template → templates/react-ts-start}/server/db.ts +0 -0
  65. /package/dist/{template → templates/react-ts-start}/src/App.tsx +0 -0
  66. /package/dist/{template → templates/react-ts-start}/src/components/ui/animated-number.tsx +0 -0
  67. /package/dist/{template → templates/react-ts-start}/src/components/ui/animated-text.tsx +0 -0
  68. /package/dist/{template → templates/react-ts-start}/src/components/ui/bottom-nav.tsx +0 -0
  69. /package/dist/{template → templates/react-ts-start}/src/components/ui/button.tsx +0 -0
  70. /package/dist/{template → templates/react-ts-start}/src/components/ui/card.tsx +0 -0
  71. /package/dist/{template → templates/react-ts-start}/src/components/ui/otp-input.tsx +0 -0
  72. /package/dist/{template → templates/react-ts-start}/src/components/ui/scroll-affordance.tsx +0 -0
  73. /package/dist/{template → templates/react-ts-start}/src/components/ui/sound.ts +0 -0
  74. /package/dist/{template → templates/react-ts-start}/src/components/ui/transitions.tsx +0 -0
  75. /package/dist/{template → templates/react-ts-start}/src/components/ui/vibes-ui-styles.ts +0 -0
  76. /package/dist/{template → templates/react-ts-start}/src/db.drizzle.ts +0 -0
  77. /package/dist/{template → templates/react-ts-start}/src/index.css +0 -0
  78. /package/dist/{template → templates/react-ts-start}/src/lib/utils.ts +0 -0
  79. /package/dist/{template → templates/react-ts-start}/tsconfig.app.json +0 -0
  80. /package/dist/{template → templates/react-ts-start}/tsconfig.json +0 -0
  81. /package/dist/{template → templates/react-ts-start}/tsconfig.node.json +0 -0
@@ -0,0 +1,30 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4
+ "target": "es2023",
5
+ "lib": ["ES2023", "DOM", "DOM.Iterable"],
6
+ "module": "esnext",
7
+ "types": ["vite/client"],
8
+ "skipLibCheck": true,
9
+
10
+ /* Bundler mode */
11
+ "moduleResolution": "bundler",
12
+ "allowImportingTsExtensions": true,
13
+ "verbatimModuleSyntax": true,
14
+ "moduleDetection": "force",
15
+ "noEmit": true,
16
+ "jsx": "react-jsx",
17
+
18
+ /* Linting */
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "erasableSyntaxOnly": true,
22
+ "noFallthroughCasesInSwitch": true,
23
+
24
+ /* Path alias — keep in lockstep with vite.config.ts */
25
+ "paths": {
26
+ "@/*": ["./src/*"]
27
+ }
28
+ },
29
+ "include": ["src"]
30
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ { "path": "./tsconfig.app.json" },
5
+ { "path": "./tsconfig.node.json" }
6
+ ],
7
+ "compilerOptions": {
8
+ "paths": { "@/*": ["./src/*"] }
9
+ }
10
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
+ "target": "es2023",
5
+ "lib": ["ES2023"],
6
+ "module": "esnext",
7
+ "types": ["node"],
8
+ "skipLibCheck": true,
9
+
10
+ /* Bundler mode */
11
+ "moduleResolution": "bundler",
12
+ "allowImportingTsExtensions": true,
13
+ "verbatimModuleSyntax": true,
14
+ "moduleDetection": "force",
15
+ "noEmit": true,
16
+
17
+ /* Linting */
18
+ "noUnusedLocals": true,
19
+ "noUnusedParameters": true,
20
+ "erasableSyntaxOnly": true,
21
+ "noFallthroughCasesInSwitch": true
22
+ },
23
+ "include": ["vite.config.ts"]
24
+ }
@@ -3,9 +3,17 @@ import { defineConfig } from 'vite-plus'
3
3
  import react from '@vitejs/plugin-react'
4
4
  import tailwindcss from '@tailwindcss/vite'
5
5
  import vibes from '@omg-dev/vite-plugin'
6
+ import { tanstackRouter } from '@tanstack/router-plugin/vite'
6
7
 
7
8
  export default defineConfig({
8
- plugins: [react(), tailwindcss(), vibes()],
9
+ plugins: [
10
+ // Must come before react(): it generates src/routeTree.gen.ts from
11
+ // src/routes/ and code-splits each route into its own chunk.
12
+ tanstackRouter({ target: 'react', autoCodeSplitting: true }),
13
+ react(),
14
+ tailwindcss(),
15
+ vibes(),
16
+ ],
9
17
  resolve: {
10
18
  // pi (and humans copying from shadcn docs) reaches for '@/components/...'
11
19
  // unconditionally. Bake the alias here so the import resolves in every
@@ -0,0 +1,75 @@
1
+ # Design system — non-negotiable
2
+
3
+ This app ships a locked design system (shadcn/ui, Tailwind v4, preset theme).
4
+ Follow these rules on every UI change.
5
+
6
+ ## Colors: semantic tokens only
7
+
8
+ Tailwind's default palette is **removed** (see the lock block in
9
+ `src/index.css`). `bg-indigo-600`, `text-zinc-400`, `border-slate-700`, etc.
10
+ compile to **nothing** — if a color class has no visible effect, this is why.
11
+
12
+ - Use: `bg-background`, `bg-card`, `bg-primary`, `bg-secondary`, `bg-muted`,
13
+ `bg-accent`, `bg-destructive`, `text-foreground`, `text-muted-foreground`,
14
+ `border-border`, `ring-ring` (+ their `-foreground` pairs, opacity works:
15
+ `bg-primary/15`).
16
+ - Never hand-edit the token values in `src/index.css`. To change the look,
17
+ switch the whole preset:
18
+ `bunx --bun shadcn@latest init --preset <code> --force`
19
+ (named presets: `nova` `vega` `maia` `lyra` `mira` `luma` `sera`), then
20
+ verify `vite.config.ts` kept `host`/`allowedHosts`/`cors`/`hmr` and the
21
+ `@` alias.
22
+ - Don't force the `.dark` class or invent a dark theme unless the user asks;
23
+ presets already handle light/dark.
24
+
25
+ ## Components: use `src/components/ui/` before writing anything
26
+
27
+ The full inventory is pre-installed — **never hand-roll one of these with
28
+ divs** (no div-built tab bars, toggles, sliders, dropdowns, modals):
29
+
30
+ `tabs` `dialog` `sheet` `popover` `tooltip` `dropdown-menu` `select` `input`
31
+ `textarea` `label` `checkbox` `radio-group` `switch` `slider` `toggle-group`
32
+ `badge` `separator` `skeleton` `progress` `avatar` `scroll-area` `accordion`
33
+ — plus the vendored delight primitives: `button`, `card`, `bottom-nav`,
34
+ `otp-input`, `animated-number`, `animated-text`, `scroll-affordance`,
35
+ `transitions` (`.vui-t-*` motion), `sound`.
36
+
37
+ - Import via the alias: `import { Tabs, TabsList } from "@/components/ui/tabs"`.
38
+ - Missing a component? `yes n | bunx --bun shadcn@latest add <name>`
39
+ (answer No to overwrite prompts — the vendored primitives must survive).
40
+ - Never hand-edit files in `src/components/ui/`.
41
+ - Motion: use `transitions.tsx` / `.vui-*` classes and the `animated-*`
42
+ primitives; don't write bespoke keyframe animations for patterns they cover.
43
+
44
+ ## Routing + SSR: TanStack Start
45
+
46
+ This app is **server-rendered**. There is no `index.html` and no `src/main.tsx`
47
+ — `src/routes/__root.tsx` IS the HTML document, rendered per request.
48
+
49
+ ```tsx
50
+ // src/routes/pricing.tsx → /pricing
51
+ import { createFileRoute } from "@tanstack/react-router"
52
+
53
+ export const Route = createFileRoute("/pricing")({ component: Pricing })
54
+
55
+ function Pricing() { return <main>...</main> }
56
+ ```
57
+
58
+ - `src/App.tsx` is the `/` route's component — keep the home view there.
59
+ - Anything that used to go in `index.html` (meta, title, fonts, icons) belongs
60
+ in the root route's `head()`.
61
+ - `src/router.tsx` exports `getRouter()`. It must return a **fresh** router on
62
+ every call — the server calls it per request, and a shared instance would
63
+ leak one visitor's state into another's page.
64
+ - **Every component renders on the server first.** Touching `window`,
65
+ `document`, or `localStorage` during render crashes the request instead of
66
+ just the client. Put browser-only work in `useEffect`.
67
+ - Navigate with `<Link to="/pricing">` from `@tanstack/react-router`.
68
+ - `src/routeTree.gen.ts` is generated from `src/routes/` — never edit it.
69
+
70
+ ## Environment
71
+
72
+ - Project dir `/home/user/project`, package manager **bun**.
73
+ - Dev server is already running on 5173 with HMR — never start another.
74
+ - Read `.agents/skills/vibes-create-app` at the start of a new build and the
75
+ `shadcn` skill before composing components.
@@ -0,0 +1,58 @@
1
+ # react-ts-start — TanStack Start (SSR) variant
2
+
3
+ **Experimental.** The default starter is `react-ts` (SPA + TanStack Router,
4
+ prerendered). Reach for this one only when a page genuinely needs
5
+ server-rendered HTML per request — personalized content above the fold, or
6
+ SEO on pages whose content isn't known at build time.
7
+
8
+ ```bash
9
+ bun create omg my-app --template react-ts-start
10
+ ```
11
+
12
+ ## How it differs from `react-ts`
13
+
14
+ | | `react-ts` | `react-ts-start` |
15
+ |----------------|----------------------------------|-----------------------------------------|
16
+ | HTML | `index.html` + build-time bake | rendered per request by `__root.tsx` |
17
+ | Entry | `src/main.tsx` | `src/router.tsx` (`getRouter`) |
18
+ | Build output | `dist/` | `dist/client/` + `dist/server/server.js` |
19
+ | Static deploy | yes, when there's no db/functions| never — SSR needs a running server |
20
+
21
+ ## How it's served
22
+
23
+ `vibes-build` detects SSR by the presence of `dist/server/server.js` and
24
+ generates a different `.vibes/server.mjs`: `@omg-dev/server` still owns
25
+ `/api/*`, auth, websockets and the assets in `dist/client`, and anything it
26
+ doesn't claim falls through to Start's fetch handler via the `notFound` seam.
27
+ `bun build` inlines Start's server bundle (plus react, h3, seroval) so the
28
+ runtime keeps its no-`node_modules` contract.
29
+
30
+ ## Known gaps
31
+
32
+ Tracked in the PR that added this template — do not assume these work:
33
+
34
+ - **`bun run dev` does not serve pages.** This is the blocker. Start's dev-mode
35
+ SSR middleware never engages under vite-plus: `/api/*` answers 200 but every
36
+ document request falls through to a bare 404. Measured against this template
37
+ with vite-plus 0.1.21 vs stock vite 8.0.13 on the same config and app:
38
+
39
+ | dev server | `GET /` |
40
+ |---|---|
41
+ | vite-plus 0.1.21 | **404** (no SSR middleware) |
42
+ | vite 8.0.13 | 200, 24.7KB server-rendered HTML |
43
+
44
+ Not caused by `@omg-dev/vite-plugin` — removing it changes nothing.
45
+ **Production builds are unaffected** and fully work under vite-plus. But a
46
+ sandbox's whole inner loop is `bun run dev`, so this template can't live in
47
+ one until it's resolved (upstream fix, or a dev-only stock-vite path).
48
+
49
+ - **PWA + analytics tags are not injected.** Both ride `transformIndexHtml` in
50
+ `@omg-dev/vite-plugin`, and there is no `index.html` here. They need to move
51
+ into the root route's `head()`.
52
+ - **The dev error-sink script isn't injected either** (same reason), so pi's
53
+ between-turn error reading is degraded in dev.
54
+ - **No Firecracker bake.** This template is CLI-only; it is not registered as a
55
+ sandbox snapshot template and the dashboard cannot create one.
56
+ - **`@tanstack/react-start` declares `vite: >=7`,** while this repo is on
57
+ vite 8 via vite-plus. It builds and runs today, but that's outside its
58
+ supported range — expect churn on upgrades.