create-elytra 0.0.0 → 0.0.1

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 (79) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +45 -4
  3. package/index.js +8 -5
  4. package/package.json +11 -4
  5. package/src/args.js +93 -0
  6. package/src/cli.js +113 -0
  7. package/src/prompts.js +40 -0
  8. package/src/scaffold.js +96 -0
  9. package/template/CONNECT.md +89 -0
  10. package/template/README.md +51 -0
  11. package/template/cms/blocks.ts +17 -0
  12. package/template/cms/collections/asset.ts +13 -0
  13. package/template/cms/collections/author.ts +12 -0
  14. package/template/cms/collections/index.ts +11 -0
  15. package/template/cms/collections/page.ts +45 -0
  16. package/template/cms/collections/post.ts +104 -0
  17. package/template/cms/collections/settings.ts +27 -0
  18. package/template/cms/index.ts +11 -0
  19. package/template/cms/redirects.ts +7 -0
  20. package/template/cms/routes.ts +34 -0
  21. package/template/components/index.ts +24 -0
  22. package/template/components/marketing/feature-card.tsx +77 -0
  23. package/template/components/marketing/hero.tsx +81 -0
  24. package/template/components/marketing/index.tsx +32 -0
  25. package/template/components/marketing/section.tsx +41 -0
  26. package/template/components/marketing/shared.ts +21 -0
  27. package/template/components/post-body.tsx +47 -0
  28. package/template/components/post-teaser.tsx +46 -0
  29. package/template/components/theme.css +31 -0
  30. package/template/dot-gitignore +34 -0
  31. package/template/elytra.config.ts +39 -0
  32. package/template/frontend/app/[[...slug]]/page.tsx +22 -0
  33. package/template/frontend/app/api/revalidate/route.ts +14 -0
  34. package/template/frontend/app/layout.tsx +14 -0
  35. package/template/frontend/app/not-found.tsx +8 -0
  36. package/template/frontend/app/sitemap.ts +22 -0
  37. package/template/frontend/dot-env +14 -0
  38. package/template/frontend/lib/content.ts +68 -0
  39. package/template/frontend/lib/host.ts +9 -0
  40. package/template/frontend/lib/live-content.ts +270 -0
  41. package/template/frontend/lib/project-config.ts +22 -0
  42. package/template/frontend/next.config.mjs +19 -0
  43. package/template/frontend/package.json +25 -0
  44. package/template/frontend/tsconfig.json +39 -0
  45. package/template/package.json +22 -0
  46. package/template/pnpm-workspace.yaml +3 -0
  47. package/template/studio/convex/assets.ts +1 -0
  48. package/template/studio/convex/auth.config.ts +3 -0
  49. package/template/studio/convex/auth.ts +6 -0
  50. package/template/studio/convex/cliTokens.ts +1 -0
  51. package/template/studio/convex/cms.ts +1 -0
  52. package/template/studio/convex/content.ts +1 -0
  53. package/template/studio/convex/delivery.ts +1 -0
  54. package/template/studio/convex/functions.ts +1 -0
  55. package/template/studio/convex/graphs.ts +1 -0
  56. package/template/studio/convex/guard.ts +1 -0
  57. package/template/studio/convex/http.ts +6 -0
  58. package/template/studio/convex/members.ts +1 -0
  59. package/template/studio/convex/publishing.ts +1 -0
  60. package/template/studio/convex/references.ts +1 -0
  61. package/template/studio/convex/schema.ts +1 -0
  62. package/template/studio/convex/sync.ts +4 -0
  63. package/template/studio/convex/tsconfig.json +17 -0
  64. package/template/studio/convex/users.ts +1 -0
  65. package/template/studio/convex/webhooks.ts +1 -0
  66. package/template/studio/dot-env +18 -0
  67. package/template/studio/package.json +34 -0
  68. package/template/studio/src/routeTree.gen.ts +104 -0
  69. package/template/studio/src/router.tsx +25 -0
  70. package/template/studio/src/routes/$projectId.$.tsx +14 -0
  71. package/template/studio/src/routes/__root.tsx +119 -0
  72. package/template/studio/src/routes/index.tsx +17 -0
  73. package/template/studio/src/routes/sign-in.tsx +159 -0
  74. package/template/studio/src/styles/app.css +11 -0
  75. package/template/studio/src/styles/canvas.css +23 -0
  76. package/template/studio/src/vite-env.d.ts +1 -0
  77. package/template/studio/tsconfig.json +20 -0
  78. package/template/studio/vite.config.ts +26 -0
  79. package/template/turbo.json +18 -0
@@ -0,0 +1,26 @@
1
+ import { defineConfig } from 'vite'
2
+ import { tanstackStart } from '@tanstack/react-start/plugin/vite'
3
+ import viteReact from '@vitejs/plugin-react'
4
+ import tailwindcss from '@tailwindcss/vite'
5
+
6
+ /**
7
+ * EC-223 mount contract: no `@site/*` alias and no per-package `src` alias. A real
8
+ * consumer pulls the engine from its published/linked package, not from elytra repo
9
+ * source paths. In dev, Vite's default `development` export condition resolves the
10
+ * linked `@elytracms/*` packages to their TypeScript source (the iterate-fast loop,
11
+ * EC-231); a production build (EC-234, registry install) resolves `default` → `dist`.
12
+ * `ssr.noExternal` transpiles the linked packages through Vite's SSR pipeline.
13
+ */
14
+ export default defineConfig({
15
+ // EC-234 — the studio is a pure client app: Convex serves all data + auth, and
16
+ // there are no server functions/loaders (no createServerFn, no API routes). Build
17
+ // it as a static SPA (a prerendered `dist/client/index.html` shell + client bundle)
18
+ // so any static host — Vercel here — can serve it with a catch-all → index.html
19
+ // rewrite. The default SSR build emits dist/{client,server} with no servable root
20
+ // index.html, which on Vercel's static target 404s every route.
21
+ plugins: [tailwindcss(), tanstackStart({ spa: { enabled: true } }), viteReact()],
22
+ server: { port: 5180 },
23
+ ssr: {
24
+ noExternal: [/^@elytracms\//],
25
+ },
26
+ })
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://turbo.build/schema.json",
3
+ "tasks": {
4
+ "build": {
5
+ "outputs": [".next/**", "dist/**"]
6
+ },
7
+ "dev": {
8
+ "cache": false,
9
+ "persistent": true
10
+ },
11
+ "lint": {
12
+ "outputs": []
13
+ },
14
+ "type-check": {
15
+ "outputs": []
16
+ }
17
+ }
18
+ }