Best Practices
This guide provides best practices for building high-quality, successful resources and scripts on the Mirra Store. Following these guidelines improves reliability, user satisfaction, and marketplace success.
Resource Development
API Design
Use RESTful conventions for consistent, predictable APIs:
GETfor reading dataPOSTfor creating resourcesPUTorPATCHfor updating existing resourcesDELETEfor removing resources- Return appropriate HTTP status codes (
200,201,400,404,500)
Return consistent JSON structures:
Provide clear, actionable error messages:
Version your API to manage changes safely:
- ✅ Use URL versioning:
/v1/weather,/v2/weather - ✅ Maintain backwards compatibility within versions
- ✅ Deprecate old versions gracefully with advance notice
- ✅ Document all breaking changes clearly
- ❌ Don't make breaking changes without version increments
Documentation
Write clear, comprehensive instructions:
- Explain what your resource does and why users need it
- List all requirements and prerequisites
- Provide step-by-step setup instructions
- Include troubleshooting sections for common issues
- Keep documentation updated with code changes
Include practical code examples:
Document all parameters thoroughly:
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
city | string | Yes | City name (e.g., "London", "New York") | - |
units | string | No | Temperature units: "metric" or "imperial" | "metric" |
lang | string | No | Response language code (e.g., "en", "es") | "en" |
Explain all error codes:
| Error Code | Cause | Solution |
|---|---|---|
INVALID_PARAMETER | Required parameter missing or invalid | Check parameter spelling and type |
CITY_NOT_FOUND | City name not recognized | Verify city name spelling |
RATE_LIMIT_EXCEEDED | Too many requests | Wait before retrying |
API_KEY_INVALID | Authentication failed | Check API key configuration |
Performance
Optimize response times:
- ✅ Target under 200ms for simple requests
- ✅ Use caching for frequently requested data
- ✅ Minimize database queries with proper indexing
- ✅ Optimize algorithms and data structures
- ❌ Don't perform expensive operations synchronously
Implement intelligent caching:
Monitor and optimize performance:
- Track response times for all endpoints
- Identify and optimize slow operations
- Set up alerts for performance degradation
- Scale infrastructure as usage grows
- Profile code to find bottlenecks
Security
Use HTTPS exclusively:
- ✅ Enforce TLS 1.2 or higher
- ✅ Use valid SSL/TLS certificates
- ✅ Redirect all HTTP requests to HTTPS
- ❌ Never transmit sensitive data over HTTP
Validate all inputs rigorously:
Implement rate limiting:
Support secure credential management:
- ✅ Support API key rotation without downtime
- ✅ Allow multiple active keys per user
- ✅ Implement key expiration policies
- ✅ Log all API key usage for auditing
- ❌ Never log or expose API keys in responses
Script Development
Code Quality
Write clean, readable code:
Add helpful documentation:
Use meaningful, descriptive names:
Performance
Optimize algorithm complexity:
Use efficient data structures:
Avoid unnecessary computation:
Error Handling
Catch and handle all exceptions:
Provide helpful error messages:
Handle edge cases explicitly:
Testing
Test Thoroughly
Write unit tests for individual functions:
Write integration tests with realistic data:
Test edge cases and boundaries:
Testing Checklist
Before publishing, verify:
- Valid inputs produce correct results
- Invalid inputs throw appropriate errors with clear messages
- Empty inputs are handled gracefully
- Large inputs complete without timeout
- Unicode and special characters work correctly
- Concurrent executions don't interfere with each other
- Error messages are clear and actionable
- All edge cases are covered
Marketplace Success
Quality First
Build reliable products:
- ✅ Test extensively before publishing
- ✅ Handle all errors gracefully
- ✅ Optimize for performance
- ✅ Monitor uptime and availability
- ✅ Fix bugs quickly when reported
- ❌ Don't publish untested code
Maintain actively:
- ✅ Respond to user issues within 24-48 hours
- ✅ Add requested features when feasible
- ✅ Update documentation as code changes
- ✅ Keep dependencies current and secure
- ✅ Engage with your user community
- ❌ Don't abandon published work
Documentation Excellence
Write comprehensive documentation:
- Clear overview of what the resource/script does
- Step-by-step setup instructions
- Complete API reference with all parameters
- Practical, runnable code examples
- Troubleshooting guide for common issues
- FAQ section addressing user questions
Keep documentation current:
- Update immediately when code changes
- Add examples based on user questions
- Clarify sections users find confusing
- Fix errors and broken links promptly
- Expand FAQ as questions arise
User Support
Be responsive:
- ✅ Reply to reviews within 24-48 hours
- ✅ Answer questions promptly and thoroughly
- ✅ Fix reported bugs as quickly as possible
- ✅ Acknowledge feature requests
- ✅ Thank users for feedback
- ❌ Don't ignore user communication
Provide multiple support channels:
- Review replies on the marketplace
- Email support for complex issues
- Discord community for real-time help
- GitHub issues for bug tracking
- Documentation with searchable content
Pricing Strategy
Price fairly and competitively:
- Research competitor pricing
- Consider the value you provide
- Start with a free tier to build trust
- Add paid tiers for advanced features
- Offer trial periods when appropriate
Be transparent:
- ✅ Create a clear pricing page
- ✅ Disclose all costs upfront
- ✅ Explain what users get at each tier
- ✅ Show the value of paid features
- ✅ Offer refunds for legitimate issues
- ❌ Don't hide fees or surprise users with charges
Common Mistakes to Avoid
Development Mistakes
- ❌ Publishing untested code
- ❌ Ignoring user feedback and bug reports
- ❌ Writing unclear or incomplete documentation
- ❌ Hardcoding sensitive data like API keys
- ❌ Skipping error handling
- ❌ Optimizing prematurely without profiling
- ❌ Over-promising features you can't deliver
- ❌ Abandoning projects after publishing
Best Practices
- ✅ Test thoroughly before publishing
- ✅ Listen to and act on user feedback
- ✅ Document comprehensively and clearly
- ✅ Use environment variables for configuration
- ✅ Handle all errors with helpful messages
- ✅ Profile code before optimizing
- ✅ Set realistic expectations
- ✅ Maintain and improve continuously
Pre-Launch Checklist
Before publishing your resource or script:
- Code tested thoroughly with unit and integration tests
- Documentation complete with setup, API reference, and examples
- Practical examples provided for common use cases
- Error handling implemented for all failure modes
- Performance optimized and profiled
- Security reviewed (HTTPS, input validation, rate limiting)
- Pricing configured appropriately
- Developer profile complete and professional
- Support plan ready (email, Discord, etc.)
- Monitoring and logging configured
See Also
- Creating Resources - Build and publish resources
- Creating Scripts - Build and publish scripts
- Handling Reviews - Manage user feedback
- Managing Your Profile - Optimize your developer presence
- Resources - Understanding resources
- Scripts - Understanding scripts
Need help? Join our Discord community or email support.