create-raredays-app 0.1.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 +89 -0
- package/bin/index.js +1024 -0
- package/package.json +43 -0
- package/scaffold-fragments/billing/files/app/api/billing/webhook/route.ts +5 -0
- package/scaffold-fragments/billing/module.json +31 -0
- package/scaffold-fragments/billing/runtime/config.ts +8 -0
- package/scaffold-fragments/billing/runtime/exports.ts +6 -0
- package/scaffold-fragments/billing/runtime/imports.ts +6 -0
- package/scaffold-fragments/billing/runtime/ports.ts +3 -0
- package/scaffold-fragments/cms/module.json +29 -0
- package/scaffold-fragments/cms/runtime/config.ts +4 -0
- package/scaffold-fragments/cms/runtime/exports.ts +1 -0
- package/scaffold-fragments/cms/runtime/imports.ts +1 -0
- package/scaffold-fragments/email/module.json +30 -0
- package/scaffold-fragments/email/runtime/config.ts +1 -0
- package/scaffold-fragments/email/runtime/imports.ts +1 -0
- package/scaffold-fragments/email/runtime/ports.ts +1 -0
- package/scaffold-fragments/feature-flags/files/app/lib/flags.ts +48 -0
- package/scaffold-fragments/feature-flags/module.json +66 -0
- package/scaffold-fragments/i18n/files/messages/en-US.json +15 -0
- package/scaffold-fragments/i18n/module.json +9 -0
- package/scaffold-fragments/i18n/runtime/config.ts +7 -0
- package/scaffold-fragments/i18n/runtime/exports.ts +1 -0
- package/scaffold-fragments/i18n/runtime/imports.ts +2 -0
- package/scaffold-fragments/i18n/runtime/ports.ts +1 -0
- package/scaffold-fragments/identity/module.json +30 -0
- package/scaffold-fragments/identity/vendors/better-auth/files/app/api/auth/[...all]/route.ts +15 -0
- package/scaffold-fragments/identity/vendors/better-auth/files/app/lib/auth.ts +20 -0
- package/scaffold-fragments/jobs/module.json +12 -0
- package/scaffold-fragments/jobs/runtime/config.ts +4 -0
- package/scaffold-fragments/jobs/runtime/imports.ts +1 -0
- package/scaffold-fragments/jobs/runtime/ports.ts +1 -0
- package/scaffold-fragments/notifications/module.json +12 -0
- package/scaffold-fragments/notifications/runtime/config.ts +8 -0
- package/scaffold-fragments/notifications/runtime/imports.ts +5 -0
- package/scaffold-fragments/notifications/runtime/ports.ts +1 -0
- package/scaffold-fragments/organizations/module.json +12 -0
- package/scaffold-fragments/telemetry/module.json +43 -0
- package/scaffold-fragments/telemetry/runtime/config.ts +7 -0
- package/scaffold-fragments/telemetry/runtime/imports.ts +7 -0
- package/scaffold-fragments/telemetry/runtime/ports.ts +1 -0
- package/skillex/private/contribute.md +193 -0
- package/skillex/public/consumer.md +157 -0
- package/templates/client/.storybook/main.ts +77 -0
- package/templates/client/.storybook/preview.ts +12 -0
- package/templates/client/CLAUDE.md +50 -0
- package/templates/client/_claude/settings.json +107 -0
- package/templates/client/_github/PULL_REQUEST_TEMPLATE.md +19 -0
- package/templates/client/_github/dependabot.yml +48 -0
- package/templates/client/_github/workflows/ci.yml +104 -0
- package/templates/client/_gitignore +15 -0
- package/templates/client/_npmrc +1 -0
- package/templates/client/app/(app)/layout.tsx +49 -0
- package/templates/client/app/(marketing)/layout.tsx +21 -0
- package/templates/client/app/(marketing)/page.tsx +34 -0
- package/templates/client/app/api/backend/[...path]/route.ts +37 -0
- package/templates/client/app/api/dev/login/route.ts +14 -0
- package/templates/client/app/api/dev/logout/route.ts +18 -0
- package/templates/client/app/globals.css +22 -0
- package/templates/client/app/home-auth-controls.tsx +28 -0
- package/templates/client/app/layout.tsx +38 -0
- package/templates/client/app/lib/backend-client.ts +55 -0
- package/templates/client/app/lib/runtime.test.ts +38 -0
- package/templates/client/app/lib/runtime.ts +54 -0
- package/templates/client/app/protected/page.tsx +31 -0
- package/templates/client/app/theme.override.css +9 -0
- package/templates/client/instrumentation.ts +10 -0
- package/templates/client/mocks/browser.tsx +28 -0
- package/templates/client/mocks/handlers.ts +20 -0
- package/templates/client/mocks/node.ts +7 -0
- package/templates/client/next.config.ts +8 -0
- package/templates/client/oxfmt.config.ts +8 -0
- package/templates/client/oxlint.config.ts +8 -0
- package/templates/client/package.json +61 -0
- package/templates/client/postcss.config.mjs +1 -0
- package/templates/client/public/mockServiceWorker.js +349 -0
- package/templates/client/scripts/build-theme.mjs +18 -0
- package/templates/client/site.spec.ts +58 -0
- package/templates/client/skillex.json +12 -0
- package/templates/client/skills/repo.md +56 -0
- package/templates/client/stylelint.config.mjs +4 -0
- package/templates/client/tsconfig.json +11 -0
- package/templates/client/vitest.config.ts +27 -0
- package/templates/client/vitest.setup.ts +18 -0
- package/templates/full-stack/.storybook/main.ts +77 -0
- package/templates/full-stack/.storybook/preview.ts +12 -0
- package/templates/full-stack/CLAUDE.md +50 -0
- package/templates/full-stack/_claude/settings.json +107 -0
- package/templates/full-stack/_github/PULL_REQUEST_TEMPLATE.md +19 -0
- package/templates/full-stack/_github/dependabot.yml +57 -0
- package/templates/full-stack/_github/workflows/ci.yml +109 -0
- package/templates/full-stack/_github/workflows/db-check.yml +36 -0
- package/templates/full-stack/_github/workflows/db-migrate.yml +39 -0
- package/templates/full-stack/_gitignore +15 -0
- package/templates/full-stack/_npmrc +1 -0
- package/templates/full-stack/app/(app)/layout.tsx +53 -0
- package/templates/full-stack/app/(marketing)/layout.tsx +21 -0
- package/templates/full-stack/app/(marketing)/page.tsx +38 -0
- package/templates/full-stack/app/api/dev/login/route.ts +14 -0
- package/templates/full-stack/app/api/dev/logout/route.ts +18 -0
- package/templates/full-stack/app/api/widgets/route.ts +10 -0
- package/templates/full-stack/app/demo/widgets/page.tsx +86 -0
- package/templates/full-stack/app/globals.css +22 -0
- package/templates/full-stack/app/home-auth-controls.tsx +28 -0
- package/templates/full-stack/app/layout.tsx +38 -0
- package/templates/full-stack/app/lib/runtime.test.ts +38 -0
- package/templates/full-stack/app/lib/runtime.ts +54 -0
- package/templates/full-stack/app/protected/page.tsx +31 -0
- package/templates/full-stack/app/theme.override.css +9 -0
- package/templates/full-stack/db/check.ts +46 -0
- package/templates/full-stack/db/index.ts +109 -0
- package/templates/full-stack/db/migrate.ts +66 -0
- package/templates/full-stack/db/migrations/.gitkeep +0 -0
- package/templates/full-stack/db/schema.ts +20 -0
- package/templates/full-stack/drizzle.config.ts +16 -0
- package/templates/full-stack/instrumentation.ts +10 -0
- package/templates/full-stack/mocks/browser.tsx +28 -0
- package/templates/full-stack/mocks/handlers.ts +34 -0
- package/templates/full-stack/mocks/node.ts +7 -0
- package/templates/full-stack/next.config.ts +8 -0
- package/templates/full-stack/oxfmt.config.ts +8 -0
- package/templates/full-stack/oxlint.config.ts +8 -0
- package/templates/full-stack/package.json +72 -0
- package/templates/full-stack/postcss.config.mjs +1 -0
- package/templates/full-stack/public/mockServiceWorker.js +349 -0
- package/templates/full-stack/scripts/build-theme.mjs +18 -0
- package/templates/full-stack/site.spec.ts +58 -0
- package/templates/full-stack/skillex.json +12 -0
- package/templates/full-stack/skills/repo.md +56 -0
- package/templates/full-stack/stylelint.config.mjs +4 -0
- package/templates/full-stack/tsconfig.json +11 -0
- package/templates/full-stack/vitest.config.ts +42 -0
- package/templates/full-stack/vitest.setup.ts +18 -0
- package/templates/static/.storybook/main.ts +77 -0
- package/templates/static/.storybook/preview.ts +12 -0
- package/templates/static/CLAUDE.md +50 -0
- package/templates/static/_claude/settings.json +107 -0
- package/templates/static/_github/PULL_REQUEST_TEMPLATE.md +18 -0
- package/templates/static/_github/dependabot.yml +43 -0
- package/templates/static/_github/workflows/ci.yml +91 -0
- package/templates/static/_gitignore +15 -0
- package/templates/static/_npmrc +1 -0
- package/templates/static/app/(marketing)/layout.tsx +21 -0
- package/templates/static/app/(marketing)/page.tsx +17 -0
- package/templates/static/app/globals.css +22 -0
- package/templates/static/app/layout.tsx +24 -0
- package/templates/static/app/theme.override.css +9 -0
- package/templates/static/next.config.ts +19 -0
- package/templates/static/oxfmt.config.ts +8 -0
- package/templates/static/oxlint.config.ts +8 -0
- package/templates/static/package.json +53 -0
- package/templates/static/postcss.config.mjs +1 -0
- package/templates/static/scripts/build-theme.mjs +18 -0
- package/templates/static/site.spec.ts +58 -0
- package/templates/static/skillex.json +12 -0
- package/templates/static/skills/repo.md +56 -0
- package/templates/static/stylelint.config.mjs +4 -0
- package/templates/static/tsconfig.json +11 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { defineSiteSpec } from "@raredays/site-config";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The site specification for this app.
|
|
5
|
+
*
|
|
6
|
+
* Edit this file to brand your site, configure navigation, declare integrations,
|
|
7
|
+
* and enable modules. The Tailwind theme override stylesheet at
|
|
8
|
+
* `app/theme.override.css` is regenerated from this file by `pnpm theme:build`
|
|
9
|
+
* (which is chained into `pnpm dev` and `pnpm build`).
|
|
10
|
+
*/
|
|
11
|
+
export default defineSiteSpec({
|
|
12
|
+
framework: "0.x",
|
|
13
|
+
runtime: "static",
|
|
14
|
+
identity: {
|
|
15
|
+
name: "__SLUG__",
|
|
16
|
+
slug: "__SLUG__",
|
|
17
|
+
canonicalDomain: "example.com",
|
|
18
|
+
locales: ["en-US"],
|
|
19
|
+
},
|
|
20
|
+
branding: {
|
|
21
|
+
// Token overrides flow into Tailwind's @theme layer at build time.
|
|
22
|
+
// Anything in @raredays/tokens can be overridden here; unset keys keep
|
|
23
|
+
// the framework defaults. Examples:
|
|
24
|
+
//
|
|
25
|
+
// tokens: {
|
|
26
|
+
// color: { brand: { primary: "#0070f3", secondary: "#111111" } },
|
|
27
|
+
// font: { sans: "'Inter Variable', ui-sans-serif, system-ui, sans-serif" },
|
|
28
|
+
// radius: { md: "0.5rem" },
|
|
29
|
+
// },
|
|
30
|
+
assets: {
|
|
31
|
+
logo: "/logo.svg",
|
|
32
|
+
favicon: "/favicon.ico",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
navigation: {
|
|
36
|
+
primary: [{ label: "Home", href: "/" }],
|
|
37
|
+
footer: [{ label: "About", href: "/about" }],
|
|
38
|
+
},
|
|
39
|
+
// Module configurations live here, keyed by module id. Each enabled module
|
|
40
|
+
// package validates its own slice. Example:
|
|
41
|
+
//
|
|
42
|
+
// modules: {
|
|
43
|
+
// billing: { plans: [...] },
|
|
44
|
+
// },
|
|
45
|
+
integrations: {
|
|
46
|
+
// Each integration's credential slots reference SHOUTING_SNAKE_CASE env
|
|
47
|
+
// var names — never literal secret values. Example:
|
|
48
|
+
//
|
|
49
|
+
// stripe: {
|
|
50
|
+
// secretKey: "STRIPE_SECRET_KEY",
|
|
51
|
+
// webhookSecret: "STRIPE_WEBHOOK_SECRET",
|
|
52
|
+
// },
|
|
53
|
+
},
|
|
54
|
+
deploy: {
|
|
55
|
+
vercel: { projectId: "prj_replace_me" },
|
|
56
|
+
// No `database` field — static apps have no server runtime.
|
|
57
|
+
},
|
|
58
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Repository conventions
|
|
3
|
+
topic: repo-conventions
|
|
4
|
+
tags: [getting-started]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Repository conventions
|
|
8
|
+
|
|
9
|
+
This app was scaffolded with `create-raredays-app`. The framework's
|
|
10
|
+
`@raredays/*` packages are workspace deps and ship their own skills, all
|
|
11
|
+
auto-discovered via the `DependencyBoundary` in `skillex.json`.
|
|
12
|
+
|
|
13
|
+
## Layout
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
app/
|
|
17
|
+
├── (auth)/ # Sign-in / sign-up routes (when identity:better-auth is wired)
|
|
18
|
+
├── (subscribed)/ # Routes gated behind an active subscription
|
|
19
|
+
├── api/ # API route handlers
|
|
20
|
+
├── demo/ # Sample pages (delete or replace)
|
|
21
|
+
├── lib/
|
|
22
|
+
│ └── runtime.ts # Provider composition root — edit here to swap providers
|
|
23
|
+
├── globals.css # Tailwind v4 entry; scans @raredays/* dists for utilities
|
|
24
|
+
├── layout.tsx # Root layout — wraps app in RaredaysProvider
|
|
25
|
+
└── theme.override.css # Generated by `pnpm theme:build` from site.spec.ts
|
|
26
|
+
db/ # Drizzle schema + migrations
|
|
27
|
+
mocks/ # MSW handlers (node + browser setups)
|
|
28
|
+
public/ # Static assets + mockServiceWorker.js
|
|
29
|
+
site.spec.ts # Single source of truth for site config — feeds theme:build
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Always-on workflow
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
pnpm install # auto-runs skillex refresh via postinstall
|
|
36
|
+
pnpm dev # Next dev server
|
|
37
|
+
pnpm dev:mocks # Dev with MSW intercepting fetch
|
|
38
|
+
pnpm test # vitest run (node-mode tests)
|
|
39
|
+
pnpm check # lint + format:check + style + typecheck (gate before commit)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Where things live in the framework
|
|
43
|
+
|
|
44
|
+
- `@raredays/core` — provider/port pattern, `RaredaysProvider`, env-config, ports
|
|
45
|
+
- `@raredays/components` — design system components (Tailwind v4, shadcn-flavored)
|
|
46
|
+
- `@raredays/identity` (+ `identity-better-auth`) — auth, sessions, organizations
|
|
47
|
+
- `@raredays/billing` (+ `billing-stripe`) — subscriptions, webhooks → events
|
|
48
|
+
- `@raredays/notifications` — in-app + email notification port
|
|
49
|
+
- `@raredays/cms` (+ `cms-hygraph`, `cms-bridge`) — headless CMS port + canonical-id bridge
|
|
50
|
+
- `@raredays/engagement` — declarative engagement tables (bookmarks, history, tags)
|
|
51
|
+
- `@raredays/state-machine` — typed state machine primitive
|
|
52
|
+
- `@raredays/i18n` — locale-aware translations + formatters
|
|
53
|
+
- `@raredays/mocks` — MSW setup for node + browser
|
|
54
|
+
|
|
55
|
+
Run `pnpm exec skillex query --package "@raredays/<name>"` for any of them
|
|
56
|
+
to see canonical usage patterns.
|