-
Notifications
You must be signed in to change notification settings - Fork 139
feat(site): add templates #3567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR Review: Add Templates FeatureOverviewThis PR introduces a template/example registry system that consolidates example metadata and creates a browsable templates page on the website. The implementation moves from a manually-maintained examples list to a generated system that reads metadata from each example's package.json. ✅ Strengths1. Well-structured architecture
2. Good developer experience
3. Clean UI implementation
🔍 Issues & RecommendationsCritical Issues1. Missing validation for technologies/tags constants The example-registry package exports TECHNOLOGIES and TAGS constants, but the build script doesn't validate that template metadata only uses values from these constants. This could lead to:
Recommendation: Add validation in build.ts to verify all technologies and tags used in templates are defined in the constants. 2. Inconsistent template metadata Looking at the diff:
Recommendation: Audit all examples and ensure technologies accurately reflect dependencies. Consider auto-detecting technologies from package.json dependencies. Medium Priority Issues3. Hardcoded path assumptions At website/src/app/(v2)/(marketing)/templates/[slug]/page.tsx:39-45: const readmePath = path.join(
process.cwd(),
"..",
"examples",
templateName,
"README.md",
);Using relative paths from process.cwd() is fragile and assumes a specific monorepo structure. This will break if the build context changes. Recommendation: Use a consistent path resolution approach or make the examples path configurable. 4. Silent failures for missing READMEs At build.ts:75-76, warnings for missing READMEs are swallowed. Templates without documentation aren't very useful. Recommendation: Make README.md required, or make it configurable whether to fail the build on missing READMEs. 5. No graceful handling of build failures TemplatesPageClient.tsx imports from @/data/templates/shared which re-exports from example-registry. If the build step fails or hasn't run, this causes import errors rather than helpful messages. Minor Issues6. Unused migration scripts The scripts migrate-templates.ts and remove-rivet-tech.ts appear to be one-time migration scripts. Consider removing them or moving to a migrations/ archive folder. 7. Package.json build output mismatch The example-registry/package.json specifies dist/ outputs (main, module, types), but the build script only generates src/_gen.ts. The exports point to src/index.ts which works for TypeScript but won't work for the specified main/module fields. Recommendation: Either add a proper TypeScript build step or update package.json to remove dist references. 8. Brittle README parsing The README parsing at build.ts:62-68 assumes a specific format. Consider using a markdown parser or documenting the expected format. 📊 Test CoverageMissing tests for:
Recommendation: Add at least unit tests for the build script, especially error cases and validation. 🔒 Security ConsiderationsNo major security issues, but consider:
⚡ Performance ConsiderationsGenerally good:
📝 Code Quality & StyleFollows project conventions:
🎯 SummarySolid foundation, but needs refinement: Must Fix:
Should Fix: Nice to Have: 📋 Checklist for Author
Overall: Good architectural approach, but needs validation improvements and consistency fixes. Code quality is solid, but metadata accuracy and error handling need attention. Review by Claude Code |
735dd6f to
d7f4e0d
Compare
59757d7 to
cc69285
Compare
More templates
@rivetkit/cloudflare-workers
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
@rivetkit/engine-runner
@rivetkit/engine-runner-protocol
commit: |
cc69285 to
093ba9b
Compare
d7f4e0d to
f111198
Compare
91028de to
eb81abd
Compare
f111198 to
1add7bd
Compare
eb81abd to
2641cb4
Compare
1add7bd to
80590eb
Compare
80590eb to
3082543
Compare
3082543 to
4c36897
Compare

No description provided.