- Notifications
You must be signed in to change notification settings - Fork4.6k
[WIP] Add formspree, clerk and react-admin templates to sites#10031
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:1.7.x
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
coderabbitaibot commentedJun 19, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
📝 WalkthroughWalkthroughThis change updates the configuration file responsible for site templates by appending three new template entries. Each entry includes metadata such as a unique key, name, tagline, use case, version, framework configuration, and placeholders for screenshot URLs. The "React Admin Dashboard" template defines specific environment variables, while the "Formspree" and "Clerk" templates currently have empty environment variable arrays. All new templates are categorized under the "STARTER" use case and have a score of 1. No existing templates are modified or removed, and there are no changes to function signatures or other exported entities. Possibly related PRs
📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (4)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat withCodeRabbit:
SupportNeed help? Create a ticket on oursupport page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
app/config/templates/site.php (3)
1418-1436
:Complete the template configuration for Formspree integration.The Formspree template appears incomplete:
- Wrong screenshot URLs: Using lynx gallery template URLs instead of Formspree-specific ones.
- Empty variables array: Formspree typically requires configuration variables (e.g., form endpoint, API key).
- Incomplete TODO items: Multiple TODO comments suggest this template needs further development.
Since this is a WIP template, consider adding typical Formspree environment variables:
- 'variables' => [] // TODO: Add env vars once added to template+ 'variables' => [+ [+ 'name' => 'VITE_FORMSPREE_ENDPOINT',+ 'description' => 'Your Formspree form endpoint',+ 'value' => '',+ 'placeholder' => 'https://formspree.io/f/your-form-id',+ 'required' => true,+ 'type' => 'text'+ ],+ ]And update the screenshot URLs:
- 'screenshotDark' => $url . '/images/sites/templates/gallery-for-lynx-dark.png', // TODO: Update this- 'screenshotLight' => $url . '/images/sites/templates/gallery-for-lynx-light.png', // TODO: Update this+ 'screenshotDark' => $url . '/images/sites/templates/template-for-formspree-dark.png',+ 'screenshotLight' => $url . '/images/sites/templates/template-for-formspree-light.png',
1437-1455
:Complete the template configuration for Clerk integration.The Clerk template configuration is incomplete:
- Wrong screenshot URLs: Using lynx gallery template URLs instead of Clerk-specific ones.
- Missing environment variables: Clerk integration typically requires API keys and configuration.
- Incomplete TODO items: Multiple TODO comments indicate this template needs completion.
Consider adding typical Clerk environment variables for Next.js:
- 'variables' => [] // TODO: Add the relevant variables for Clerk+ 'variables' => [+ [+ 'name' => 'NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY',+ 'description' => 'Your Clerk publishable key',+ 'value' => '',+ 'placeholder' => 'pk_test_...',+ 'required' => true,+ 'type' => 'text'+ ],+ [+ 'name' => 'CLERK_SECRET_KEY',+ 'description' => 'Your Clerk secret key',+ 'value' => '',+ 'placeholder' => 'sk_test_...',+ 'required' => true,+ 'type' => 'password'+ ],+ ]And update the screenshot URLs:
- 'screenshotDark' => $url . '/images/sites/templates/gallery-for-lynx-dark.png', // TODO: Update this- 'screenshotLight' => $url . '/images/sites/templates/gallery-for-lynx-light.png', // TODO: Update this+ 'screenshotDark' => $url . '/images/sites/templates/template-for-clerk-dark.png',+ 'screenshotLight' => $url . '/images/sites/templates/template-for-clerk-light.png',
1373-1455
:Consider the use case categorization for these templates.All three new templates use
UseCases::STARTER
with TODO comments questioning if they need new categories. Consider:
- React Admin Dashboard: Could fit better in a new
ADMIN
orDASHBOARD
category- Formspree: Could fit in a
FORMS
category or remain asSTARTER
- Clerk: Could fit in an
AUTH
category or remain asSTARTER
The current categorization works for now, but you might want to evaluate if new use case categories would provide better organization as more specialized templates are added.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/config/templates/site.php
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: Setup & Build Appwrite Image
- GitHub Check: Linter
- GitHub Check: Check if utopia-php/database changed
- GitHub Check: Setup & Build Appwrite Image
- GitHub Check: scan
app/config/templates/site.php Outdated
[ | ||
'key' => 'template-for-react-admin-dashboard', | ||
'name' => 'React Admin Dashboard', | ||
'tagline' => 'A React-based admin dashboard template with order management features.', | ||
'score' => 1, // 0 to 10 based on looks of screenshot (avoid 1,2,3,8,9,10 if possible) | ||
'useCases' => [UseCases::STARTER], // TODO: Check if this needs to have a new category | ||
'screenshotDark' => $url . '/images/sites/templates/gallery-for-lynx-dark.png', // TODO: Update this | ||
'screenshotLight' => $url . '/images/sites/templates/gallery-for-lynx-light.png', // TODO: Update this | ||
'frameworks' => [ | ||
getFramework('REACT', [ | ||
'providerRootDirectory' => './react/react-admin', | ||
'outputDirectory' => './dist', | ||
]), | ||
], | ||
'vcsProvider' => 'github', | ||
'providerRepositoryId' => 'templates-for-sites', | ||
'providerOwner' => 'appwrite', | ||
'providerVersion' => '0.4.*', | ||
'variables' => [ | ||
[ | ||
'name' => 'APPWRITE_SITE_API_ENDPOINT', // TODO: Update this | ||
'description' => 'Endpoint of Appwrite server', | ||
'value' => '{apiEndpoint}', | ||
'placeholder' => '{apiEndpoint}', | ||
'required' => true, | ||
'type' => 'text' | ||
], | ||
[ | ||
'name' => 'APPWRITE_SITE_PROJECT_ID', // TODO: Update this | ||
'description' => 'Your Appwrite project ID', | ||
'value' => '{projectId}', | ||
'placeholder' => '{projectId}', | ||
'required' => true, | ||
'type' => 'text' | ||
], | ||
[ | ||
'name' => 'VITE_APPWRITE_PROJECT_NAME', // TODO: Update this | ||
'description' => 'Your Appwrite project name', | ||
'value' => '{projectName}', | ||
'placeholder' => '{projectName}', | ||
'required' => true, | ||
'type' => 'text' | ||
], | ||
] | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fix inconsistent environment variable naming and placeholder screenshot URLs.
Several issues need attention in the React Admin Dashboard template:
- Inconsistent variable naming: The variables mix
APPWRITE_SITE_*
andVITE_*
prefixes, which doesn't follow the pattern used by other React templates. - Wrong screenshot URLs: Both URLs point to the lynx gallery template instead of this template's screenshots.
- Incomplete TODO items: Several TODO comments indicate this template configuration is incomplete.
For consistency with other React templates, update the environment variables:
- 'name' => 'APPWRITE_SITE_API_ENDPOINT', // TODO: Update this+ 'name' => 'VITE_APPWRITE_ENDPOINT', 'description' => 'Endpoint of Appwrite server', 'value' => '{apiEndpoint}', 'placeholder' => '{apiEndpoint}', 'required' => true, 'type' => 'text' ], [- 'name' => 'APPWRITE_SITE_PROJECT_ID', // TODO: Update this+ 'name' => 'VITE_APPWRITE_PROJECT_ID', 'description' => 'Your Appwrite project ID', 'value' => '{projectId}', 'placeholder' => '{projectId}', 'required' => true, 'type' => 'text' ], [ 'name' => 'VITE_APPWRITE_PROJECT_NAME', // TODO: Update this
And update the screenshot URLs to point to the correct template images:
- 'screenshotDark' => $url . '/images/sites/templates/gallery-for-lynx-dark.png', // TODO: Update this- 'screenshotLight' => $url . '/images/sites/templates/gallery-for-lynx-light.png', // TODO: Update this+ 'screenshotDark' => $url . '/images/sites/templates/template-for-react-admin-dashboard-dark.png',+ 'screenshotLight' => $url . '/images/sites/templates/template-for-react-admin-dashboard-light.png',
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In app/config/templates/site.php from lines 1373 to 1417, fix the React AdminDashboard template by standardizing environment variable names to use the sameprefix pattern as other React templates, replacing the mixed APPWRITE_SITE_* andVITE_* prefixes with a consistent one. Also, update the screenshotDark andscreenshotLight URLs to point to the correct React Admin Dashboard imagesinstead of the lynx gallery images. Finally, remove or complete the TODOcomments to finalize the template configuration.
github-actionsbot commentedJun 19, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Security Scan Results for PRDocker Image Scan Results
Source Code Scan Results🎉 No vulnerabilities found! |
github-actionsbot commentedJun 19, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✨ Benchmark results
⚡ Benchmark Comparison
|
What does this PR do?
Add formspree, clerk and react-admin templates to sites
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Screenshots may also be helpful.)
Related PRs and Issues
Checklist