A demo application for testing and developing Formbricks in-product surveys. This Next.js app provides an interactive environment to test survey triggers, user actions, and attributes.
- Install dependencies:
pnpm install- Create a
.env.localfile with your Formbricks credentials:
NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID=your-environment-id
NEXT_PUBLIC_FORMBRICKS_API_HOST=https://app.formbricks.comYou can find your environment ID in the Formbricks app under Settings → Setup.
- Start the development server:
pnpm devOpen http://localhost:3000 to view the app.
- User Identification: Set user IDs and pull user data from Formbricks
- User Attributes: Test setting single and multiple custom attributes
- Actions: Test both no-code and code actions
- Email Setting: Test user email functionality
- Language Support: Test multi-language survey delivery
- Debug Mode: Automatically enabled for detailed widget logs (check browser console)
- Dark Mode: Toggle between light and dark themes
The app provides interactive buttons to test various Formbricks SDK methods:
formbricks.setUserId()- Set user ID and sync stateformbricks.setAttribute()- Set individual attributesformbricks.setAttributes()- Set multiple attributes at onceformbricks.setEmail()- Set user emailformbricks.setLanguage()- Set user languageformbricks.track()- Trigger code actionsformbricks.logout()- Clear user session
Create surveys in your Formbricks app and use this playground to test triggers and targeting.