This document compiles research on Flipper Zero app development requirements, tools, and best practices for the FlipChanger project.
Flipper Zero supports two main development approaches:
- Language: C/C++
- Build Output:
.fap(Flipper Application Package) files - Pros: Full hardware access, maximum performance, deeper integration
- Cons: Steeper learning curve, requires firmware repo, compilation needed
- Best For: Complex apps, maximum control, performance-critical features
- Language: JavaScript/TypeScript (via mJS engine)
- Build Output:
.jsfiles (or transpiled scripts) - Pros: Easier iteration, no full firmware build, faster development cycle
- Cons: More limited features, less performance, constrained by mJS engine
- Best For: Learning, rapid prototyping, simpler apps
Recommendation for FlipChanger: Start with JavaScript/TypeScript for learning, then consider C/C++ if you need advanced features like complex IR integration or performance optimization.
| Tool | Purpose | Installation |
|---|---|---|
| Node.js | JavaScript runtime and package manager | Download from nodejs.org |
| npm/yarn/pnpm | Package manager (comes with Node.js) | Included with Node.js |
| Flipper JS SDK | Official SDK for Flipper Zero JS apps | Installed via npm install @flipperdevices/create-fz-app |
| VS Code (optional) | Recommended IDE with good TypeScript support | code.visualstudio.com |
| Tool | Purpose | Installation |
|---|---|---|
| Git | Version control and cloning firmware | Pre-installed on macOS |
| Python 3 | Required for build tools | Pre-installed on macOS |
| FBT (Flipper Build Tool) | Main build system for firmware and FAPs | Installed via firmware repo |
| uFBT (Alternative) | Lightweight build tool for external apps | python3 -m pip install --upgrade ufbt |
| ARM Toolchain | Cross-compiler for ARM architecture | Installed automatically by FBT/uFBT |
-
Install Node.js
# Check if Node.js is installed node --version npm --version -
Create a new Flipper Zero JS app
npx @flipperdevices/create-fz-app@latest
This scaffolds a project with:
- TypeScript configuration
- Basic app structure
- SDK dependencies
- Build/deploy scripts
-
Development Workflow
npm start # Builds, transpiles, and uploads to Flipper Zero via USB- Connect Flipper Zero via USB
- Changes are live: edit code →
npm start→ test on device
-
File Structure (Typical JS App)
your-app/ ├── src/ │ └── index.ts # Main app code ├── package.json ├── tsconfig.json └── fz-sdk.config.json5 # SDK configuration
-
Clone Firmware Repository
git clone --recursive https://github.com/flipperdevices/flipperzero-firmware.git cd flipperzero-firmware -
Install Build Dependencies
# macOS brew install scons # Or use uFBT (simpler) python3 -m pip install --upgrade ufbt
-
Create Your App
# Create app directory mkdir -p applications_user/flipchanger cd applications_user/flipchanger # Create application.fam manifest file # Write your C source files
-
Build Your App
# Using FBT (from firmware root) ./fbt fap_flipchanger # Or using uFBT (from app directory) ufbt build
-
Deploy to Device
# Copy .fap file to SD card, or ./fbt launch APPSRC=applications_user/flipchanger
- No manifest required - SDK handles packaging
- Configuration in
fz-sdk.config.json5:{ "app": { "name": "FlipChanger", "type": "js" }, "build": { "minify": false // Enable for production } }
Required Fields:
App(
appid="flipchanger",
apptype=FlipperAppType.EXTERNAL,
name="FlipChanger",
entry_point="flipchanger_main",
fap_icon_assets="icons",
fap_category="Games", # or "Tools", "Utils", etc.
requires=[
FlipperAppRequirement.GUI,
FlipperAppRequirement.STORAGE,
FlipperAppRequirement.INFRARED, # For IR features
],
stack_size=2048,
cdefines=["APP_FLIPCHANGER"],
)Key Manifest Fields:
appid: Unique identifier (lowercase, no spaces)apptype:EXTERNALfor user apps,PLUGINfor system integrationentry_point: Main function namerequires: List of hardware/API dependenciesstack_size: Memory allocation (default: 2048 bytes)
| Feature | JavaScript | C/C++ | Notes |
|---|---|---|---|
| GUI/Screen | ✅ Yes | ✅ Yes | 128x64 monochrome display |
| Buttons/Input | ✅ Yes | ✅ Yes | D-pad, OK, Back buttons |
| Storage | ✅ Yes | ✅ Yes | SD card, internal storage |
| Infrared (IR) | ✅ Yes | ✅ Yes | IR database access available |
| GPIO | ✅ Yes | ✅ Yes | General-purpose I/O |
| USB-HID | ✅ Yes | ✅ Yes | USB Human Interface Device |
| NFC | ✅ Yes | Full NFC support in C/C++ | |
| Sub-GHz Radio | ✅ Yes | Radio protocols in C/C++ | |
| Low-level Hardware | ❌ No | ✅ Yes | Direct hardware access only in C/C++ |
Key Points:
- Flipper Zero has an existing IR database of remote control codes
- IR codes can be accessed via API calls
- You can reuse existing codes from the database
- Custom IR codes can be recorded/learned
IR API Usage (Conceptual):
// JavaScript (conceptual - exact API depends on SDK)
const ir = require("@flipperdevices/js-api/infrared");
// Search database for CD changer remotes
// Send IR commands// C/C++ (conceptual)
#include <infrared.h>
// Use infrared_transmit() function
// Access IR database via infrared_remote_get()For FlipChanger: We can search the IR database for CD changer remotes and reuse those codes.
- Open Source: All apps must be open source and free
- Repository: Must be hosted on GitHub
- Metadata: Proper app metadata in manifest
- Documentation: README with build/usage instructions
- Compliance: Follow Flipper's compliance guidelines
- Version Compatibility: Apps must work with current firmware versions
- Create GitHub Repository (✅ Done for FlipChanger)
- Develop Your App (Next step)
- Test Thoroughly on actual hardware
- Submit Pull Request to Flipper Apps Catalog repository
- Review Process: Manual + automated checks
- Publication: Once approved, available in Flipper Mobile/Lab
- App follows Flipper coding standards
- No unauthorized protocols/frequencies
- Proper use of trademarks/logos (if any)
- App manifest correctly formatted
- Documentation complete
- Open source license included (MIT ✅)
| Resource | Limit | Impact |
|---|---|---|
| RAM | ~64KB total | Efficient memory usage critical |
| Flash | ~1MB | Keep app size small |
| Screen | 128x64 monochrome | Simple UI, no color/graphics |
| Storage | SD card (varies) | Data stored on SD card |
- Keep it Simple: Flipper Zero has limited resources
- Efficient Storage: Use JSON efficiently, avoid large files
- Simple UI: Design for 128x64 monochrome display
- Test Often: Regular testing on actual hardware
- Version Match: Build for firmware version on your device
- Error Handling: Robust error handling for storage/API failures
- Stack Size: Set appropriately in manifest (default: 2048)
- Heap: Limited when running as FAP from SD card
- Static Data: Keep icons/images small
- Dynamic Allocation: Use sparingly
- ✅ Repository created on GitHub
- Install Node.js and SDK
- Create simple "Hello World" JS app
- Test deployment to Flipper Zero
- Understand basic UI elements
- Implement JSON storage (CD metadata)
- Build slot management UI
- Create add/edit CD interface
- Implement data persistence
- UI/UX improvements
- Error handling
- Testing on hardware
- Documentation updates
- Research IR database API
- Find CD changer remote codes
- Implement IR control features
- Testing with actual CD changer
- Final testing
- Prepare submission
- Submit to Flipper Apps Catalog
- Address review feedback
- Developer Portal: https://developer.flipper.net/
- Doxygen API Docs: https://developer.flipper.net/flipperzero/doxygen/
- Firmware Repository: https://github.com/flipperdevices/flipperzero-firmware
- JS SDK: https://developer.flipper.net/flipperzero/doxygen/js_about_js_engine.html
- App Publishing: https://developer.flipper.net/flipperzero/doxygen/app_publishing.html
- Flipper Wiki: https://flipper.wiki/
- Reddit: r/flipperzero
- Discord: Flipper Zero community servers
- Example Apps: Browse Flipper Apps Catalog for reference
- uFBT: https://github.com/flipperdevices/flipperzero-ufbt (Lightweight build tool)
- FBT: Included in firmware repo (Full build system)
-
Choose Development Path
- Recommendation: Start with JavaScript/TypeScript
- Easier learning curve
- Faster iteration
- Can switch to C/C++ later if needed
-
Install Prerequisites
# Check Node.js node --version npm --version # If not installed, download from nodejs.org
-
Create Initial App Structure
- Use JS SDK to scaffold project
- Set up basic project structure
- Create initial README with setup instructions
-
Research JSON Storage API
- How to read/write JSON files on SD card
- Storage location and permissions
- Error handling for missing SD card
-
Design UI Flow
- Main menu
- Slot browser
- CD details view
- Add/edit form
- Which development path: JavaScript or C/C++?
- How will data be structured? (Review data model in product_vision.md)
- What's the navigation flow?
- How many slots will be visible at once on 128x64 screen?
- Where will JSON file be stored? (SD card path)
-
Start with JavaScript/TypeScript
- Lower barrier to entry
- Faster development cycle
- Good for learning project
-
Use JSON for Storage
- Human-readable
- Easy to edit/debug
- Well-supported in JS
-
Keep UI Simple
- 128x64 display is small
- List-based navigation
- Form-based data entry
-
Plan for App Store
- Follow best practices from start
- Document everything
- Keep code clean and commented
-
IR Integration Later
- Get core features working first
- Add IR as enhancement
- Research IR database after MVP
Document Status: Research Complete
Last Updated: 2024
Next Update: After initial development setup