* fix: build error due to survey status becoming optional
* made refactors
* fix: use universal ID over newly created ID
* remove build step from github actions workflows
---------
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
* feat: adds api handlers for upload and get file from S3
* feat: upload and fetch files from local storage
* feat: upload and fetch files from local storage
* feat: adds restriction check for allowed file extesnsions
* refactor
* fix: uses t3 env for validation
* fix: fixes validation issues in storage api
* merge with main
* fix: moves UPLOADS_DIR to constants file
* fix: moves private uploads to responseId
* chore: merge with main
* fix: changes api route
* remove comment in storage service, use services in client storage route
* simplify client storage endpoint
* rename fileType to contentType
* relocate storage endpoints, update validation
* update management storage route for readability
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* fix: docker env parsing & response bug when built w docker
* chore: bring back env example
* fix: docker compose envs are now single place defined
* add: renaming of .env in docs
* remove: existence of prisma_generate_data_proxy
* fix: use newer env vars and a smarter way to handle existing .env file
* fix: remove text to remove existing .enb
* fix: remove comments, local testing, and mention of more updating via echo in prod script
* fix: env ending
* fix: finalllyyy the docker compose works
* wip
* fix: update self host docker compose
* fix: echo log rename
* fix: docker env parsing & response bug when built w docker
* chore: bring back env example
* fix: docker compose envs are now single place defined
* add: renaming of .env in docs
* remove: existence of prisma_generate_data_proxy
* fix: use newer env vars and a smarter way to handle existing .env file
* fix: remove text to remove existing .enb
* fix: remove comments, local testing, and mention of more updating via echo in prod script
* fix: env ending
* fix: finalllyyy the docker compose works
* feat: short survey url support in docker compose
* fix: add envs to prod script
* chore: reorder env vars for uniformity
* update description for SHORT_SURVEY_BASE_URL
* fix: add ASSET_PREFIX_URL to prod script & docker compose
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* WIP
* added prisma actions
* remove console.logs
* some more fixes
* tweaks
* addressed all PR review comments
* remove hits from the prisma schema and all its corresponding service logic
* add nanoid
* corrected placeholders
* change database model, bring shortUrl service up to Formbricks code conventions
* update UI and shortUrl endpoint to work with new service
---------
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* feat: docs for management API
* fix: split api into client and management
* update navigation and pages
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* poc: use server session and api key validation on deletion
* feat: use server session and api key validation on deletion and creation
* feat: packages/lib/apiKey for apiKey services and auth
* shubham/auth-for-api-key
* fix: caching
* feat: handle authorization for action creation, update, delete
* feat: handle authorization for survey creation, updation & deletion
* feat: use cached method across and wrapper for authzn check
* fix: use cached wrapper & introduce more authzn check for survey services in actions
* fix: club caching methods and use authzn errors
* feat: add caching in canUserAccessApiKey
* feat: add caching in canUserAccessAction and use Authzn error
* fix: rename action to actionClass wherever needed
* feat: use caching in core method and update hasEnvAccess call
* fix: use authzn specific error
* fix: use cache getActionClass
* fix: make changes
* fix: import
* fix: import and suggested changes
* fix: rename action and use cache tag
* feat: use services to create team
* fix: atomic services for product & team creation
* improve teamUpdateInput
* use services in signup process
* redirect to prod environment when new product is created
* fix signup bug
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* add uniqueResponseId to link survey
* add uniqueResponseId to survey response
* add singUseId to database and link survey
* add singleUseId to api
* add single use option in survey response options
* add single use to getSurvey
* add getResponseBySingleUseId
* add ZSurveySingleUse schema to survey schema
* add logic to check if link with suid has response
* pass singleUseId as props, revert SWR changes
* generation of single-use url in LinkSurveyModal
* add singleUseId to SingleResponseCard
* update SurveyInactive for invalid link
* add suId to ZResponse schema
* fix typo in SurveyInactive
* update ResponseOptionCard
* add suId to response select
* add default message for SurveyLinkUsed
* update logic to render SurveyLinkUsed
* add comment for suId in prisma schema
* fix types
* refresh server component on save survey
* update logic
* fix build errors
* fix prisma schema
* add db migration
* update wording
* add singleUseId to localstorage
* fix survey link used over thank you
* add suid to people responses
* fix preview and copy link on surveys page.
* update text and icon for link survey modal
* check survey not finished before setting question
* update show surveylink used logic
* add zodtype to prisma
* fix logic to render last question answered/stored
* add better comments
* update default message for single use surveys
* add LinkSingleUseSurveyModal
* add guard before getting response with suid
* fix build error
* add default message for link used page
* add key and group imports
* add suId encryption and validation
* make survey url encryption optional
* fix build errors
* move singleUseId to server side in surveyList
* added validation to getResponseBySingleUseId service
* restored env var names
* import FORMBRICKS_ENCRYPTION_KEY from constants
* check if encryption environment variable is set, add length validation for env variable
---------
Co-authored-by: Ty Kerr <tykerr@Tys-MacBook-Pro.local>
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
* feat: connection states on integrations
* fix: missing action buttons
* make text more readable
---------
Co-authored-by: Johannes <johannes@formbricks.com>
* poc: use server session and api key validation on deletion
* feat: use server session and api key validation on deletion and creation
* feat: packages/lib/apiKey for apiKey services and auth
* shubham/auth-for-api-key
* fix: caching
* feat: handle authorization for tag creation, updation & deletion
* fix: use cached wrapper
* fix: club caching methods and use authzn errors
* feat: add caching in canUserAccessApiKey
* fix: suggrsted changes and authzn for response as well
* fix: work on suggested changes
* fix broken lock file
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* poc: use server session and api key validation on deletion
* feat: use server session and api key validation on deletion and creation
* feat: packages/lib/apiKey for apiKey services and auth
* shubham/auth-for-api-key
* fix: caching
* feat: handle authorization for action creation, update, delete
* feat: use cached method across and wrapper for authzn check
* fix: club caching methods and use authzn errors
* feat: add caching in canUserAccessApiKey
* feat: add caching in canUserAccessAction and use Authzn error
* fix: rename action to actionClass wherever needed
* fix: use cache getActionClass
* fix: make changes
* fix: import
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* poc: use server session and api key validation on deletion
* feat: use server session and api key validation on deletion and creation
* feat: packages/lib/apiKey for apiKey services and auth
* shubham/auth-for-api-key
* fix: caching
* fix: club caching methods and use authzn errors
* feat: add caching in canUserAccessApiKey
* init: rewritten formbricks api package
* restrucure: client prepended formbricks api package
* feat: cleanup error templating and node-fetch for non browser access
* feat: replace package (build error for js packge due to api)
* fix: rename methods & move error type
* fix: imports of api via js
* remove node-fetch
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* feat: privacy, imprint, and terms URL env vars now do not need rebuilding
* feat: disable_singup env var now do not need rebuilding
* feat: password_reset_disabled env var now do not need rebuilding
* feat: email_verification_disabled env var now do not need rebuilding
* feat: github_oauth & google_oauth env var now do not need rebuilding
* feat: move logic of env vars to serverside and send boolean client-side
* feat: invite_disabled env var now do not need rebuilding
* feat: rename vars logically
* feat: migration guide
* feat: update docker-compose as per v1.1
* deprecate: unused NEXT_PUBLIC_VERCEL_URL & VERCEL_URL
* deprecate: unused RAILWAY_STATIC_URL
* deprecate: unused RENDER_EXTERNAL_URL
* deprecate: unused HEROKU_APP_NAME
* fix: define WEBAPP_URL & replace NEXT_WEBAPP_URL with it
* migrate: NEXT_PUBLIC_IS_FORMBRICKS_CLOUD to IS_FORMBRICKS_CLOUD
* chore: move all env parsing to a constants.ts from page files
* feat: migrate client side envs to server side
* redo: isFormbricksCloud to navbar serverside page
* fix: constants is now a server only file
* fix: removal of use swr underway
* fix: move 1 tag away from swr to service
* feat: move away from tags swr
* feat: move away from surveys swr
* feat: move away from eventClass swr
* feat: move away from event swr
* fix: make constants server-only
* remove comments from .env.example, use constants in MetaInformation
* clean up services
* rename tag function
* fix build error
* fix smaller bugs, fix Response % not working in summary
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* feat: paginante people page
* undo: delete env example
* fix: rename vars and return empty arr over err
* fix: invalid page logic
* fix: handle bigger cases
* increase PEOPLE_PER_PAGE to 50
* fix: show no people when added invalid page no
* feat: add caching in people fetch services
* Revert "feat: add caching in people fetch services"
This reverts commit ab1e98c05e.
* fix build errors
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* chore: update npm packages
* update formbricks-web packages
* update packages in demo
* update packages in formbricks-com
* fix survey status dropdown has no value
* docs: add local and gitpod set
This links to our docs on formbricks.com for local setup and adds a gitpod setup banner
* feat: open mailhog after gitpod setup complete
* remove development doc
* added intro and surveySelect page
* added home page and wrapper component
* added spreadsheet select
* added data write functionality and added integration schema model
* improved UX
* reworked UI
* added google sheet integration
* removed some unused code
* added user email
* UI tweaks
* fixed build issues and made added question to top of spreadsheets
* adds refreshSheets and added empty survey/spreadsheets text
* restored pnpm-lock
* added duplicate sheet warning
* move process.env to t3env
* move migration
* update docs link, add note to show that sheets integration is not configured
* Add simple docs page for google-sheets
* added session check
* restored pnpm-lock
* Merge branch 'main' of github.com:formbricks/formbricks into Integration/Google-sheet
* added google sheet env variables to runtimeEnv
---------
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* feat: moves edit team name to server components
* feat: server components for membership roles
* feat: adds server actions and services
* fix: fixes invite server action
* feat: adds packages for jwt and email
* feat: server actions
* feat: moves edit memberships logic to server components
* feat: moves delete team logic to server components
* fix: fixes team loading states
* rename getAllMembershipsByUserId -> getMembershipsByUserId
* remove cache from mutating functions
* remove cache from updateInvite
* refactoring
* fix build error
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* fix: sync call gets called by other functions
* fix: sync call gets called by other functions
* remove unused imports
* remove unused import
* fix userId update
* added data fetching to server side and also added some actions
* made refactors
* replaced router.push with redirect
* updated profileUpdateInput
* move components in components folder
* update import for product update action
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* feat: webhooks now have a source to diff between user and third party
* fix: capitalise first letter of source and increase vertical padding in row
* fix: update webhhok source type in prisma and cleanup services
* combine two migrations into one
* add actions file for webhook UI
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* created a new service for survey data mutation
* made requested changes
* made some refactors
* ran pnpm format
* removed console logs
* removed some unused code
* made upateSurvey return TSurvey and added laoding state to AddNoCodeActionModal
* fixed minor bugs
* ran pnpm format
* fixed build issues
* Replaced old question types with new types
* fix survey list not up to date on changes
* solved back button issue
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* added documentation for make.com integration
* ran pnpm format
* update wording in docs
* updated docs for make integration
* updated connect link
---------
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* moved environment navbar to RSC
* added Error component
* format
* update errors path
* use standard services in environment navbar, update product service according to standards, add redirect shortcuts for teams and products
* update analysis github workflow with environment variables
* fix WEBAPP_URL is required
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* add vite survey package
* add renderSurvey method
* add all survey components
* First working version of renderSurvey
* integrate survey package into survey preview
* add survey modal functionality to formbricks-surveys
* fix build errors and add new template types
* add response queue
* add simple formbricks-js integration
* add local state management for surveys
* add local storage to multiple choice and open text questions
* add local state to other question types, layout fixes
* Fix modal close button, clean js package code
* add new calculate progress function
* fix progressbar on thankyou card
* fix churn survey branching in demo product
* use tsup to bundle @formbricks/js
* update survey positioning in link surveys
* fix preview reset button in link survey
* change logic for progress bar
* update progressbar logic
* update spacing
* add conditional autofocus / disable for iframe
* add userId to link survey
* integrated email verification
* moved token verification and reading to server component
* ran pnpm format
* added question prefilling
* ran pnpm format
* Moved question prefilling logic to Link Survey
* Refactor types
* centralize survey package props, fix build errors
* fix userId in link survey
* fix survey closed message
* add redirect on complete, fix bugs
* smaller bugfixes
* smaller bugfixes
* fix bugs
* fix build errors
* remove logs
---------
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
* fix: remove unused stripe_public_key env var
* feat: include all possible env vars in documentation
* update enviroment variables in docs
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* Improve developer experience by analyzing PRs automatically using Github actions
* update docker workflow base images
* use ubuntu latest image
* move issue label action to workflow dir
* feat: revamp nocode action across frontend, backend, and js lib
* fix: remove console warning for ref forwarding
* feat: make advancedToggle component and use it across
* feat: use advancedToggle all across survey editor
* feat: use advancedToggle all across survey editor for link surveys
* remove: unused imports
* ui tweaks
* fix: form registration
* chore: advancedOptionToggle now has grey box inside the div
* fix: handle multiple css selectors separately
* test no code demo app
* replace logout with reset in demo apps
---------
Co-authored-by: Johannes <johannes@formbricks.com>
* Initialized Gitpod tested scripts
* ignored ports 1025 and 8025
* added website dev environment
* removed api and error tasks and prioritized web task to be shown first
* moved link LinkSurvey to RSC
* made some code refactors
* made requested changes
* ran pnpm build and added configured inactive survey
* fixed a build issue
* made some code refactors
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* moved apikey settings to server component
* rename ZApiKeyData to ZApiKeyCreateInput
* Make smaller improvements
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* feat: migrate look and feel to serverside component with loading screen
* fix: use existing product type instead of creating a custom type
* fix: make improvements as Matti suggested
* change attributes order in updateProduct function
* run pnpm format
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* validate: for email in the user verification modal
* feat: email auth is now a server page, uses server-side zod lib for email input validation, removes validator lib
* Add FormWrapper to Error Message
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* made modal component responsive
* added tab switch
* added mobile preview mode for surveys
* did some refactors
* did some refactors
* added type defs
* ran pnpm format
* removed an unused comment
* fixed variable name typo
* fixed UI bugs and added mobile mockup to link surveys
* restored changes from fix long description PR
* fixed scroll to top issue and toggle hide bug
* fixed minor animation bug
* fixed placement issue
* re-embed restart button, make phone preview more responsive
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* Chore: moved profile settings to server component
* ran pnpm format
* fisxed a build issue
* made requested changes
* made some refactors
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* fix: fixes close survey on x response issue
* feat: updates
* chore: don't update _count
* chore: optimizations
* fix: fixes issue with not being able to enter a lower value at all
* update toast message
* add response count to toast
* only count completed responses
---------
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* feat: migration /[personId] page to server side
* feat: decouple components in person page
* fix: ZDisplaysWithSurveyName now extends the ZDisplay type
* feat: drop custom service and use existing service for survey and response
* run pnpm format
* shift data fetching to component level but still server side
* rename event to action
* move special person services to activity service
* remove activityFeedItem type in ActivityFeed
* simplify TResponseWithSurvey
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* fix: attempts to reduce time taken to create team
* fix: fixes long time taken in team creation
* fix: refactors prisma logic
* feat: added logic for adding demo data while signing up
* fix: adds comment
* fix: adds another logic for adding demo data
* fix: adds service for adding demo data
* fix: fixes
* fix: adds demo product creation logic in next auth options
* fix: fixes next auth options
* fix: fixes team creation logic
* refactor: clean up
* fix: moves the logic for adding demo product while creating team in bg
* fix: moves individual queries in a transaction
* refactor: service
* fix: moves api route to app-dir
* fix: fixes api calls
* fix: fixes cache
* fix: removes unused code
* feat: handle openssl producing special characters that were causing errrs for sed to read
* feat: use all variables in dockerfile from the sole env itself
* add back button, next with local storaage wip
* handle submission and skip submission logic
* handle showing stored value on same concurrent question type.
* remove console.log
* fix next button not showing, add saving answer on pressing back to local storage
* add temp props to QuestionCondition in preview modal
* add temp props to QuestionCondition in preview modal again...
* update navigation logic
* update survey question preview
* add back-button component
* add back button to formbricks/js
* refactor localStorage functions to lib
* remove unused import
* add form prefilling when reloading forms
* merge main into branch
* Revert "merge main into branch"
This reverts commit 13bc9c06ec.
* rename localStorage key answers->responses
* rename answers -> responses in linkSurvey lib
* when survey page reloaded jump to next question instead of current question
* rename getStoredAnswer -> getStoredResponse
* continue renaming
* continue renaming
* rename answerValue -> responseValue
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* feat: poc
* merge: individual docker-compose files
* fix: nits
* feat: postgres now only accessible internally
* feat: emoji time
* cleanup: my commented commands
* better emoji and warning on domain name
* fix: better handling of docker check
* feat: follow principle of least privilege and remove excess sudo in commands
* feat: read machine name dynamically
* feat: documentation for prod script
* feat: remove custom networks in the docker compose
* cleanup: comments in script
* update emojis to fix spacing
* attempt: new groyp
* attemp: move new group command at end for the ability to parse vars
* feat: it all works without sudo yay
* feat: cleanup docs as suggested
* documentation: self hosting for prod script
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* added validation to survey edit
* made refactors
* extracted validation rules into a single object and resolved draggable issue
* ran pnpm format
* fixed a validation bug
* fixed similar validation bug in other component
* implemented default and specific validation
* made some code refactors
* handled case where a question is deleted
* instead of storing questionIdx now we are storing question id in invalidQuestions array && ran pnpm format
* removed unused comment
* run pnpm format
* made requested changes
* removed unused export
* add types to validation.ts
* run pnpm format
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* url add to link-survey
* fixed
* fixed
* fixed
* fixed
* ran pnpm format
* make url optional in response input to not break existing integrations
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* feat: adds enhanced bug report github page and removes md version of it
* feat: adds enhanced feature request .yml github page and removes .md version of it
* refactor: makes the Desktop field as md editor on Bug Report Github Page
* refactor: converts the Environment field as checkbox on Bug Report Github Page
* Fix email notifications not working properly
* Fix response notification not working
* fix response meta schema
* fix typo in docs
* improve error message in webhooks
* feat: server rendering of event actions summary page & server actions
* chore: renaming event to action and minor refactoring
* fix: logging message
* delete: unnecessary file
* feat: migrate attributes overview page
* feat: impl grouped page & layout, logically differentiate attributes and actions
* pnpm format
* fix: logical addressing of dirs and minot bugs
* move: actionsAndAttributes navbar to dedicated dir from components
* fix: use server-only build-time checks and move actionsAttributes navbar
* revert: unnecessary docker compose changes
* resolve merge conflicts dynamically
* fix: address feedback comments
* use sparkles icon from heroicons
* fix updated action not updating in table
* remove async from client function due to warning
* move router.refresh in AddNoActionModal
* small rename
* feat: replace swr w server action in ActionSettingsTab
* replace custom error with ResourceNotFoundError error class
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* create people and survey on team create
* create people and responses / displays
* drafting GPT input
* add attributeClass, eventClass and people
* fix link in person detail page
* fix email instead of uid
* added two surveys
* add events, 3 more surveys
---------
Co-authored-by: Johannes <johannes@formbricks.com>
* feat: github action to build and push to dockerhub on release
* feat: docker repo and quickstart readmne
* fix: check for NEXTAUTH_SECRET in dockerfile before running
* fix: check for NEXTAUTH_SECRET as null or not
* add deployment guide
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* added metadata template
* created layout file in [survedId]
* changed Link to <a> for complete reload of individual survey
* added prop types for generateMetadata
* added page titles for sub pages
* Replaced survey title with Your Surveys
* fix layout metadata not working with latest changes to getAnalysisData()
* run pnpm format
* add new analysis folder for common layout
* fix conflicts
* add metadata to integrations page
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* feat: added a option to set ordering of choices
* changed the parameter for random ordering and used Switch instead of Select
* added logic for shuffle
* added shuffleOption in zod schema and fixed some copy.
* run pnpm format
* make shuffleOption optional in zod to prevent errors in existing data
* made fixes as asked in peer review and ran pnpm format
* minor bug fixes
* Update env.mjs
* fix shuffleArray to not shuffle reference object
* update shuffle method
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* Fix issue 427
* Address review comment
* jump back to top on long questions
* add to JS widget
---------
Co-authored-by: Seram Nitesh Singh <nitesh.s@auzmor.com>
Co-authored-by: Johannes <johannes@formbricks.com>
* add first part of sync service
* add actionClasses to js sync
* fix errors, add product to sync
* rewrite formbricks-js for new states and types
* fix tests
* fix build errors
* add cors
* fix cors errors and other bugs
* comment test in checks until working again
* feat: added surveyClosedMessage field to database and also added it's types
* feat: added the custom closed message to the frontend
* fix: fixes build issue
* fix: refactored the code to toggle surveyClosedMessage and redirectUrl
* pnpm format
* recreate prisma migration
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* add expiresAt prop to members call
* add expired badge in addition to pending in members list
* check for expired on invite link
* fix type error
* update invite expired message
* remove console.log
---------
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* add isDraft=true to all new questions and remove it on save
* update button to show on draft questions
* re-add input validation
---------
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* created new create-display and updated display endpoints with zod, db service-layer, and next.js route handlers
* changed the api URL and changed few type definations
* new getTeamDetails service is created which will be further used by display and response endpoints
* changed the prisma call with getTeamDetails service
* created display services and zod validation schema
* removed envId from func parameter
* fix build error by adding a type annotation
* Moved the return inside try block
* Removed comments
* changed the update display service name to markDisplayResponded
* Update route.ts
* reference person type in display, check response code first then transform to json
* add createdAt & updatedAt to person when query display
* pnpm format
* small optimizations
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* Added Notification API
* Added Email functionality to the weekly
notification
* Added no live survey email notification
* Activating weeklySummary notification alertSwitch
* Adding check to include only surveys which
have weeklySummary enabled
* Updated the condition for weekSummary
notification check
* update UI
* Update to reduce number of database calls
* Updated the email subject when no survey in weeklysummary
* applied pnpm format
* update notification settings with new types and fix functionality
* loop through all products to send weekly summary email, colocate files
* fix build errors
* add more types
* add vercel.json for cron configuration
* remove console.logs, limit responses to 5 per survey
* update email subject
* improve how responses are displayed in summary email
* update email layout
* add cron to github action instead of vercel
* add github action
* add beta flag
---------
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* feat: person overview is now a server rendered page
* feat: loader component & fix: minor changes as suggested
* hide: session count
* getAttributeValue always returns string
* fix: remove createdAt & updatedAt fields from user for now
* fix: use select instead of include to specify retreival fields
* feat: suspense streaming
* feat: skeleton table for streaming and loading
* fix: use integrated loading and cleanup components
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* enable consent summary
* fix type error
* fix Consent Summary to use dismissed instead of skipped and move to Server Component
* change Skipped to Dismissed in UI
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* only add packages once to their main package and remove them from other packages to avoid version conflicts
* update package versions
* update package versions, clean packages
* remove old vscode settings
* exclude formbricks-com from pnpm dev
* narrow down tsconfig includes, pnpm-lock update
* add pnpm test to github action
* fix: adds animation on duplicate tag
* fix: fixes error data flow
* fix: fixes tag getting animated on all errors
* fix: changes icon to heroicons
* fix: fixes error being thrown when adding duplicate tag
* fix: fixes responses not getting refetched
* init: jest for formbricks/js
* test: formbricks init
* test: formbricks set attributes
* test: formbricks updated attributes
* test: formbricks track, refresh, route change
* test: formbricks logout
* chore: use strict checking & replace let w const
* chore: destructure variables
* feat: test coverage visibility
* updated: pnpm lock file
* feat: tests now use a mock API
* fix: mock actual formbricks survey response and not empty placeholders
* rename: unit test for clarity
* chore: destructure setting attributes into individual tests
* feat: mock console logger for cleaner cli during tests
* add top level test script for turbo
* update babel config to fix errors in formbricks-js build
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* add placement enum and prop to db scheme
* enable placement toggle in setttings
* enable in-app survey placement demo
* add position helper function
* add placement to in-app-modal preview
* add placement prop to api endpoint
* add placement to widget
* remove coming soon
* add styling
* add apply tailwind styles instead of a ts function
* add clickoutside and darkoverlay prop
* add darkOverlay and clickOutside form
* update js package tailwind apply classes
* add background to widget and close on click outside
* only show backdrop and clickOutside if is center
* only display background when modal is centered
* responsive changes in js widget
* add updated migration, move styles from global.css to function
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* use new services for server-side data retrieval in survey responses & summary
* fix build errors
* add notes to response schema
* add response notes
* fix type conflicts
* add tag functionality
* run pnpm format
* fix tag state not updating correctly
* fat: added prisma model for Tag
* feat: adds api route for tags
* fat: added prisma model for Tag
* feat: adds mutation hook for creating a tag
* feat: adds apis for creating and retrieving tags
* feat: adds sample UI for creating and retrieving tags
* feat: adds UI components for Combobox
* feat: adds api router for fetching all tags for a product
* feat: adds combobox and api for appending tag to a response
* feat: adds api call for removing a tag from a response
* fix: relaced normal post with swr mutations
* fix: mutations for adding and deleting tags
* feat: integrated the create and delete tags apis and combobox
* fix: fixes api routes and db queries for tags apis
* fix: fixes api routes and headers
* feat: adds tag delete functionality
* feat: adds update tag api and UI
* feat: adds tags count api and integration
* feat: inital UI for tags table
* fix: UI for autosave name component
* fix: fixes api response
* fix: fixes errors on merge tags
* fat: added prisma model for Tag
* fix: replaces lodash.debounce with lodash
* fix: fixes capital letter tags not getting added
* fix: changed tag table to relate to environment
* fix: migrated tag apis from product to environment
* fix: formatting with prettier
* fix: fixes tags interface in single response
* fix: fixes UI bugs
* fix: fixes text on no tags
* fix: deleted local migrations
* fix: synced migrations with main
* fix: fixes combobox bugs
* fix: fixes placeholder
* update migrations
* fix build issues
* fix tag adding functionality
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* Add exit intent and scroll depth automatic actions
* Remove lorem ipsum text
* Modified event listeners to not get called if survey is already running
* Add trackEvent inside event listeners
* Remove lorem ipsum
* Move event listeners to init
* Fix exit intent listener
* Modify event listeners to get called everytime and change exit intent text
* Add missed files
* Move events to separate file and add name check
* Add name check
* Fix build error
* fix: remove environmentsNavbar on survey editor
* objects deep comparision utility function
* feat: confirm on window reload or close
* feat: confirm save on back
* feat: custom alert dialog
* remove radixui alert dialog
* replaced shadcn alert with new custom alert dialog
* fix: save button varient to darkCTA
* fix: moved beforeunload logic to surveymenubar
* fix: remove deepequal function
* installed lodash
* fix: survey not comparing on change
* fix: isqual import
* feat: added current person attributes to the user response
* feat: added tooltip showing user attributes in response view
* fix: switched to using the service layer and added annotations for json field
* rename PersonAttributesData to ResponsePersonAttributes to fit current naming scheme
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* Add env variable to check for team invite
* Check for only public invite env for invite
* Disable Add Member and block the invite API
* Change the invite disabled condition
* Update the condition for env variable
---------
Co-authored-by: Seram Nitesh Singh <nitesh.s@auzmor.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* feat: add deletes account button on profile section.
* feat: add delete account action when user click on delete account button
* feat:logout user when his account is deleted
* feat: added warning message before user deletes account
* feat: add description to Delete account
section
* fix: fix: build issue.
* fix: avoid giving the ownership of a team to a member who is not an admin
* fix: merge conflict
* fix: use !== in delete button disabled prop
* fix: typo semething -> Something
* refactor: simplified user deletion logic
* refactor: explain user deletion logic
* refactor: remove unecessary delete membership queries
* feat: add deletes account button on profile section.
* feat: add delete account action when user click on delete account button
* feat:logout user when his account is deleted
* feat: added warning message before user deletes account
* fix merge conlicts
* update to delete info text
* feat: delete the team if the owner deletes his account and the team has no admins
* add await
* Add method to check if user is admin or owner
* Add method to enable role based member invites
* Add Select Control element to UI to handle role based invite
* Add flag to allow add member feature for owner or admin level users only
* Fix error with role select element
* Add UI view to modify membership
* Add RoleElement component to handle the Role display
* Integrate api for Updating Accepted Member Role
* Integrate api for Updating Invitee's Role
* Resolve PR comments and merge conflicts
* add new zod schema for responses
* add new client endpoints for responses
* add services for responses and surveys
* add new responses model to webhooks & email
---------
Co-authored-by: Johannes <johannes@formbricks.com>
* remove debug loglevel from formbricks usage;
* remove license fields from internal packages
* improve package descriptions, add logger message for survey delay
* include formbricks api into formbricks js
* make formbricks errors package private
* update formbricks-js dependencies to include formbricks-api
* update formbricks-js to 0.1.20
* auto focus on sign up
* update PR template
* add updatedAt date to survey summary
* add animation to Progress, make timer smoother
* change button size in question card, auto focus
* add transition to js widget, fix auto focus in editor
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* use label instead of id in onboarding analysis, add logout to formbricks usage
* add await option for all sdk commands, fix logout bug in formbricks usage
* add @formbricks/api (api abstraction layer) and @formbricks/errors package to monorepo
* use @formbricks/api in @formbricks/js to expose an api endpoint
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* add moveQuestion function to handle index changes
* add dropdown arrows to context menu, disable on first / last element and call moveQuestion function
* fix: build error StartIcon typing
* fix: endIcon type for button
* Add new env variable NEXT_PUBLIC_WEBAPP_URL that is used server-side for the current address
* Move Next-Auth to App-Directory
* Move Membership-API & User-API to App-Directory
* Update env-examples with new structure
* add new onboarding for new and existing Formbricks users
* Add new personalized template view
---------
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* add team switch when user has multiple teams
* fix hydration error by changing the way env variables load
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
* feat: add modal to add new product to current team
* feat: add create product endpoint and helper function
* feat: display available products in dropdown and include environmentId in request
* new icon
---------
Co-authored-by: moritzrengert <moritz@rengert.de>
* update LP with walk through
* update docs with attributes and events
* update team UI + form validation
* add walk through to app
* small fixes
---------
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
### New Formbricks Release: Complete Rewrite, New Features & Enhanced UI 🚀
We're thrilled to announce the release of the new Formbricks, a complete overhaul of our codebase, packed with powerful features and an improved user experience.
#### What's New:
1. **Survey Builder**: Design and customize your in-product micro-surveys with our intuitive survey builder.
2. **Trigger Micro-Surveys**: Set up micro-surveys to appear at specific points within your app, allowing you to gather feedback when it matters most.
3. **JavaScript SDK**: Our new JavaScript SDK makes integration a breeze - just embed it once and you're ready to go.
4. **No-Code Events**: Set up events and triggers without writing a single line of code, making it accessible for everyone on your team.
5. **Revamped UI**: Enjoy an entirely new user interface that enhances usability and provides a smooth, delightful experience.
This release marks a major step forward for Formbricks, enabling you to better understand your users and build an outstanding product experience.
Please update your Formbricks integration to take advantage of these exciting new features, and let us know in the Discord if you have any questions or feedback!
Happy surveying! 🎉
Indent code blocks and texts in enumeration appropriately to make auto-enumeration work.
Use auto-enumeration (aka 1. for every enum item) to be more robust with respect to changes.
* add onboarding survey after user signup
* add user flag finishedOnboarding to database and session
* fix submission capture endpoint to allow customer property update
---------
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: knugget <johannes@knugget.de>
* add enterprise license, add ee package
* migrate database from workspaces to organisations
* add payment api endpoints and billing pages
* add stripe env variables to .env.example
* add PMF results dashboard
* add PMF Segmentation View
* add PMF setup instructions
* Built new Filter Navigation that is also used in Feedback
Co-authored-by: knugget <johannes@knugget.de>
description:"Suggest an idea for this project \U0001F680"
title:"[FEATURE]"
labels:enhancement
assignees:[]
body:
- type:textarea
id:problem-description
attributes:
label:Is your feature request related to a problem? Please describe.
description:A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required:true
- type:textarea
id:solution-description
attributes:
label:Describe the solution you'd like
description:A clear and concise description of what you want to happen.
validations:
required:true
- type:textarea
id:alternate-solution-description
attributes:
label:Describe alternatives you've considered
description:A clear and concise description of any alternative solutions or features you've considered.
validations:
required:false
- type:textarea
id:additional-context
attributes:
label:Additional context
description:Add any other context or screenshots about the feature request here.
validations:
required:false
- type:markdown
id:formbricks-info
attributes:
value:|
### How we code at Formbricks 🤓
- Follow Best Practices lined out in our [Contributor Docs](https://formbricks.com/docs/contributing/how-we-code)
- First time: Please read our [introductory blog post](https://formbricks.com/blog/join-the-formtribe)
- All UI components are in the package `formbricks/ui`
- Run `pnpm go` to find a demo app to test in-app surveys at `localhost:3002`
- Everything is type-safe
- We use **chatGPT** to help refactor code. Use our [Formbricks ✨ megaprompt ✨](https://github.com/formbricks/formbricks/blob/main/megaprompt.md) to create the right
context before you write your prompt.
- Anything unclear? [Ask in Discord](https://formbricks.com/discord)
<!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. -->
Fixes # (issue)
<!-- Please provide a screenshots or a loom video for visual changes to speed up reviews
Loom Video: https://www.loom.com/
-->
## Type of change
<!-- Please mark the relevant points by using [x] -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change adds a new database migration
- [ ] This change requires a documentation update
## How should this be tested?
<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration -->
- Test A
- Test B
## Checklist
<!-- We're starting to get more and more contributions. Please help us making this efficient for all of us and go through this checklist. Please tick off what you did -->
### Required
- [ ] Filled out the "How to test" section in this PR
- [ ] Read [How we Code at Formbricks](<[https://github.com/formbricks/formbricks/blob/main/CONTRIBUTING.md](https://formbricks.com/docs/contributing/how-we-code)>)
- [ ] Self-reviewed my own code
- [ ] Commented on my code in hard-to-understand bits
- [ ] Ran `pnpm build`
- [ ] Checked for warnings, there are none
- [ ] Removed all `console.logs`
- [ ] Merged the latest changes from main onto my branch with `git pull origin main`
- [ ] My changes don't cause any responsiveness issues
- [ ] First PR at Formbricks? [Please sign the CLA!](https://formbricks.com/clmyhzfrymr4ko00hycsg1tvx) Without it we wont be able to merge it 🙏
### Appreciated
- [ ] If a UI change was made: Added a screen recording or screenshots to this PR
- [ ] Updated the Formbricks Docs if changes were necessary
Hey there and thank you for opening this pull request! 👋🏼
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
Details:
```
${{ steps.lint_pr_title.outputs.error_message }}
```
# Delete a previous comment when the issue has been resolved
Portions of this software are licensed as follows:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
- All content that resides under the "packages/ee/" directory of this repository, if that directory exists, is licensed under the license defined in "packages/ee/LICENSE".
- All content that resides under the "packages/js/", "packages/errors/" and "packages/api/" directories of this repository, if that directories exist, is licensed under the "MIT" license as defined in the "LICENSE" files of these packages.
- All third party components incorporated into the Formbricks Software are licensed under the original license provided by the owner of the applicable component.
- Content outside of the above mentioned directories or restrictions above is available under the "AGPLv3" license as defined below.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
1. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
> :octocat: Are you looking for snoopForms - the Open Source Typeform Alternative? We're building the next stage of the snoopForms evolution here with Formbricks - more modular, more open, and for all your form needs. If you still are looking for the code of snoopForms you can find it in the [snoopforms branch](https://github.com/formbricks/formbricks/tree/snoopforms).

## 🔥 The FormTribe Hackathon is on!
We're building all essential form functionality so you don't have to. Modular, customizable, extendable. And open source.
To celebrate Hacktoberfest, we've launched our FormTribe hackathon. Write code or perform non-code side quests to collect points and increase your chances of winning the MacBook Air M2!
### Mission: Stop rewriting existing code
**Join lottery with a [single tweet!](https://formtribe.com). All info on [formtribe.com](https://formtribe.com)**
We want to solve forms once and for all. If, in 10 years, a web developer rewrites core form functionality instead of building on top of our stack, we didn’t do our job. We want you to build your next big thing faster. Our big thing is the last form tool humanity needs. Hold us accountable!
## ✨ About Formbricks
[Read more in our blog](https://formbricks-com.vercel.app/blog/snoopforms-becomes-formbricks)
Formbricks is your go-to solution for in-product micro-surveys that will supercharge your product experience. Use micro-surveys to target the right users at the right time without making surveys annoying.
Build a 'home-cooked' solution at the fraction of the time. We do the heavy lifting, you customize to your needs.
**Try it out in the cloud at [formbricks.com](https://formbricks.com)**
### React Forms Library
## 💪 Mission: Make customer-centric decisions based on data.
Building React forms has never been quicker. But there is more...
Loads of question types, validation, multi-page forms, logic jumps, i18n, custom styles - all the good stuff you want, but don't want to build yourself.
Building forms fast is great, but where do you pipe your data? And what is it worth without a schema?"
### Core API - The OS form engine
Your form looks perfect? Time to build integrations...
Our core API handles all of the submission handling of your forms and surveys. Our main objective is versatility, so that you can use it with any currently existing form. Soon we will integrate it with our React Form Builder. This allows for handling schemas so that you get a full image of your submission data.
Formbricks helps you apply best practices from data-driven work and experience management to make better business decisions. Ask users as they experience your product - and leverage a significantly higher conversion rate. Gather all insights you can - including partial submissions and build conviction for the next product decision. Better data, better business.
### Features
-**Fast Form Creation**: Build complex forms with our React Lib. Our data pipes also work with any other form.
-**Data Pipelines**: Save your data where you need it. Use webhooks or pre-built integrations.
-**Powerful Data Insights**: View and manage your results quicker. Handle submissions in our dahsboard.
-**No-Code Builder**: Let your operators create and change forms. Stick with React to style and embed forms. `(coming soon)`
-**Built-in Analytics**: Opening rate, drop-offs, conversions. Use privacy-first analytics out of the box. `(coming soon)`
-**Survey Templates**: NPS, CSAT, Employee Surveys. Name your business objective, we have the questions. `(coming soon)`
-📲 Create **in-product surveys** with our no code editor with multiple question types.
-📚 Choose from a variety of best-practice **templates**.
-👩🏻 Launch and **target your surveys to specific user groups** without changing your application code.
-🔗 Create shareable **link surveys**.
-👨👩👦 Invite your team members to **collaborate** on your surveys.
-🔌 Integrate Formbricks with **Slack, Posthog, Zapier, n8n and more**.
- 🔒 All **open source**, transparent and self-hostable.
### Why Formbricks
### Built on Open Source
-**Futureproof**: Form needs change. With Formbricks you’ll avoid island solutions right from the start.
-**Privacy by design**: Self-host the entire product and fly through privacy compliance reviews.
-**Community driven**: We're building for you. If you need something specific, we’re happy to build it!
-**Great DX**: We love a solid developer experience. We felt your pain and do our best to avoid it.
-**Customizable**: We have to build opinionated. If it doesn't suit your need, just change it up.
-**Extendable**: Even though we try, we cannot build every single integration. With Formbricks, you can.
-💻 [Typescript](https://www.typescriptlang.org/)
-🚀 [Next.js](https://nextjs.org/)
-⚛️ [React](https://reactjs.org/)
-🎨 [TailwindCSS](https://tailwindcss.com/)
-📚 [Prisma](https://prisma.io/)
-🔒 [Auth.js](https://authjs.dev/)
- 🧘♂️ [Zod](https://zod.dev/)
### Built With
## 🚀 Getting started
- [Typescript](https://www.typescriptlang.org/)
- [Next.js](https://nextjs.org/)
- [React](https://reactjs.org/)
- [TailwindCSS](https://tailwindcss.com/)
- [Prisma](https://prisma.io/)
We've got several options depending on your need to help you quickly get started with Formbricks.
## Installation and usage
### ☁️ Cloud Version
Coming soon - we will update this Readme in the weeks ahead and show you how to leverage all the advantages of Formbricks
Formbricks has a hosted cloud offering with a generous free plan to get you up and running as quickly as possible. To get started, please visit [formbricks.com](https://formbricks.com).
### 🐳 Self-hosted version
Formbricks is available Open-Source under AGPLv3 license. You can host Formbricks on your own servers using Docker without a subscription.
(In the future we may develop additional features that aren't in the free Open-Source version).
If you opt for self-hosting Formbricks, here are a few options to consider:
#### Docker
To get started with self-hosting with Docker, take a look at our [self-hosting docs](https://formbricks.com/docs/self-hosting/deployment).
#### Community managed One Click Hosting
##### Railway
You can deploy Formbricks on [Railway](https://railway.app) using the button below.
[](https://railway.app/new/template/PPDzCd)
### 👨💻 Development
#### Prerequisites
Here is what you need to be able to run Formbricks:
- [Docker](https://www.docker.com/) - to run PostgreSQL and MailHog
#### Local Setup
To get started locally, we've got a [guide to help you](https://formbricks.com/docs/contributing/setup).
#### Gitpod Setup
1. Click the button below to open this project in Gitpod.
2. This will open a fully configured workspace in your browser with all the necessary dependencies already installed.
[](https://gitpod.io/#https://github.com/formbricks/formbricks)
## ✍️ Contribution
We are very happy if you are interested in contributing to Formbricks 🤗
Here are a few options:
- Star this repo.
- Create issues every time you feel something is missing or goes wrong.
- Upvote issues with 👍 reaction so we know what's the demand for a particular issue to prioritize it within the roadmap.
Please check out [our contribution guide](https://formbricks.com/docs/contributing/introduction) and our [list of open issues](https://github.com/formbricks/formbricks/issues) for more information.
Let's have a chat about your survey needs and get you started.
<a href="https://cal.com/johannes/onboarding?utm_source=banner&utm_campaign=oss"><img alt="Book us with Cal.com" src="https://cal.com/book-with-cal-dark.svg" /></a>
## ⚖️ License
Distributed under the AGPLv3 License. See [`LICENSE`](./LICENSE) for more information.
## 🔒 Security
We take security very seriously. If you come across any security vulnerabilities, please disclose them by sending an email to security@formbricks.com. We appreciate your help in making our platform as secure as possible and are committed to working with you to resolve any issues quickly and efficiently. See [`SECURITY.md`](./SECURITY.md) for more information.
<p align="right"><a href="#top">🔼 Back to top</a></p>
This is Formbrick's security policy. Please reach out to us
on our Discord or, if privately, via <security@formbricks.com>
## Introduction
Formbricks is dedicated to maintaining the integrity and security of our systems and our clients' data. In our pursuit to keep our technology environment safe, we welcome the collaborative efforts of our user community and security researchers to enhance security protocols and continuously secure our platform. This security policy outlines our approach towards handling data, ensuring secure practices, and managing the disclosure of vulnerabilities.
## I. Third-Party Data Usage Policy
We affirm our commitment towards meticulous validation of data usage and collection scope by any third-party library or integration utilized in our operations. We adhere to the following protocols:
- Rigorous vetting of third-party services to confirm adherence to our data usage and privacy standards.
- Continuous monitoring and assessment of third-party practices to ensure ongoing compliance.
- Immediate action to mitigate risks if a third-party deviates from agreed-upon data practices.
## II. Annual Penetration Testing (Pentest)
To understand and bolster our security stature, Formbricks undertakes:
- Annual penetration testing executed by an independent, skilled third party.
- Prioritization of any identified issues, with immediate action on critical vulnerabilities.
- Transparent communication and learnings shared with relevant stakeholders.
## III. Vulnerability Reporting and Management
Please do not use attacks on physical security, social engineering, distributed denial of service, spam or applications of third parties.
### **A. When to Report a Vulnerability**
We invite you to report if:
- A potential security vulnerability in Formbricks is identified.
- There is uncertainty about how a vulnerability affects our platform.
- A vulnerability is detected in a dependent project of Formbricks.
- An action was executed which, in your belief, should be restricted.
### **B. When Reporting is Unnecessary**
Avoid reporting if:
- Assistance is needed to optimize Formbricks for security – please engage on our Discord for this.
- Help is required for applying security-related updates.
- The concern is not related to security.
### **C. Vulnerability Reporting Procedure**
In the interest of responsibly managing vulnerabilities, please adhere to the following procedure:
> Do not reveal the problem to others until it has been resolved.
1.**Send a Detailed Report**:
- Address emails to [security@formbricks.com](mailto:security@formbricks.com).
- Include:
- Problem description.
- Detailed, reproducible steps, with screenshots where possible.
- Affected version(s).
- Known possible mitigations.
- Your Discord username or preferred contact method.
2.**Acknowledgement of Receipt**:
- Our security team will acknowledge receipt and provide an initial response within 48 hours.
- Following verification of the vulnerability and the fix, a release plan will be formulated, with the fix deployed between 7 to 28 days, depending on the severity and complexity.
3.**Ongoing Communication**:
- A project maintainer may engage with you for additional details or clarification.
- We appreciate your patience as we explore the reported item, verify its authenticity, and ascertain the existence of a vulnerability.
---
### Please Read the below carefully
If you have followed the instructions above, we will **not** take any legal action against you in regard to the report,
We will handle your report with strict confidentiality, and not pass on your personal details to third parties without your permission, We will keep you informed of the progress towards resolving the problem, In the public information concerning the problem reported, we will give your name as the discoverer of the problem (unless you desire otherwise).
We, at Formbricks, wish to express our gratitude towards all individuals who assist us in fortifying our security posture. Your responsible disclosure and cooperation enable us to elevate our security protocols, safeguarding our platform and data therein.
Tailwind Labs Inc. grants you an on-going, non-exclusive license to use the Components and Templates.
The license grants permission to **one individual** (the Licensee) to access and use the Components and Templates.
You **can**:
- Use the Components and Templates to create unlimited End Products.
- Modify the Components and Templates to create derivative components and templates. Those components and templates are subject to this license.
- Use the Components and Templates to create unlimited End Products for unlimited Clients.
- Use the Components and Templates to create End Products where the End Product is sold to End Users.
- Use the Components and Templates to create End Products that are open source and freely available to End Users.
You **cannot**:
- Use the Components and Templates to create End Products that are designed to allow an End User to build their own End Products using the Components and Templates or derivatives of the Components and Templates.
- Re-distribute the Components and Templates or derivatives of the Components and Templates separately from an End Product, neither in code or as design assets.
- Share your access to the Components and Templates with any other individuals.
- Use the Components and Templates to produce anything that may be deemed by Tailwind Labs Inc, in their sole and absolute discretion, to be competitive or in conflict with the business of Tailwind Labs Inc.
### Example usage
Examples of usage **allowed** by the license:
- Creating a personal website by yourself.
- Creating a website or web application for a client that will be owned by that client.
- Creating a commercial SaaS application (like an invoicing app for example) where end users have to pay a fee to use the application.
- Creating a commercial self-hosted web application that is sold to end users for a one-time fee.
- Creating a web application where the primary purpose is clearly not to simply re-distribute the components (like a conference organization app that uses the components for its UI for example) that is free and open source, where the source code is publicly available.
Examples of usage **not allowed** by the license:
- Creating a repository of your favorite Tailwind UI components or templates (or derivatives based on Tailwind UI components or templates) and publishing it publicly.
- Creating a React or Vue version of Tailwind UI and making it available either for sale or for free.
- Create a Figma or Sketch UI kit based on the Tailwind UI component designs.
- Creating a "website builder" project where end users can build their own websites using components or templates included with or derived from Tailwind UI.
- Creating a theme, template, or project starter kit using the components or templates and making it available either for sale or for free.
- Creating an admin panel tool (like [Laravel Nova](https://nova.laravel.com/) or [ActiveAdmin](https://activeadmin.info/)) that is made available either for sale or for free.
In simple terms, use Tailwind UI for anything you like as long as it doesn't compete with Tailwind UI.
### Personal License Definitions
Licensee is the individual who has purchased a Personal License.
Components and Templates are the source code and design assets made available to the Licensee after purchasing a Tailwind UI license.
End Product is any artifact produced that incorporates the Components or Templates or derivatives of the Components or Templates.
End User is a user of an End Product.
Client is an individual or entity receiving custom professional services directly from the Licensee, produced specifically for that individual or entity. Customers of software-as-a-service products are not considered clients for the purpose of this document.
## Team License
Tailwind Labs Inc. grants you an on-going, non-exclusive license to use the Components and Templates.
The license grants permission for **up to 25 Employees and Contractors of the Licensee** to access and use the Components and Templates.
You **can**:
- Use the Components and Templates to create unlimited End Products.
- Modify the Components and Templates to create derivative components and templates. Those components and templates are subject to this license.
- Use the Components and Templates to create unlimited End Products for unlimited Clients.
- Use the Components and Templates to create End Products where the End Product is sold to End Users.
- Use the Components and Templates to create End Products that are open source and freely available to End Users.
You **cannot**:
- Use the Components or Templates to create End Products that are designed to allow an End User to build their own End Products using the Components or Templates or derivatives of the Components or Templates.
- Re-distribute the Components or Templates or derivatives of the Components or Templates separately from an End Product.
- Use the Components or Templates to create End Products that are the property of any individual or entity other than the Licensee or Clients of the Licensee.
- Use the Components or Templates to produce anything that may be deemed by Tailwind Labs Inc, in their sole and absolute discretion, to be competitive or in conflict with the business of Tailwind Labs Inc.
### Example usage
Examples of usage **allowed** by the license:
- Creating a website for your company.
- Creating a website or web application for a client that will be owned by that client.
- Creating a commercial SaaS application (like an invoicing app for example) where end users have to pay a fee to use the application.
- Creating a commercial self-hosted web application that is sold to end users for a one-time fee.
- Creating a web application where the primary purpose is clearly not to simply re-distribute the components or templates (like a conference organization app that uses the components or a template for its UI for example) that is free and open source, where the source code is publicly available.
Examples of use **not allowed** by the license:
- Creating a repository of your favorite Tailwind UI components or template (or derivatives based on Tailwind UI components or templates) and publishing it publicly.
- Creating a React or Vue version of Tailwind UI and making it available either for sale or for free.
- Creating a "website builder" project where end users can build their own websites using components or templates included with or derived from Tailwind UI.
- Creating a theme or template using the components or templates and making it available either for sale or for free.
- Creating an admin panel tool (like [Laravel Nova](https://nova.laravel.com/) or [ActiveAdmin](https://activeadmin.info/)) that is made available either for sale or for free.
- Creating any End Product that is not the sole property of either your company or a client of your company. For example your employees/contractors can't use your company Tailwind UI license to build their own websites or side projects.
### Team License Definitions
Licensee is the business entity who has purchased a Team License.
Components and Templates are the source code and design assets made available to the Licensee after purchasing a Tailwind UI license.
End Product is any artifact produced that incorporates the Components or Templates or derivatives of the Components or Templates.
End User is a user of an End Product.
Employee is a full-time or part-time employee of the Licensee.
Contractor is an individual or business entity contracted to perform services for the Licensee.
Client is an individual or entity receiving custom professional services directly from the Licensee, produced specifically for that individual or entity. Customers of software-as-a-service products are not considered clients for the purpose of this document.
## Enforcement
If you are found to be in violation of the license, access to your Tailwind UI account will be terminated, and a refund may be issued at our discretion. When license violation is blatant and malicious (such as intentionally redistributing the Components or Templates through private warez channels), no refund will be issued.
The copyright of the Components and Templates is owned by Tailwind Labs Inc. You are granted only the permissions described in this license; all other rights are reserved. Tailwind Labs Inc. reserves the right to pursue legal remedies for any unauthorized use of the Components or Templates outside the scope of this license.
## Liability
Tailwind Labs Inc.’s liability to you for costs, damages, or other losses arising from your use of the Components or Templates — including third-party claims against you — is limited to a refund of your license fee. Tailwind Labs Inc. may not be held liable for any consequential damages related to your use of the Components or Templates.
This Agreement is governed by the laws of the Province of Ontario and the applicable laws of Canada. Legal proceedings related to this Agreement may only be brought in the courts of Ontario. You agree to service of process at the e-mail address on your original order.
## Questions?
Unsure which license you need, or unsure if your use case is covered by our licenses?
Email us at [support@tailwindui.com](mailto:support@tailwindui.com) with your questions.
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
## Getting Started
First, run the development server:
```bash
npm run dev
# or
yarn dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
## Learn More
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
title: "Implementing Code Actions in Formbricks | Real-time User Action Tracking",
description:
"Dive into the world of Formbricks' code actions. Learn how to seamlessly integrate formbricks.track() method into your codebase, enabling real-time tracking of user actions like button clicks, visiting a specific URL. Up your survey game with precise and exact triggers.",
};
#### Actions
# Code Actions
Actions can also be set in the code base. You can fire an action using `formbricks.track()`
<Col>
<CodeGroup title="Track an action">
```javascript
formbricks.track("Action Name");
```
</CodeGroup>
</Col>
Here is an example of how to fire an action when a user clicks a button:
title: "Implementing No-Code Actions in Formbricks | Real-time User Action Tracking",
description:
"Discover the power of Formbricks' No-Code Actions. Easily set up triggers based on Page URL, innerText, and CSS Selectors without touching a line of code. Inccrease user engagement and get insights at precise moments in the user journey.",
};
#### Actions
# No-Code Actions
No-Code actions can be set up within Formbricks with just a few clicks. There are three types of No-Code actions:
## Page URL Action
The page URL action is triggered, when a user visits a specific page in your application. There are several match conditions:
- `exactMatch`: The URL should exactly match the provided string.
- `contains`: The URL should contain the specified string as a substring.
- `startsWith`: The URL should start with the specified string.
- `endsWith`: The URL should end with the specified string.
- `notMatch`: The URL should not match the specified condition.
- `notContains`: The URL should not contain the specified string as a substring.
## innerText Action
The innerText action checks if the `innerText` of a clicked HTML element matches a specific text, e.g. the label of a button. Display a survey on any button click!
## CSS Selector Action
The CSS Selector action checks if the provided CSS selector matches the selector of a clicked HTML element. The CSS selector can be a class, id or any other CSS selector within your website. Display a survey on any element click!
title: "Using Actions in Formbricks | Fine-tuning User Moments",
description:
"Dive deep into how actions in Formbricks help products and teams to engage users at precise moments in their journey. Discover the power of actions, from coding to no-code setups, to refine user targeting and generate richer, more detailed user insights.",
};
#### Actions
# What are actions and why are they useful?
You want to understand what your users think and feel during specific moments in the user journey. To be able to ask at exactly the right point in time, you need actions.
## What are actions?
Actions are a little notification sent from your application to Formbricks. You decide which actions are sent either in your [Code](/docs/actions/code) or by setting up a [No-Code](/docs/actions/no-code) action within Formbricks.
## How do actions work?
When a predefined action happens in your app, the Formbricks widget notices. This action can then trigger a survey to be shown to the user and is stored in the database.
## Why are actions useful?
Actions help you to display your surveys at the right time. Later on, you will be able to segment your users based on the actions they have triggered in the past. This way, you can create much more granular user segments, e.g. only target users that already have used a specific feature.
import { Fence } from "@/components/shared/Fence";
export const meta = {
title: "Formbricks Public Client API Guide: Manage Survey Displays & Responses",
description:
"Dive deep into Formbricks' Public Client API designed for customisation. This comprehensive guide provides detailed instructions on how to mark surveys as displayed as well as responded for individual persons, ensuring seamless client-side interactions without compromising data security.",
};
#### Client API
# Displays API
The Public Client API is designed for the JavaScript SDK and does not require authentication. It's primarily used for creating persons, sessions, and responses within the Formbricks platform. This API is ideal for client-side interactions, as it doesn't expose sensitive information.
This set of API can be used to
- [Mark Survey as Displayed](#mark-survey-as-displayed-for-person)
- [Mark Survey as Responded](#mark-survey-as-responded-for-person)
---
## Mark Survey as Displayed for Person {{ tag: 'POST', label: '/api/v1/client/diplays' }}
<Row>
<Col>
Mark a Survey as seen for a Person provided valid SurveyId and PersonId.
title: "Formbricks API Overview: Public Client & Management API Breakdown",
description:
"Get a detailed understanding of Formbricks' dual API offerings: the unauthenticated Public Client API optimized for client-side tasks and the secured Management API for advanced account operations. Choose the perfect fit for your integration needs and ensure robust data handling",
};
#### API
# API Overview
Formbricks offers two types of APIs: the **Public Client API** and the **Management API**. Each API serves a different purpose, has different authentication requirements, and provides access to different data and settings.
Checkout the [API Key Setup](/docs/api/api-key-setup) - to generate, store, or delete API Keys.
## Public Client API
The Public Client API is designed for the JavaScript SDK and does not require authentication. It's primarily used for creating persons, sessions, and responses within the Formbricks platform. This API is ideal for client-side interactions, as it doesn't expose sensitive information.
- [Displays API](/docs/api/client/displays) - Mark Survey as Displayed or Responded for a Person
- [Responses API](/docs/api/client/responses) - Create & update responses for a survey
## Management API
The Management API provides access to all data and settings that are visible in the Formbricks App. This API requires a personal API Key for authentication, which can be generated in the Settings section of the Formbricks App. With the Management API, you can manage your Formbricks account programmatically, accessing and modifying data and settings as needed.
**Auth:** Personal API Key
API requests made to the Management API are authorized using a personal API key. This key grants the same rights and access as if you were logged in at formbricks.com. It's essential to keep your API key secure and not share it with others.
To generate, store, or delete an API key, follow the instructions provided on the following page [API Key](/docs/api/api-key-setup).
- [Action Class API](/docs/api/management/action-classes) - Create, Update, and Delete Action Classes
- [Attribute Class API](/docs/api/management/attribute-classes) - Create, Update, and Delete Attribute Classes
- [Me API](/docs/api/management/me) - Retrieve Account Information
- [People API](/docs/api/management/people) - Create, Update, and Delete People
- [Responses API](/docs/api/management/responses) - Create, Update, and Delete Responses
- [Surveys API](/docs/api/management/surveys) - Create, Update, and Delete Surveys
- [Webhook API](/docs/api/management/webhooks) - Create, Update, and Delete Webhooks
<Note>
By understanding the differences between these two APIs, you can choose the appropriate one for your needs,
ensuring a secure and efficient integration with the Formbricks platform.
import { Fence } from "@/components/shared/Fence";
export const meta = {
title: "Formbricks Responses API Documentation - Manage Your Survey Data Seamlessly",
description:
"Unlock the full potential of Formbricks' Responses API. From fetching to updating survey responses, our comprehensive guide helps you integrate and manage survey data efficiently without compromising security. Ideal for client-side interactions.",
};
#### Management API
# Responses API
The Public Client API is designed for the JavaScript SDK and does not require authentication. It's primarily used for creating persons, sessions, and responses within the Formbricks platform. This API is ideal for client-side interactions, as it doesn't expose sensitive information.
---
## Create a response {{ tag: 'POST', label: '/api/v1/client/responses' }}
Add a new response to a survey.
<Row>
<Col>
### Mandatory Body Fields
<Properties>
<Property name="surveyId" type="string">
The id of the survey the response belongs to.
</Property>
<Property name="finished" type="boolean">
Marks whether the response is complete or not.
</Property>
<Property name="data" type="string">
The data of the response as JSON object (key: questionId, value: answer).
</Property>
</Properties>
### Optional Body Fields
<Properties>
<Property name="personId" type="string" required>
Internal Formbricks id to identify the user sending the response
| data | yes | - | The response data object (answers to the survey). In this object the key is the questionId, the value the answer of the user to this question. |
| personId | no | - | The person this response is connected to. |
| surveyId | yes | - | The survey this response is connected to. |
| finished | yes | false | Mark a response as complete to be able to filter accordingly. |
| data | yes | - | The response data object (answers to the survey). In this object the key is the questionId, the value the answer of the user to this question. |
| finished | yes | false | Mark a response as complete to be able to filter accordingly. |
import { Fence } from "@/components/shared/Fence";
export const meta = {
title: "Formbricks People API: Fetch or Create Person Overview",
description:
"Dive into Formbricks' People API within the Public Client API suite, designed to work without authentication requirements. Seamlessly fetch or create a person by their userId and environmentId, optimizing client-side interactions while maintaining data privacy.",
};
#### Management API
# Action Classes API
This set of API can be used to
- [List Actions](#get-all-action-classes)
- [Get Action](#get-action-class-by-id)
- [Create Actions](#create-action-class)
- [Delete Actions](#delete-action-class)
<Note>You will need an API Key to interact with these APIs.</Note>
---
## Get all Action Classes {{ tag: 'GET', label: '/api/v1/management/action-classes' }}
<Row>
<Col>
Get all the existing action classes in your environment.
"This guide provides step-by-step instructions to generate, store, and delete API keys, ensuring safe and authenticated access to your Formbricks account.",
};
#### API
# API Key Setup
## Auth: Personal API key
The API requests are authorized with a personal API key. This API key gives you the same rights as if you were logged in at formbricks.com - **don't share it around!**
### How to generate an API key
1. Go to your settings on [app.formbricks.com](https://app.formbricks.com).
2. Go to page “API keys”
<Image src={AddApiKey} alt="Add API Key" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" />
3. Create a key for the development or production environment.
4. Copy the key immediately. You won’t be able to see it again.
<Image
src={ApiKeySecret}
alt="API Key Secret"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
<Note>
### Store API key safely
Anyone who has your API key has full control over your account.
For security reasons, you cannot view the API key again.
</Note>
### Test your API Key
Hit the below request to verify that you are authenticated with your API Key and the server is responding.
## Get My Profile {{ tag: 'GET', label: '/api/v1/me' }}
<Row>
<Col>
Get the product details and environment type of your account.
import { Fence } from "@/components/shared/Fence";
export const meta = {
title: "Formbricks People API: Fetch or Create Person Overview",
description:
"Dive into Formbricks' People API within the Public Client API suite, designed to work without authentication requirements. Seamlessly fetch or create a person by their userId and environmentId, optimizing client-side interAttributes while maintaining data privacy.",
};
#### Management API
# Attribute Classes API
This set of API can be used to
- [List Attributes](#get-all-attribute-classes)
- [Get Attributes](#get-attribute-class-by-id)
- [Create Attributes](#create-attribute-class)
- [Delete Attributes](#delete-attribute-class)
<Note>You will need an API Key to interact with these APIs.</Note>
---
## Get all Attribute Classes {{ tag: 'GET', label: '/api/v1/management/attribute-classes' }}
<Row>
<Col>
Get all the existing attribute classes in your environment.
import { Fence } from "@/components/shared/Fence";
export const meta = {
title: "Formbricks People API: Fetch or Create Person Overview",
description:
"Dive into Formbricks' People API within the Public Client API suite, designed to work without authentication requirements. Seamlessly fetch or create a person by their userId and environmentId, optimizing client-side interactions while maintaining data privacy.",
};
#### Management API
# Me API
This API can be used to get your own current environment details.
<Note>You will need an API Key to interact with these APIs.</Note>
---
## Get Environment {{ tag: 'GET', label: '/api/v1/management/me' }}
import { Fence } from "@/components/shared/Fence";
export const meta = {
title: "Formbricks People API: Fetch or Create Person Overview",
description:
"Dive into Formbricks' People API within the Public Client API suite, designed to work without authentication requirements. Seamlessly fetch or create a person by their userId and environmentId, optimizing client-side interactions while maintaining data privacy.",
};
#### Management API
# People API
This set of API can be used to
- [List People](#list-people)
- [Get Person](#get-person)
- [Delete Person](#delete-person)
<Note>You will need an API Key to interact with these APIs.</Note>
---
## List People {{ tag: 'GET', label: '/api/v1/management/people' }}
import { Fence } from "@/components/shared/Fence";
export const meta = {
title: "Formbricks Responses API Documentation - Manage Your Survey Data Seamlessly",
description:
"Unlock the full potential of Formbricks' Responses API. From fetching to updating survey responses, our comprehensive guide helps you integrate and manage survey data efficiently without compromising security. Ideal for client-side interactions.",
};
#### Management API
# Responses API
This set of API can be used to
- [List Responses](#list-all-responses)
- [Get Response](#get-response-by-id)
- [Delete Response](#delete-a-response)
<Note>You will need an API Key to interact with these APIs.</Note>
---
## List all Responses {{ tag: 'GET', label: '/api/v1/management/responses' }}
<Row>
<Col>
Retrieve all the responses you have received in your environment.
import { Fence } from "@/components/shared/Fence";
export const meta = {
title: "Formbricks Surveys API Documentation - How to Retrieve All Surveys",
description:
"Explore the comprehensive guide to the Formbricks Surveys API. Learn how to effectively retrieve all the surveys in your environment with the necessary headers and API key setup. Includes sample request and response formats.",
};
#### Management API
# Surveys API
This set of API can be used to
- [List All Surveys](#list-all-surveys)
- [Get Survey](#get-survey-by-id)
- [Create Survey](#create-survey)
- [Delete Survey](#delete-survey-by-id)
<Note>You will need an API Key to interact with these APIs.</Note>
---
## List all surveys {{ tag: 'GET', label: '/api/v1/management/surveys' }}
<Row>
<Col>
Retrieve all the surveys you have for the environment.
"headline": "You are one of our power users! Do you have 5 minutes?",
"required": false,
"buttonLabel": "Happy to help!",
"logic": [
{
"condition": "skipped",
"destination": "end"
}
],
"html": "<p class=\"fb-editor-paragraph\" dir=\"ltr\"><span>We would love to understand your user experience better. Sharing your insight helps a lot!</span></p>",
"buttonExternal": false,
"dismissButtonLabel": "No, thanks."
},
{
"id": "kp62fbqe8cfzmvy8qwpr81b2",
"type": "multipleChoiceSingle",
"headline": "How disappointed would you be if you could no longer use My Product?",
"subheader": "Please select one of the following options:",
"required": true,
"choices": [
{
"id": "bdgy1hnwd7uwmfxk1ljqp1n5",
"label": "Not at all disappointed"
},
{
"id": "poabnvgtwenp8rb2v70gj4hj",
"label": "Somewhat disappointed"
},
{
"id": "opfiqyqz8wrqn0i0f7t24d3n",
"label": "Very disappointed"
}
],
"shuffleOption": "none"
},
{
"id": "klvpwd4x08x8quesihvw5l92",
"type": "multipleChoiceSingle",
"headline": "What is your role?",
"subheader": "Please select one of the following options:",
"required": true,
"choices": [
{
"id": "c8nerw6l9gpsxcmqkn10f9hy",
"label": "Founder"
},
{
"id": "ebjqezei6a2axtuq86cleetn",
"label": "Executive"
},
{
"id": "ctiijjblyhlp22snypfamqt1",
"label": "Product Manager"
},
{
"id": "ibalyr0mhemfkkr82vypmg40",
"label": "Product Owner"
},
{
"id": "fipk606aegslbd0e7yhc0xjx",
"label": "Software Engineer"
}
],
"shuffleOption": "none"
},
{
"id": "ryo75306flyg72iaeditbv51",
"type": "openText",
"headline": "What type of people do you think would most benefit from My Product?",
"required": true
},
{
"id": "lkjaxb73ulydzeumhd51sx9g",
"type": "openText",
"headline": "What is the main benefit your receive from My Product?",
"required": true
},
{
"id": "ec7agikkr58j8uonhioinkyk",
"type": "openText",
"headline": "How can we improve My Product for you?",
"subheader": "Please be as specific as possible.",
"required": true
}
],
"thankYouCard": {
"enabled": true,
"headline": "Thank you!",
"subheader": "We appreciate your feedback."
},
"delay": 0,
"autoComplete": null,
"closeOnDate": null
}
]
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Get Survey by ID {{ tag: 'GET', label: '/api/v1/management/surveys/<survey-id>' }}
"headline": "Why did you cancel your subscription?",
"subheader": "We're sorry to see you leave. Help us do better:",
"required": true,
"logic": [
{
"condition": "equals",
"value": "Difficult to use",
"destination": "easier-to-use"
},
{
"condition": "equals",
"value": "It's too expensive",
"destination": "30-off"
},
{
"condition": "equals",
"value": "I am missing features",
"destination": "missing-features"
},
{
"condition": "equals",
"value": "Poor customer service",
"destination": "poor-service"
},
{
"condition": "equals",
"value": "I just didn't need it anymore",
"destination": "end"
}
],
"choices": [
{
"id": "isud2xethsw63dlwl89kr4kj",
"label": "Difficult to use"
},
{
"id": "opuu4ba3dlele3n0gjkuh27c",
"label": "It's too expensive"
},
{
"id": "gnypapo0rhvkt8pwosrphvbl",
"label": "I am missing features"
},
{
"id": "wkgsrsrazd9kfunqhzjezx6t",
"label": "Poor customer service"
},
{
"id": "pykmgyyw74vg0gaeryj6bo4c",
"label": "I just didn't need it anymore"
}
]
},
{
"id": "easier-to-use",
"type": "openText",
"headline": "What would have made {{productName}} easier to use?",
"subheader": "",
"required": true,
"buttonLabel": "Send",
"logic": [
{
"condition": "submitted",
"destination": "end"
}
]
},
{
"id": "30-off",
"type": "cta",
"headline": "Get 30% off for the next year!",
"required": true,
"buttonLabel": "Get 30% off",
"logic": [
{
"condition": "clicked",
"destination": "end"
}
],
"html": "<p class=\"fb-editor-paragraph\" dir=\"ltr\"><span>We'd love to keep you as a customer. Happy to offer a 30% discount for the next year.</span></p>",
"buttonUrl": "https://formbricks.com",
"buttonExternal": true,
"dismissButtonLabel": "Skip"
},
{
"id": "missing-features",
"type": "openText",
"headline": "What features are you missing?",
"subheader": "",
"required": true,
"logic": [
{
"condition": "submitted",
"destination": "end"
}
]
},
{
"id": "poor-service",
"type": "cta",
"headline": "So sorry to hear 😔 Talk to our CEO directly!",
"required": true,
"buttonLabel": "Send email to CEO",
"logic": [
{
"condition": "clicked",
"destination": "end"
}
],
"html": "<p class=\"fb-editor-paragraph\" dir=\"ltr\"><span>We aim to provide the best possible customer service. Please email our CEO and she will personally handle your issue.</span></p>",
"buttonUrl": "mailto:ceo@company.com",
"buttonExternal": true,
"dismissButtonLabel": "Skip"
}
],
"thankYouCard": {
"enabled": false
},
"delay": 0,
"autoComplete": null,
"closeOnDate": null,
"surveyClosedMessage": null,
"verifyEmail": null
}
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
"headline": "Why did you cancel your subscription?",
"subheader": "We're sorry to see you leave. Help us do better:",
"required": true,
"logic": [
{
"condition": "equals",
"value": "Difficult to use",
"destination": "easier-to-use"
},
{
"condition": "equals",
"value": "It's too expensive",
"destination": "30-off"
},
{
"condition": "equals",
"value": "I am missing features",
"destination": "missing-features"
},
{
"condition": "equals",
"value": "Poor customer service",
"destination": "poor-service"
},
{
"condition": "equals",
"value": "I just didn't need it anymore",
"destination": "end"
}
],
"choices": [
{
"id": "isud2xethsw63dlwl89kr4kj",
"label": "Difficult to use"
},
{
"id": "opuu4ba3dlele3n0gjkuh27c",
"label": "It's too expensive"
},
{
"id": "gnypapo0rhvkt8pwosrphvbl",
"label": "I am missing features"
},
{
"id": "wkgsrsrazd9kfunqhzjezx6t",
"label": "Poor customer service"
},
{
"id": "pykmgyyw74vg0gaeryj6bo4c",
"label": "I just didn't need it anymore"
}
]
},
{
"id": "easier-to-use",
"type": "openText",
"headline": "What would have made {{productName}} easier to use?",
"subheader": "",
"required": true,
"buttonLabel": "Send",
"logic": [
{
"condition": "submitted",
"destination": "end"
}
]
},
{
"id": "30-off",
"type": "cta",
"headline": "Get 30% off for the next year!",
"required": true,
"buttonLabel": "Get 30% off",
"logic": [
{
"condition": "clicked",
"destination": "end"
}
],
"html": "<p class=\"fb-editor-paragraph\" dir=\"ltr\"><span>We'd love to keep you as a customer. Happy to offer a 30% discount for the next year.</span></p>",
"buttonUrl": "https://formbricks.com",
"buttonExternal": true,
"dismissButtonLabel": "Skip"
},
{
"id": "missing-features",
"type": "openText",
"headline": "What features are you missing?",
"subheader": "",
"required": true,
"logic": [
{
"condition": "submitted",
"destination": "end"
}
]
},
{
"id": "poor-service",
"type": "cta",
"headline": "So sorry to hear 😔 Talk to our CEO directly!",
"required": true,
"buttonLabel": "Send email to CEO",
"logic": [
{
"condition": "clicked",
"destination": "end"
}
],
"html": "<p class=\"fb-editor-paragraph\" dir=\"ltr\"><span>We aim to provide the best possible customer service. Please email our CEO and she will personally handle your issue.</span></p>",
"buttonUrl": "mailto:ceo@company.com",
"buttonExternal": true,
"dismissButtonLabel": "Skip"
}
],
"thankYouCard": {
"enabled": false
},
"delay": 0,
"autoComplete": null,
"closeOnDate": null,
"surveyClosedMessage": null,
"verifyEmail": null
}
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
title: "Formbricks Webhook API Documentation - List, Retrieve, Create, and Delete Webhooks",
description:
"Explore the comprehensive guide to the Formbricks Webhooks API. This is all you need to interact and play with the Formbricks Webhooks and integrate them into any third party app of your choice",
};
#### Management API
# Webhook API
Formbricks' Webhook API offers a powerful interface for interacting with webhooks. Webhooks allow you to receive real-time HTTP notifications of changes to specific objects in the Formbricks environment.
The behavior of the webhooks is determined by their trigger settings. The trigger determines which updates the webhook sends. Current available triggers include "responseCreated", "responseUpdated", and "responseFinished". This allows you to customize your webhooks to only send notifications for the events that are relevant to your application.
Webhooks are tied to a specific Formbricks environment. Once set, a webhook will receive updates from all surveys within this environment. This makes it easy to manage your data flow and ensure that all relevant updates are caught by the webhook.
This set of API can be used to
- [List All Webhooks](#list-webhooks)
- [Get Webhook](#retrieve-webhook-by-id)
- [Create Webhook](#create-webhook)
- [Delete Webhook](#delete-webhook-by-id)
And the detailed Webhook Paylod is elaborated [here](#webhook-payload).
These APIs are designed to facilitate seamless integration of Formbricks with third-party systems. By making use of our webhook API, you can automate the process of sending data to these systems whenever significant events occur within your Formbricks environment.
<Note>You will need an API Key to interact with these APIs.</Note>
---
## List Webhooks {{ tag: 'GET', label: '/api/v1/webhooks' }}
<Row>
<Col>
Learn how to retrieve a list of all webhooks via API.
| event | String | The name of the trigger event [responseCreated, responseUpdated, responseFinished] |
| data | Object | Contains the details of the newly created response. |
| data.id | String | Formbricks Response ID. |
| data.createdAt | String | The timestamp when the response was created. |
| data.updatedAt | String | The timestamp when the response was last updated. |
| data.surveyId | String | The identifier of the survey associated with this response. |
| data.finished | Boolean | A boolean value indicating whether the survey response is marked as finished. |
| data.data | Object | An object containing the response data, where keys are question identifiers, and values are the corresponding answers given by the respondent. |
| data.meta | Object | Additional metadata related to the response, such as the user's operating system and browser information. |
| data.personAttributes | Object | An object with attributes related to the respondent, such as their email and a user ID (if available). |
| data.person | Object | Information about the respondent, including their unique id, attributes, and creation/update timestamps. |
| data.notes | Array | An array of notes associated with the response (if any). |
| data.tags | Array | An array of tags assigned to the response (if any). |
title: "Guide for Setting Custom Attributes | Formbricks Documentation",
description:
"Learn how to set attributes in code using setAttribute function. Enhance user segmentation, target surveys effectively, and gather valuable insights for better decisions. Easily send user-specific details for better survey segmentation and gain deeper insights.",
};
#### Attributes
# Setting attributes with code
One way to send attributes to Formbricks is in your code. In Formbricks, there are two special attributes for [user identification](/docs/attributes/identify-users)(user ID & email) and custom attributes. An example:
## Setting Custom User Attributes
You can use the setAttribute function to set any custom attribute for the user (e.g. name, plan, etc.):
<Col>
<CodeGroup title="Setting Plan to Pro">
```javascript
formbricks.setAttribute("Plan", "Pro");
```
</CodeGroup>
</Col>
Generally speaking, the setAttribute function works like this:
title: "User Identification in Formbricks | Enhancing Survey Feedback",
description:
"A comprehensive guide on identifying users in Formbricks without compromising privacy. Learn how to set User ID, email, and custom attributes to optimize survey targeting, recontact users, and control survey intervals, all while respecting user anonymity.",
};
#### Attributes
# Identifying Users
At Formbricks, we value user privacy. By default, Formbricks doesn't collect or store any personal information from your users. However, we understand that it can be helpful for you to know which user submitted the feedback and also functionality like recontacting users and controlling the waiting period between surveys requires identifying the users. That's why we provide a way for you to share existing user data from your app, so you can view it in our dashboard.
Once the Formbricks widget is loaded on your web app, our SDK exposes methods for identifying user attributes. Let's set it up!
## Setting User ID
You can use the `setUserId` function to identify a user with any string. It's best to use the default identifier you use in your app (e.g. unique id from database) but you can also anonymize these as long as they are unique for every user. This function can be called multiple times with the same value safely and stores the identifier in local storage. We recommend you set the User ID whenever the user logs in to your website, as well as after the installation snippet (if the user is already logged in).
<Col>
<CodeGroup title="Setting User ID">
```javascript
formbricks.setUserId("USER_ID");
```
</CodeGroup>
</Col>
## Setting User Email
You can use the setEmail function to set the user's email:
<Col>
<CodeGroup title="Setting Email">
```javascript
formbricks.setEmail("user@example.com");
```
</CodeGroup>
</Col>
### Setting Custom User Attributes
You can use the setAttribute function to set any custom attribute for the user (e.g. name, plan, etc.):
When a user logs out of your webpage, make sure to log them out of Formbricks as well. This will prevent new activity from being associated with an incorrect user. Use the logout function:
title: "Understanding User Attributes in Formbricks Surveys",
description:
"Dive into the importance of attributes in surveys. Learn how key-value pairs can significantly improve survey targeting, enhance feedback quality, and guide data-driven decisions with Formbricks.",
};
#### Attributes
# What are attributes and why are they useful?
Surveying your user base without segmentation leads to weak results and survey fatigue. Attributes help you segment your users into groups.
## What are attributes?
Attributes are key-value pairs that you can set for each person individually. For example, the attribute "Plan" can be set to "Free" or "Paid".
## How do attributes work?
Attributes are sent from your application to Formbricks and are associated with the current user. We store it in our database and allow you to use it the next time you create a survey.
## Why are attributes useful?
Attributes help show surveys to the right group of people. For example, you can show a survey to all users who have a "Plan" attribute set to "Paid".
description: "Learn how to effectively utilize Formbricks' Churn Surveys to gain deeper insights into user departures. Dive into a step-by-step guide to craft, trigger, and optimize your churn surveys, ensuring you capture invaluable feedback at critical junctures",
};
#### Best Practices
# Learn from Churn
Churn is hard, but can teach you a lot. Whenever a user decides that your product isn’t worth it anymore, you have a unique opportunity to get deep insights. These insights are pure gold to reduce churn.
## Purpose
The Churn Survey is among the most effective ways to identify weaknesses in you offering. People were willing to pay but now are not anymore: What changed? Let’s find out!
## Preview
<DemoPreview template="Churn Survey" />
## Formbricks Approach
- Ask at exactly the right point in time
- Follow-up to prevent bad reviews
- Coming soon: Make survey mandatory
## Overview
To run the Churn Survey in your app you want to proceed as follows:
1. Create new Churn Survey at [app.formbricks.com](http://app.formbricks.com/)
2. Set up the user action to display survey at right point in time
3. Choose correct recontact options to never miss a feedback
4. Prevent that churn!
<Note>
## Formbricks Widget running?
We assume that you have already installed the Formbricks Widget in your web app. It’s required to display messages
and surveys in your app. If not, please follow the [Quick Start Guide (takes 15mins max.)](/docs/getting-started/quickstart-in-app-survey)
</Note>
### 1. Create new Churn Survey
If you don't have an account yet, create one at [app.formbricks.com](https://app.formbricks.com/auth/signup)
Click on "Create Survey" and choose the template “Churn Survey”:
<Image
src={CreateChurnFlow}
alt="Create churn survey by template"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
### 2. Update questions (if you like)
You’re free to update the question and answer options. However, based on our experience, we suggest giving the provided template a go 😊
<Image
src={ChangeText}
alt="Change text content"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
_Want to change the button color? You can do so in the product settings._
Save, and move over to the “Audience” tab.
### 3. Pre-segment your audience
In this case, you don’t really need to pre-segment your audience. You likely want to ask everyone who hits the “Cancel subscription” button.
### 4. Set up a trigger
To create the trigger for your Churn Survey, you have two options to choose from:
1. **Trigger by innerText:** You likely have a “Cancel Subscription” button in your app. You can setup a user Action with the according `innerText` to trigger the survey, like so:
<Image
src={TriggerInnerText}
alt="Set the trigger by inner Text"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
2. **Trigger by CSS Selector:** In case you have more than one button saying “Cancel Subscription” in your app and only want to display the survey when one of them is clicked, you want to be more specific. The best way to do that is to give this button the HTML `id=“cancel-subscription”` and set your user action up like so:
<Image
src={TriggerCSS}
alt="Set the trigger by CSS Selector"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
3. **Trigger by pageURL:** Lastly, you could also display your survey on a subpage “/subscription-cancelled” where you forward users once they cancelled the trial subscription. You can then create a user Action with the type `pageURL` with the following settings:
<Image
src={TriggerPageUrl}
alt="Set the trigger by page URL"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
Whenever a user visits this page, matches the filter conditions above and the recontact options (below) the survey will be displayed ✅
Here is our complete [Actions manual](/docs/actions/why) covering [Code](/docs/actions/code) and [No-Code](/docs/actions/no-code) Actions.
<Note>
## Pre-churn flow coming soon
We’re currently building full-screen survey pop-ups. You’ll be able to prevent users from closing the survey
unless they respond to it. It’s certainly debatable if you want that but you could force them to click through
the survey before letting them cancel 🤷
</Note>
### 5. Select Action in the “When to ask” card
<Image
src={SelectAction}
alt="Select feedback button action"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
### 6. Last step: Set Recontact Options correctly
Lastly, scroll down to “Recontact Options”. Here you have to choose the correct settings to make sure you milk these super valuable insights. You want to make sure that this survey is always displayed, no matter if the user has already seen a survey in the past days:
<Image
src={RecontactOptions}
alt="Set recontact options"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
These settings make sure the survey is always displayed, when a user wants to Cancel their subscription.
### 7. Congrats! You’re ready to publish your survey 💃
<Image
src={PublishSurvey}
alt="Publish survey"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
<Note>
## Formbricks Widget running?
You need to have the Formbricks Widget installed to display the Churn Survey in your app. Please follow [this
tutorial (Step 4 onwards)](/docs/getting-started/quickstart-in-app-survey) to install the widget.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.