This is the TelemetryX Applications Library - a collection of completely independent applications for the TelemetryX platform. Each application is standalone with its own dependencies, build system, and documentation.
TelemetryX is a low-code platform for digital screens that enables full-fledged applications using familiar web technologies. For detailed SDK information and API reference, see SDK_GUIDE.md.
This library provides:
- Independent Applications: Collection of standalone TelemetryX applications
- Application Templates: Use
tx initto generate new applications - Build Scripts: Tools to build applications independently
applications/ # Independent applications
example/ # Example app generated by 'tx init'
src/ # Source code with React Router
assets/ # Static assets
package.json # Own dependencies
tsconfig.json # Own TypeScript config
vite.config.ts # Own build config
telemetry.config.json # TelemetryX configuration
[your-apps]/ # Each app is fully independent
scripts/ # Utility scripts
docs/ # Shared documentation
- Own package.json: Independent dependencies including
@telemetryx/sdk - Own build system: Typically Vite for fast builds
- Own TypeScript config: Tailored to app needs
- Own documentation: README.md and AGENTS.md
- No shared dependencies: Complete isolation
Each application uses the TelemetryX CLI for development. Run tx init to create a new application with the built-in development harness.
Each application MUST:
- Be completely independent (own package.json, build system)
- Include
@telemetryx/sdkas a dependency - Use TypeScript 5.7+ with strict mode
- Suggest using React 19.1+ (or like)
- Build to its own dist/ directory
- Include comprehensive error handling for 24/7 operation
- Support offline fallbacks
- Be optimized for display from distance
- Support both a render and settings mount point
For comprehensive SDK patterns, architecture, and code examples, refer to SDK_GUIDE.md.
- Navigate to
applications/directory - Run
tx initto create a new application - The CLI will create a complete application structure with:
package.jsonwith@telemetryx/sdkdependencytsconfig.jsonand Vite build configtelemetry.config.jsonwith mount points- Basic React Router setup for render/settings views
- Customize and extend the generated application
- Document usage and configuration
applications/[app-name]/
src/
App.tsx # Main component
index.tsx # Entry point
types.ts # TypeScript types
dist/ # Built output (generated)
docs/ # Documentation
package.json # Own dependencies (@telemetryx/sdk)
tsconfig.json # Own TypeScript config
vite.config.ts # Own build config
AGENTS.md # AI assistant guide
README.md # App documentation
telemetry.config.json # TelemetryX Application Information
.gitignore # Git ignore rules
- Create new application:
tx init- Generate a new TelemetryX application - Individual applications:
cd applications/[app-name] pnpm install pnpm dev # Runs 'tx serve' - starts harness at localhost:6969 pnpm run build # Build for production (if configured)
- Testing with harness: The TelemetryX CLI provides a complete development environment with SDK mocking
- Each app must build without any other apps
- Each app has its own node_modules
- Each app can be moved to separate repository
- No shared code between applications
- All dependencies declared in app's package.json
{
"name": "telemetryx-[app-name]-app",
"version": "1.0.0",
"type": "module",
"dependencies": {
"@telemetryx/sdk": "latest",
"react": "^19.1.0",
"react-dom": "^19.1.0"
},
"devDependencies": {
"@types/react": "^19.0.0",
"typescript": "^5.7.0",
"vite": "^5.4.0"
}
}For detailed SDK usage patterns, data fetching, storage, and API examples, see SDK_GUIDE.md.
Standard Mount Point Paths:
- Render Route: Always use
/index.htmlfor the main application display - Settings Route: Always use
/settings.htmlfor configuration interface
// telemetry.config.json
{
"name": "app-name",
"mountPoints": {
"render": { "path": "/index.html" },
"settings": { "path": "/settings.html" }
}
}This convention ensures consistency across all applications and follows web standards.
// Prefer Context API for simple state
const AppContext = createContext<AppState>({});
// Use Zustand for complex state
const useStore = create<StoreState>((set) => ({
data: null,
updateData: (data) => set({ data })
}));// Always wrap applications in error boundaries
class AppErrorBoundary extends Component {
componentDidCatch(error: Error) {
console.error('Application error:', error);
// Show fallback UI
}
}- Minimize Re-renders: Use memo, useMemo, useCallback appropriately
- Lazy Load: Split code for features not immediately visible
- Cache Aggressively: Store API responses, computed values
- Debounce Updates: Batch rapid state changes
- Optimize Images: Use appropriate formats and sizes
// Clean up timers and subscriptions
useEffect(() => {
const timer = setInterval(updateData, 30000);
return () => clearInterval(timer);
}, []);
// Use weak references for large objects
const cache = new WeakMap();- NEVER commit API keys to the repository
- Use environment variables for development
- Use TelemetryX secure storage in production
// Always validate external data
const validateApiResponse = (data: unknown): ValidData => {
if (!isValidSchema(data)) {
throw new ValidationError('Invalid data schema');
}
return data as ValidData;
};- Sanitize user-generated content
- Use CSP headers appropriately
- Validate URLs before fetching
- Implement rate limiting for API calls
Applications are built using modern tooling:
- ES2023 target for modern JavaScript features
- ES Modules for tree-shaking and optimization
- Source maps for development debugging
- Type checking with TypeScript 5.7+
- Build with Turborepo
- Local development harness with hot reload
- Deployment via TelemetryX CLI or GitHub integration
For comprehensive SDK features, APIs, and capabilities, see SDK_GUIDE.md.
Key categories include:
- Device capabilities and hardware integration
- Storage system with multiple scopes
- Data integration and real-time subscriptions
- Configuration and application lifecycle
Solution: Implement proper cleanup in useEffect hooks, use error boundaries
Solution: Use double buffering pattern, update state atomically
Solution: Use high contrast, appropriate font sizes, consider viewing distance
Solution: Implement offline fallbacks, cache critical data, retry logic
- Always assume 24/7 operation - No memory leaks, proper cleanup
- Design for distance viewing - Large text, high contrast
- Handle all error cases - Network, API, hardware failures
- Optimize for performance - Lazy loading, caching, debouncing
- Follow TypeScript strictly - No
anytypes, proper interfaces - Document thoroughly - Configuration, usage, troubleshooting
- Test comprehensively - Unit, integration, performance tests
- Security first - No exposed secrets, validate all data
- Use SDK features - Don't reinvent platform capabilities
- Consider offline scenarios - Cached data, fallback content
The development harness includes a complete TelemetryX SDK Bridge implementation (bridge-stub.js) using the official @telemetryx/root-sdk that provides:
- Device Information: Mock device capabilities, location, display specs
- Data APIs: Simulated data fetching for weather, calendar, RSS, social media
- Storage System: Local storage-based mock for application data
- Real-time Updates: WebSocket-based data subscription system
- Message Bridge: PostMessage API for iframe communication
- Device Info: Location (San Francisco), display (1920x1080), capabilities
- Weather Data: Current conditions, 3-day forecast, alerts
- Calendar Events: Sample meetings and appointments
- RSS Feeds: Mock news feed data
- Social Media: Sample social media posts
The harness uses the official @telemetryx/root-sdk Bridge class to:
- Create a Bridge instance that handles client-server communication
- Provide mock responses to all SDK client messages via onMessage handler
- Support data subscriptions with real-time updates
- Handle storage operations with scoped stores (account, application, device)
- Manage media folders and content operations
- Log all SDK interactions for debugging
This allows applications using @telemetryx/sdk to be developed and tested with the same Bridge protocol used in production TelemetryX environments.
pnpm run build:all # Build all applications independently
pnpm run app:placeholders # Create placeholder HTML filestx init # Create new application
cd applications/[app-name] # Navigate to app
pnpm install # Install app dependencies
pnpm dev # Start dev server with harness (localhost:6969)
pnpm run build # Build app for production (if configured)cd applications/[app-name]
npm run build # Build the application
# Deploy dist/ folder to TelemetryX- SDK Guide: SDK_GUIDE.md - Comprehensive SDK documentation
- Platform Documentation: https://docs.telemetryx.ai
- API Reference: https://docs.telemetryx.ai/reference/introduction
- Support: Via the in app chat
When contributing to this repository:
- Follow TypeScript strict mode
- Include comprehensive error handling
- Add offline fallbacks
- Write tests for new features
- Update documentation
- Consider 24/7 operation requirements
- Optimize for digital display viewing
- Follow security best practices
- Use existing SDK features
- Include configuration schema
Remember: Applications in this library run on commercial kiosk and digital signage displays that operate 24/7 in public spaces. Reliability, performance, and user experience are critical.