connore 0.1.1 → 0.2.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 (238) hide show
  1. package/README.md +13 -8
  2. package/bin/ctxkit.js +5 -5
  3. package/package.json +2 -1
  4. package/packs/base/planning/START.md +29 -28
  5. package/packs/base/planning/blueprint-template.md +46 -46
  6. package/packs/base/planning/plan-template.md +46 -45
  7. package/packs/base/rules/anti-patterns.md +19 -16
  8. package/packs/base/rules/code-style.md +19 -16
  9. package/packs/base/rules/dependency-policy.md +19 -16
  10. package/packs/base/rules/error-handling.md +19 -16
  11. package/packs/base/rules/security-audit.md +47 -0
  12. package/packs/base/rules/security-baseline.md +19 -16
  13. package/packs/base/templates/bug-report.md +19 -16
  14. package/packs/base/templates/feature-spec.md +19 -16
  15. package/packs/base/templates/handoff.md +19 -16
  16. package/packs/base/templates/project-brief.md +19 -16
  17. package/packs/base/workflow/code-review.md +19 -16
  18. package/packs/base/workflow/debugging.md +18 -14
  19. package/packs/base/workflow/git-and-commits.md +19 -16
  20. package/packs/base/workflow/idea-to-spec.md +19 -16
  21. package/packs/base/workflow/session-handoff.md +19 -16
  22. package/packs/base/workflow/spec-to-plan.md +19 -16
  23. package/packs/knowledge/backend/api/conventions.md +21 -0
  24. package/packs/knowledge/backend/architecture/local-sqlite.md +20 -0
  25. package/packs/knowledge/backend/authentication/session-and-engine.md +24 -0
  26. package/packs/knowledge/backend/database/schema.md +21 -0
  27. package/packs/knowledge/components/custom/ambient-background.md +26 -0
  28. package/packs/knowledge/components/custom/ambient-background.tsx +12 -0
  29. package/packs/knowledge/components/custom/corner-frame.md +26 -0
  30. package/packs/knowledge/components/custom/corner-frame.tsx +48 -0
  31. package/packs/knowledge/components/custom/cta-button.md +26 -0
  32. package/packs/knowledge/components/custom/cta-button.tsx +10 -0
  33. package/packs/knowledge/components/custom/page-transition.md +26 -0
  34. package/packs/knowledge/components/custom/page-transition.tsx +10 -0
  35. package/packs/knowledge/components/custom/smooth-scroll.md +26 -0
  36. package/packs/knowledge/components/custom/smooth-scroll.tsx +32 -0
  37. package/packs/knowledge/components/motion-effects/README.md +30 -0
  38. package/packs/knowledge/components/ui-primitives/LICENSE +21 -0
  39. package/packs/knowledge/components/ui-primitives/README.md +22 -0
  40. package/packs/knowledge/components/ui-primitives/badge.md +26 -0
  41. package/packs/knowledge/components/ui-primitives/badge.tsx +48 -0
  42. package/packs/knowledge/components/ui-primitives/button.md +27 -0
  43. package/packs/knowledge/components/ui-primitives/button.tsx +66 -0
  44. package/packs/knowledge/components/ui-primitives/card.md +26 -0
  45. package/packs/knowledge/components/ui-primitives/card.tsx +102 -0
  46. package/packs/knowledge/components/ui-primitives/checkbox.md +26 -0
  47. package/packs/knowledge/components/ui-primitives/checkbox.tsx +32 -0
  48. package/packs/knowledge/components/ui-primitives/dialog.md +26 -0
  49. package/packs/knowledge/components/ui-primitives/dialog.tsx +168 -0
  50. package/packs/knowledge/components/ui-primitives/dropdown-menu.md +26 -0
  51. package/packs/knowledge/components/ui-primitives/dropdown-menu.tsx +268 -0
  52. package/packs/knowledge/components/ui-primitives/input.md +27 -0
  53. package/packs/knowledge/components/ui-primitives/input.tsx +18 -0
  54. package/packs/knowledge/components/ui-primitives/label.md +26 -0
  55. package/packs/knowledge/components/ui-primitives/label.tsx +23 -0
  56. package/packs/knowledge/components/ui-primitives/progress.md +26 -0
  57. package/packs/knowledge/components/ui-primitives/progress.tsx +30 -0
  58. package/packs/knowledge/components/ui-primitives/scroll-area.md +26 -0
  59. package/packs/knowledge/components/ui-primitives/scroll-area.tsx +54 -0
  60. package/packs/knowledge/components/ui-primitives/select.md +26 -0
  61. package/packs/knowledge/components/ui-primitives/select.tsx +191 -0
  62. package/packs/knowledge/components/ui-primitives/separator.md +26 -0
  63. package/packs/knowledge/components/ui-primitives/separator.tsx +27 -0
  64. package/packs/knowledge/components/ui-primitives/sonner.md +26 -0
  65. package/packs/knowledge/components/ui-primitives/sonner.tsx +49 -0
  66. package/packs/knowledge/components/ui-primitives/switch.md +26 -0
  67. package/packs/knowledge/components/ui-primitives/switch.tsx +32 -0
  68. package/packs/knowledge/components/ui-primitives/tabs.md +26 -0
  69. package/packs/knowledge/components/ui-primitives/tabs.tsx +89 -0
  70. package/packs/knowledge/components/ui-primitives/textarea.md +26 -0
  71. package/packs/knowledge/components/ui-primitives/textarea.tsx +17 -0
  72. package/packs/knowledge/components/ui-primitives/tooltip.md +26 -0
  73. package/packs/knowledge/components/ui-primitives/tooltip.tsx +56 -0
  74. package/packs/knowledge/design/aesthetics/app-shell.md +41 -0
  75. package/packs/knowledge/design/aesthetics/code-neutral.md +40 -0
  76. package/packs/knowledge/design/aesthetics/match.md +46 -0
  77. package/packs/knowledge/design/aesthetics/ruled-outline.md +40 -0
  78. package/packs/knowledge/design/aesthetics/solid-accent.md +43 -0
  79. package/packs/knowledge/design/animations/motion.md +40 -0
  80. package/packs/knowledge/design/project-style.md +50 -0
  81. package/packs/knowledge/design/references/benefit-card-grid.md +27 -0
  82. package/packs/knowledge/design/references/benefit-card-grid.png +0 -0
  83. package/packs/knowledge/design/references/cta-centered.md +27 -0
  84. package/packs/knowledge/design/references/cta-centered.png +0 -0
  85. package/packs/knowledge/design/references/cta-split-media.md +27 -0
  86. package/packs/knowledge/design/references/cta-split-media.png +0 -0
  87. package/packs/knowledge/design/references/dashboard-overview.md +31 -0
  88. package/packs/knowledge/design/references/dashboard-overview.png +0 -0
  89. package/packs/knowledge/design/references/faq-split-accordion.md +27 -0
  90. package/packs/knowledge/design/references/faq-split-accordion.png +0 -0
  91. package/packs/knowledge/design/references/feature-split-checklist.md +27 -0
  92. package/packs/knowledge/design/references/feature-split-checklist.png +0 -0
  93. package/packs/knowledge/design/references/footer-four-column.md +27 -0
  94. package/packs/knowledge/design/references/footer-four-column.png +0 -0
  95. package/packs/knowledge/design/references/footer-two-column.md +27 -0
  96. package/packs/knowledge/design/references/footer-two-column.png +0 -0
  97. package/packs/knowledge/design/references/hero-accent-curtain.md +27 -0
  98. package/packs/knowledge/design/references/hero-accent-curtain.png +0 -0
  99. package/packs/knowledge/design/references/hero-split-media.md +27 -0
  100. package/packs/knowledge/design/references/hero-split-media.png +0 -0
  101. package/packs/knowledge/design/references/logo-cloud-grid.md +27 -0
  102. package/packs/knowledge/design/references/logo-cloud-grid.png +0 -0
  103. package/packs/knowledge/design/references/logo-row-ruled.md +27 -0
  104. package/packs/knowledge/design/references/logo-row-ruled.png +0 -0
  105. package/packs/knowledge/design/references/pricing-three-card.md +27 -0
  106. package/packs/knowledge/design/references/pricing-three-card.png +0 -0
  107. package/packs/knowledge/design/references/steps-ruled-grid.md +27 -0
  108. package/packs/knowledge/design/references/steps-ruled-grid.png +0 -0
  109. package/packs/knowledge/design/rules.md +35 -0
  110. package/packs/knowledge/design/token-structure.md +46 -0
  111. package/packs/knowledge/design/tokens.md +55 -0
  112. package/packs/knowledge/frontend/README.md +50 -0
  113. package/packs/knowledge/frontend/SOURCES.md +40 -0
  114. package/packs/knowledge/frontend/accessibility/focus-and-dialogs.md +47 -0
  115. package/packs/knowledge/frontend/accessibility/semantics-and-keyboard.md +45 -0
  116. package/packs/knowledge/frontend/accessibility/wcag-targets.md +43 -0
  117. package/packs/knowledge/frontend/architecture/agent-context-files.md +43 -0
  118. package/packs/knowledge/frontend/architecture/app-foundations.md +43 -0
  119. package/packs/knowledge/frontend/architecture/error-handling.md +47 -0
  120. package/packs/knowledge/frontend/architecture/feature-modules.md +49 -0
  121. package/packs/knowledge/frontend/architecture/import-boundaries.md +44 -0
  122. package/packs/knowledge/frontend/architecture/naming.md +43 -0
  123. package/packs/knowledge/frontend/architecture/project-structure.md +48 -0
  124. package/packs/knowledge/frontend/architecture/routing.md +45 -0
  125. package/packs/knowledge/frontend/architecture/security.md +44 -0
  126. package/packs/knowledge/frontend/architecture/typescript.md +44 -0
  127. package/packs/knowledge/frontend/components/composition.md +45 -0
  128. package/packs/knowledge/frontend/components/data-display.md +47 -0
  129. package/packs/knowledge/frontend/components/library-choice.md +45 -0
  130. package/packs/knowledge/frontend/components/variants.md +44 -0
  131. package/packs/knowledge/frontend/forms/form-architecture.md +49 -0
  132. package/packs/knowledge/frontend/forms/multi-step.md +43 -0
  133. package/packs/knowledge/frontend/forms/validation.md +47 -0
  134. package/packs/knowledge/frontend/layout/responsive.md +41 -0
  135. package/packs/knowledge/frontend/page-blueprints/app-shell.md +16 -0
  136. package/packs/knowledge/frontend/page-blueprints/faq-footer.md +22 -0
  137. package/packs/knowledge/frontend/page-blueprints/feature-grid.md +22 -0
  138. package/packs/knowledge/frontend/page-blueprints/pricing.md +16 -0
  139. package/packs/knowledge/frontend/page-blueprints/saas-hero.md +24 -0
  140. package/packs/knowledge/frontend/patterns/dark-marketing.md +18 -0
  141. package/packs/knowledge/frontend/patterns/status-pill.md +19 -0
  142. package/packs/knowledge/frontend/performance/code-splitting.md +47 -0
  143. package/packs/knowledge/frontend/performance/images-and-vitals.md +44 -0
  144. package/packs/knowledge/frontend/performance/rendering.md +40 -0
  145. package/packs/knowledge/frontend/rendering/server-and-client.md +50 -0
  146. package/packs/knowledge/frontend/state/api-layer.md +49 -0
  147. package/packs/knowledge/frontend/state/async-ui-states.md +43 -0
  148. package/packs/knowledge/frontend/state/client-store.md +46 -0
  149. package/packs/knowledge/frontend/state/server-cache.md +42 -0
  150. package/packs/knowledge/frontend/state/state-categories.md +50 -0
  151. package/packs/knowledge/frontend/testing/component-tests.md +44 -0
  152. package/packs/knowledge/frontend/testing/strategy.md +46 -0
  153. package/packs/knowledge/inbox/README.md +14 -0
  154. package/packs/knowledge/workflows/authentication.md +18 -0
  155. package/packs/knowledge/workflows/crud.md +20 -0
  156. package/packs/knowledge/workflows/dashboard.md +22 -0
  157. package/packs/nextjs-fullstack/backend/auth-and-roles.md +19 -16
  158. package/packs/nextjs-fullstack/backend/background-jobs.md +19 -16
  159. package/packs/nextjs-fullstack/backend/caching.md +17 -14
  160. package/packs/nextjs-fullstack/backend/database.md +19 -16
  161. package/packs/nextjs-fullstack/backend/file-uploads.md +19 -16
  162. package/packs/nextjs-fullstack/backend/logging.md +17 -14
  163. package/packs/nextjs-fullstack/backend/migrations.md +17 -14
  164. package/packs/nextjs-fullstack/backend/rate-limiting.md +19 -16
  165. package/packs/nextjs-fullstack/backend/secrets-and-env.md +19 -16
  166. package/packs/nextjs-fullstack/backend/validation.md +19 -16
  167. package/packs/nextjs-fullstack/blueprints/ai-app.md +1 -1
  168. package/packs/nextjs-fullstack/blueprints/internal-tool.md +1 -1
  169. package/packs/nextjs-fullstack/blueprints/saas-app.md +1 -1
  170. package/packs/nextjs-fullstack/build-deploy/ci.md +18 -16
  171. package/packs/nextjs-fullstack/build-deploy/deploy.md +19 -16
  172. package/packs/nextjs-fullstack/build-deploy/monitoring.md +16 -14
  173. package/packs/nextjs-fullstack/build-deploy/performance.md +17 -14
  174. package/packs/nextjs-fullstack/build-deploy/project-structure.md +18 -16
  175. package/packs/nextjs-fullstack/build-deploy/release-checklist.md +20 -16
  176. package/packs/nextjs-fullstack/build-deploy/testing.md +19 -16
  177. package/packs/nextjs-fullstack/evals/README.md +18 -15
  178. package/packs/nextjs-fullstack/examples/golden-app/README.md +18 -16
  179. package/packs/nextjs-fullstack/frontend/accessibility.md +17 -14
  180. package/packs/nextjs-fullstack/frontend/components.md +19 -16
  181. package/packs/nextjs-fullstack/frontend/copy.md +46 -0
  182. package/packs/nextjs-fullstack/frontend/data-fetching.md +46 -0
  183. package/packs/nextjs-fullstack/frontend/forms.md +17 -14
  184. package/packs/nextjs-fullstack/frontend/layout.md +19 -16
  185. package/packs/nextjs-fullstack/frontend/loading-empty-error.md +19 -16
  186. package/packs/nextjs-fullstack/frontend/motion.md +17 -14
  187. package/packs/nextjs-fullstack/frontend/responsive.md +19 -16
  188. package/packs/nextjs-fullstack/frontend/seo.md +20 -16
  189. package/packs/nextjs-fullstack/frontend/tables.md +17 -14
  190. package/packs/nextjs-fullstack/frontend/tokens.md +18 -16
  191. package/packs/nextjs-fullstack/integrations/analytics.md +17 -14
  192. package/packs/nextjs-fullstack/integrations/email.md +17 -14
  193. package/packs/nextjs-fullstack/integrations/llm-apis.md +19 -16
  194. package/packs/nextjs-fullstack/integrations/oauth.md +19 -16
  195. package/packs/nextjs-fullstack/integrations/object-storage.md +19 -16
  196. package/packs/nextjs-fullstack/integrations/payments.md +17 -14
  197. package/packs/nextjs-fullstack/integrations/queues.md +17 -14
  198. package/packs/nextjs-fullstack/integrations/search.md +19 -16
  199. package/packs/nextjs-fullstack/integrations/webhooks.md +17 -14
  200. package/packs/nextjs-fullstack/playbooks/add-ai-feature.md +19 -16
  201. package/packs/nextjs-fullstack/playbooks/add-auth.md +19 -16
  202. package/packs/nextjs-fullstack/playbooks/add-crud.md +19 -16
  203. package/packs/nextjs-fullstack/playbooks/add-email.md +19 -16
  204. package/packs/nextjs-fullstack/playbooks/add-file-upload.md +19 -16
  205. package/packs/nextjs-fullstack/playbooks/add-webhook.md +19 -16
  206. package/packs/nextjs-fullstack/playbooks/ship-to-prod.md +20 -16
  207. package/plugins/connore/.claude-plugin/plugin.json +10 -0
  208. package/plugins/connore/hooks/hooks.json +16 -0
  209. package/plugins/connore/skills/connore-backend/SKILL.md +32 -0
  210. package/plugins/connore/skills/connore-handoff/SKILL.md +15 -0
  211. package/plugins/connore/skills/connore-routes/SKILL.md +16 -0
  212. package/plugins/connore/skills/connore-validate/SKILL.md +15 -0
  213. package/src/cli.js +110 -21
  214. package/src/commands/doctor.js +2 -0
  215. package/src/commands/edit.js +88 -0
  216. package/src/commands/graph.js +20 -0
  217. package/src/commands/handoff.js +45 -0
  218. package/src/commands/init.js +8 -3
  219. package/src/commands/lint.js +13 -5
  220. package/src/commands/log.js +49 -25
  221. package/src/commands/packs.js +21 -0
  222. package/src/commands/routes.js +13 -0
  223. package/src/commands/search.js +7 -2
  224. package/src/commands/update.js +5 -1
  225. package/src/lib/config.js +67 -64
  226. package/src/lib/graph.js +96 -0
  227. package/src/lib/index.js +88 -72
  228. package/src/lib/lessons.js +173 -173
  229. package/src/lib/lint.js +185 -67
  230. package/src/lib/mutate.js +26 -24
  231. package/src/lib/packs.js +25 -10
  232. package/src/lib/paths.js +1 -1
  233. package/src/lib/prompts.js +66 -0
  234. package/src/lib/report.js +41 -33
  235. package/src/lib/routes.js +59 -0
  236. package/src/lib/run.js +116 -73
  237. package/src/lib/search.js +24 -0
  238. package/src/lib/tokens.js +8 -0
@@ -1,43 +1,46 @@
1
1
  ---
2
- title: Spec To Plan
2
+ title: Spec to plan
3
3
  type: workflow
4
- tags: [workflow]
4
+ tags: [plan]
5
5
  stack: any
6
- status: draft
7
- verified:
8
- description: Draft direction for Spec To Plan.
6
+ status: reviewed
7
+ verified: 2026-12-07
8
+ description: Load when a spec exists and the work is more than one step.
9
9
  ---
10
10
 
11
- # Spec To Plan
11
+ # Spec to plan
12
12
 
13
13
  ## Use when
14
- TODO
14
+ You are about to build from a written spec.
15
15
 
16
16
  ## Default
17
- TODO
17
+ Turn the spec into a connore plan from the matching blueprint. Do the open phase only.
18
18
 
19
19
  ## Use instead when
20
- TODO
20
+ The spec is one check. Just do that check.
21
21
 
22
22
  ## Never
23
- TODO
23
+ Never skip a red gate. Never plan a phase the spec marked out of scope.
24
24
 
25
25
  ## Why
26
- TODO
26
+ The plan is what stops the agent from jumping to the last screen.
27
27
 
28
28
  ## Steps
29
- 1. TODO
29
+ 1. Match the blueprint.
30
+ 2. Run connore plan init if no plan exists.
31
+ 3. Do the next open task.
32
+ 4. Mark it done only when its check passes.
30
33
 
31
34
  ## Done when
32
- TODO
35
+ The plan's next step matches the spec, and later phases are still closed.
33
36
 
34
37
  ## Example
35
- TODO
38
+ Auth is open. Billing stays closed until that gate is met.
36
39
 
37
40
  ## Common mistakes
38
- TODO
41
+ A plan that lists every idea. Marking a task done because the file exists.
39
42
 
40
43
  ## Sources
41
- TODO
44
+ Connore pack. Original wording. No vendor text copied.
42
45
 
43
46
  License: MIT
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: API conventions
3
+ type: api
4
+ tags: [http, json, errors]
5
+ updated: 2026-11-19
6
+ description: Request and error shape used by the Context101 route handlers.
7
+ ---
8
+
9
+
10
+ # API conventions
11
+
12
+ From the route handlers in `src/app/api`.
13
+
14
+ - JSON in, JSON out. A bad body is `400` with `{ "error": "Expected JSON." }`.
15
+ - Validation errors are `400` with `{ "error": "<sentence>" }`. Login failure uses the same shape (`"That email and password do not match."`).
16
+ - Read handlers send `Cache-Control: no-store`.
17
+ - Call `await connection()` from `next/server` before reading cookies or the database in a route.
18
+ - List responses wrap the array: `{ "projects": [...] }`.
19
+ - The engine uses Bearer or `X-Context101-Token`. A missing token is `401`. A disallowed Origin is `403`. Browser CORS echoes the origin only when it is on the allowlist.
20
+
21
+ Do not return stack traces in `error`.
@@ -0,0 +1,20 @@
1
+ ---
2
+ title: Local SQLite architecture
3
+ type: architecture
4
+ tags: [sqlite, next, engine]
5
+ updated: 2026-11-19
6
+ description: How Context101 splits the Next app and the local engine.
7
+ ---
8
+
9
+
10
+ # Local SQLite architecture
11
+
12
+ From Context101. Two processes share one SQLite file.
13
+
14
+ - The Next.js app serves pages and `src/app/api/*`.
15
+ - A local engine (`src/engine`) serves the same data to agents. It checks an API token and an origin allowlist (`src/engine/auth.ts`).
16
+ - App routes call the engine first. If the engine is down they answer from SQLite themselves. `GET /api/projects` does this, and returns 503 only when both fail.
17
+
18
+ SQLite uses `node:sqlite` `DatabaseSync`, `journal_mode = WAL`, and `foreign_keys = ON`. One connection is cached on `globalThis`. The file path comes from `sqlitePath()`.
19
+
20
+ Do not add a hosted database in this pattern. The product is local-first.
@@ -0,0 +1,24 @@
1
+ ---
2
+ title: Session and engine auth
3
+ type: authentication
4
+ tags: [auth, session, scrypt]
5
+ updated: 2026-11-19
6
+ description: Cookie session for the app, and a separate bearer token for the local engine.
7
+ ---
8
+
9
+
10
+ # Session and engine auth
11
+
12
+ Source: `src/lib/accounts.ts` and `src/engine/auth.ts`.
13
+
14
+ ## App session
15
+
16
+ - Email is trimmed and lowercased. It must match a simple `local@domain` pattern and be at most 160 characters. Name is required, trimmed, max 80. Password minimum is 8 characters.
17
+ - Password hash is scrypt, 32 bytes, with a random 16-byte salt, both stored as base64url. Compare with `timingSafeEqual`.
18
+ - Session token is `randomBytes(32)` base64url. Lifetime is 30 days. Cookie name `context101_session`. Flags: httpOnly, sameSite lax, path `/`, secure when `NODE_ENV` is production.
19
+ - One active session per user. Starting a session drops that user's older rows. Logout deletes the row for that token.
20
+ - The JSON user is `{ id, email, name }`. Never send the hash or the salt.
21
+
22
+ ## Engine
23
+
24
+ Separate from the cookie. `Authorization: Bearer <token>` or header `X-Context101-Token` must equal `config.apiToken`. Mutations also require an allowlisted `Origin` when Origin is present.
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: SQLite schema
3
+ type: database
4
+ tags: [sqlite, schema]
5
+ updated: 2026-11-19
6
+ description: Tables created in Context101 src/lib/db.ts.
7
+ ---
8
+
9
+
10
+ # Schema
11
+
12
+ Source: `src/lib/db.ts`. Child tables use `project_id` with `ON DELETE CASCADE` and a `position` column.
13
+
14
+ - `meta` (key, value), `accounts` (id, email unique, name, password_hash, password_salt, created_at), `sessions` (token, user_id, expires_at).
15
+ - `projects`: id, owner_id, name, emoji, created_at, updated_at, workspace_path, use_case, goal, audience, tone, vibe, primary_color, font, toolkit_json, custom_toolkit, token, published_at, starter_applied. Later columns: sources_json, read_sessions, plan.
16
+ - Children: `knowledge_items`, `rules` (text, kind), `skills`, `components`, `reference_images` (data_url, note), `memory_items` (kind, text, created_at).
17
+ - Catalogs: `library_catalog`, `component_catalog`, `skill_catalog`.
18
+ - Activity: `agent_sessions` (tool, file, prompts, edits, summary), `mcp_events` (at, kind, name, project).
19
+ - Also: `help_messages`, `mirrors`, `removed_projects`.
20
+
21
+ Indexes: `projects(token)`, `projects(owner_id)`, `help_messages(user_id, created_at)`.
@@ -0,0 +1,26 @@
1
+ ---
2
+ title: Ambient background
3
+ type: component
4
+ tags: [custom, background]
5
+ updated: 2026-11-19
6
+ description: Fixed grid, three drifting orbs, and a noise layer.
7
+ ---
8
+
9
+
10
+ # Ambient background
11
+
12
+ Fixed grid, three drifting orbs, and a noise layer. File: `ambient-background.tsx`.
13
+
14
+ ## Props
15
+
16
+ No props. aria-hidden, pointer-events none, z-index -10. Motion lives in the CSS classes ambient-grid, ambient-orb, ambient-noise.
17
+
18
+ ## When
19
+
20
+ Behind a dark marketing page. It is grayscale in the CSS, not the accent curtain in `design/references/hero-accent-curtain.md`.
21
+
22
+ ## Example
23
+
24
+ ```tsx
25
+ <AmbientBackground />
26
+ ```
@@ -0,0 +1,12 @@
1
+ /** Fixed grayscale backdrop: a masked line grid and slow-drifting light. Transform-only animation, no blur filters. */
2
+ export function AmbientBackground() {
3
+ return (
4
+ <div aria-hidden className="pointer-events-none fixed inset-0 -z-10 overflow-hidden">
5
+ <div className="ambient-grid absolute inset-0" />
6
+ <div className="ambient-orb ambient-orb-a" />
7
+ <div className="ambient-orb ambient-orb-b" />
8
+ <div className="ambient-orb ambient-orb-c" />
9
+ <div className="ambient-noise absolute inset-0" />
10
+ </div>
11
+ )
12
+ }
@@ -0,0 +1,26 @@
1
+ ---
2
+ title: Corner button
3
+ type: component
4
+ tags: [custom, button, outline]
5
+ updated: 2026-11-19
6
+ description: Outline link with four 10px corner brackets.
7
+ ---
8
+
9
+
10
+ # Corner button
11
+
12
+ Outline link with four 10px corner brackets. File: `corner-frame.tsx`.
13
+
14
+ ## Props
15
+
16
+ CornerButton props: href (string), children, className, glow (default false), variant outline or ghost. Height h-11, px-5, text-sm. glow adds .corner-btn-glow (mint ring). Uses next/link.
17
+
18
+ ## When
19
+
20
+ The paired outline buttons in the ruled set, primary and secondary. Not the filled accent button of the solid-accent set.
21
+
22
+ ## Example
23
+
24
+ ```tsx
25
+ <CornerButton href="/signup" glow>Start free</CornerButton>
26
+ ```
@@ -0,0 +1,48 @@
1
+ import Link from "next/link"
2
+ import { cn } from "cn"
3
+
4
+ const frame =
5
+ "pointer-events-none absolute inset-0 before:absolute before:top-0 before:left-0 before:h-2 before:w-2 before:border-t before:border-l after:absolute after:top-0 after:right-0 after:h-2 after:w-2 after:border-t after:border-r [[data-corners]::before]:border-white [[data-corners]::after]:border-white"
6
+
7
+ function CornerOverlay({ className }: { className?: string }) {
8
+ return (
9
+ <span aria-hidden data-corners className={cn("pointer-events-none absolute inset-0", className)}>
10
+ <span className="absolute top-0 left-0 h-2.5 w-2.5 border-t border-l border-current" />
11
+ <span className="absolute top-0 right-0 h-2.5 w-2.5 border-t border-r border-current" />
12
+ <span className="absolute bottom-0 left-0 h-2.5 w-2.5 border-b border-l border-current" />
13
+ <span className="absolute bottom-0 right-0 h-2.5 w-2.5 border-b border-r border-current" />
14
+ </span>
15
+ )
16
+ }
17
+
18
+ export function CornerButton({
19
+ href,
20
+ children,
21
+ className,
22
+ glow = false,
23
+ variant = "outline",
24
+ }: {
25
+ href: string
26
+ children: React.ReactNode
27
+ className?: string
28
+ glow?: boolean
29
+ variant?: "outline" | "ghost"
30
+ }) {
31
+ return (
32
+ <Link
33
+ href={href}
34
+ className={cn(
35
+ "corner-btn relative inline-flex h-11 items-center justify-center px-5 text-sm font-medium text-white transition-[color,background-color,box-shadow,transform] duration-300",
36
+ variant === "outline" && "bg-black",
37
+ variant === "ghost" && "bg-transparent",
38
+ glow && "corner-btn-glow",
39
+ className,
40
+ )}
41
+ >
42
+ <CornerOverlay className="text-white/85" />
43
+ <span className="relative z-10">{children}</span>
44
+ </Link>
45
+ )
46
+ }
47
+
48
+ export { CornerOverlay, frame }
@@ -0,0 +1,26 @@
1
+ ---
2
+ title: Get started
3
+ type: component
4
+ tags: [custom, button]
5
+ updated: 2026-11-19
6
+ description: CornerButton preset that links to /signup.
7
+ ---
8
+
9
+
10
+ # Get started
11
+
12
+ CornerButton preset that links to /signup. File: `cta-button.tsx`.
13
+
14
+ ## Props
15
+
16
+ GetStarted props: className, label (default "Start free"). Always passes glow.
17
+
18
+ ## When
19
+
20
+ The marketing header action when you want the Context101 corner treatment.
21
+
22
+ ## Example
23
+
24
+ ```tsx
25
+ <GetStarted label="Start free" />
26
+ ```
@@ -0,0 +1,10 @@
1
+ import { CornerButton } from "./corner-frame"
2
+ import { cn } from "cn"
3
+
4
+ export function GetStarted({ className, label = "Start free" }: { className?: string; label?: string }) {
5
+ return (
6
+ <CornerButton href="/signup" className={cn(className)} glow>
7
+ {label}
8
+ </CornerButton>
9
+ )
10
+ }
@@ -0,0 +1,26 @@
1
+ ---
2
+ title: Page transition
3
+ type: component
4
+ tags: [custom, motion]
5
+ updated: 2026-11-19
6
+ description: View Transition on route change.
7
+ ---
8
+
9
+
10
+ # Page transition
11
+
12
+ View Transition on route change. File: `page-transition.tsx`.
13
+
14
+ ## Props
15
+
16
+ children: React.ReactNode. enter class page-enter (520ms, 120ms delay). exit class page-exit (220ms).
17
+
18
+ ## When
19
+
20
+ Wrap a route template. Do not also animate the same nodes with hero-rise.
21
+
22
+ ## Example
23
+
24
+ ```tsx
25
+ <PageTransition>{children}</PageTransition>
26
+ ```
@@ -0,0 +1,10 @@
1
+ import { ViewTransition } from "react"
2
+
3
+ /** Fades the old page out and lifts the new one in on every route change. Used from template.tsx, which remounts per navigation. */
4
+ export function PageTransition({ children }: { children: React.ReactNode }) {
5
+ return (
6
+ <ViewTransition enter="page-enter" exit="page-exit" default="none">
7
+ {children}
8
+ </ViewTransition>
9
+ )
10
+ }
@@ -0,0 +1,26 @@
1
+ ---
2
+ title: Smooth scroll
3
+ type: component
4
+ tags: [custom, motion]
5
+ updated: 2026-11-19
6
+ description: Lenis smooth wheel scrolling locked to the GSAP ticker.
7
+ ---
8
+
9
+
10
+ # Smooth scroll
11
+
12
+ Lenis smooth wheel scrolling locked to the GSAP ticker. File: `smooth-scroll.tsx`.
13
+
14
+ ## Props
15
+
16
+ No props. Duration 1.15s. Easing 1 - (1 - t) ** 4. Anchor offset -72. Bails out when prefers-reduced-motion is set. Depends on lenis and gsap.
17
+
18
+ ## When
19
+
20
+ Marketing pages only. Leave app shells on native scroll.
21
+
22
+ ## Example
23
+
24
+ ```tsx
25
+ <SmoothScroll />
26
+ ```
@@ -0,0 +1,32 @@
1
+ "use client"
2
+
3
+ import { useEffect } from "react"
4
+ import Lenis from "lenis"
5
+ import { gsap, ScrollTrigger } from "@/lib/gsap"
6
+
7
+ const globalLenis = globalThis as typeof globalThis & { __lenis?: Lenis }
8
+
9
+ export function getLenis() {
10
+ return globalLenis.__lenis
11
+ }
12
+
13
+ /** Smooth wheel scrolling for the marketing pages, driven by GSAP's ticker so ScrollTrigger stays in sync. */
14
+ export function SmoothScroll() {
15
+ useEffect(() => {
16
+ if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return
17
+ const lenis = new Lenis({ duration: 1.15, easing: (t) => 1 - Math.pow(1 - t, 4), anchors: { offset: -72 }, autoRaf: false })
18
+ globalLenis.__lenis = lenis
19
+ lenis.on("scroll", ScrollTrigger.update)
20
+ const tick = (time: number) => lenis.raf(time * 1000)
21
+ gsap.ticker.add(tick)
22
+ gsap.ticker.lagSmoothing(0)
23
+ document.documentElement.classList.add("lenis-on")
24
+ return () => {
25
+ gsap.ticker.remove(tick)
26
+ lenis.destroy()
27
+ if (globalLenis.__lenis === lenis) globalLenis.__lenis = undefined
28
+ document.documentElement.classList.remove("lenis-on")
29
+ }
30
+ }, [])
31
+ return null
32
+ }
@@ -0,0 +1,30 @@
1
+ ---
2
+ title: Motion effects
3
+ type: component
4
+ tags: [motion, effects, license, install]
5
+ updated: 2026-12-06
6
+ description: Install commands for the animated effects used by the reference layouts. Source is not vendored.
7
+ ---
8
+
9
+
10
+ # Motion effects
11
+
12
+ These effects are installed into the app, never copied into this pack. Their licence permits use inside an application but forbids selling or redistributing the components themselves, which is what shipping them in a pack would be. That is why this folder holds no component source.
13
+
14
+ Install into the app, not into `.ctx/`:
15
+
16
+ ```
17
+ npx shadcn@latest add @react-bits/SpotlightCard-TS-TW
18
+ npx shadcn@latest add @react-bits/BlurText-TS-TW
19
+ npx shadcn@latest add @react-bits/FadeContent-TS-TW
20
+ ```
21
+
22
+ The package names above are required for the install to resolve. Do not treat them as a licence to copy the source.
23
+
24
+ ## When
25
+
26
+ - SpotlightCard: pointer light on dark cards. The coded equivalent is `.card-premium` in the motion note. The benefit cards in `design/references/benefit-card-grid.md` are a still of this idea.
27
+ - BlurText: headline that resolves out of blur. Coded equivalent is `hero-rise` / `hero-line` (1.1s and 1.4s, expo ease).
28
+ - FadeContent: section enter. Coded equivalent is `section-in` at 0.55s.
29
+
30
+ Match the durations in `design/animations/motion.md` if you retune them. Do not add bounce easing.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 shadcn
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: UI primitives
3
+ type: component
4
+ tags: [ui-primitive, radix-nova, setup]
5
+ updated: 2026-12-06
6
+ description: How the copied primitive files are meant to be used, and what was not in the source.
7
+ ---
8
+
9
+
10
+ # UI primitives
11
+
12
+ Copied from Context101 `src/components/ui`. Style `radix-nova`, base `neutral`, CSS variables, Lucide. These are MIT and may be used commercially; the notice must stay, so keep `LICENSE` in this folder (MIT, Copyright (c) 2023 shadcn).
13
+
14
+ ## Needs
15
+
16
+ `react`, `radix-ui`, `class-variance-authority`, `cn`, `lucide-react`, `sonner`, `next-themes`, Tailwind 4, and `shadcn/tailwind.css`. `dialog.tsx` imports `./button`.
17
+
18
+ `table` and `form` are not in the source project, so they are not in this pack. Add them in the app with `npx shadcn@latest add table form` if a screen needs them. Do not invent a local copy here.
19
+
20
+ The generator keeps its own command name; that is the tool you run, not a label for this folder.
21
+
22
+ Each `*.md` next to a component lists the props that are actually declared in that file.
@@ -0,0 +1,26 @@
1
+ ---
2
+ title: Badge
3
+ type: component
4
+ tags: [ui-primitive, badge]
5
+ updated: 2026-11-19
6
+ description: Small status label.
7
+ ---
8
+
9
+
10
+ # Badge
11
+
12
+ Small status label. File: `badge.tsx`.
13
+
14
+ ## Props
15
+
16
+ variant: default, secondary, destructive, outline, ghost, link. Height h-5, text-xs, radius rounded-4xl. asChild optional.
17
+
18
+ ## When
19
+
20
+ Status such as Running, Popular, Indexed. One or two words.
21
+
22
+ ## Example
23
+
24
+ ```tsx
25
+ <Badge variant="outline">Popular</Badge>
26
+ ```
@@ -0,0 +1,48 @@
1
+ import * as React from "react"
2
+ import { cva, type VariantProps } from "class-variance-authority"
3
+ import { cn } from "cn"
4
+ import { Slot } from "radix-ui"
5
+
6
+ const badgeVariants = cva(
7
+ "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
12
+ secondary:
13
+ "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
14
+ destructive:
15
+ "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
16
+ outline:
17
+ "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
18
+ ghost:
19
+ "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
20
+ link: "text-primary underline-offset-4 hover:underline",
21
+ },
22
+ },
23
+ defaultVariants: {
24
+ variant: "default",
25
+ },
26
+ }
27
+ )
28
+
29
+ function Badge({
30
+ className,
31
+ variant = "default",
32
+ asChild = false,
33
+ ...props
34
+ }: React.ComponentProps<"span"> &
35
+ VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
36
+ const Comp = asChild ? Slot.Root : "span"
37
+
38
+ return (
39
+ <Comp
40
+ data-slot="badge"
41
+ data-variant={variant}
42
+ className={cn(badgeVariants({ variant }), className)}
43
+ {...props}
44
+ />
45
+ )
46
+ }
47
+
48
+ export { Badge, badgeVariants }
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: Button
3
+ type: component
4
+ tags: [ui-primitive, button]
5
+ updated: 2026-11-19
6
+ description: Primary and secondary actions.
7
+ ---
8
+
9
+
10
+ # Button
11
+
12
+ Primary and secondary actions. File: `button.tsx`.
13
+
14
+ ## Props
15
+
16
+ variant: default, outline, secondary, ghost, destructive, link. size: default (h-8), xs (h-6), sm (h-7), lg (h-9), icon, icon-xs, icon-sm, icon-lg. asChild uses Slot.Root. Other props pass through to button.
17
+
18
+ ## When
19
+
20
+ The one filled action in a cluster. outline or ghost for the second action. destructive for delete.
21
+
22
+ ## Example
23
+
24
+ ```tsx
25
+ <Button>Save</Button>
26
+ <Button variant="outline" size="sm">Cancel</Button>
27
+ ```
@@ -0,0 +1,66 @@
1
+ import * as React from "react"
2
+ import { cva, type VariantProps } from "class-variance-authority"
3
+ import { cn } from "cn"
4
+ import { Slot } from "radix-ui"
5
+
6
+ const buttonVariants = cva(
7
+ "group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-primary text-primary-foreground hover:bg-primary/80",
12
+ outline:
13
+ "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
14
+ secondary:
15
+ "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
16
+ ghost:
17
+ "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
18
+ destructive:
19
+ "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
20
+ link: "text-primary underline-offset-4 hover:underline",
21
+ },
22
+ size: {
23
+ default:
24
+ "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
25
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
26
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
27
+ lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
28
+ icon: "size-8",
29
+ "icon-xs":
30
+ "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
31
+ "icon-sm":
32
+ "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
33
+ "icon-lg": "size-9",
34
+ },
35
+ },
36
+ defaultVariants: {
37
+ variant: "default",
38
+ size: "default",
39
+ },
40
+ }
41
+ )
42
+
43
+ function Button({
44
+ className,
45
+ variant = "default",
46
+ size = "default",
47
+ asChild = false,
48
+ ...props
49
+ }: React.ComponentProps<"button"> &
50
+ VariantProps<typeof buttonVariants> & {
51
+ asChild?: boolean
52
+ }) {
53
+ const Comp = asChild ? Slot.Root : "button"
54
+
55
+ return (
56
+ <Comp
57
+ data-slot="button"
58
+ data-variant={variant}
59
+ data-size={size}
60
+ className={cn(buttonVariants({ variant, size, className }))}
61
+ {...props}
62
+ />
63
+ )
64
+ }
65
+
66
+ export { Button, buttonVariants }