Contributing Templates
The Mastra community plays a vital role in creating templates that showcase innovative application patterns. This guide explains how to contribute your own templates to the Mastra ecosystem.
Template Contribution Process
1. Review Requirements
Before creating a template, ensure you understand:
- Templates Reference - Technical requirements and conventions
- Project Structure - Standard Mastra project organization
- Community guidelines and quality standards
2. Develop Your Template
Create your template following the established patterns:
- Focus on a specific use case or pattern
- Include comprehensive documentation
- Test thoroughly with fresh installations
- Follow all technical requirements
3. Submit for Review
Once your template is ready, submit it through our contribution form. Templates undergo an approval process to ensure quality and consistency.
Submission Guidelines
Template Criteria
We accept templates that:
- Demonstrate unique value - Show innovative use cases or patterns not covered by existing templates
- Follow conventions - Adhere to all technical requirements and structural guidelines
- Include quality documentation - Provide clear setup instructions and usage examples
- Work reliably - Function correctly with minimal setup after installation
Quality Standards
Templates must meet these quality benchmarks:
- Code quality - Clean, well-commented, and maintainable code
- Error handling - Proper error handling for external APIs and user inputs
- Type safety - Full TypeScript typing with Zod validation where appropriate
- Documentation - Comprehensive README with setup and usage instructions
- Testing - Verified to work with fresh installations
Submission Process
1. Prepare Your Template
Ensure your template meets all requirements outlined in the Templates Reference:
- Proper project structure in
src/mastra/
directory - Standard TypeScript configuration
- Comprehensive
.env.example
file - Detailed README with setup instructions
2. Submit Your Template
Submit your template using our contribution form:
Submit Template Contribution 
Required Information
When submitting your template, provide:
- Template Name - Clear, descriptive name indicating the use case
- Template Author Name - Your name or organization name
- Template Author Email - Contact email for communication about your submission
- GitHub URL - Link to your template repository
- Description - Detailed explanation of what the template does and its value
- Optional Image - Screenshot or diagram showing the template in action
- Optional Demo Video - Link to a video demonstrating the template’s functionality
Review Process
Review Criteria
Templates are evaluated on:
- Technical compliance - Adherence to template rules and conventions
- Code quality - Clean, maintainable, and well-documented code
- Uniqueness - Novel use cases or innovative implementation patterns
- Educational value - Ability to teach Mastra concepts effectively
- Community benefit - Potential value to the broader Mastra community
Feedback and Iteration
If your template needs improvements:
- You’ll receive specific feedback on required changes
- Make the requested modifications and resubmit
- The review process continues until the template meets standards
Community Guidelines
Template Ideas
Consider creating templates for:
- Industry-specific use cases - Healthcare, finance, education, etc.
- Integration patterns - Specific API or service integrations
- Advanced techniques - Complex workflows, multi-agent systems, or novel patterns
- Learning resources - Step-by-step tutorials for specific concepts
Development Best Practices
- Start simple - Begin with a minimal working example and add complexity gradually
- Document thoroughly - Include detailed comments and comprehensive README
- Test extensively - Verify your template works across different environments
- Seek feedback - Share with the community for early feedback before submission
Community Engagement
- Join Discord - Participate in the Mastra Discord community 
- Share progress - Update the community on your template development
- Help others - Assist other contributors with their templates
- Stay updated - Keep track of new Mastra features and conventions
Template Maintenance
Ongoing Responsibilities
As a template contributor, you may be asked to:
- Update dependencies - Keep templates current with latest Mastra versions
- Fix issues - Address bugs or compatibility problems
- Improve documentation - Enhance instructions based on user feedback
- Add features - Extend templates with new capabilities
Community Support
The Mastra team and community provide:
- Technical guidance - Help with complex implementation challenges
- Review feedback - Detailed feedback to improve template quality
- Promotion - Showcase approved templates to the community
- Maintenance assistance - Support for keeping templates up-to-date
Validation Checklist
Before submitting a template, verify:
- All code organized in
src/mastra/
directory - Uses standard Mastra TypeScript configuration
- Includes comprehensive
.env.example
- Has detailed README with setup instructions
- No monorepo or web framework boilerplate
- Successfully runs after fresh install and environment setup
- Follows all code quality standards
- Demonstrates clear, valuable use case
Community Showcase
Template Gallery
Approved templates will be featured in:
- mastra.ai/templates - Community template gallery (coming soon)
- Documentation - Referenced in relevant documentation sections
- Community highlights - Featured in newsletters and community updates
Recognition
Template contributors receive:
- Attribution - Your name and contact information with the template
- Community recognition - Acknowledgment in community channels
Getting Started
Ready to contribute a template?
- Explore existing templates - Review current templates for inspiration and patterns
- Plan your template - Define the use case and value proposition
- Follow the requirements - Ensure compliance with all technical requirements
- Build and test - Create a working, well-documented template
- Submit for review - Use the contribution form to submit your template
Your contributions help grow the Mastra ecosystem and provide valuable resources for the entire community. We look forward to seeing your innovative templates!