Defining Application
Register your application code with TelemetryOS Studio to deploy to devices
Defining Application
After building your application code (typically using the CLI tool), you need to define it in TelemetryOS Studio to make it available for deployment to devices. This process connects your code repository to the TelemetryOS platform.
Prerequisites
Before defining your application in Studio, you should have:
- ✅ Built your application code locally
- ✅ Tested it with
tos serveor equivalent development server - ✅ Created a
telemetry.config.jsonconfiguration file - ✅ Pushed your code to a Git repository (GitHub recommended) or created a ZIP archive
Accessing Application Creation
Navigate to the application creation interface:
- Sign in to TelemetryOS Studio at
app.telemetryos.com - Select Content from the main menu
- Select Applications from the submenu
- Click the CREATE APPLICATION button
The application creation interface provides multiple methods for connecting your application code to the platform.
Application Definition Methods
TelemetryOS Studio provides three methods for defining applications:
1. Import GitHub Repository (Recommended)
Connect your GitHub repository for automated CI/CD deployment with version control integration.
Benefits:
- Automatic builds on git push
- Version history and rollback capability
- Branch-based deployment (staging/production)
- Team collaboration through pull requests
- Continuous integration workflow
Setup:
- Push your application code to GitHub
- Select Import GitHub Repository in Studio
- Authorize TelemetryOS to access your GitHub account
- Select the repository and branch
- Configure build settings (usually auto-detected from
telemetry.config.json)
Learn more: GitHub Integration
2. Import Git Repository
Connect any Git repository (GitLab, Bitbucket, self-hosted) using HTTPS URL.
Benefits:
- Works with any Git hosting provider
- Same CI/CD capabilities as GitHub integration
- Version control and rollback
- Supports private repositories with authentication
Setup:
- Push your application code to your Git provider
- Select Import Git Repository in Studio
- Enter repository HTTPS URL
- Provide authentication credentials if private
- Select branch for deployment
- Configure build settings
Learn more: Git Repositories
3. Upload Archive (ZIP)
Upload a pre-built ZIP file containing your application code.
Use cases:
- Quick testing and prototyping
- Internal applications without source control
- Pre-built applications from third parties
- Legacy applications or migrations
Setup:
- Build your application locally (
npm run build) - Create ZIP archive of the
dist/orbuild/directory - Select Upload Archive in Studio
- Upload the ZIP file
- Configure application metadata
Learn more: Upload a ZIP File
Required Configuration
Regardless of the method chosen, all applications require:
Application Metadata
Application Name
- Unique identifier within your account
- Used in SDK
configure()call - Should match the
namefield intelemetry.config.json
Version
- Semantic versioning recommended (e.g.,
1.0.0) - Incremented with each deployment
- Used for rollback and version management
Description (optional)
- User-facing description of application functionality
- Helps team members understand application purpose
- Shown in application library
Source Configuration
Repository/Archive Location
- GitHub repository URL or Git HTTPS URL
- Branch name for Git-based deployments
- ZIP file for archive uploads
Build Settings
- Build command (e.g.,
npm run build, auto-detected frompackage.json) - Build output directory (e.g.,
dist/, auto-detected fromtelemetry.config.json) - Node.js version (if applicable)
Mount Points
Mount points are automatically detected from your telemetry.config.json:
{
"name": "weather-dashboard",
"version": "1.0.0",
"mountPoints": {
"render": "/render",
"settings": "/settings"
}
}These tell TelemetryOS where to load each component of your application:
- render - Main display component shown on devices
- settings - Configuration UI shown in Studio side panel
- background - Worker scripts (optional)
Learn more: Mount Points
Application Definition Workflow
Step 1: Build Application Locally
Use the CLI to generate and develop your application:
# Generate new application
tos init weather-dashboard
cd weather-dashboard
# Develop and test locally
tos serve
# Build for production
npm run buildStep 2: Push to Repository
Commit and push your code:
git add .
git commit -m "Initial application build"
git remote add origin https://github.com/username/weather-dashboard.git
git push -u origin mainStep 3: Define in Studio
- Navigate to Content > Applications > CREATE APPLICATION
- Select Import GitHub Repository
- Authorize GitHub if not already connected
- Select repository:
username/weather-dashboard - Select branch:
main - Review auto-detected settings:
- Name:
weather-dashboard(fromtelemetry.config.json) - Build command:
npm run build(frompackage.json) - Output directory:
dist/(from Vite config) - Mount points:
/render,/settings(fromtelemetry.config.json)
- Name:
- Click CREATE APPLICATION
Step 4: Initial Build
TelemetryOS automatically:
- Clones your repository
- Installs dependencies (
npm install) - Runs build command (
npm run build) - Packages application files
- Creates initial version (
v1.0.0)
Build progress is shown in real-time. Build typically completes in 1-3 minutes.
Step 5: Add to Playlist
Once built, your application is ready for deployment:
- Navigate to Content > Playlists
- Open a playlist or create new one
- Add your application to a page
- Configure instance settings in side panel
- Assign playlist to devices or device groups
- Publish changes
Post-Definition Workflow
Continuous Deployment
With GitHub/Git integration, updates are automatic:
- Make code changes locally
- Test with
tos serve - Commit and push to repository
- TelemetryOS automatically builds new version
- New version available for deployment
Version Management
Studio provides version control:
- View all published versions
- Deploy specific versions to different device groups
- Rollback to previous versions instantly
- Compare versions and changes
Instance Configuration
Each application instance on a playlist can have unique settings:
- Add application to playlist page
- Click application in Studio page editor
- Settings component loads in side panel
- Configure instance-specific settings
- Settings saved to instance storage
- Different playlist instances can have different settings
Example: Same weather application showing different cities on different displays.
Application Types
Standard Applications
Most applications use the render + settings pattern:
- Render displays content on devices
- Settings provides configuration UI in Studio
- Communicate via Storage API
Example structure:
{
"mountPoints": {
"render": "/render",
"settings": "/settings"
}
}Worker Applications
Applications needing continuous background processing:
- Render displays content
- Settings provides configuration
- Worker runs continuously in background
Example use case: Data sync every 5 minutes, even when render not visible.
{
"mountPoints": {
"render": "/render",
"settings": "/settings",
"background": "/worker"
}
}Container Applications
Applications needing backend services:
- Render displays content
- Settings provides configuration
- Containers run Docker services on device
Example use case: Local database or API server on device.
{
"mountPoints": {
"render": "/render",
"settings": "/settings"
},
"containers": [
{
"name": "api-server",
"image": "myapp/api:latest",
"port": 3000
}
]
}Common Definition Patterns
Development → Staging → Production
Use branches for different environments:
- Development -
developbranch, auto-deploy to test devices - Staging -
stagingbranch, QA testing before production - Production -
mainbranch, deployed to production devices
Define three separate applications in Studio, each connected to different branch.
Monorepo with Multiple Applications
Single repository containing multiple applications:
monorepo/
├── apps/
│ ├── weather-dashboard/
│ ├── news-feed/
│ └── social-wall/
└── shared/
Define each application separately in Studio, pointing to same repository but different subdirectories.
Template-Based Applications
Create base template application, fork for customization:
- Define template application with generic functionality
- Fork repository for each customer/location
- Customize fork with specific branding/content
- Define forked version as new application in Studio
Security Considerations
Repository Access
Public repositories:
- No authentication required
- Code visible to anyone
- Suitable for open-source applications
Private repositories:
- Requires authentication (OAuth for GitHub, credentials for Git)
- Code remains private
- Recommended for proprietary applications
Build Security
TelemetryOS build process:
- Runs in isolated container
- No access to other customer code
- Secrets/environment variables encrypted at rest
- Build artifacts stored securely
Secrets Management
Never commit secrets to repository:
# ❌ DON'T DO THIS
const API_KEY = 'sk_live_abc123xyz';Instead, use environment variables configured in Studio:
# ✅ DO THIS
const API_KEY = process.env.API_KEY;Configure environment variables in Studio application settings.
Troubleshooting
Build Fails
Check build logs in Studio:
- Dependency installation errors
- TypeScript compilation errors
- Build command failures
- Missing files or configuration
Common fixes:
- Ensure
package.jsonscripts are correct - Verify
telemetry.config.jsonis valid - Check that build outputs to correct directory
- Ensure all dependencies are in
package.json
Application Not Loading
Verify mount points:
- Check
telemetry.config.jsonmount point paths - Ensure built files exist at specified paths
- Verify HTML files have correct structure
Check browser console:
- SDK configuration errors
- JavaScript runtime errors
- Network request failures
Settings Not Appearing
Verify settings mount point:
{
"mountPoints": {
"render": "/render",
"settings": "/settings" // ← Must be defined
}
}Check settings component:
- Calls
configure()with correct app name - Renders without errors
- Storage API calls are correct
Best Practices
1. Use Git-Based Deployment
Git integration provides the best development experience:
- Version control out of the box
- Automatic builds on push
- Easy rollback and version management
- Team collaboration support
2. Test Before Defining
Always test locally before defining in Studio:
tos serve # Test locally first3. Use Semantic Versioning
Follow semantic versioning for clarity:
1.0.0- Initial release1.1.0- New features, backward compatible2.0.0- Breaking changes
4. Document Configuration
Add README to repository explaining:
- What the application does
- Required settings/configuration
- Environment variables needed
- How to test locally
5. Environment-Based Branches
Use branches for different deployment environments:
main→ Production devicesstaging→ Testing devicesdevelop→ Development devices
6. Monitor Build Times
Optimize build for faster deployments:
- Minimize dependencies
- Use caching where possible
- Optimize asset sizes
- Consider build output size
Next Steps
After defining your application in Studio:
- Add to Playlist - Deploy to devices
- Configure Settings - Instance configuration
- GitHub Integration - Set up automated deployment
- Storage Methods - Learn data persistence
- Local Development - Advanced development workflow
Learn More
- Generate New Application - Use CLI to scaffold applications
- GitHub Integration - Detailed GitHub setup
- Git Repositories - Use any Git provider
- Mount Points - Understand application architecture
- Configuration - Complete telemetry.config.json reference
Updated 5 days ago