Template Examples
Templates are complete, deployable applications that combine Next.js pages, serverless scripts, and API resources into a single package. These examples demonstrate how to build templates for different use cases, from simple dashboards to complex multi-component applications.
Each example shows the complete template structure, customization options, and deployment workflow.
Examples
Building a cryptocurrency portfolio dashboard
This example demonstrates a complete dashboard template that tracks cryptocurrency portfolios in real-time. The template includes a Next.js frontend, serverless scripts for data processing, and integrations with cryptocurrency price APIs.
Creating the template
Create the template using the POST /api/sdk/v1/templates endpoint:
Template structure
The template manifest defines all included components:
Customization configuration
Define customizable fields that users can configure during installation:
Building the template
Build the template to prepare it for deployment:
The build process compiles the Next.js application, validates all scripts, and verifies resource dependencies.
Publishing to marketplace
Make the template available to other users:
Result
The template appears in the marketplace with pricing information. Users can preview the template, check requirements, and install it with their custom configuration. You earn revenue from setup fees, monthly fees, and usage-based charges.
Creating an analytics dashboard
This example shows a simpler analytics dashboard template that demonstrates the minimum viable template structure. The template includes basic data visualization and metric tracking capabilities.
Template definition
Result
The template provides a clean starting point for analytics applications. Users can extend it with additional metrics, custom visualizations, and data sources.
Installing and Using Templates
Checking template requirements
Before installation, verify that all required resources are available:
The response indicates which resources need to be installed and whether the user has sufficient permissions and credits.
Installing a template
Install a template with custom configuration:
Installation creates a new instance of the template with the specified configuration. The platform deploys the Next.js page, provisions all scripts, and configures resource connections automatically.
Template repository structure
A complete template repository includes:
View a complete example: Example Template on GitHub
Managing Template Versions
Creating a new version
Release updates to your template:
Users with existing installations can upgrade to the new version. The platform handles migration of customization settings and data.
Version compatibility
Maintain backward compatibility when updating templates:
- Patch versions (1.0.1): Bug fixes only, no breaking changes
- Minor versions (1.1.0): New features, backward compatible
- Major versions (2.0.0): Breaking changes, may require user action
Document breaking changes clearly in the changelog to help users upgrade smoothly.
Best Practices
Template design principles
Build templates that are easy to install and customize:
✅ Do:
- Focus on a single, well-defined use case
- Provide sensible defaults for all customization fields
- Make customization optional—templates should work out of the box
- Include comprehensive README with screenshots
- Test all dependencies and resource integrations
- Document environment variables and configuration
- Provide example data or seed scripts
❌ Avoid:
- Overly complex templates with too many features
- Too many required resources (increases installation friction)
- Hard-coded values that should be customizable
- Poor error handling in scripts
- Missing or incomplete documentation
- Untested customization options
Pricing strategies
Choose a pricing model that reflects your template's value:
- Setup Fee: One-time cost for installation and initial configuration ($5-50)
- Monthly Fee: Recurring fee for hosting and maintenance ($2-20)
- Usage Cost: Based on script executions and API calls ($0.001-0.01 per use)
Consider your costs when setting prices. Include infrastructure, resource fees, and support overhead. Offer a free tier or trial period to encourage adoption.
Customization best practices
Design flexible customization options:
Group related settings, provide validation rules, and include helpful descriptions.
Testing checklist
Before publishing your template:
- Build locally: Test the build process with
npm run build - Test all scripts: Execute each script with sample data
- Verify resource access: Ensure all API integrations work
- Check customization: Test all customization options
- Test installation: Install the template in a clean environment
- Validate dependencies: Confirm all required resources are available
- Review documentation: Ensure README is complete and accurate
- Test upgrades: Verify version migration works correctly
Error handling in templates
Implement robust error handling in template scripts:
Return structured error responses with error codes to help users diagnose issues.
See also
- Templates - Complete template documentation
- Creating Templates - Step-by-step creation guide
- Script Examples - Building template scripts
- Resource Examples - Integrating resources in templates
- Template Best Practices - Advanced template patterns