You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/GITHUB_AND_LIBRARY_PLAN.md
+77-75Lines changed: 77 additions & 75 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,19 +10,45 @@ Make this repo suitable for **three uses**:
10
10
11
11
## Goals
12
12
13
-
Goals follow the same order as the implementation steps below.
13
+
Goals follow the same order as sections 1–4. Track progress via the checklists in each section (1.4, 2.6, 3.6, 4.5).
14
14
15
-
| Goal | Outcome (aligned with step) |
15
+
| Goal | Outcome (aligned with section) |
16
16
|------|-----------------------------|
17
-
|**1. GitHub-ready**| Repo created on GitHub; code pushed; LICENSE in repo; description and topics set (step 1). |
18
-
|**2. Runnable on checkout**|`git clone` → `npm install` → `npm run dev` works; README “Getting Started” accurate (step 2). |
19
-
|**3. Use as library**| package.json and entry point in place; consumers can install from GitHub/npm and import; README “Use as a library” section (step 3). |
20
-
|**4. GitHub Pages demo**| Vite `base` set; Pages workflow deploys `dist/` to `gh-pages`; Settings → Pages enabled; “Live demo” link in README (steps 4–5). |
21
-
|**5. Clear docs**| README explains run locally, use as library, and try the live demo (across steps 2–5). |
|**1. GitHub-ready**| Repo created on GitHub; code pushed; LICENSE in repo; description and topics set (§4). |
18
+
|**2. Runnable on checkout**|`git clone` → `npm install` → `npm run dev` works; README “Getting Started” accurate (§1). |
19
+
|**3. Use as library**| package.json and entry point in place; consumers can install from GitHub/npm and import; README “Use as a library” section (§2). |
20
+
|**4. GitHub Pages demo**| Vite `base` set; Pages workflow deploys `dist/` to `gh-pages`; Settings → Pages enabled; “Live demo” link in README (§3). |
21
+
|**5. Clear docs**| README explains run locally, use as library, and try the live demo (§1–4). |
22
+
|**6. Publish (optional)**| npm publish or install-from-GitHub documented. |
|**LICENSE**| Done | AGPL-3.0-or-later in repo; `package.json` has `"license": "AGPL-3.0-or-later"`. |
35
+
|**README**| Partial | Has “Getting Started (Demo App)” with `npm install` / `npm run dev`. No Node version note, no “Use as a library” install-from-GitHub section, no “Live demo” link. Integration Guide documents copy-paste and schema-only use. |
36
+
|**Runnable on checkout**| Partial | Commands work; no `.nvmrc`; README matches commands. |
37
+
|**Library packaging**| Done |`package.json`: version 0.1.0, description, keywords, main, types, exports, files; `src/index.ts` re-exports schemas, utils, CLI, components; README “Use as a library” section. |
38
+
|**GitHub Pages**| Not done | No `base` in `vite.config.js`; no `.github/workflows/` (no `pages.yml` or `ci.yml`). |
39
+
|**GitHub repo**| Done | Repo on GitHub (`devalbo/tb-solid-pod`), main pushed, LICENSE in repo. **Repo is private for now**; make public when you want install-from-GitHub or a public Live demo. |
40
+
41
+
**Next steps (in order):**
42
+
1)~~Confirm repo on GitHub and push if needed.~~ Done (repo is private).
43
+
2)~~Add `.nvmrc` and optional Node note in README.~~ Done.
44
+
3)~~Add `src/index.ts`, update `package.json` for library use, add “Use as a library” in README.~~ Done.
45
+
4) Set Vite `base`, add Pages workflow, enable Pages, add “Live demo” link.
46
+
47
+
---
48
+
49
+
**When you complete a task:** mark it `[x]` in the **checklist** at the end of the relevant section (1.4, 2.6, 3.6, 4.5) and refresh this **Current state** table so the plan stays accurate.
50
+
51
+
---
26
52
## 1. Runnable on Checkout
27
53
28
54
### 1.1 Keep current app as default
@@ -32,19 +58,19 @@ Goals follow the same order as the implementation steps below.
32
58
33
59
### 1.2 Getting Started in README
34
60
35
-
- README already has “Getting Started (Demo App)” with `npm install` and `npm run dev`.
36
-
- Add one line if useful: “Requires Node 18+ (or 20+).” Optionally add `.nvmrc` with e.g. `20` so `nvm use` works.
61
+
-[x]README already has “Getting Started (Demo App)” with `npm install` and `npm run dev`.
62
+
-[x]Add one line if useful: “Requires Node 18+ (or 20+).” Optionally add `.nvmrc` with e.g. `20` so `nvm use` works.
37
63
38
64
### 1.3 Optional: Node version hint
39
65
40
-
- Add **`.nvmrc`** with a single line: `20` (or your preferred LTS).
41
-
- In README Getting Started, add: “Requires Node 18+ (or use `nvm use` if you use nvm).”
66
+
-[x]Add **`.nvmrc`** with a single line: `20` (or your preferred LTS).
67
+
-[x]In README Getting Started, add: “Requires Node 18+ (or use `nvm use` if you use nvm).”
42
68
43
69
### 1.4 Checklist (runnable)
44
70
45
-
-[]`npm install` and `npm run dev` work on a clean clone.
46
-
-[] README “Getting Started” matches actual commands.
@@ -57,11 +83,13 @@ Two ways to “use as a library”:
57
83
58
84
Plan focuses on **A** so the repo is a proper installable package; **B** stays as an alternative in the README.
59
85
86
+
**Assumption for step 2:** we are **not** publishing to npm right now—only making the package installable from the GitHub repo (e.g. `npm install github:user/tb-solid-pod`). You can add npm publish later if needed.
87
+
60
88
### 2.1 Package identity
61
89
62
-
-**name**: Keep `tb-solid-pod` or use a scoped name e.g. `@yourname/tb-solid-pod` if you plan to publish to npm.
63
-
-**version**: Set a real version, e.g. `0.1.0` (semver).
64
-
-**private**: Remove`"private": true`so the package can be published (or installed from GitHub with `npm install git+https://...`).
90
+
-[x]**name**: Keep `tb-solid-pod`(or use a scoped name e.g. `@yourname/tb-solid-pod` if you later publish to npm).
91
+
-[x]**version**: Set a real version, e.g. `0.1.0` (semver).
92
+
-[ ]**private**: Keep`"private": true`for now—it only blocks npm publish; install from GitHub still works. Remove when you want to publish to npm.
65
93
66
94
### 2.2 What the library exposes
67
95
@@ -101,8 +129,7 @@ Add/update:
101
129
```
102
130
103
131
-**main / types / exports**: Point at **source** so consumers’ bundlers (Vite, etc.) compile TypeScript. No `dist/` or dual build unless you add a separate “lib” build later.
104
-
-**files**: Publish only `src` and README; keeps package small and avoids shipping `dist/` or demo-only files if you add a lib build later.
105
-
- Omit `"private": true` when you intend to publish or allow install from GitHub.
132
+
-**files**: Include only `src` and README; keeps the package small. For GitHub-only install, `private: true` is fine (remove it when you publish to npm).
106
133
107
134
If you prefer a **single entry** that re-exports everything:
108
135
@@ -119,26 +146,26 @@ Then in package.json:
119
146
### 2.4 Consumer dependencies (peer / optional)
120
147
121
148
-**tinybase**, **react**, **react-dom**, **zod**, **@inrupt/vocab-common-rdf**, **@inrupt/vocab-solid-common** are required for full app.
122
-
- For **library** use, list them as **dependencies** so `npm install tb-solid-pod` brings them in; or list as **peerDependencies** if you want the app to supply versions (more flexible, but consumers must install them).
149
+
- For **library** use, list them as **dependencies** so `npm install github:user/tb-solid-pod` brings them in; or list as **peerDependencies** if you want the app to supply versions (more flexible, but consumers must install them).
123
150
124
-
Recommendation for simplicity: keep as **dependencies** so install-from-GitHub / npm “just works” for the demo and for apps that don’t care about version alignment. You can switch to peerDependencies later if needed.
151
+
Recommendation for simplicity: keep as **dependencies** so `npm install github:user/tb-solid-pod`“just works” for the demo and for consuming apps. You can switch to peerDependencies later if needed.
125
152
126
153
### 2.5 Library entry file (optional but useful)
127
154
128
-
- Add **`src/index.ts`** that:
155
+
-[x]Add **`src/index.ts`** that:
129
156
- Re-exports all public schemas (from `src/schemas/index.ts`).
130
157
- Re-exports CLI and components you want to expose (e.g. `CliTerminal`, `createPersona`, etc.).
131
-
- Document in README: “To use as a library, `import { createPersona, CliTerminal, ... } from 'tb-solid-pod'` (or from GitHub: `npm i github:user/tb-solid-pod`).”
158
+
-[x]Document in README: install from GitHub (`npm i github:user/tb-solid-pod`) and example `import { createPersona, CliTerminal, ... } from 'tb-solid-pod'`.
132
159
133
160
### 2.6 Checklist (library)
134
161
135
-
-[]`"private": true`removed (when you want it installable).
-[x]`main`, `types`, `exports` point at source entry (e.g. `src/index.ts`).
166
+
-[x]`files` includes `src` and `README.md`.
167
+
-[x] (Optional) `src/index.ts` added and re-exports public API.
168
+
-[x] README documents: install from GitHub and example `import` for library use.
142
169
143
170
---
144
171
@@ -150,10 +177,10 @@ Deploy the built Vite app so visitors can use it at `https://<username>.github.i
150
177
151
178
GitHub Pages serves project sites from `/<repo>/`, so assets must use that base.
152
179
153
-
- In **`vite.config.js`** (or `vite.config.ts`), set **`base`** to the repo name with leading and trailing slash:
180
+
-[ ]In **`vite.config.js`** (or `vite.config.ts`), set **`base`** to the repo name with leading and trailing slash:
154
181
-`base: '/tb-solid-pod/'` (replace with actual repo name if different).
155
-
- Rebuild: `npm run build`. Check that `dist/index.html` references assets like `/tb-solid-pod/assets/...` (not `/assets/...`).
156
-
- Optional: use an env variable so local dev keeps `base: '/'` and CI sets `base: '/repo-name/'` for the Pages build.
182
+
-[ ]Rebuild: `npm run build`. Check that `dist/index.html` references assets like `/tb-solid-pod/assets/...` (not `/assets/...`).
183
+
-[ ]Optional: use an env variable so local dev keeps `base: '/'` and CI sets `base: '/repo-name/'` for the Pages build.
157
184
158
185
### 3.2 Build output
159
186
@@ -172,7 +199,7 @@ GitHub Pages serves project sites from `/<repo>/`, so assets must use that base.
172
199
173
200
Add a workflow that builds and deploys to GitHub Pages. For example:
174
201
175
-
-**Trigger**: push to `main` (or only when `dist/` or source changes, if you prefer).
202
+
-[ ]**Trigger**: push to `main` (or only when `dist/` or source changes, if you prefer).
176
203
-**Steps**:
177
204
1. Checkout repo.
178
205
2. Setup Node (e.g. `actions/setup-node` with version from `.nvmrc` or fixed `20`).
@@ -184,8 +211,8 @@ Result: every push to `main` (or chosen branch) updates the live demo.
184
211
185
212
### 3.5 README and base path
186
213
187
-
- In README, add a **“Try it”** or **“Live demo”** link at the top or in Getting Started: `https://<username>.github.io/<repo>/`.
188
-
- If repo is renamed, update `base` in Vite config and the README link.
214
+
-[ ]In README, add a **“Try it”** or **“Live demo”** link at the top or in Getting Started: `https://<username>.github.io/<repo>/`.
215
+
-[ ]If repo is renamed, update `base` in Vite config and the README link.
189
216
190
217
### 3.6 Checklist (GitHub Pages)
191
218
@@ -201,24 +228,25 @@ Result: every push to `main` (or chosen branch) updates the live demo.
201
228
202
229
### 4.1 Create the repo on GitHub
203
230
204
-
- On GitHub: **Create a new repository** (e.g. `tb-solid-pod`).
231
+
-[x]On GitHub: **Create a new repository** (e.g. `tb-solid-pod`).
205
232
- Choose owner (your user or org).
206
233
- Set repo name (this becomes the path in GitHub Pages URL: `https://<owner>.github.io/<repo>/`).
207
234
-**Do not** add a README, .gitignore, or license yet if you already have them locally (avoids merge conflicts).
208
235
- Default branch: **main**.
209
-
- Note the repo URL (e.g. `https://github.com/<owner>/<repo>.git`); you will need the repo name for `base` in Vite and for the “Live demo” link.
236
+
-**Public vs private**: The repo can stay **private** for now. Make it public when you want others to install from GitHub (`npm install github:user/tb-solid-pod`) or when you want the Live demo URL to be openly shareable.
237
+
-[x] Note the repo URL (e.g. `https://github.com/<owner>/<repo>.git`); you will need the repo name for `base` in Vite and for the “Live demo” link.
210
238
211
239
### 4.2 Repo settings
212
240
213
-
-**Description**: e.g. “Browser-based Solid-style data pod with TinyBase – personas, contacts, groups, type indexes, WebID profile. Runnable demo + use as library.”
214
-
-**Topics/tags**: e.g. `solid`, `tinybase`, `pod`, `webid`, `linked-data`, `react`, `typescript`.
215
-
-**License**: Ensure LICENSE file exists (AGPL-3.0) and matches `package.json` “license”.
241
+
-[ ]**Description**: e.g. “Browser-based Solid-style data pod with TinyBase – personas, contacts, groups, type indexes, WebID profile. Runnable demo + use as library.”
242
+
-[ ]**Topics/tags**: e.g. `solid`, `tinybase`, `pod`, `webid`, `linked-data`, `react`, `typescript`.
243
+
-[x]**License**: Ensure LICENSE file exists (AGPL-3.0) and matches `package.json` “license”.
216
244
217
245
### 4.3 README for GitHub visitors
218
246
219
-
- First paragraph: what the project is, that it’s **runnable on checkout** and **usable as a library**.
220
-
-**Getting Started** – clone, install, run (already there).
221
-
-**Library usage** – one short section: install from GitHub (or npm) and a minimal import example; link to “Integration Guide” for details.
247
+
-[x]First paragraph: what the project is, that it’s **runnable on checkout** and **usable as a library**.
248
+
-[x]**Getting Started** – clone, install, run (already there).
249
+
-[ ]**Library usage** – one short section: install from GitHub (or npm) and a minimal import example; link to “Integration Guide” for details.
222
250
223
251
### 4.4 GitHub Actions
224
252
@@ -228,44 +256,18 @@ Result: every push to `main` (or chosen branch) updates the live demo.
228
256
229
257
### 4.5 Checklist (GitHub)
230
258
231
-
-[] Repo created on GitHub; default branch set (e.g. main).
259
+
-[x] Repo created on GitHub; default branch set (e.g. main).
- Create a new repository on GitHub (e.g. `tb-solid-pod`) under your user or org. Do not initialize with README / .gitignore / license if you already have them locally.
- In README, add a short “Use as a library” section (install from GitHub/npm + one import example).
256
-
257
-
4.**GitHub Pages: Vite base + workflow**
258
-
- Set `base: '/<repo>/'` in `vite.config.js` (use the repo name from step 1).
259
-
- Add `.github/workflows/pages.yml` that builds with this base and deploys `dist/` to `gh-pages` (e.g. `peaceiris/actions-gh-pages`). This workflow is required.
260
-
- Add “Live demo” / “Try it” link in README: `https://<owner>.github.io/<repo>/`.
261
-
262
-
5.**Enable Pages and verify**
263
-
- In repo Settings → Pages: choose “Deploy from a branch”; branch `gh-pages`, folder root. Save.
264
-
- Push your changes (workflow and Vite base). The workflow will run and create/update `gh-pages`; the site will appear at the Pages URL.
268
+
## 5. Implementation order
265
269
266
-
6.**Publish (optional)**
267
-
- To publish to npm: add npm account, `npm login`, `npm publish`. Optionally automate with a release workflow.
268
-
- To use only from GitHub: document `npm install github:username/tb-solid-pod` (or `user/repo#branch`).
270
+
Work through **sections 1 → 4** in order. Track progress using the **checklists** at the end of each section (1.4, 2.6, 3.6, 4.5).
0 commit comments