@strayl/agent 0.1.8 → 0.1.10
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/dist/agent.js +20 -5
- package/package.json +27 -27
- package/skills/api-creation/SKILL.md +631 -631
- package/skills/authentication/SKILL.md +294 -294
- package/skills/frontend-design/SKILL.md +108 -108
- package/skills/landing-creation/SKILL.md +125 -125
- package/skills/reference/SKILL.md +149 -149
- package/skills/web-application-creation/SKILL.md +231 -231
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: frontend-design
|
|
3
|
-
description: Design and implement distinctive frontend UI for landing pages and web applications. Use when users ask for visual direction, layout, styling, component composition, or UX polish.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Frontend Design
|
|
7
|
-
|
|
8
|
-
## When to Use
|
|
9
|
-
|
|
10
|
-
- After scaffolding with `landing-creation` or `web-application-creation`
|
|
11
|
-
- User asks to design, style, polish, or redesign UI
|
|
12
|
-
- User wants new screens/sections (hero, pricing, dashboard, settings, auth pages, etc.)
|
|
13
|
-
- User asks for a specific aesthetic direction (minimal, bold, editorial, brutalist, retro, corporate)
|
|
14
|
-
|
|
15
|
-
## Workflow
|
|
16
|
-
|
|
17
|
-
1. **Clarify intent quickly**
|
|
18
|
-
- Product/site goal and audience
|
|
19
|
-
- Required screens/sections
|
|
20
|
-
- Preferred visual direction and color constraints
|
|
21
|
-
|
|
22
|
-
2. **Define the visual system first**
|
|
23
|
-
- Typography pair (display + body) — see **Font Guidelines** below
|
|
24
|
-
- Color tokens via CSS variables
|
|
25
|
-
- Spacing, radius, shadow, and motion rules
|
|
26
|
-
|
|
27
|
-
3. **Compose the layout**
|
|
28
|
-
- For landing pages: nav, hero, proof, features, CTA, footer
|
|
29
|
-
- For apps: app shell, primary user flow, settings/forms, data states
|
|
30
|
-
- Add meaningful empty/loading/error states where relevant
|
|
31
|
-
|
|
32
|
-
4. **Implement pragmatically**
|
|
33
|
-
- Reuse existing project components before adding new dependencies
|
|
34
|
-
- Add new UI components only when the current set cannot cover the requirement
|
|
35
|
-
- Run install commands in background mode and confirm via logs
|
|
36
|
-
|
|
37
|
-
5. **Validate before handoff**
|
|
38
|
-
- Check mobile/tablet/desktop behavior
|
|
39
|
-
- Verify contrast and focus states
|
|
40
|
-
- Show preview, gather feedback, iterate
|
|
41
|
-
|
|
42
|
-
## Core Principles
|
|
43
|
-
|
|
44
|
-
### 1. Universal Frontend Scope
|
|
45
|
-
This skill is not only for landing pages. Apply it to marketing sites, product pages, dashboards, and full web app screens.
|
|
46
|
-
|
|
47
|
-
### 2. Distinct Visual Direction
|
|
48
|
-
Avoid generic template outputs. Make deliberate choices in typography, spacing rhythm, and layout structure.
|
|
49
|
-
|
|
50
|
-
### 3. No Forced Component Catalog
|
|
51
|
-
Do not rely on a single external component catalog as a default workflow. Use the project's own design language first.
|
|
52
|
-
|
|
53
|
-
### 4. Reuse Before Reinventing
|
|
54
|
-
Prefer existing components and tokens; extend them only where needed to keep UI consistent.
|
|
55
|
-
|
|
56
|
-
### 5. Responsive by Default
|
|
57
|
-
Design for small screens first, then scale up without breaking hierarchy and readability.
|
|
58
|
-
|
|
59
|
-
## Font Guidelines
|
|
60
|
-
|
|
61
|
-
**NEVER use the Bitcount font** — it is a Strayl branding font and must not be used in user projects.
|
|
62
|
-
|
|
63
|
-
**Avoid generic defaults** — Do NOT default to System UI, Inter, Arial, Helvetica, or other overused fonts. Every project deserves a distinctive typographic identity.
|
|
64
|
-
|
|
65
|
-
**Be creative and intentional** — Pick fonts that match the project's personality and aesthetic direction. Experiment with interesting pairings. Examples of strong choices:
|
|
66
|
-
- **Editorial / luxury**: Playfair Display, Cormorant, Fraunces, Libre Baskerville
|
|
67
|
-
- **Modern / clean**: Space Grotesk, General Sans, Outfit, Plus Jakarta Sans, Sora
|
|
68
|
-
- **Bold / statement**: Clash Display, Cabinet Grotesk, Unbounded, Familjen Grotesk
|
|
69
|
-
- **Geometric**: DM Sans, Manrope, Satoshi, Urbanist
|
|
70
|
-
- **Playful / warm**: Bricolage Grotesque, Instrument Sans, Lora, Crimson Pro
|
|
71
|
-
- **Monospace accent**: JetBrains Mono, Fira Code, IBM Plex Mono, Space Mono
|
|
72
|
-
|
|
73
|
-
Use Google Fonts CDN or fontsource for font loading. Always pick a display + body pair that complement each other.
|
|
74
|
-
|
|
75
|
-
## Technical Guidelines
|
|
76
|
-
|
|
77
|
-
- For simple sites, start with `src/routes/index.tsx`.
|
|
78
|
-
- For app features, edit the route/component relevant to the request.
|
|
79
|
-
- Extract reusable UI into `src/components/`.
|
|
80
|
-
- Keep style tokens centralized in `src/styles.css` and route shell files.
|
|
81
|
-
|
|
82
|
-
## Image Generation
|
|
83
|
-
|
|
84
|
-
**Proactively generate images** when the design calls for visual content (hero images, backgrounds, illustrations, icons, product shots). Do NOT use placeholder boxes or Lorem-style image URLs — generate real images instead.
|
|
85
|
-
|
|
86
|
-
**When to generate:**
|
|
87
|
-
- The user asks to build a page/section that naturally needs imagery (hero, about, features, gallery) and has NOT provided their own images or URLs
|
|
88
|
-
- The design would look incomplete or broken without visual content
|
|
89
|
-
- The user explicitly asks for images or illustrations
|
|
90
|
-
|
|
91
|
-
**When NOT to generate:**
|
|
92
|
-
- The user provided their own images, URLs, or assets
|
|
93
|
-
- The section works well with icons, gradients, or pure typography (no image needed)
|
|
94
|
-
- The user explicitly said to skip images or use placeholders
|
|
95
|
-
|
|
96
|
-
**How:**
|
|
97
|
-
- Use `generate_image` — up to 10 images per call, with descriptive prompts and appropriate aspect ratios
|
|
98
|
-
- Write detailed prompts: describe style, mood, colors, subject — not just "hero image"
|
|
99
|
-
- Match aspect ratios to layout: `16:9` for hero banners, `1:1` for cards/avatars, `3:4` for portraits
|
|
100
|
-
- Use `analyze_image` to understand user-provided mockups or screenshots before designing
|
|
101
|
-
|
|
102
|
-
## Workflow Checklist
|
|
103
|
-
|
|
104
|
-
- [ ] Confirmed goal, screens, and visual direction
|
|
105
|
-
- [ ] Defined typography and color/token system
|
|
106
|
-
- [ ] Implemented responsive layout and key states
|
|
107
|
-
- [ ] Reused existing components where possible
|
|
108
|
-
- [ ] Previewed and iterated with user feedback
|
|
1
|
+
---
|
|
2
|
+
name: frontend-design
|
|
3
|
+
description: Design and implement distinctive frontend UI for landing pages and web applications. Use when users ask for visual direction, layout, styling, component composition, or UX polish.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Frontend Design
|
|
7
|
+
|
|
8
|
+
## When to Use
|
|
9
|
+
|
|
10
|
+
- After scaffolding with `landing-creation` or `web-application-creation`
|
|
11
|
+
- User asks to design, style, polish, or redesign UI
|
|
12
|
+
- User wants new screens/sections (hero, pricing, dashboard, settings, auth pages, etc.)
|
|
13
|
+
- User asks for a specific aesthetic direction (minimal, bold, editorial, brutalist, retro, corporate)
|
|
14
|
+
|
|
15
|
+
## Workflow
|
|
16
|
+
|
|
17
|
+
1. **Clarify intent quickly**
|
|
18
|
+
- Product/site goal and audience
|
|
19
|
+
- Required screens/sections
|
|
20
|
+
- Preferred visual direction and color constraints
|
|
21
|
+
|
|
22
|
+
2. **Define the visual system first**
|
|
23
|
+
- Typography pair (display + body) — see **Font Guidelines** below
|
|
24
|
+
- Color tokens via CSS variables
|
|
25
|
+
- Spacing, radius, shadow, and motion rules
|
|
26
|
+
|
|
27
|
+
3. **Compose the layout**
|
|
28
|
+
- For landing pages: nav, hero, proof, features, CTA, footer
|
|
29
|
+
- For apps: app shell, primary user flow, settings/forms, data states
|
|
30
|
+
- Add meaningful empty/loading/error states where relevant
|
|
31
|
+
|
|
32
|
+
4. **Implement pragmatically**
|
|
33
|
+
- Reuse existing project components before adding new dependencies
|
|
34
|
+
- Add new UI components only when the current set cannot cover the requirement
|
|
35
|
+
- Run install commands in background mode and confirm via logs
|
|
36
|
+
|
|
37
|
+
5. **Validate before handoff**
|
|
38
|
+
- Check mobile/tablet/desktop behavior
|
|
39
|
+
- Verify contrast and focus states
|
|
40
|
+
- Show preview, gather feedback, iterate
|
|
41
|
+
|
|
42
|
+
## Core Principles
|
|
43
|
+
|
|
44
|
+
### 1. Universal Frontend Scope
|
|
45
|
+
This skill is not only for landing pages. Apply it to marketing sites, product pages, dashboards, and full web app screens.
|
|
46
|
+
|
|
47
|
+
### 2. Distinct Visual Direction
|
|
48
|
+
Avoid generic template outputs. Make deliberate choices in typography, spacing rhythm, and layout structure.
|
|
49
|
+
|
|
50
|
+
### 3. No Forced Component Catalog
|
|
51
|
+
Do not rely on a single external component catalog as a default workflow. Use the project's own design language first.
|
|
52
|
+
|
|
53
|
+
### 4. Reuse Before Reinventing
|
|
54
|
+
Prefer existing components and tokens; extend them only where needed to keep UI consistent.
|
|
55
|
+
|
|
56
|
+
### 5. Responsive by Default
|
|
57
|
+
Design for small screens first, then scale up without breaking hierarchy and readability.
|
|
58
|
+
|
|
59
|
+
## Font Guidelines
|
|
60
|
+
|
|
61
|
+
**NEVER use the Bitcount font** — it is a Strayl branding font and must not be used in user projects.
|
|
62
|
+
|
|
63
|
+
**Avoid generic defaults** — Do NOT default to System UI, Inter, Arial, Helvetica, or other overused fonts. Every project deserves a distinctive typographic identity.
|
|
64
|
+
|
|
65
|
+
**Be creative and intentional** — Pick fonts that match the project's personality and aesthetic direction. Experiment with interesting pairings. Examples of strong choices:
|
|
66
|
+
- **Editorial / luxury**: Playfair Display, Cormorant, Fraunces, Libre Baskerville
|
|
67
|
+
- **Modern / clean**: Space Grotesk, General Sans, Outfit, Plus Jakarta Sans, Sora
|
|
68
|
+
- **Bold / statement**: Clash Display, Cabinet Grotesk, Unbounded, Familjen Grotesk
|
|
69
|
+
- **Geometric**: DM Sans, Manrope, Satoshi, Urbanist
|
|
70
|
+
- **Playful / warm**: Bricolage Grotesque, Instrument Sans, Lora, Crimson Pro
|
|
71
|
+
- **Monospace accent**: JetBrains Mono, Fira Code, IBM Plex Mono, Space Mono
|
|
72
|
+
|
|
73
|
+
Use Google Fonts CDN or fontsource for font loading. Always pick a display + body pair that complement each other.
|
|
74
|
+
|
|
75
|
+
## Technical Guidelines
|
|
76
|
+
|
|
77
|
+
- For simple sites, start with `src/routes/index.tsx`.
|
|
78
|
+
- For app features, edit the route/component relevant to the request.
|
|
79
|
+
- Extract reusable UI into `src/components/`.
|
|
80
|
+
- Keep style tokens centralized in `src/styles.css` and route shell files.
|
|
81
|
+
|
|
82
|
+
## Image Generation
|
|
83
|
+
|
|
84
|
+
**Proactively generate images** when the design calls for visual content (hero images, backgrounds, illustrations, icons, product shots). Do NOT use placeholder boxes or Lorem-style image URLs — generate real images instead.
|
|
85
|
+
|
|
86
|
+
**When to generate:**
|
|
87
|
+
- The user asks to build a page/section that naturally needs imagery (hero, about, features, gallery) and has NOT provided their own images or URLs
|
|
88
|
+
- The design would look incomplete or broken without visual content
|
|
89
|
+
- The user explicitly asks for images or illustrations
|
|
90
|
+
|
|
91
|
+
**When NOT to generate:**
|
|
92
|
+
- The user provided their own images, URLs, or assets
|
|
93
|
+
- The section works well with icons, gradients, or pure typography (no image needed)
|
|
94
|
+
- The user explicitly said to skip images or use placeholders
|
|
95
|
+
|
|
96
|
+
**How:**
|
|
97
|
+
- Use `generate_image` — up to 10 images per call, with descriptive prompts and appropriate aspect ratios
|
|
98
|
+
- Write detailed prompts: describe style, mood, colors, subject — not just "hero image"
|
|
99
|
+
- Match aspect ratios to layout: `16:9` for hero banners, `1:1` for cards/avatars, `3:4` for portraits
|
|
100
|
+
- Use `analyze_image` to understand user-provided mockups or screenshots before designing
|
|
101
|
+
|
|
102
|
+
## Workflow Checklist
|
|
103
|
+
|
|
104
|
+
- [ ] Confirmed goal, screens, and visual direction
|
|
105
|
+
- [ ] Defined typography and color/token system
|
|
106
|
+
- [ ] Implemented responsive layout and key states
|
|
107
|
+
- [ ] Reused existing components where possible
|
|
108
|
+
- [ ] Previewed and iterated with user feedback
|
|
@@ -1,125 +1,125 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: landing-creation
|
|
3
|
-
description: Initialize a new landing page from the Strayl landing template using npx create-strayl-landing. Use when the user wants a single-page site, landing page, or marketing page — NOT a full web application with multiple routes and complex state.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Landing Page Creation
|
|
7
|
-
|
|
8
|
-
## When to Use
|
|
9
|
-
|
|
10
|
-
- User asks to create a landing page, marketing page, or single-page site
|
|
11
|
-
- User says something like "create a site", "make me a landing page", "build a website", "create a homepage"
|
|
12
|
-
- User wants a simple promotional or presentation page (not a multi-page app with forms, auth, dashboards)
|
|
13
|
-
- The workspace repository is empty and the user's request implies a simple site rather than a full application
|
|
14
|
-
|
|
15
|
-
## When NOT to Use (use `web-application-creation` instead)
|
|
16
|
-
|
|
17
|
-
- User explicitly asks for a "web app", "application", "dashboard", "admin panel"
|
|
18
|
-
- User needs multiple routes, forms, data handling, state management, i18n
|
|
19
|
-
- User describes features like authentication, CRUD, API integration, database
|
|
20
|
-
- User wants 50+ UI components out of the box
|
|
21
|
-
|
|
22
|
-
## Workflow
|
|
23
|
-
|
|
24
|
-
1. **Ask the user for the site name** before running any commands. The name will be used as the project directory name.
|
|
25
|
-
2. **Run the scaffolding command** in the repository root:
|
|
26
|
-
```
|
|
27
|
-
npx -y create-strayl-landing@latest --name {site-name}
|
|
28
|
-
```
|
|
29
|
-
3. **Install dependencies:**
|
|
30
|
-
```
|
|
31
|
-
cd {site-name} && npm install
|
|
32
|
-
```
|
|
33
|
-
4. **Start the dev server** in background mode:
|
|
34
|
-
```
|
|
35
|
-
cd {site-name} && npm run dev
|
|
36
|
-
```
|
|
37
|
-
5. **Check logs** to confirm the server started successfully (look for "ready" or "listening on port").
|
|
38
|
-
6. **Show preview** to the user with `showPreview`.
|
|
39
|
-
|
|
40
|
-
7. **🔴 REQUIRED: Read and follow the design skill** — After showing preview, you MUST immediately:
|
|
41
|
-
```
|
|
42
|
-
read_file("/skills/frontend-design/SKILL.md")
|
|
43
|
-
```
|
|
44
|
-
Then follow the design skill's workflow to build out the landing page content. Do NOT stop after showing the preview — the scaffolding is just the starting point.
|
|
45
|
-
|
|
46
|
-
## After Scaffolding
|
|
47
|
-
|
|
48
|
-
**IMPORTANT:** Scaffolding creates an empty template. Your job is not done after `showPreview`. You MUST continue to the `frontend-design` skill to actually build the landing page content (hero, features, sections, etc.) based on the user's request.
|
|
49
|
-
|
|
50
|
-
## Template Stack
|
|
51
|
-
|
|
52
|
-
| Layer | Technology |
|
|
53
|
-
|-------|------------|
|
|
54
|
-
| Framework | React 19.2 + TanStack Start |
|
|
55
|
-
| Bundler | Vite 7.1 |
|
|
56
|
-
| Language | TypeScript 5.7 (strict mode) |
|
|
57
|
-
| Routing | TanStack Router (file-based) |
|
|
58
|
-
| Styling | Tailwind CSS 4.0 + CSS custom properties |
|
|
59
|
-
| UI Components | shadcn/ui (install as needed) |
|
|
60
|
-
| Icons | Lucide React |
|
|
61
|
-
| Theming | next-themes (light/dark + system default) |
|
|
62
|
-
| Fonts | Geist, Geist Mono (Google CDN) |
|
|
63
|
-
| Server | Nitro |
|
|
64
|
-
|
|
65
|
-
## Project Structure
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
{site-name}/
|
|
69
|
-
├── public/
|
|
70
|
-
│ ├── favicon.ico
|
|
71
|
-
│ ├── logo-dark.webp
|
|
72
|
-
│ └── logo-light.webp
|
|
73
|
-
├── src/
|
|
74
|
-
│ ├── components/
|
|
75
|
-
│ │ ├── ui/
|
|
76
|
-
│ │ │ └── button.tsx # Button component (7 variants, 6 sizes)
|
|
77
|
-
│ │ ├── theme-provider.tsx # Theme provider (light/dark/system)
|
|
78
|
-
│ │ └── themed-logo.tsx # Theme-aware logo
|
|
79
|
-
│ ├── lib/
|
|
80
|
-
│ │ └── utils.ts # cn() — class merging utility
|
|
81
|
-
│ ├── routes/
|
|
82
|
-
│ │ ├── __root.tsx # Root layout (fonts, meta, ThemeProvider)
|
|
83
|
-
│ │ ├── index.tsx # Home page (single landing page)
|
|
84
|
-
│ │ └── routeTree.gen.ts # Auto-generated route tree
|
|
85
|
-
│ ├── router.tsx # Router configuration
|
|
86
|
-
│ └── styles.css # Global styles + CSS custom properties
|
|
87
|
-
├── package.json
|
|
88
|
-
├── tsconfig.json
|
|
89
|
-
├── vite.config.ts
|
|
90
|
-
└── components.json # shadcn/ui configuration
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
## Key Features
|
|
94
|
-
|
|
95
|
-
- **Theming** — Light/dark mode via CSS custom properties. Semantic tokens: `primary`, `secondary`, `accent`, `destructive`, `muted`, `info`, `success`, `warning`. Light background `#f5f5f5`, dark background `#171717`.
|
|
96
|
-
- **Button component** — Simple button with CVA variants (`default`, `destructive`, `outline`, `ghost`, `secondary`, `link`) and sizes (`sm`, `default`, `lg`, `icon`).
|
|
97
|
-
- **Hydration safety** — Components check `mounted` state before rendering theme-dependent UI, preventing SSR mismatches.
|
|
98
|
-
- **Minimal footprint** — Only 3 components (Button, ThemeProvider, ThemedLogo) and a single page. No bloat.
|
|
99
|
-
- **Extensible** — Add new components via `npx shadcn@latest add <component>`. Add pages by creating files in `src/routes/`.
|
|
100
|
-
|
|
101
|
-
## Default Page Content
|
|
102
|
-
|
|
103
|
-
The template ships with a single page (`/`) containing:
|
|
104
|
-
- "STRAYL" heading (responsive sizing)
|
|
105
|
-
- "Landing page template" subheading
|
|
106
|
-
- "Get Started" CTA button with themed logo
|
|
107
|
-
- Full-height centered layout
|
|
108
|
-
|
|
109
|
-
## Architecture
|
|
110
|
-
|
|
111
|
-
- **Root layout** (`__root.tsx`) — Uses `shellComponent` for HTML shell. Geist fonts via Google Fonts CDN, ThemeProvider wrapper. Same pattern as `web-application-creation` template.
|
|
112
|
-
- **Routing** — File-based via TanStack Router. Files in `src/routes/` become routes automatically.
|
|
113
|
-
- **SSR** — Supported via TanStack React Start + Nitro.
|
|
114
|
-
- **Path alias** — `@/*` maps to `./src/*`.
|
|
115
|
-
- **`cn()`** — Utility combining clsx + tailwind-merge for conflict-free class merging.
|
|
116
|
-
- **Button** — Standard React button component. For link buttons, wrap with an anchor or use Tailwind classes directly.
|
|
117
|
-
|
|
118
|
-
## Best Practices
|
|
119
|
-
|
|
120
|
-
- **Do NOT** use `npm create`, `npx create-vite`, or other scaffolding tools. Always use `npx -y create-strayl-landing@latest`.
|
|
121
|
-
- Always use the `--name` flag to specify the site name.
|
|
122
|
-
- After creation, work inside the `{site-name}/` directory for all file edits.
|
|
123
|
-
- Start editing from `src/routes/index.tsx` (the landing page).
|
|
124
|
-
- Add new UI components via `npx shadcn@latest add <component>` rather than installing separate UI libraries.
|
|
125
|
-
- This is a landing page template — keep it simple. For complex multi-page apps, use the `web-application-creation` skill instead.
|
|
1
|
+
---
|
|
2
|
+
name: landing-creation
|
|
3
|
+
description: Initialize a new landing page from the Strayl landing template using npx create-strayl-landing. Use when the user wants a single-page site, landing page, or marketing page — NOT a full web application with multiple routes and complex state.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Landing Page Creation
|
|
7
|
+
|
|
8
|
+
## When to Use
|
|
9
|
+
|
|
10
|
+
- User asks to create a landing page, marketing page, or single-page site
|
|
11
|
+
- User says something like "create a site", "make me a landing page", "build a website", "create a homepage"
|
|
12
|
+
- User wants a simple promotional or presentation page (not a multi-page app with forms, auth, dashboards)
|
|
13
|
+
- The workspace repository is empty and the user's request implies a simple site rather than a full application
|
|
14
|
+
|
|
15
|
+
## When NOT to Use (use `web-application-creation` instead)
|
|
16
|
+
|
|
17
|
+
- User explicitly asks for a "web app", "application", "dashboard", "admin panel"
|
|
18
|
+
- User needs multiple routes, forms, data handling, state management, i18n
|
|
19
|
+
- User describes features like authentication, CRUD, API integration, database
|
|
20
|
+
- User wants 50+ UI components out of the box
|
|
21
|
+
|
|
22
|
+
## Workflow
|
|
23
|
+
|
|
24
|
+
1. **Ask the user for the site name** before running any commands. The name will be used as the project directory name.
|
|
25
|
+
2. **Run the scaffolding command** in the repository root:
|
|
26
|
+
```
|
|
27
|
+
npx -y create-strayl-landing@latest --name {site-name}
|
|
28
|
+
```
|
|
29
|
+
3. **Install dependencies:**
|
|
30
|
+
```
|
|
31
|
+
cd {site-name} && npm install
|
|
32
|
+
```
|
|
33
|
+
4. **Start the dev server** in background mode:
|
|
34
|
+
```
|
|
35
|
+
cd {site-name} && npm run dev
|
|
36
|
+
```
|
|
37
|
+
5. **Check logs** to confirm the server started successfully (look for "ready" or "listening on port").
|
|
38
|
+
6. **Show preview** to the user with `showPreview`.
|
|
39
|
+
|
|
40
|
+
7. **🔴 REQUIRED: Read and follow the design skill** — After showing preview, you MUST immediately:
|
|
41
|
+
```
|
|
42
|
+
read_file("/skills/frontend-design/SKILL.md")
|
|
43
|
+
```
|
|
44
|
+
Then follow the design skill's workflow to build out the landing page content. Do NOT stop after showing the preview — the scaffolding is just the starting point.
|
|
45
|
+
|
|
46
|
+
## After Scaffolding
|
|
47
|
+
|
|
48
|
+
**IMPORTANT:** Scaffolding creates an empty template. Your job is not done after `showPreview`. You MUST continue to the `frontend-design` skill to actually build the landing page content (hero, features, sections, etc.) based on the user's request.
|
|
49
|
+
|
|
50
|
+
## Template Stack
|
|
51
|
+
|
|
52
|
+
| Layer | Technology |
|
|
53
|
+
|-------|------------|
|
|
54
|
+
| Framework | React 19.2 + TanStack Start |
|
|
55
|
+
| Bundler | Vite 7.1 |
|
|
56
|
+
| Language | TypeScript 5.7 (strict mode) |
|
|
57
|
+
| Routing | TanStack Router (file-based) |
|
|
58
|
+
| Styling | Tailwind CSS 4.0 + CSS custom properties |
|
|
59
|
+
| UI Components | shadcn/ui (install as needed) |
|
|
60
|
+
| Icons | Lucide React |
|
|
61
|
+
| Theming | next-themes (light/dark + system default) |
|
|
62
|
+
| Fonts | Geist, Geist Mono (Google CDN) |
|
|
63
|
+
| Server | Nitro |
|
|
64
|
+
|
|
65
|
+
## Project Structure
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
{site-name}/
|
|
69
|
+
├── public/
|
|
70
|
+
│ ├── favicon.ico
|
|
71
|
+
│ ├── logo-dark.webp
|
|
72
|
+
│ └── logo-light.webp
|
|
73
|
+
├── src/
|
|
74
|
+
│ ├── components/
|
|
75
|
+
│ │ ├── ui/
|
|
76
|
+
│ │ │ └── button.tsx # Button component (7 variants, 6 sizes)
|
|
77
|
+
│ │ ├── theme-provider.tsx # Theme provider (light/dark/system)
|
|
78
|
+
│ │ └── themed-logo.tsx # Theme-aware logo
|
|
79
|
+
│ ├── lib/
|
|
80
|
+
│ │ └── utils.ts # cn() — class merging utility
|
|
81
|
+
│ ├── routes/
|
|
82
|
+
│ │ ├── __root.tsx # Root layout (fonts, meta, ThemeProvider)
|
|
83
|
+
│ │ ├── index.tsx # Home page (single landing page)
|
|
84
|
+
│ │ └── routeTree.gen.ts # Auto-generated route tree
|
|
85
|
+
│ ├── router.tsx # Router configuration
|
|
86
|
+
│ └── styles.css # Global styles + CSS custom properties
|
|
87
|
+
├── package.json
|
|
88
|
+
├── tsconfig.json
|
|
89
|
+
├── vite.config.ts
|
|
90
|
+
└── components.json # shadcn/ui configuration
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Key Features
|
|
94
|
+
|
|
95
|
+
- **Theming** — Light/dark mode via CSS custom properties. Semantic tokens: `primary`, `secondary`, `accent`, `destructive`, `muted`, `info`, `success`, `warning`. Light background `#f5f5f5`, dark background `#171717`.
|
|
96
|
+
- **Button component** — Simple button with CVA variants (`default`, `destructive`, `outline`, `ghost`, `secondary`, `link`) and sizes (`sm`, `default`, `lg`, `icon`).
|
|
97
|
+
- **Hydration safety** — Components check `mounted` state before rendering theme-dependent UI, preventing SSR mismatches.
|
|
98
|
+
- **Minimal footprint** — Only 3 components (Button, ThemeProvider, ThemedLogo) and a single page. No bloat.
|
|
99
|
+
- **Extensible** — Add new components via `npx shadcn@latest add <component>`. Add pages by creating files in `src/routes/`.
|
|
100
|
+
|
|
101
|
+
## Default Page Content
|
|
102
|
+
|
|
103
|
+
The template ships with a single page (`/`) containing:
|
|
104
|
+
- "STRAYL" heading (responsive sizing)
|
|
105
|
+
- "Landing page template" subheading
|
|
106
|
+
- "Get Started" CTA button with themed logo
|
|
107
|
+
- Full-height centered layout
|
|
108
|
+
|
|
109
|
+
## Architecture
|
|
110
|
+
|
|
111
|
+
- **Root layout** (`__root.tsx`) — Uses `shellComponent` for HTML shell. Geist fonts via Google Fonts CDN, ThemeProvider wrapper. Same pattern as `web-application-creation` template.
|
|
112
|
+
- **Routing** — File-based via TanStack Router. Files in `src/routes/` become routes automatically.
|
|
113
|
+
- **SSR** — Supported via TanStack React Start + Nitro.
|
|
114
|
+
- **Path alias** — `@/*` maps to `./src/*`.
|
|
115
|
+
- **`cn()`** — Utility combining clsx + tailwind-merge for conflict-free class merging.
|
|
116
|
+
- **Button** — Standard React button component. For link buttons, wrap with an anchor or use Tailwind classes directly.
|
|
117
|
+
|
|
118
|
+
## Best Practices
|
|
119
|
+
|
|
120
|
+
- **Do NOT** use `npm create`, `npx create-vite`, or other scaffolding tools. Always use `npx -y create-strayl-landing@latest`.
|
|
121
|
+
- Always use the `--name` flag to specify the site name.
|
|
122
|
+
- After creation, work inside the `{site-name}/` directory for all file edits.
|
|
123
|
+
- Start editing from `src/routes/index.tsx` (the landing page).
|
|
124
|
+
- Add new UI components via `npx shadcn@latest add <component>` rather than installing separate UI libraries.
|
|
125
|
+
- This is a landing page template — keep it simple. For complex multi-page apps, use the `web-application-creation` skill instead.
|