Skip to main content
The Thena Apps framework provides a foundation for building applications that extend and enhance Thena. This guide explains the core concepts and architecture to help you start building.

Developer quickstart

  1. Create an app manifest with minimal fields (name, scopes, events).
  2. Host a webhook that accepts platform events and returns 2xx quickly.
  3. Use the bot token from the installation event to call Activities/APIs.
  4. Store configuration securely and reference it from Activities.
  5. Add one Activity and one event handler end-to-end before scaling up.

Minimal app (manifest + handler)

Production checklist

  • Enforce idempotency using eventId.
  • Process asynchronously; keep webhook fast.
  • Store bot tokens and configuration securely.
  • Validate event payloads and activity responses.
  • Add monitoring for failed events/activities.

Architecture overview

At its core, the Apps framework uses an event-driven architecture that enables real-time communication between your app and Thena. Here’s how the main components work together:

Core components

  1. Event system
    • Central communication layer
    • Handles real-time updates
    • Manages app lifecycle events
    • Processes user interactions
  2. Authentication
    • Bot token-based authentication
    • Secure installation flow
    • Automatic token management
  3. Authorization
    • Permission-based access control
    • Scoped resource access
    • User-level permissions
  4. Events
    • Subscribe to platform events
    • Publish custom events
    • Handle real-time updates
    • Process state changes
  5. Activities
    • HTTP-based operations
    • Pre-configured API calls
    • Custom business logic
    • External service integration

How events work

The event system is the primary way your app communicates with Thena. Here’s a typical event flow:

Key events

  1. Installation events When your app is installed in a workspace, you’ll receive an installation event with the bot token and other details:
  2. Platform events Your app can subscribe to various platform events. Here’s an example of a ticket comment event:
For a complete list of available events and their payloads, see our platform events documentation.

Security model

The Apps framework uses a token-based security model:
  1. Installation security
    • Secure bot token generation
    • Workspace-scoped access
  2. Request authentication
    • Token validation on each request
    • Request signing
    • Secure payload transmission
  3. Data access control
    • Resource-level permissions
    • User context validation
    • Data encryption in transit

Building blocks

Events

Events let you respond to changes in Thena. See our platform events documentation for a complete list of available events.

Activities

Activities are pre-configured HTTP operations: