Skip to content

CrowdStrike/foundry-sample-foundryjs-demo

CrowdStrike Falcon

Foundry-JS Demo sample Foundry app

The Foundry-JS Demo sample Foundry app is a community-driven, open source project which serves as an example of an app which can be built using CrowdStrike's Foundry ecosystem. foundry-sample-foundryjs-demo is an open source project, not a CrowdStrike product. As such, it carries no formal support, expressed or implied.

This app is one of several App Templates included in Foundry that you can use to jumpstart your development. It comes complete with a set of preconfigured capabilities aligned to its business purpose. Deploy this app from the Templates page with a single click in the Foundry UI, or create an app from this template using the CLI.

Important

To view documentation and deploy this sample app, you need access to the Falcon console.

Description

A comprehensive demonstration of the foundry-js JavaScript library (@crowdstrike/foundry-js) showcasing all major features and capabilities through an interactive web application. This demo provides working examples of core API features including FalconApi connection, event handling, workflow execution, collections CRUD operations, LogScale integration, API integrations, cloud functions, navigation utilities, modal management, and comprehensive error handling patterns.

Prerequisites

  • The Foundry CLI (instructions below).
  • Node.js 22+ (needed if modifying the app's UI). See Node.js for installation instructions.
  • Python 3.13+ (needed if modifying the app's functions). See Python For Beginners for installation instructions.

Install the Foundry CLI

You can install the Foundry CLI with Scoop on Windows or Homebrew on Linux/macOS.

Windows:

Install Scoop. Then, add the Foundry CLI bucket and install the Foundry CLI.

scoop bucket add foundry https://github.com/crowdstrike/scoop-foundry-cli.git
scoop install foundry

Or, you can download the latest Windows zip file, expand it, and add the install directory to your PATH environment variable.

Linux and macOS:

Install Homebrew. Then, add the Foundry CLI repository to the list of formulae that Homebrew uses and install the CLI:

brew tap crowdstrike/foundry-cli
brew install crowdstrike/foundry-cli/foundry

Run foundry version to verify it's installed correctly.

Getting Started

Clone this sample to your local system, or download as a zip file and import it into Foundry.

git clone https://github.com/CrowdStrike/foundry-sample-foundryjs-demo
cd foundry-sample-foundryjs-demo

Log in to Foundry:

foundry login

Select the following permissions:

  • Create and run RTR scripts
  • Create, execute and test workflow templates
  • Create, run and view API integrations
  • Create, edit, delete, and list queries

Deploy the app:

foundry apps deploy

Tip

If you get an error that the name already exists, change the name to something unique to your CID in manifest.yml.

Once the deployment has finished, you can release the app:

foundry apps release

Next, go to Foundry > App catalog, find your app, and install it. Navigate to Foundry > Apps in your Falcon Console, find "Foundry-JS Demo" in your app list, and click to open the interactive demonstration.

About this sample app

The Foundry-JS Demo is a comprehensive reference implementation showcasing the full capabilities of the foundry-js JavaScript library. This sample application serves as both a learning resource and a practical starting point for developers building Foundry applications.

Key Components

  • Interactive UI Pages: Built with React 19, React Router 7, and Tailwind CSS, featuring the official foundry-js JavaScript library
  • Python Cloud Function: A simple greeting function that demonstrates basic serverless capabilities with workflow integration
  • API Integrations: JSONPlaceholder API for testing external service integration
  • Collections: Demo collection for showcasing CRUD operations with structured data
  • LogScale Queries: Saved searches demonstrating user activity monitoring
  • Workflows: Simple greeting workflow template for automation examples

Features Demonstrated

Core API Features:

  • FalconApi Connection: Initialize and establish connection to Falcon console
  • Event Handling: Receive and process context data from Falcon console
  • Workflow Execution: Execute on-demand workflows and retrieve results
  • Collections CRUD: Complete Create, Read, Update, Delete operations on Foundry collections
  • LogScale Integration: Write events, execute dynamic queries, and run saved searches

Advanced Features:

  • API Integrations: Call external APIs through configured OpenAPI specifications
  • Cloud Functions: Execute Foundry serverless functions with various HTTP methods
  • Navigation Utilities: Handle internal hash-based routing and external navigation
  • Modal Management: Open and close modals within the Falcon console
  • Error Handling: Comprehensive error handling patterns and user feedback

Educational Value

Each feature demonstration includes:

  • Interactive Forms: Input fields to test different parameters
  • Example Buttons: Pre-filled examples for quick testing
  • Real-time Results: Live display of API responses
  • Error Handling: Clear error messages and debugging information
  • Code Examples: Comprehensive documentation through working code

Target Audience

This demo is designed for:

  • Developers new to the Foundry platform
  • Teams building custom Foundry applications
  • Security engineers exploring Foundry automation capabilities
  • Anyone seeking comprehensive SDK documentation through code examples

Foundry resources



WE STOP BREACHES

About

Foundry-JS Demo sample Foundry app

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors