TELA Project Templates
Ready-to-use project templates for building TELA applications quickly. All templates follow TELA size constraints and best practices.
Quick Start Templates
These templates provide working TELA applications you can customize and deploy immediately. Each template includes complete HTML, CSS, and JavaScript with XSWD integration and follows TELA design system patterns.
Available Templates
Downloadable Code Templates
Direct Download: tela-api-template.js - Complete DERO/TELA API implementation you can include in any TELA application. Right-click and save, or copy the code directly.
Template Features
What's Included in Every Template
β
Complete file structure (HTML, CSS, JS)
β
TELA design system styling
β
XSWD Super Core integration for robust wallet connectivity
β
Size optimization (with compression guidance)
β
Responsive design for all devices
β
Production-grade error handling and loading states
β
Real DERO data integration with fallback modes
β
Copy-paste ready code with deployment instructions
Template Structure
template-name/
βββ index.html # Main application file
βββ styles.css # TELA design system styles
βββ app.js # Core application logic
βββ README.md # Usage instructions
βββ deploy-guide.md # Deployment instructionsQuick Start Workflow
1. Choose Your Template
Pick the template that best matches your project needs:
For Most Applications:
- Basic TELA App - Complete starter with wallet integration and UI
XSWD Libraries (Choose One):
- XSWD Super Core - Full-featured, production-ready (recommended)
- XSWD Minimal Core - Lightweight for size-constrained apps
2. Copy Template Files
Each template page provides complete, copy-paste ready code for all files.
3. Customize for Your Needs
- Update application name and description
- Modify colors and styling as needed
- Add your specific functionality
- Test locally with
tela-cli serve local
4. Deploy to TELA
# Using TELA-CLI
tela-cli
endpoint simulator
wallet ./your-wallet.db
# Deploy each file
install-doc index.html
install-doc styles.css
install-doc app.js
# Create INDEX
install-index YourAppName
# Test deployed version
serve [your-new-scid]Template Customization Guide
Color Theme Customization
/* Change the primary color theme */
:root {
/* Original: Cyan theme */
--primary-color: #52c8db;
/* Alternative themes: */
/* --primary-color: #b959b6; Purple theme */
/* --primary-color: #4ade80; Green theme */
/* --primary-color: #fbbf24; Amber theme */
}
/* Update all primary color references */
.btn-primary { border-color: var(--primary-color); color: var(--primary-color); }
.text-primary { color: var(--primary-color); }
.enhanced-stat-card { border-color: rgba(82,200,219,0.3); } /* Update with your color */Application Name Customization
// Update these values in your app.js
const AppConfig = {
name: 'Your App Name',
description: 'Your app description',
version: '1.0.0',
xswd: {
id: 'your-unique-app-id',
name: 'Your App Name',
description: 'Brief description for wallet connection',
url: window.location.origin
}
};Adding Custom Features
// Template for adding new features
const CustomFeature = {
name: 'My Custom Feature',
render() {
return `
<div class="enhanced-card">
<div class="card-header">
<h3 style="color:#52c8db;margin:0;">${this.name}</h3>
</div>
<div class="card-content">
<!-- Your custom content here -->
</div>
</div>
`;
},
async loadData() {
// Your custom XSWD calls here
try {
const data = await xswd.call('DERO.GetInfo');
return data;
} catch (error) {
console.error('Failed to load data:', error);
return null;
}
}
};Best Practices for Templates
Template Development Guidelines
- Keep it simple - Templates should be easy to understand and modify
- Follow size limits - All files must stay under 18KB
- Use proven patterns - Based on working TELA applications
- Include error handling - Graceful degradation for network issues
- Test thoroughly - Verify templates work with real DERO data
File Size Management
# Check template file sizes before deployment
check_template_sizes() {
echo "π Template File Sizes:"
for file in *.html *.css *.js; do
if [ -f "$file" ]; then
size=$(wc -c < "$file")
kb=$(echo "scale=2; $size/1024" | bc)
if (( $(echo "$kb > 18" | bc -l) )); then
echo "β $file: ${kb}KB (EXCEEDS LIMIT)"
elif (( $(echo "$kb > 15" | bc -l) )); then
echo "β οΈ $file: ${kb}KB (consider compression)"
else
echo "β
$file: ${kb}KB"
fi
fi
done
}Template Testing Workflow
# Test template before publishing
test_template() {
echo "π§ͺ Testing TELA template..."
# 1. Check file sizes
check_template_sizes
# 2. Test local serving
echo "π‘ Testing local serving..."
tela-cli serve local ./
# 3. Validate XSWD integration
echo "π Testing XSWD connection..."
# Manual test: Check if wallet connection works
# 4. Test deployment process
echo "π Testing deployment..."
# Deploy to simulator network for testing
echo "β
Template testing complete!"
}Next Steps
- Choose a Template - Start with the basic app template
- Learn TELA Development - Complete development guide
- Customize Design - Use design system components
- Deploy Your App - Deploy using TELA-CLI
Ready to Build Your TELA Application?
These templates provide everything you need to start building immediately. Choose a template, customize it, and deploy to the DERO blockchain.
Related Pages
Available Templates:
- Basic TELA App - Complete starter template
- XSWD Super Core - Official XSWD library
- XSWD Minimal Core - Lightweight XSWD
- TELA API Template (Download) - Complete API library
Development Resources:
- Beginner's Guide - From zero to deployed app
- API Reference - Complete API documentation
- JavaScript Guidelines - Proven code patterns
Deployment:
- TELA CLI Workflows - Production deployment
- XSWD Protocol - Wallet integration
- Size Optimization - File optimization