bsmnt 0.2.0 → 0.2.5
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 +1 -1
- package/package.json +22 -5
- package/src/templates/next-default/.biome/plugins/no-anchor-element.grit +12 -0
- package/src/templates/next-default/.biome/plugins/no-relative-parent-imports.grit +10 -0
- package/src/templates/next-default/.biome/plugins/no-unnecessary-forwardref.grit +9 -0
- package/src/templates/next-default/.github/PULL_REQUEST_TEMPLATE.md +14 -0
- package/src/templates/next-default/.vscode/extensions.json +20 -0
- package/src/templates/next-default/.vscode/settings.json +105 -0
- package/src/templates/next-default/app/favicon.ico +0 -0
- package/src/templates/next-default/app/layout.tsx +104 -0
- package/src/templates/next-default/app/page.tsx +11 -0
- package/src/templates/next-default/app/robots.ts +15 -0
- package/src/templates/next-default/app/sitemap.ts +16 -0
- package/src/templates/next-default/biome.json +2 -2
- package/src/templates/next-default/components/layout/footer/index.tsx +31 -0
- package/src/templates/next-default/components/layout/header/index.tsx +9 -0
- package/src/templates/next-default/components/layout/theme/index.tsx +66 -0
- package/src/templates/next-default/components/layout/wrapper/index.tsx +63 -0
- package/src/templates/next-default/components/ui/README.md +77 -0
- package/src/templates/next-default/components/ui/image/README.md +37 -0
- package/src/templates/next-default/components/ui/image/index.tsx +219 -0
- package/src/templates/next-default/components/ui/link/index.tsx +152 -0
- package/src/templates/next-default/lib/utils/metadata.ts +26 -26
- package/src/templates/next-default/package.json +4 -4
- package/src/templates/next-default/public/fonts/geist/Geist-Mono.woff2 +0 -0
- package/src/templates/next-experiments/app/layout.tsx +18 -18
- package/src/templates/next-experiments/app/robots.ts +3 -3
- package/src/templates/next-experiments/app/sitemap.ts +4 -4
- package/src/templates/next-experiments/biome.json +2 -2
- package/src/templates/next-experiments/components/layout/theme/index.tsx +1 -1
- package/src/templates/next-experiments/components/layout/wrapper/index.tsx +7 -9
- package/src/templates/next-experiments/components/ui/image/index.tsx +39 -46
- package/src/templates/next-experiments/components/ui/link/index.tsx +6 -0
- package/src/templates/next-experiments/lib/utils/metadata.ts +26 -26
- package/src/templates/next-experiments/package.json +4 -4
- package/src/templates/next-webgl/app/layout.tsx +18 -18
- package/src/templates/next-webgl/app/robots.ts +3 -3
- package/src/templates/next-webgl/app/sitemap.ts +4 -4
- package/src/templates/next-webgl/biome.json +2 -2
- package/src/templates/next-webgl/components/layout/theme/index.tsx +1 -1
- package/src/templates/next-webgl/components/layout/wrapper/index.tsx +0 -2
- package/src/templates/next-webgl/components/ui/image/index.tsx +6 -11
- package/src/templates/next-webgl/components/ui/link/index.tsx +9 -2
- package/src/templates/next-webgl/components/webgl/components/scene/index.tsx +1 -0
- package/src/templates/next-webgl/lib/utils/metadata.ts +26 -26
- package/src/templates/next-webgl/package.json +4 -4
- package/src/templates/next-experiments/.cursor/rules/README.md +0 -184
- package/src/templates/next-experiments/.cursor/rules/architecture.mdc +0 -437
- package/src/templates/next-experiments/.cursor/rules/components.mdc +0 -436
- package/src/templates/next-experiments/.cursor/rules/integrations.mdc +0 -447
- package/src/templates/next-experiments/.cursor/rules/main.mdc +0 -278
- package/src/templates/next-experiments/.cursor/rules/styling.mdc +0 -433
- package/src/templates/next-experiments/.github/workflows/lighthouse-to-slack.yml +0 -136
- package/src/templates/next-webgl/.cursor/rules/README.md +0 -184
- package/src/templates/next-webgl/.cursor/rules/architecture.mdc +0 -437
- package/src/templates/next-webgl/.cursor/rules/components.mdc +0 -436
- package/src/templates/next-webgl/.cursor/rules/integrations.mdc +0 -447
- package/src/templates/next-webgl/.cursor/rules/main.mdc +0 -278
- package/src/templates/next-webgl/.cursor/rules/styling.mdc +0 -433
- package/src/templates/next-webgl/.github/workflows/lighthouse-to-slack.yml +0 -136
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
# Lighthouse Performance Reports
|
|
2
|
-
#
|
|
3
|
-
# Runs Lighthouse on Vercel deployments and posts results as commit comments.
|
|
4
|
-
# Our GitHub → Slack integration forwards these to Slack automatically.
|
|
5
|
-
#
|
|
6
|
-
# Required GitHub Secrets:
|
|
7
|
-
# VERCEL_TOKEN - Vercel API token (Settings → Tokens)
|
|
8
|
-
|
|
9
|
-
name: Lighthouse
|
|
10
|
-
|
|
11
|
-
on:
|
|
12
|
-
push:
|
|
13
|
-
branches: [main]
|
|
14
|
-
pull_request:
|
|
15
|
-
types: [opened, synchronize]
|
|
16
|
-
branches: [main]
|
|
17
|
-
paths:
|
|
18
|
-
# Only runs when relevant files change
|
|
19
|
-
- 'app/**'
|
|
20
|
-
- 'components/**'
|
|
21
|
-
- 'lib/**'
|
|
22
|
-
- 'public/**'
|
|
23
|
-
- 'package.json'
|
|
24
|
-
- 'package-lock.json'
|
|
25
|
-
- 'next.config.**'
|
|
26
|
-
|
|
27
|
-
permissions:
|
|
28
|
-
contents: write
|
|
29
|
-
pull-requests: write
|
|
30
|
-
actions: read
|
|
31
|
-
|
|
32
|
-
jobs:
|
|
33
|
-
lighthouse:
|
|
34
|
-
runs-on: ubuntu-latest
|
|
35
|
-
timeout-minutes: 10
|
|
36
|
-
|
|
37
|
-
steps:
|
|
38
|
-
- name: Discover Vercel Project
|
|
39
|
-
id: vercel_info
|
|
40
|
-
env:
|
|
41
|
-
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
|
42
|
-
run: |
|
|
43
|
-
project_name="${GITHUB_REPOSITORY##*/}"
|
|
44
|
-
echo "Looking for Vercel project: $project_name"
|
|
45
|
-
|
|
46
|
-
# Get team ID for basement.studio
|
|
47
|
-
teams=$(curl -s -H "Authorization: Bearer $VERCEL_TOKEN" "https://api.vercel.com/v2/teams")
|
|
48
|
-
team_id=$(echo "$teams" | jq -r '.teams[] | select(.slug=="basement") | .id')
|
|
49
|
-
echo "Team ID: $team_id"
|
|
50
|
-
|
|
51
|
-
# Get project ID by matching repo name
|
|
52
|
-
projects=$(curl -s -H "Authorization: Bearer $VERCEL_TOKEN" "https://api.vercel.com/v9/projects?teamId=$team_id")
|
|
53
|
-
project_id=$(echo "$projects" | jq -r ".projects[] | select(.name==\"$project_name\") | .id")
|
|
54
|
-
echo "Project ID: $project_id"
|
|
55
|
-
|
|
56
|
-
echo "team_id=$team_id" >> $GITHUB_OUTPUT
|
|
57
|
-
echo "project_id=$project_id" >> $GITHUB_OUTPUT
|
|
58
|
-
|
|
59
|
-
- name: Get Vercel Preview URL
|
|
60
|
-
id: vercel_url
|
|
61
|
-
uses: zentered/vercel-preview-url@v1.4.0
|
|
62
|
-
env:
|
|
63
|
-
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
|
64
|
-
with:
|
|
65
|
-
vercel_team_id: ${{ steps.vercel_info.outputs.team_id }}
|
|
66
|
-
vercel_project_id: ${{ steps.vercel_info.outputs.project_id }}
|
|
67
|
-
|
|
68
|
-
- name: Wait for Deployment
|
|
69
|
-
id: await
|
|
70
|
-
uses: UnlyEd/github-action-await-vercel@v2.0.0
|
|
71
|
-
env:
|
|
72
|
-
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
|
73
|
-
with:
|
|
74
|
-
deployment-url: ${{ steps.vercel_url.outputs.preview_url }}
|
|
75
|
-
timeout: 300
|
|
76
|
-
poll-interval: 10
|
|
77
|
-
continue-on-error: true
|
|
78
|
-
|
|
79
|
-
- name: Run Lighthouse
|
|
80
|
-
if: steps.await.outcome == 'success'
|
|
81
|
-
id: lighthouse
|
|
82
|
-
uses: treosh/lighthouse-ci-action@v12
|
|
83
|
-
env:
|
|
84
|
-
LHCI_BUILD_CONTEXT__CURRENT_HASH: ${{ github.sha }}
|
|
85
|
-
with:
|
|
86
|
-
urls: https://${{ steps.vercel_url.outputs.preview_url }}
|
|
87
|
-
uploadArtifacts: true
|
|
88
|
-
temporaryPublicStorage: true
|
|
89
|
-
|
|
90
|
-
- name: Format Results
|
|
91
|
-
id: format
|
|
92
|
-
uses: actions/github-script@v8
|
|
93
|
-
env:
|
|
94
|
-
DEPLOYMENT_FAILED: ${{ steps.await.outcome != 'success' }}
|
|
95
|
-
PREVIEW_URL: ${{ steps.vercel_url.outputs.preview_url }}
|
|
96
|
-
MANIFEST: ${{ steps.lighthouse.outputs.manifest }}
|
|
97
|
-
LINKS: ${{ steps.lighthouse.outputs.links }}
|
|
98
|
-
with:
|
|
99
|
-
script: |
|
|
100
|
-
if (process.env.DEPLOYMENT_FAILED === 'true') {
|
|
101
|
-
core.setOutput('comment', '⚠️ Vercel deployment failed or timed out. Lighthouse audit skipped.');
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
try {
|
|
106
|
-
const manifest = JSON.parse(process.env.MANIFEST);
|
|
107
|
-
const links = JSON.parse(process.env.LINKS);
|
|
108
|
-
const previewUrl = process.env.PREVIEW_URL;
|
|
109
|
-
|
|
110
|
-
const scores = manifest[0].summary;
|
|
111
|
-
const reportUrl = Object.values(links)[0];
|
|
112
|
-
|
|
113
|
-
const emoji = (score) => score >= 0.9 ? '🟢' : score >= 0.5 ? '🟠' : '🔴';
|
|
114
|
-
const format = (score) => Math.round(score * 100);
|
|
115
|
-
|
|
116
|
-
const comment = [
|
|
117
|
-
`⚡️ [Lighthouse report](${reportUrl}) for this commit:`,
|
|
118
|
-
'',
|
|
119
|
-
`${emoji(scores.performance)} Performance: ${format(scores.performance)}`,
|
|
120
|
-
`${emoji(scores.accessibility)} Accessibility: ${format(scores.accessibility)}`,
|
|
121
|
-
`${emoji(scores['best-practices'])} Best Practices: ${format(scores['best-practices'])}`,
|
|
122
|
-
`${emoji(scores.seo)} SEO: ${format(scores.seo)}`,
|
|
123
|
-
'',
|
|
124
|
-
`*Tested on [${previewUrl}](https://${previewUrl})*`
|
|
125
|
-
].join('\n');
|
|
126
|
-
|
|
127
|
-
core.setOutput('comment', comment);
|
|
128
|
-
} catch (error) {
|
|
129
|
-
console.error('Error:', error);
|
|
130
|
-
core.setOutput('comment', '⚠️ Failed to generate Lighthouse report. Check workflow logs.');
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
- name: Post Commit Comment
|
|
134
|
-
uses: peter-evans/commit-comment@v4
|
|
135
|
-
with:
|
|
136
|
-
body: ${{ steps.format.outputs.comment }}
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
# Cursor Rules Documentation
|
|
2
|
-
|
|
3
|
-
This directory contains consolidated Cursor AI rules for the Satus project. The rules are organized into 5 focused files for easy maintenance and efficient AI context loading.
|
|
4
|
-
|
|
5
|
-
## 📁 File Structure
|
|
6
|
-
|
|
7
|
-
### 1. `main.mdc` - Project Overview & Cross-Cutting Concerns
|
|
8
|
-
**Purpose**: High-level overview and concerns that apply across the entire project
|
|
9
|
-
|
|
10
|
-
**Contents**:
|
|
11
|
-
- Technology stack (Next.js 16+, React 19+, Tailwind v4, Biome, Bun)
|
|
12
|
-
- React 19+ new features (`<Activity />`, `useEffectEvent`, `cacheSignal`)
|
|
13
|
-
- Next.js 16 Cache Components gotchas and best practices
|
|
14
|
-
- File organization
|
|
15
|
-
- React Compiler & memoization guidelines (single source of truth)
|
|
16
|
-
- Image optimization guidelines (single source of truth)
|
|
17
|
-
- Development vs production guidelines (single source of truth)
|
|
18
|
-
- Core utility libraries (`@/utils`)
|
|
19
|
-
|
|
20
|
-
**When to reference**: Starting a new project, understanding the tech stack, cross-cutting concerns
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
### 2. `components.mdc` - React Component Patterns & WebGL
|
|
25
|
-
**Purpose**: All React component patterns including standard components and WebGL/Three.js
|
|
26
|
-
|
|
27
|
-
**Contents**:
|
|
28
|
-
- Component structure and imports
|
|
29
|
-
- Props interfaces and React 19 ref handling
|
|
30
|
-
- Forms and responsive design
|
|
31
|
-
- Performance best practices (code splitting)
|
|
32
|
-
- Error handling
|
|
33
|
-
- WebGL/Three.js setup and patterns
|
|
34
|
-
- React Three Fiber
|
|
35
|
-
- Drei components
|
|
36
|
-
- Custom shaders
|
|
37
|
-
- Animation and interaction
|
|
38
|
-
- Post-processing
|
|
39
|
-
|
|
40
|
-
**When to reference**: Building React components, creating WebGL experiences, working with Three.js
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
### 3. `styling.mdc` - CSS Modules & Tailwind CSS v4
|
|
45
|
-
**Purpose**: All styling approaches including CSS Modules and Tailwind CSS v4
|
|
46
|
-
|
|
47
|
-
**Contents**:
|
|
48
|
-
- CSS Modules (file naming, class naming, imports)
|
|
49
|
-
- Responsive design (viewport functions, breakpoints, grid system)
|
|
50
|
-
- Typography and colors
|
|
51
|
-
- Animations and transitions
|
|
52
|
-
- Tailwind CSS v4 (CSS-first configuration, theme variables, new features)
|
|
53
|
-
- 3D transforms, gradients, shadows
|
|
54
|
-
- New variants (composable, `starting`, `not-*`, `nth-*`)
|
|
55
|
-
- Custom extensions (`@utility`, `@variant`, `@plugin`)
|
|
56
|
-
- Breaking changes and migration
|
|
57
|
-
- Project-specific custom utilities (`b-*` classes)
|
|
58
|
-
- PostCSS functions
|
|
59
|
-
|
|
60
|
-
**When to reference**: Styling components, using Tailwind, creating responsive designs
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
### 4. `integrations.mdc` - Third-Party Integrations
|
|
65
|
-
**Purpose**: Guidelines for all third-party service integrations
|
|
66
|
-
|
|
67
|
-
**Contents**:
|
|
68
|
-
- **Sanity CMS**: Configuration, schema management, GROQ queries, visual editing, TypeScript generation, cacheSignal integration
|
|
69
|
-
- **Shopify**: API configuration, product management, cart operations, cacheSignal integration
|
|
70
|
-
- General best practices (environment variables, API resilience, error handling)
|
|
71
|
-
- Cache Components gotchas for integrations (user-specific data, real-time data)
|
|
72
|
-
- Type safety and performance
|
|
73
|
-
- Security and integration management
|
|
74
|
-
- Webhook handling
|
|
75
|
-
|
|
76
|
-
**When to reference**: Integrating with Sanity, Shopify, or other third-party services
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
### 5. `architecture.mdc` - Architecture Patterns & Best Practices
|
|
81
|
-
**Purpose**: Architectural patterns, state management, routing, and code quality guidelines
|
|
82
|
-
|
|
83
|
-
**Contents**:
|
|
84
|
-
- Type safety (TypeScript configuration)
|
|
85
|
-
- State management (React state, Zustand)
|
|
86
|
-
- Routing & navigation (Next.js App Router, Link component)
|
|
87
|
-
- Metadata & SEO
|
|
88
|
-
- Performance (server components, code splitting, caching)
|
|
89
|
-
- Cache Components (Next.js 16) - Suspense, invalidation, gotchas
|
|
90
|
-
- Security (environment variables, input validation, authentication)
|
|
91
|
-
- Testing & debugging (unit tests, debugging tools, error boundaries)
|
|
92
|
-
- Code quality (linting, formatting, code organization)
|
|
93
|
-
- Development workflow (package manager, git workflow, client/server boundaries)
|
|
94
|
-
|
|
95
|
-
**When to reference**: Architectural decisions, state management, routing patterns, code quality
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## 🎯 Quick Reference Guide
|
|
100
|
-
|
|
101
|
-
### I want to...
|
|
102
|
-
|
|
103
|
-
- **Start a new feature** → Read `main.mdc` for overview, then `architecture.mdc` for patterns
|
|
104
|
-
- **Build a React component** → `components.mdc`
|
|
105
|
-
- **Add WebGL/Three.js** → `components.mdc` § WebGL Components & Activity Integration
|
|
106
|
-
- **Style with CSS Modules** → `styling.mdc` § CSS Modules
|
|
107
|
-
- **Style with Tailwind** → `styling.mdc` § Tailwind CSS v4
|
|
108
|
-
- **Use custom utilities** → `styling.mdc` § Project-Specific Custom Utilities
|
|
109
|
-
- **Integrate Sanity CMS** → `integrations.mdc` § Sanity CMS Integration
|
|
110
|
-
- **Integrate Shopify** → `integrations.mdc` § Shopify Integration
|
|
111
|
-
- **Manage state** → `architecture.mdc` § State Management
|
|
112
|
-
- **Add routing** → `architecture.mdc` § Routing & Navigation
|
|
113
|
-
- **Optimize performance** → `architecture.mdc` § Performance
|
|
114
|
-
- **Handle security** → `architecture.mdc` § Security
|
|
115
|
-
- **Debug issues** → `architecture.mdc` § Testing & Debugging
|
|
116
|
-
- **Understand React Compiler** → `main.mdc` § React Compiler & Memoization
|
|
117
|
-
- **Handle images** → `main.mdc` § Image Optimization (`@/components/ui/image`)
|
|
118
|
-
- **Dev vs prod differences** → `main.mdc` § Development vs Production
|
|
119
|
-
- **Use utility functions** → `main.mdc` § Core Utility Libraries (`@/utils`)
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
## 📝 Maintenance Guidelines
|
|
124
|
-
|
|
125
|
-
### When Editing Rules
|
|
126
|
-
|
|
127
|
-
1. **Avoid Duplication**: If content applies to multiple areas, put it in `main.mdc` and reference it
|
|
128
|
-
2. **Use Cross-References**: Link to other sections instead of duplicating content
|
|
129
|
-
3. **Keep It Focused**: Each file should maintain its specific purpose
|
|
130
|
-
4. **Update Dates**: Update the "Last updated" date when making changes
|
|
131
|
-
5. **Check Dependencies**: When updating one file, check if related files need updates
|
|
132
|
-
|
|
133
|
-
### Example Cross-Reference Pattern
|
|
134
|
-
|
|
135
|
-
```markdown
|
|
136
|
-
<!-- In components.mdc -->
|
|
137
|
-
## Performance Optimization
|
|
138
|
-
See main.mdc § React Compiler & Memoization for optimization guidelines.
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
### Adding New Content
|
|
142
|
-
|
|
143
|
-
**Ask yourself**:
|
|
144
|
-
- Is this component-specific? → `components.mdc`
|
|
145
|
-
- Is this styling-related? → `styling.mdc`
|
|
146
|
-
- Is this an integration? → `integrations.mdc`
|
|
147
|
-
- Is this architectural? → `architecture.mdc`
|
|
148
|
-
- Is this cross-cutting? → `main.mdc`
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
## 🚀 For Developers
|
|
153
|
-
|
|
154
|
-
### Quick Setup
|
|
155
|
-
1. These rules are automatically loaded by Cursor AI
|
|
156
|
-
2. All files have `alwaysApply: true` in frontmatter
|
|
157
|
-
3. Files apply to: `*.tsx, *.jsx, *.css, *.js, *.ts`
|
|
158
|
-
|
|
159
|
-
### Contributing
|
|
160
|
-
When adding new guidelines:
|
|
161
|
-
1. Choose the appropriate file
|
|
162
|
-
2. Follow existing formatting patterns
|
|
163
|
-
3. Add clear examples
|
|
164
|
-
4. Update this README if needed
|
|
165
|
-
5. Keep content focused and actionable
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## 📊 File Statistics
|
|
170
|
-
|
|
171
|
-
| File | Purpose | Key Topics |
|
|
172
|
-
|------|---------|------------|
|
|
173
|
-
| `main.mdc` | Overview & Cross-cutting | Tech stack, React 19+ features, Cache Components, React Compiler, Images, Dev/Prod |
|
|
174
|
-
| `components.mdc` | React & WebGL | Components, Forms, WebGL, Three.js, Shaders, Activity |
|
|
175
|
-
| `styling.mdc` | All Styling | CSS Modules, Tailwind v4, Responsive, Custom utilities |
|
|
176
|
-
| `integrations.mdc` | Third-party Services | Sanity, Shopify, Cache Components, cacheSignal |
|
|
177
|
-
| `architecture.mdc` | Patterns & Quality | State, Routing, Performance, Cache Components, Security, Testing |
|
|
178
|
-
|
|
179
|
-
---
|
|
180
|
-
|
|
181
|
-
Last updated: 2026-01-26
|
|
182
|
-
|
|
183
|
-
For questions or suggestions about these rules, contact the development team.
|
|
184
|
-
|