@cellajs/create-cella 0.2.2 → 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/README.md CHANGED
@@ -4,7 +4,7 @@ CLI tool to scaffold a new Cella project from the template.
4
4
 
5
5
  ## Overview
6
6
 
7
- This CLI creates a new Cella project by downloading the latest template, setting up your development environment, and configuring git with upstream tracking for future syncs.
7
+ This CLI creates a new Cella project by downloading the latest template, scaffolding your project, and configuring git with upstream tracking for future syncs. It runs no shell commands and requires no `git` binary — git operations use [isomorphic-git](https://github.com/isomorphic-git/isomorphic-git) and the template is fetched and extracted in-process.
8
8
 
9
9
  ## Usage
10
10
 
@@ -24,15 +24,23 @@ Running without arguments starts interactive mode, prompting for:
24
24
  pnpm create @cellajs/cella [directory] [options]
25
25
  ```
26
26
 
27
+ | Option | Description |
28
+ | --- | --- |
29
+ | `--template <path>` | Use a custom template (local path or `github:user/repo`) |
30
+ | `--port-offset <number>` | Set the port offset (0-490 in steps of 10) |
31
+ | `--admin-email <email>` | Set the admin email for the initial seed user |
32
+ | `-v, --version` | Output the current version |
33
+ | `-h, --help` | Display the help message |
34
+
27
35
  ## What It Does
28
36
 
29
- 1. Downloads latest Cella template via [giget](https://github.com/unjs/giget)
30
- 2. Cleans template files (removes cella-specific docs, configs)
31
- 3. Installs dependencies with `pnpm install`
32
- 4. Generates initial database migrations
33
- 5. Initializes git repository with initial commit
34
- 6. Creates optional working branch
35
- 7. Adds Cella as upstream remote for future syncs
37
+ 1. Downloads the latest Cella template as a GitHub tarball and extracts it in-process (no `git` binary, no shell)
38
+ 2. Cleans template files (removes cella-specific docs, configs) and interpolates the project config
39
+ 3. Initializes a git repository with an initial commit via isomorphic-git
40
+ 4. Creates an optional working branch
41
+ 5. Adds Cella as the upstream remote for future syncs
42
+
43
+ Dependency installation and migration generation are **not** run automatically — after scaffolding, run `pnpm install`, then `pnpm generate` (the CLI prints these next steps on success).
36
44
 
37
45
  ## Development
38
46
 
@@ -45,6 +53,9 @@ pnpm ts
45
53
  # Lint
46
54
  pnpm lint:fix
47
55
 
56
+ # Try it out
57
+ pnpm try
58
+
48
59
  # Run tests
49
60
  pnpm test
50
61
 
@@ -14,6 +14,10 @@ import type { ConfigMode, RequiredConfig, S3ConfigInput } from '../src/config-bu
14
14
  // Re-export for external consumers
15
15
  export { roles, hierarchy } from './hierarchy-config';
16
16
 
17
+ // Set these early for reuse
18
+ const entityTypes = ['user', 'organization', 'attachment', 'page'] as const;
19
+ const productEntityTypes = ['attachment', 'page'] as const;
20
+
17
21
  export const config = {
18
22
 
19
23
  /******************************************************************************
@@ -21,13 +25,13 @@ export const config = {
21
25
  ******************************************************************************/
22
26
 
23
27
  /** All entity types in the app - must match hierarchy.allTypes. */
24
- entityTypes: ['user', 'organization', 'attachment', 'page'] as const,
28
+ entityTypes,
25
29
 
26
30
  /** Context entities with memberships - must match hierarchy.contextTypes. */
27
31
  contextEntityTypes: ['organization'] as const,
28
32
 
29
33
  /** Product/content entities - must match hierarchy.productTypes. */
30
- productEntityTypes: ['attachment', 'page'] as const,
34
+ productEntityTypes,
31
35
 
32
36
  /**
33
37
  * Product entity types tracked for seen/unseen counts.
@@ -53,7 +57,11 @@ export const config = {
53
57
  * Entity embeddings: declares which entities are embedded as ID arrays inside
54
58
  * other entities. Forks extend when adding new embedding relationships.
55
59
  */
56
- entityEmbeddings: [] as readonly { readonly embeddedEntity: string; readonly hostEntity: string; readonly hostColumn: string }[],
60
+ entityEmbeddings: [] as readonly {
61
+ readonly embeddedEntity: (typeof productEntityTypes)[number];
62
+ readonly hostEntity: (typeof productEntityTypes)[number];
63
+ readonly hostColumn: string;
64
+ }[],
57
65
 
58
66
  /**
59
67
  * User menu structure of context entities with optional nested subentities.
@@ -111,6 +119,22 @@ export const config = {
111
119
  yjsUrl: 'wss://yjs.__project_slug__.example.com',
112
120
  /** AI service base URL */
113
121
  aiUrl: 'https://ai.__project_slug__.example.com',
122
+ /**
123
+ * Per-service toggles and public URLs. `enabled` controls whether the service
124
+ * is wired up; `publicUrl` is the externally reachable endpoint.
125
+ */
126
+ services: {
127
+ frontend: { enabled: true as boolean, publicUrl: 'https://__project_slug__.example.com' },
128
+ backend: { enabled: true as boolean, publicUrl: 'https://api.__project_slug__.example.com' },
129
+ cdc: { enabled: true as boolean },
130
+ yjs: { enabled: false as boolean, publicUrl: 'wss://yjs.__project_slug__.example.com' },
131
+ ai: { enabled: false as boolean, publicUrl: 'https://ai.__project_slug__.example.com' },
132
+ },
133
+
134
+ // Cost escape hatch: when true the backend (MODE=api) also boots every enabled
135
+ // service in-process — one VM for previews/small forks. Default false keeps the
136
+ // split (one service per process). cdc co-hosting forfeits API blue-green.
137
+ singleVM: false as boolean,
114
138
 
115
139
  /** About page URL */
116
140
  aboutUrl: '/about',
@@ -145,6 +169,8 @@ export const config = {
145
169
  maintenance: false,
146
170
  /** Cookie version - increment when changing cookie structure to invalidate old cookies */
147
171
  cookieVersion: 'v1',
172
+ /** Persisted client query-cache shape - bump on a breaking change to a cached entity so clients wipe stale cache. See info/SCHEMA_EVOLUTION.md */
173
+ clientCacheVersion: 'v1',
148
174
 
149
175
  /******************************************************************************
150
176
  * FEATURE FLAGS
@@ -165,10 +191,6 @@ export const config = {
165
191
  uploadEnabled: false as boolean,
166
192
  /** Customer support chat widget (Gleap). Unrelated to the AI module. */
167
193
  chatSupport: false as boolean,
168
- /** Yjs realtime collaboration */
169
- yjs: false as boolean,
170
- /** AI capability layer: tool registry + model runner + MCP endpoint. */
171
- ai: false as boolean,
172
194
  },
173
195
 
174
196
  /******************************************************************************
@@ -281,6 +303,8 @@ export const config = {
281
303
  googleMapsKey: '',
282
304
  /** Matrix homeserver URL for chat integration */
283
305
  matrixURL: 'https://matrix-client.matrix.org',
306
+ /** Maple.dev public ingest key, safe to embed in the frontend bundle (empty disables frontend export) */
307
+ maplePublicIngestKey: '',
284
308
 
285
309
  /******************************************************************************
286
310
  * THEMING & UI
@@ -354,7 +378,7 @@ export const config = {
354
378
  bankAccount: '',
355
379
  googleMapsUrl: '',
356
380
  scheduleCallUrl: '',
357
- blueskyUrl: '',
381
+ socialUrl: '',
358
382
  blueskyHandle: '',
359
383
  element: '',
360
384
  githubUrl: '',