Thank you for your interest in FlipDeck! This guide will help you get started with development.
- Flipper Zero device (stock firmware)
- SD card (8GB FAT32 formatted)
- Computer with USB-A to USB-C cable (data-capable)
We recommend using the Flipper Zero simulator for initial development:
# Clone the repository
git clone https://github.com/mohabbis/flipdeck.git
cd flipdeck
# Build using fbt
curl -fsSL https://raw.githubusercontent.com/flipperzero/fbt/main/install.sh | sh
fbt- Install Python 3.8+
- Install fbt:
pip install fbt - Install fbt for Flipper:
fbt install-sdk
src/
├── flipdeck_app.c # Main entry point and state machine
├── flipdeck_ui.c # GUI views and user interaction
├── profile_manager.c # SD card profile storage
├── usb_hid.c # USB HID communication
└── settings.c # User preferences
- Follow the Flipper Zero C style guide
- Use 4-space indentation
- Limit lines to 100 characters
- Use meaningful variable names
// Types: PascalCase, suffixed with _t
typedef struct { ... } FlipDeckProfile;
// Functions: snake_case
void profile_manager_load_profiles(void);
// Variables: snake_case
static FlipDeckApp* g_app_ctx;
// Constants: SCREAMING_SNAKE_CASE
#define FLIPDECK_MAX_PROFILES 50- ✅ No credential storage
- ✅ No stealth payloads
- ✅ Explicit user confirmation before USB send
- ✅ Graceful error handling
- ✅ Resource cleanup on free
Run tests on the simulator:
fbt test- Build:
fbt - Copy
build-flipdeck/flipdeck.fapto SD card - Install via Apps → Install
- Test each workflow thoroughly
- All code compiles without warnings
- Memory leak check (use simulator with valgrind)
- USB safety review for new features
Every PR should include:
- Clear Summary - What and why, not how
- Testing Notes - How to test manually
- Safety Review - Any USB/HID changes need explicit review
- Updated Docs - README.md, flight_manual.md, or ROADMAP.md
feature- New functionalitybug- Fixed issuedocs- Documentation changesui- Display/GUI changessafety- Security or safety review neededenhancement- Improving existing features
The app uses a simple state machine. Add new states in FlipDeckState:
typedef enum {
FlipDeckState_Idle,
FlipDeckState_Browser,
FlipDeckState_ProfileView,
FlipDeckState_SendConfirm,
FlipDeckState_Settings,
// Add new states here
} FlipDeckState;Add new profile types in FlipDeckProfileType:
typedef enum {
FlipDeckProfileType_Command,
FlipDeckProfileType_Snippet,
FlipDeckProfileType_Shortcut,
FlipDeckProfileType_Script,
} FlipDeckProfileType;- Always check malloc success
- Free all resources in
flipdeck_app_free() - Avoid dynamic allocation in loops
- Use stack for small, fixed-size data
Before submitting PRs with sensitive changes:
- No passwords or credentials in code
- USB HID changes reviewed for safety
- All commands require explicit confirmation
- Error messages don't leak sensitive info
- SD card operations handle corruption gracefully
- Open an issue with
buglabel for problems - Use
featurelabel for enhancement ideas - Check existing issues before creating new ones
Thank you for contributing to FlipDeck! 🎮