Compare commits

..

624 Commits

Author SHA1 Message Date
github-actions[bot]
bd84cdf532 chore: Release formbricks-js 1.0.5 (#781)
* Version Packages

* ignore formbricks-web in changeset

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-09-06 12:48:13 +09:00
Matti Nannt
bea1f99374 chore: Prepare release of formbricks-js 1.0.5 (#780) 2023-09-06 12:39:46 +09:00
Shubham Palriwala
713753cdf8 fix: array nullity checks in js packages leads to unpredicted error message (#771) 2023-09-06 10:37:43 +09:00
Shubham Palriwala
e8b54dd3ae fix: Generalise login error messages to prevent user account enumeration (#772) 2023-09-06 10:35:45 +09:00
RafalAtGaragenet
36bd14e4f6 fix: Null pointer expection for multiple choice question on web-app form (#770) 2023-09-06 10:31:34 +09:00
Johannes
5b704b536d refactor: Solve confusion around dev/prod API Keys
refactor: Solve confusion around dev/prod API Keys
2023-09-05 20:46:44 +02:00
Johannes
c2d3d6889f always show notice 2023-09-05 20:32:32 +02:00
Johannes
4490d2a2f5 Merge branch 'main' of github.com:formbricks/formbricks into prod-dev-apikey 2023-09-05 20:16:43 +02:00
Johannes
1b407a9fb4 fix: document People and Display APIs
fix: document People and Display APIs
2023-09-05 19:44:32 +02:00
Dhruwang
6ab89fa054 moved environmentNotice to shared component and made some refactors 2023-09-05 20:03:04 +05:30
Matti Nannt
b174afc1c6 fix: eslint in pre-commit hook failed (#776) 2023-09-05 16:45:42 +09:00
Dhruwang
59af9c9905 API key check 2023-09-05 11:17:35 +05:30
Matti Nannt
2e727a418c fix: Update n8n-node dependencies (#774) 2023-09-05 14:37:22 +09:00
Matti Nannt
5a457ef627 Increase turborepo concurrency level (#773) 2023-09-05 14:10:51 +09:00
ShubhamPalriwala
796ba307f0 fix: document missing APIs 2023-09-04 16:24:13 +05:30
Matti Nannt
1c7ca87439 Improve developer experience by analyzing PRs automatically using Github Actions (#768)
* 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
2023-09-04 17:05:30 +09:00
dependabot[bot]
65e1a418f7 Bump semver from 5.7.1 to 5.7.2 (#737)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 16:56:02 +09:00
Matti Nannt
8a46b2c4be Add Pre-Commit Hook for linting & formatting (#767)
* add pre-commit hook for linting & formatting

* add husky

* update n8n package json, update package-lock file
2023-09-04 15:45:18 +09:00
github-actions[bot]
5e640b1c54 Release Formbricks n8n package (#766)
* Version Packages

* add n8n package to release pipeline

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-09-04 14:24:07 +09:00
Pratik
aa79c4c319 Add n8n Integration to Formbricks (#733)
* add n8n integration

* add n8n inside packages

* added documentation for n8n setup

* add formbricks scope to package

* add changeset config for automatic package deployment

* remove old docs navigation

* add new package README

* update prettier config & reformat

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-09-04 12:14:31 +09:00
Sital Adhikari
caa6979a1d Fix some images break the layout on formbricks-com (#765) 2023-09-04 10:59:25 +09:00
Dhruwang Jariwala
b00beadf2e Add Email Verification option to Link Surveys (#762)
* completed frontend

* Adds email verifaction for Link Surveys

* remove console.log

* run pnpm format

* rename userId to verify

* add loading state

* fix type names

* add types to prisma

---------

Co-authored-by: Dhruwang Jariwala <dhruwang@Dhruwangs-MacBook-Pro.local>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-09-02 15:34:00 +09:00
Shubham Palriwala
eae8e2db24 Add API documentation for Surveys & Profile Management API (#761) 2023-09-01 23:44:15 +09:00
Johannes
5db306600b Mention Editing Build-time Variables in deployment Guides
Mention Editing Build-time Variables in deployment Guides
2023-09-01 10:11:19 +02:00
Johannes
d21fd629e6 Update Career wording
Update Career wording
2023-08-31 17:58:33 +02:00
Johannes
2df31fbb07 update wording 2023-08-31 17:57:35 +02:00
ShubhamPalriwala
17406a0dd4 feat: mention about editing build time variables in all deployment guides 2023-08-31 20:11:13 +05:30
Johannes
908b9d0ae4 update job description
update job description
2023-08-31 15:40:35 +02:00
Johannes
885fe10dc5 update job description 2023-08-31 15:40:00 +02:00
Johannes
5b1eecc71e Remove inline comment for smtp_port to avoid docker build failure
Remove inline comment for smtp_port to avoid docker build failure
2023-08-31 10:05:59 +02:00
Johannes
8156a759fc Add Rivet to OSS Friends
Add Rivet to OSS Friends
2023-08-31 08:39:03 +02:00
Nathan Flurry
50bb510ae4 Add Rivet 2023-08-30 22:27:22 +00:00
Johannes
775a4e74b4 Replace Logo in readme
Replace Logo in readme
2023-08-30 16:59:26 +02:00
Johannes
9c2e26c5b4 Replace Logo
Replace Logo
2023-08-30 16:58:44 +02:00
Johannes
b21bc607e7 Integrate Docs with Example Repo and Minor Bug Fixes
Integrate Docs with Example Repo and Minor Bug Fixes
2023-08-30 16:48:33 +02:00
Johannes
5f102c3c3d Merge branch 'main' of github.com:formbricks/formbricks into shubham/docs-add-example-link-and-quick-fixed 2023-08-30 16:47:18 +02:00
Johannes
2320947d9d tweak UX of card 2023-08-30 16:44:44 +02:00
Johannes
3a3f0fa08c Validate URL on Redirection to avoid breaking app
Validate URL on Redirection to avoid breaking app
2023-08-30 15:58:58 +02:00
ShubhamPalriwala
23c388185e fix: validate url on redirection to avoid breaking app 2023-08-30 18:18:17 +05:30
ShubhamPalriwala
78bb8a005e fix: add link to examples, fix heading white in light mode, update docs as per poc built in examples repo 2023-08-30 17:09:10 +05:30
Johannes
d97df9a6e7 Harmonize href in OSS Friends
Harmonize href in OSS Friends
2023-08-30 11:37:45 +02:00
Johannes
bddc8137a3 Careers page + UI Tweaks in SEO Content
Careers page + UI Tweaks in SEO Content
2023-08-30 11:35:45 +02:00
Johannes
0164b4fbde increase header text sizes 2023-08-30 11:30:56 +02:00
Johannes
288ec89d93 release careers page 2023-08-30 10:57:02 +02:00
Thomas Kaul
1c66ccb713 Harmonize href in OSS Friends 2023-08-29 22:39:28 +02:00
Eder Silva
0ab70a8e69 Update .env.docker
removed inline comment for smtp_port to avoid build failure
2023-08-29 15:07:29 -03:00
Johannes
79e66ee408 fix: CTA question link UX
fix: CTA question link UX
2023-08-28 21:35:34 +02:00
Johannes
7b2a1c1de3 Fix Docs Tailwind Config
Fix Docs Tailwind Config
2023-08-28 20:52:53 +02:00
Dhruwang
7c12053a44 fix: CTA question link UX 2023-08-28 23:10:26 +05:30
ShubhamPalriwala
9e7b897e7c Merge branch 'main' of https://github.com/formbricks/formbricks into shubham/fix-docs-tailwind-bug 2023-08-28 22:07:03 +05:30
ShubhamPalriwala
25fcac72d8 fix: tailwind imports that were causing prod issues 2023-08-28 22:04:22 +05:30
Johannes
6c29d323d1 Migration of Docs to Protocol Template
Migration of Docs to Protocol Template
2023-08-28 17:25:41 +02:00
ShubhamPalriwala
3ddb65cd71 Merge branch 'feature/new-docs' of https://github.com/formbricks/formbricks into feature/new-docs 2023-08-28 20:34:30 +05:30
ShubhamPalriwala
2039641bae fix: zinc to slate, lighter heading and page titles 2023-08-28 20:34:24 +05:30
Johannes
bc4cfabfde Merge branch 'main' of github.com:formbricks/formbricks into feature/new-docs 2023-08-28 15:53:12 +02:00
Johannes
bb9e4521f9 Add CTA to SEO pages + meta data update
Add CTA to SEO pages + meta data update
2023-08-28 15:44:53 +02:00
Johannes
480461f727 update concierge, add canonical tag 2023-08-28 15:39:32 +02:00
Johannes
a90156e161 add CTA banner 2023-08-28 15:01:59 +02:00
Matthias Nannt
8e1018dd6a fix long loading time, fix typescript errors 2023-08-26 10:42:21 +02:00
Matthias Nannt
4734a1d369 Merge branch 'main' of github.com:formbricks/formbricks into feature/new-docs 2023-08-25 16:15:49 +02:00
ShubhamPalriwala
9edf9955ae minor final fixes 2023-08-25 19:11:19 +05:30
Matthias Nannt
fb6cc1253f update page navigation 2023-08-25 15:26:59 +02:00
Matthias Nannt
5260316d34 fix formatting issues 2023-08-25 14:52:36 +02:00
Matthias Nannt
31dc1c8e3f merge changes 2023-08-25 14:16:21 +02:00
Matthias Nannt
fb16735c12 upate packages, doc titles 2023-08-25 14:15:00 +02:00
ShubhamPalriwala
524916c20c chore: restructure api docs and rewrite framework-guides 2023-08-25 17:42:49 +05:30
Matthias Nannt
544b7b401f reformat formbricks-com 2023-08-25 11:55:37 +02:00
Matthias Nannt
c636f1d40e Merge branch 'feature/new-docs' of github.com:formbricks/formbricks into feature/new-docs 2023-08-25 11:55:09 +02:00
Matthias Nannt
cc7da7b629 fix newsletter input css 2023-08-25 11:54:58 +02:00
Matthias Nannt
06474f9e8e fix blog page not loading properly 2023-08-25 11:54:38 +02:00
ShubhamPalriwala
2eb28feb98 feat: restructure multiple setup guides into one 2023-08-25 14:53:37 +05:30
Matthias Nannt
763db0a674 Merge branch 'feature/new-docs' of github.com:formbricks/formbricks into feature/new-docs 2023-08-25 10:32:42 +02:00
Matthias Nannt
5cca9a9ee9 change gettings started structure 2023-08-25 10:32:38 +02:00
ShubhamPalriwala
53721169e8 fix: docs feedbac preview does not send data to backend now, redirect url fixed, and /docs now takes to intro page 2023-08-25 13:58:27 +05:30
Matthias Nannt
f9bb0dec3c fix section navigation 2023-08-25 09:58:24 +02:00
Matthias Nannt
ea3fb45e6e fix dead quickstart links 2023-08-25 09:35:53 +02:00
Johannes
16493c9431 Add Missing Dev Mode Navbar in Survey Editor
Add Missing Dev Mode Navbar in Survey Editor
2023-08-25 08:40:25 +02:00
Johannes
4f3ec888ec Merge branch 'main' of github.com:formbricks/formbricks into shubham/for-1147-youre-in-dev-mode-bar-missing-in-survey-editor 2023-08-25 08:39:20 +02:00
Johannes
e04cab6b7f Add Spark Framework to OSS Friends array.
Add Spark Framework to OSS Friends array.
2023-08-25 08:26:20 +02:00
ShubhamPalriwala
fbd42a572e feat: dev mode navbar in surveyEditor 2023-08-25 11:14:33 +05:30
Weston Walker
f2d2938672 Update index.ts
Added spark framework OS project.
2023-08-24 11:02:18 -05:00
ShubhamPalriwala
49f48cf7e0 fix: update layout metadata 2023-08-24 17:09:07 +05:30
ShubhamPalriwala
a74037dca1 Merge branch 'main' of https://github.com/formbricks/formbricks into feature/new-docs 2023-08-24 17:05:25 +05:30
ShubhamPalriwala
0a5d458b96 fix: make images responsive 2023-08-24 16:53:25 +05:30
Dhruwang Jariwala
9f6c40fd42 Rewrite Billing page to React Server Components and new type system (#701)
* Moved billing page to RSC

* removed unused props

* ran pnpm format

* fix build error

* add 404 page, throw 404 on billing page when !IS_FORMBRICKS_CLOUD

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-08-24 11:45:02 +02:00
ShubhamPalriwala
eea7fbbb5c rewrite: hosting/prod page 2023-08-24 15:12:38 +05:30
ShubhamPalriwala
d20b713d18 chore: restructure existing self hosting docs 2023-08-24 14:23:46 +05:30
Shubham Palriwala
317a5463e9 Revamp No-Code-Options: You can now target a combination of conditions (e.g. a specific button on a specific page) (#691)
* 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>
2023-08-24 10:27:41 +02:00
ShubhamPalriwala
ec7a1276fd chore: replace png with webpack images 2023-08-24 13:45:04 +05:30
ShubhamPalriwala
0efded57de fix: update doc pages as per main, add code layouts, introduce framework overview 2023-08-24 13:13:08 +05:30
ShubhamPalriwala
809bf1207b fix: quick resources as per analytics 2023-08-23 21:33:23 +05:30
Johannes
debf8433d0 Update docs with a new improved Quickstart guide (#725)
* update quickstart

* update quickstart and add react

* add screenshot

* update images and comments

* added image

* fill placeholder

* fix build error

* updating wording

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-08-23 16:25:50 +02:00
ShubhamPalriwala
79ea40c742 Merge branch 'feature/new-docs' of https://github.com/formbricks/formbricks into feature/new-docs 2023-08-23 19:13:42 +05:30
ShubhamPalriwala
d96ab91c6e feat: migration to new docs 2023-08-23 19:13:20 +05:30
M. Palanikannan
8ad4ba0f77 Add Gitpod support to the Formbricks Repo (#718)
* 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
2023-08-23 12:10:07 +02:00
Matti Nannt
2a60e8f464 Fix Link Survey also showing for In-Product Surveys (#727) 2023-08-22 17:14:03 +02:00
Matti Nannt
4562d85974 Fix Link Survey not pulling the right product (#726) 2023-08-22 17:07:05 +02:00
Matthias Nannt
81652b445b fix font on mainpage 2023-08-22 16:13:14 +02:00
Johannes
75ac56ff3b fixy thingys 2023-08-22 15:20:43 +02:00
Matthias Nannt
b0e42e00e9 add missing lib files 2023-08-22 14:45:11 +02:00
Matthias Nannt
8c229e4685 remove old formbricks-com 2023-08-22 14:38:52 +02:00
Matthias Nannt
80c64f2bf5 add components, images and pages 2023-08-22 14:25:06 +02:00
Matthias Nannt
c8f88fa4b2 move docs to subfolder 2023-08-22 14:07:45 +02:00
Matthias Nannt
e636bb4116 move docs to subfolder 2023-08-22 14:07:25 +02:00
Matthias Nannt
7ce8d75d91 add new template 2023-08-22 13:58:23 +02:00
Johannes
6538f8abdc UI: Responsiveness of Settings Menu
UI: Responsive of Settings Menu
2023-08-22 11:14:34 +02:00
Johannes
9a6997a3bb Merge branch 'main' of github.com:formbricks/formbricks into shubham/for-1142-create-responsive-menu-for-settings 2023-08-22 11:10:45 +02:00
Johannes
f8f0bb5f13 responsiveness tweaks 2023-08-22 11:10:26 +02:00
ShubhamPalriwala
2b7ec57722 fix: setting pages responsiveness bugs 2023-08-21 23:11:24 +05:30
Johannes
34ca2953d2 Remove zero width characters
Remove zero width characters
2023-08-21 15:58:32 +02:00
Johannes
03144164e9 Add Ghostfolio to OSS Friends
Add Ghostfolio to OSS Friends
2023-08-21 15:57:10 +02:00
Johannes
bed70be938 fix: Button descendent of button error
fix: Button descendent of button error
2023-08-21 15:52:45 +02:00
Matti Nannt
ba68c6d85d Improve loading time of person detail page (#723) 2023-08-21 13:40:40 +02:00
Matti Nannt
683ca1acec Fix old survey data shown in survey overview (#722) 2023-08-21 12:20:38 +02:00
ShubhamPalriwala
4cf7c84abe feat: responsive settings menu for mobile screens 2023-08-21 15:22:54 +05:30
Matti Nannt
4de85eb365 Add jsVersion & sessionCreated event to Telemetry (#720) 2023-08-21 11:30:00 +02:00
Matti Nannt
754bdfbca7 Move Telemetry events to services and limit events to surveyCreated and responseCreated (#719) 2023-08-21 09:47:06 +02:00
joyal007
e7c863d3ae fixed err in mobile view 2023-08-19 19:44:51 +05:30
joyal007
51430b7f5a Merge branch 'main' of https://github.com/joyal007/formbricks into fix/button-desc-error 2023-08-19 19:09:48 +05:30
joyal007
692c56226d fixed button descendent on button error 2023-08-19 19:08:58 +05:30
Thomas Kaul
503afbafb6 Add Ghostfolio
See https://ghostfol.io/en/about/oss-friends
2023-08-19 12:16:04 +02:00
Thomas Kaul
da27af39ec Remove zero width characters 2023-08-19 12:11:13 +02:00
Matti Nannt
0e19044b7f Add Formbricks version number to Setup Checklist (#712) 2023-08-19 09:18:39 +02:00
Matti Nannt
6b462504f6 Fix build errors in formbricks-com (#710)
* Fix build errors in formbricks-com'

* run pnpm format
2023-08-18 16:05:12 +02:00
Johannes
944bdc1e8e Add usagebased attributes to Formbricks
Add usagebased attributes to Formbricks
2023-08-18 15:11:18 +02:00
Johannes
72dcc66811 resolved comments 2023-08-18 15:10:15 +02:00
Johannes
b141a38e03 Merge branch 'main' of github.com:formbricks/formbricks into more-formbricks-in-formbricks 2023-08-18 15:08:19 +02:00
Johannes
0417320eb0 UI: Replace Static Truncate fn with Tailwind truncate class
UI: Replace Static Truncate fn with Tailwind truncate class
2023-08-18 15:06:32 +02:00
Johannes
0c19664bf5 update wording 2023-08-18 15:05:34 +02:00
Johannes
908350aa22 Merge branch 'main' of github.com:formbricks/formbricks into shubham/for-1153-truncate-dynamically-in-logic-editor 2023-08-18 14:31:33 +02:00
Matti Nannt
09b730bc0f Update lock file (#709) 2023-08-18 09:04:09 +02:00
Johannes
d2916c7878 UI fixes in Survey Editor
UI fixes in Survey Editor
2023-08-17 17:50:11 +02:00
Johannes
435eb75714 Log Survey Count & Names on Sync in JS widget
Log Survey Count & Names on Sync in JS widget
2023-08-17 17:45:44 +02:00
Johannes
551459a7c5 Add Strapi as CMS for SEO content
Add Strapi as CMS for SEO content
2023-08-17 17:39:42 +02:00
Johannes
6b79e8a888 fix packages 2023-08-17 17:36:14 +02:00
Johannes
dd43a55e20 remove unfinished template subpage 2023-08-17 16:57:40 +02:00
Johannes
c667b7d949 remove logs 2023-08-17 16:53:58 +02:00
ShubhamPalriwala
70c26af79c feat: use native tailwind dynamic truncate 2023-08-17 14:17:42 +05:30
ShubhamPalriwala
0d5af6b44d feat: responses already recd warning and survey preview padding 2023-08-17 13:08:50 +05:30
ShubhamPalriwala
60d3036ca1 feat: log survey count and names in js widget 2023-08-17 11:13:28 +05:30
Johannes
4362ef9ed4 data model tweaks 2023-08-16 16:37:02 +02:00
Johannes
a0ff35ed86 new data model, faq data, new image host 2023-08-16 13:21:43 +02:00
Johannes
e25d4e9a21 Merge branch 'main' of github.com:formbricks/formbricks into Rewrite-Link-Surveys-to-RSC 2023-08-16 13:20:05 +02:00
Dhruwang Jariwala
15fde11804 Use Server Components for Link Survey to improve loading speed (#676)
* 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>
2023-08-16 10:56:15 +02:00
Johannes
de90e10b91 Add Loading State to Action Delete & Person Delete Buttons
Add Loading State to Action Delete & Person Delete Buttons
2023-08-16 09:24:38 +02:00
Johannes
5453b2fb31 add usage based attributes 2023-08-15 17:13:44 +02:00
Johannes
1764cb5f1e add name as attribute 2023-08-15 16:17:55 +02:00
Matti Nannt
0659343a0b Fix zod types interfer with zapier integration (#697) 2023-08-15 15:49:48 +02:00
Johannes
1b64fd32b3 Add explainer note to demo app env example
Add explainer note to demo app env example
2023-08-15 14:12:56 +02:00
Johannes
52896d490a Add explainer note to demo app env example
Add explainer note to demo app env example
2023-08-15 14:12:03 +02:00
ShubhamPalriwala
fba2d1def9 feat: loader in deleteAction 2023-08-15 14:20:59 +05:30
ShubhamPalriwala
be4f96bb18 feat: loader in deletePerson 2023-08-15 14:12:35 +05:30
Johannes
252a6236dc Fix: Button Alignment in widget and Demo App Responsiveness
Fix: Button Alignment in widget and Demo App Responsiveness
2023-08-15 10:33:08 +02:00
Johannes
7c845202b2 responsiveness demo app 2023-08-15 10:31:07 +02:00
Dhruwang
eb41e4a419 fix: left align issue 2023-08-15 10:41:30 +05:30
github-actions[bot]
8a0f7fde3d Release formbricks-js 1.0.4 (#689)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-14 12:29:23 +02:00
Matti Nannt
01523393db Convert all attributes and userIds to string in formbricks-js (#688)
* convert any attribute input to string in formbricks-js

* add changeset, increase patch version of formbricks-js
2023-08-14 12:26:40 +02:00
Johannes
534dd5050d Make Survey Summary Page and Several Other Pages Responsive
Make Survey Summary Page and Several Other Pages Responsive
2023-08-14 11:12:48 +02:00
Johannes
a3e1e0498d fix restart UI 2023-08-14 11:11:50 +02:00
Johannes
beadbfa4b9 attributes and people page responsiveness 2023-08-14 10:53:35 +02:00
Johannes
a3162150a6 survey list and editor mobile tweaks 2023-08-14 10:43:30 +02:00
Johannes
1c6a5b2685 Add Loader in Product Delete button and tweak Weekly Summary UI
Add Loader in Product Delete button and tweak Weekly Summary UI
2023-08-14 10:33:56 +02:00
Johannes
9c8141abb2 Merge branch 'main' of github.com:formbricks/formbricks into shubham/for-1124-responsiveness-create-a-mobile-friendly-version-of-all-data 2023-08-14 10:23:16 +02:00
Johannes
88c17546b7 add font weight bold to weekly summary 2023-08-14 10:20:53 +02:00
Johannes
ccfc85f4fa Merge branch 'main' of github.com:formbricks/formbricks into shubham/for-1122-tweak-add-loading-state-to-delete-button-in-delete-product 2023-08-14 10:15:29 +02:00
Johannes
d9839aba24 Merge branch 'main' of github.com:formbricks/formbricks into shubham/for-1122-tweak-add-loading-state-to-delete-button-in-delete-product 2023-08-14 10:14:16 +02:00
Johannes
14a6cba3f4 Merge branch 'main' of github.com:formbricks/formbricks into lp/strapi 2023-08-14 10:13:35 +02:00
Matti Nannt
d83c530012 Remove responses limit for link surveys on free plan (#686) 2023-08-14 09:50:58 +02:00
ShubhamPalriwala
8716367ec1 ui: data comps of survey summary are now responsive 2023-08-14 13:09:17 +05:30
ShubhamPalriwala
dcffb8106e feat: loader in product delete button 2023-08-13 09:54:10 +05:30
github-actions[bot]
315467ef3f Version Packages (#682)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-12 12:43:50 +02:00
Matti Nannt
3dde021cd0 Prepare release of Formbricks v1.0.2 (#681) 2023-08-12 12:39:18 +02:00
Matti Nannt
ebbde2b531 Fix WEBAPP_URL cannot be set with prebuilt Docker image (#680)
* Fix WEBAPP_URL cannot be set with prebuilt Docker image

* Extend default docker-compose file and production script

* Update docs
2023-08-12 11:53:23 +02:00
Dhruwang Jariwala
47a8fd6b62 Rewrite Api Key Settings to React Server Components (#654)
* moved apikey settings to server component

* rename ZApiKeyData to ZApiKeyCreateInput

* Make smaller improvements

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-08-11 17:23:59 +02:00
Shubham Palriwala
c6686209be Move Look & Feel Settings to React Server Components (#672)
* 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>
2023-08-11 17:04:31 +02:00
Shubham Palriwala
09436c78fc Validate for E-Mail Address on Verification Page (#666)
* 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>
2023-08-11 16:36:26 +02:00
Johannes
004e524002 Merge branch 'main' of github.com:formbricks/formbricks into lp/strapi 2023-08-11 14:17:10 +02:00
Dhruwang Jariwala
98cdf941e6 Improve Preview in Survey Editor with Mobile & Desktop View (#573)
* 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>
2023-08-11 10:55:49 +02:00
Johannes
52a09aa3ae Introduce Restart Survey Button on Preview of Survey
Introduce Restart Survey Button on Preview of Survey
2023-08-11 09:13:02 +02:00
Johannes
bf028a5f64 Merge branch 'main' of github.com:formbricks/formbricks into shubham/for-1120-add-restart-button-to-survey-preview-ui-tweak 2023-08-11 09:12:15 +02:00
Johannes
5c60694117 Merge branch 'main' of github.com:formbricks/formbricks into shubham/for-1120-add-restart-button-to-survey-preview-ui-tweak 2023-08-11 08:52:52 +02:00
Johannes
2815ab2175 first article 2023-08-11 08:52:26 +02:00
Matti Nannt
179f92077b Apply prettier formatting (#678) 2023-08-10 17:25:40 +02:00
Matti Nannt
9cdf446f65 Remove lodash dependency from formbricks-js (#677)
* Remove lodash dependency from formbricks-js

* add array utils file
2023-08-10 16:22:10 +02:00
ShubhamPalriwala
f98d4f5c11 fix: make button exactly like mock 2023-08-10 17:21:44 +05:30
Matti Nannt
142c1bd35b Fix saved changes are not visible in Survey Editor (#674) 2023-08-10 13:14:17 +02:00
Johannes
b96fbf06d9 update new blog 2023-08-10 12:56:34 +02:00
ShubhamPalriwala
5e3ec7e4f0 feat: Restart Survey when Previewing a Survey & truncate logic values 2023-08-10 15:09:17 +05:30
Johannes
c261c63f43 Merge branch 'main' of github.com:formbricks/formbricks into lp/strapi 2023-08-10 09:58:04 +02:00
Johannes
3bbb4170e2 Set Response Limit to 50 when an In-App Survey is Created and Fix Doc Feedback survey
Set Response Limit to 50 when an In-App Survey is Created and Fix Doc Feedback survey
2023-08-09 18:14:34 +02:00
Johannes
dc085c41c0 Merge branch 'main' of github.com:formbricks/formbricks into shubham/for-1119-tweak-set-default-for-in-app-surveys-to-limit-to-50 2023-08-09 18:12:38 +02:00
Matti Nannt
33b3887b84 Use .env.docker in advanced docker-compose setup to simplify file structure (#671) 2023-08-09 17:57:35 +02:00
Johannes
6a8805de0b Merge branch 'main' of github.com:formbricks/formbricks into shubham/for-1119-tweak-set-default-for-in-app-surveys-to-limit-to-50 2023-08-09 17:52:29 +02:00
Johannes
10e149bb02 Fix formbricks-js labels not showing correctly with custom label styles, add dark mode to demo app
Fix formbricks-js labels not showing correctly with custom label styles, add dark mode to demo app
2023-08-09 17:51:20 +02:00
Johannes
9f944249fc update formatting 2023-08-09 17:50:40 +02:00
Johannes
b5765fed74 add dark mode to widget 2023-08-09 17:48:20 +02:00
Johannes
eee9b29723 Merge branch 'main' of github.com:formbricks/formbricks into feature/FOR-1081 2023-08-09 17:02:51 +02:00
Johannes
a3aae4ab95 fix: fixes survey link share modal and adds a mobile nav menu
fix: fixes survey link share modal and adds a mobile nav menu
2023-08-09 16:12:07 +02:00
Johannes
5b9db8f353 Merge branch 'main' of github.com:formbricks/formbricks into fix/safari-mobile 2023-08-09 16:08:52 +02:00
Matti Nannt
9b98ca4f64 Fix thank you screen is disabled after completing a survey (#670) 2023-08-09 16:05:15 +02:00
Johannes
6572d5395b Merge branch 'main' of github.com:formbricks/formbricks into fix/safari-mobile 2023-08-09 15:57:21 +02:00
Johannes
cd753f1a67 Merge branch 'main' of github.com:formbricks/formbricks into shubham/for-1119-tweak-set-default-for-in-app-surveys-to-limit-to-50 2023-08-09 15:37:08 +02:00
Johannes
6f0a26904f Fix back button in link surveys with logic jumps
Fix back button in link surveys with logic jumps
2023-08-09 15:35:32 +02:00
Johannes
e1c8a715d1 Add UI to create webhooks on integrations page
Add UI to create webhooks on integrations page
2023-08-09 15:31:14 +02:00
Johannes
96e54dbb46 double check migration 2023-08-09 15:25:55 +02:00
Johannes
b71fdf3205 Merge branch 'main' of github.com:formbricks/formbricks into shubham/for-1035-add-webhooks-ui-on-integrations-page 2023-08-09 15:22:11 +02:00
ShubhamPalriwala
5520edb2c5 feat: set response limit to 50 if the created survey is in-app 2023-08-09 18:43:50 +05:30
Johannes
d824da610d Fix: layout issue on peoples page
Fix: layout issue on peoples page
2023-08-09 14:40:35 +02:00
Dhruwang Jariwala
2bebc9598c Rewrite profile settings page to server component (#642)
* 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>
2023-08-09 13:13:58 +02:00
Dhruwang Jariwala
580e51dcea Fix Logic Jumps issues in in-product survey (#667) 2023-08-09 12:10:07 +02:00
Matthias Nannt
b570f3c79d fix pnpm lock file 2023-08-09 09:36:16 +02:00
Matthias Nannt
cf94c1a6d1 Make next & back button follow logic jumps 2023-08-09 09:27:12 +02:00
Johannes
71832c590f ui/ux tweaks 2023-08-08 22:12:40 +02:00
ShubhamPalriwala
15050525fd fix: make components out of survey and trigger checklists and minor ux factoring 2023-08-08 21:21:15 +05:30
ShubhamPalriwala
dcc198b151 cleanup: addWebhookModal component 2023-08-08 20:29:28 +05:30
ShubhamPalriwala
3793f29d0a fix: correct typo in htmlFor label 2023-08-08 20:06:21 +05:30
ShubhamPalriwala
b6da482e3f feat: webhooks now have a name across the UI 2023-08-08 20:01:48 +05:30
ShubhamPalriwala
cd1d9196fc feat: add name in webhook model db in prisme 2023-08-08 19:41:52 +05:30
ShubhamPalriwala
e3c09ebec3 fix: loader for add webhook, test nedpoint check on webhook creation, survey check, updated webhook logo 2023-08-08 19:22:01 +05:30
Dhruwang
2bda12d4fc Fix: layout issue on peoples page 2023-08-08 17:56:39 +05:30
Matti Nannt
b072d3b549 Update pnpm lock file (#664) 2023-08-08 13:38:22 +02:00
Johannes
758fc9af4d tweaks 2023-08-08 13:29:34 +02:00
ShubhamPalriwala
d4a4b4ec41 fix: dropdown replaced with checkbox list and loader is implemented 2023-08-08 15:55:48 +05:30
Johannes
d065817ba3 fix build error 2023-08-08 11:04:08 +02:00
Johannes
997f85bf32 update formatting 2023-08-08 11:04:08 +02:00
Piyush Gupta
81ee4ade1e fix: added loading states in CTA 2023-08-08 11:04:08 +02:00
Piyush Gupta
a2c07d3be7 added loading in transfer ownership CTA 2023-08-08 11:04:08 +02:00
Piyush Gupta
4a09253234 refactor: used isOwner in delete team 2023-08-08 11:04:08 +02:00
Piyush Gupta
a2f6677b54 fix: independent queries -> Txn 2023-08-08 11:04:08 +02:00
Piyush Gupta
0039647718 feat: added transfer ownership 2023-08-08 11:04:08 +02:00
Piyush Gupta
7e27730447 feat: added leave team 2023-08-08 11:04:08 +02:00
Piyush Gupta
c22158515d feat: added delete team functionality 2023-08-08 11:04:08 +02:00
Piyush Gupta
b8176ce800 feat: added delete card and modal 2023-08-08 11:04:08 +02:00
Johannes
5aa38a6e39 Delete Team, Transfer Ownership and Leave Team functionality
Delete Team, Transfer Ownership and Leave Team functionality
2023-08-08 10:51:44 +02:00
Johannes
0ebef13805 fix build error 2023-08-08 10:46:41 +02:00
Johannes
a81ceff09e update formatting 2023-08-08 10:33:26 +02:00
Piyush Gupta
7ebdf9939e fix: added loading states in CTA 2023-08-08 10:16:48 +05:30
ShubhamPalriwala
7631783e7d fix: all webhook icons now use lucid 2023-08-08 09:46:08 +05:30
ShubhamPalriwala
c92b2b00e0 fix: webhook table wrapping & add webhook modal text and dropdown id 2023-08-08 09:38:15 +05:30
ShubhamPalriwala
e68a7fe763 fix: add webhook logo and card component flexibility 2023-08-08 09:21:03 +05:30
Johannes
f8cd9dbb00 Merge branch 'main' of github.com:formbricks/formbricks into lp/strapi 2023-08-07 21:37:52 +02:00
Piyush Gupta
a3b46ee532 Merge branch 'main' of https://github.com/formbricks/formbricks into feature/delete-team 2023-08-08 00:59:37 +05:30
Matti Nannt
a1a66ef6be Fix close-on-date pipeline not executed properly (#662)
* Fix github action closeOnDate pipeline

* remove prebuild turbo build
2023-08-07 19:54:23 +02:00
Matti Nannt
6a1b8106b7 Add prebuild as a build dependency (#661) 2023-08-07 18:15:28 +02:00
Matti Nannt
8b1a074e2c Update npm packages to latest minor version (#660) 2023-08-07 17:46:58 +02:00
Matti Nannt
57733a75fc Fix build error (#659) 2023-08-07 17:13:50 +02:00
Matti Nannt
e5ef71ae87 Fix product service throwing validation error (#658) 2023-08-07 17:02:20 +02:00
Matti Nannt
89dae8f1d8 Simplify highlightBorderColor in product type (#657) 2023-08-07 16:50:24 +02:00
Anshuman Pandey
370041b0ae A highlight border can now be added to the in-product modal using the product settings (#610)
* feat: added logic for adding highlight border

* feat: adds highlight border color to js widget

* fix: fixes class issue

* fix: removes log

* fix: fixes db fields

* fix: fixes border color edit

* fix: fixes highlight border styles in demo app and preview

* fix migrations

* remove console.log

* fix build issues

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-08-07 16:14:55 +02:00
Johannes
34ff14d43b Fix: In app survey preview container size too high
Fix: In app survey preview container size too high
2023-08-07 16:00:25 +02:00
Pradumn Kumar
b6c0dbf5d3 Close survey after x responses now needs to be set to a higher number than the number of current responses (#606)
* 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>
2023-08-07 15:22:37 +02:00
Johannes
488e2801f0 Make template library searchable
Make template library searchable
2023-08-07 14:21:43 +02:00
Johannes
ae7d0a4846 Add input field validation to rename product, team and name
Add input field validation to rename product, team and name
2023-08-07 14:17:59 +02:00
Dhruwang
7d3fa70fe2 Fix: broken preview 2023-08-07 17:09:29 +05:30
ShubhamPalriwala
bb4052690e feat: link integrations page to webhook 2023-08-07 16:29:54 +05:30
ShubhamPalriwala
e8a286bd4e feat: webhooks UI 2023-08-07 16:10:34 +05:30
Piyush Gupta
205593d8d3 added loading in transfer ownership CTA 2023-08-06 15:46:11 +05:30
Piyush Gupta
37afd004af refactor: used isOwner in delete team 2023-08-06 15:30:54 +05:30
Piyush Gupta
ad86c4dbf4 fix: independent queries -> Txn 2023-08-06 15:17:08 +05:30
Piyush Gupta
fb64eb50a2 Merge branch 'main' of https://github.com/formbricks/formbricks into feature/delete-team 2023-08-06 14:58:59 +05:30
Piyush Gupta
8d7eeb045b feat: added transfer ownership 2023-08-06 14:58:52 +05:30
Shubham Palriwala
fdb1aa2299 Rewrite Person Detail Page to Server Components (#609)
* 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>
2023-08-06 09:53:37 +02:00
Shubham Khunt
df9ff011f7 fix:removed toast 2023-08-06 11:51:31 +05:30
Shubham Khunt
e85d95a4eb fix:removed toast 2023-08-06 11:51:01 +05:30
Johannes
5c9605f4af Feature : Toggle Multi-Select and Single-Select Question Types
Feature : Toggle Multi-Select and Single-Select Question Types
2023-08-05 16:23:39 +02:00
Johannes
de3d580614 Merge branch 'main' of github.com:formbricks/formbricks into toggle-multi-and-single-select 2023-08-05 15:29:39 +02:00
Johannes
d780ae1e59 strapi setup working 2023-08-05 15:28:55 +02:00
Piyush Gupta
ccb89548f0 feat: added leave team 2023-08-05 17:49:06 +05:30
Anshuman Pandey
ad42f4cc55 Dramatically improve load times when creating a new team(#614)
* 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
2023-08-05 13:59:06 +02:00
Dhruwang
51dda67992 fixed invalid storedResponseValue issue 2023-08-05 15:08:34 +05:30
Dhruwang
0598ad2eaa Feat:Toggle Multi-Select and Single-Select Question Types 2023-08-05 12:39:48 +05:30
Meet Patel
44e48e3c3f Hide the clear button for input type search 2023-08-05 10:56:50 +05:30
Piyush Gupta
1551baeca7 merged with main 2023-08-05 09:33:58 +05:30
Piyush Gupta
c3f26f7ab8 feat: added delete team functionality 2023-08-05 09:32:23 +05:30
Meet Patel
e9e3de2ce8 Added 'type=search' and 'name=search' attributes to SearchBox in TemplateContainer 2023-08-04 22:22:42 +05:30
Meet Patel
34c4e9bc1a lucide search icon 2023-08-04 22:10:39 +05:30
Johannes
c707896eb6 Fix Weekly: Remove N/A completion rate, exclude "completed" survey if has no submission in last 7 days
Fix Weekly: Remove N/A completion rate, exclude "completed" survey if has no submission in last 7 days
2023-08-04 04:19:40 -05:00
Johannes
ee545b7ade remove N/A CR, exclude completed if has no submission 2023-08-04 09:51:49 +02:00
Johannes
7bf0fa450a Add structured data to blog articles, tweaked the SEO score of existing ones
Add structured data to blog articles, tweaked the SEO score of existing ones
2023-08-04 02:19:13 -05:00
Johannes
1a8618692a more metadata for articles 2023-08-03 20:28:38 +02:00
Matti Nannt
e5f371476c Fix formatting of preview components (#646)
* Fix formatting of preview components

* update npm packages
2023-08-03 17:03:53 +02:00
Shubham Palriwala
dba3677633 fix: documentation on create webhook had invalid body key and headers were not being showed as required (#643) 2023-08-03 13:48:31 +02:00
Anshuman Pandey
369c9ed7b2 fix: fixes survey link share modal and moble nav menu 2023-08-03 17:13:51 +05:30
Piyush Gupta
0776138c1c Merge branch 'main' of https://github.com/formbricks/formbricks into feature/delete-team 2023-08-02 23:40:30 +05:30
Matthias Nannt
235c1afe28 Fix formbricks-js labels not showing correctly with custom label styles 2023-08-02 16:59:57 +02:00
Meet Patel
17b9d686bd category button text & gap 2023-08-02 20:04:18 +05:30
github-actions[bot]
73904e11a6 Update formbricks-js to 1.0.2 (#640)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-02 16:12:39 +02:00
Meet Patel
c423e43aee refined search for who completed onboarding 2023-08-02 19:39:38 +05:30
Matti Nannt
a1b447caad Increase formbricks-js z-index to 999999 to increase compatibility with more websites (#639)
* Fix formbricks-js modal covered by other elements

* Fix wrong usage of prefix

* add changeset
2023-08-02 15:59:16 +02:00
Johannes
6b989487b2 Fix SEMRush SEO issues & move OSS friends to static
Fix SEMRush SEO issues & move OSS friends to static
2023-08-02 07:40:45 -05:00
Johannes
d60e0c4e5c fix SEO issues and move OSS friends to static 2023-08-02 14:24:26 +02:00
Shubham Palriwala
2a3ab3280f Fix NEXTAUTH_SECRET not get filled correctly in deployment script (#632)
* 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
2023-08-02 13:33:29 +02:00
Matti Nannt
5b217e5483 Update pnpm-lock to solve build issues (#636) 2023-08-02 13:20:03 +02:00
tyjkerr
ec0d3f2fa2 Add Back Button to Surveys (#501)
* 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>
2023-08-02 13:08:20 +02:00
Johannes
ae702ddd06 Add Twenty.com to OSS friends
Add Twenty.com to OSS friends
2023-08-02 04:34:19 -05:00
Johannes
91f78d875b Add Twenty.com to OSS friends 2023-08-02 04:34:00 -05:00
Johannes
08110b0c34 LP: Add OSS friends via API and update pricing wording
LP: Add OSS friends via API and update pricing wording
2023-08-02 03:59:31 -05:00
Johannes
42e6601f13 update fetch URL 2023-08-02 10:47:26 +02:00
Johannes
a5c33981a0 update pricing wording, add OSS friends API 2023-08-02 10:29:06 +02:00
Johannes
1a90d1b7e8 Merge branch 'main' of github.com:formbricks/formbricks into lp/add-oss-friends 2023-08-02 09:57:03 +02:00
Meet Patel
712431e842 search box improved & default category set 2023-08-01 23:32:00 +05:30
Johannes
3905c2227e Patch: Close survey on date can be set to past
Patch: Close survey on date can be set to past
2023-08-01 03:33:37 -05:00
Meet Patel
86da5ff2f4 search improved & bg white & category disabled on search 2023-07-31 23:03:37 +05:30
github-actions[bot]
fc0feda5e9 Release formbricks-js 1.0.1 (#625)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-31 16:44:56 +02:00
Matti Nannt
3d0d633bc8 Fix new Session event not triggered every time a new session is created (#624)
* Fix new Session event not triggered every time a new session is created

* make syncWithBackend method private
2023-07-31 16:40:21 +02:00
Matti Nannt
d707e2e49e Remove ports from docker compose file in production script (#623) 2023-07-31 15:33:02 +02:00
Matti Nannt
288fc79366 Fix Authentication issues for Webhook API (#622) 2023-07-31 14:10:28 +02:00
Matti Nannt
000fcf8b02 Update npm dependencies (#621) 2023-07-31 12:49:05 +02:00
Matti Nannt
730f0ba1e9 Fix session creation endpoint throw unexpected error (#620)
* fix env variables in weekly summary action

* Fix session creation endpoint throw unexpected error
2023-07-31 11:59:21 +02:00
Meet Patel
eed9b6635d two word case handled 2023-07-31 15:06:12 +05:30
Matti Nannt
38d3de2165 Add sentry error reporting (#619) 2023-07-31 10:26:59 +02:00
Matti Nannt
5d380a4986 Fix smileys in rating questions not showing in Safari Browser (#618) 2023-07-30 21:23:02 +02:00
Meet Patel
892a58c45e Merge branch 'main' into search-template-library 2023-07-30 23:00:33 +05:30
Meet Patel
4fb9851a6d searchbox component 2023-07-30 22:49:48 +05:30
Meet Patel
09c37d78a2 filter logic moved out side return 2023-07-29 11:21:56 +05:30
Meet Patel
6335565bf9 search works 2023-07-29 11:20:14 +05:30
Matti Nannt
e32e47e272 Fix: Disable autoFocus when embedded with iframe (#615) 2023-07-28 21:08:45 +02:00
Moritz Rengert
e864829a79 Fix: Logic Jumps stop working when options get renamed (#540)
* update logic values if multi select options change

* run pnpm format

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-28 20:21:26 +02:00
Dhruwang Jariwala
b62a344e54 Update Webhook Documentation (#611)
* added webhook payload docs

* ran pnpm format

* update data.id explanation, reformat

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-28 10:41:21 +02:00
Shubham Palriwala
469590c2f6 Add Quickstart for self-hosting using automated Shell Script (#613)
* 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>
2023-07-26 16:12:33 +02:00
Matthias Nannt
5ae7f31d01 update pnpm lock 2023-07-25 16:14:00 +02:00
Matthias Nannt
cb4cd706ad Merge branch 'main' of github.com:formbricks/formbricks into feat/close-date-edge-case 2023-07-25 16:00:05 +02:00
Dhruwang Jariwala
a165143c2a Add Input Validation to the Survey Editor (#588)
* 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>
2023-07-25 11:27:09 +02:00
Meet Patel
6b3f977d83 Store current Url in the responses meta data (#566)
* 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>
2023-07-24 17:05:54 +02:00
Salim B
f743fb18fb Fix Formatting in Docker Readme (#608)
Fix formatting
2023-07-24 10:57:14 +02:00
Piyush Gupta
1e816eb6d9 feat: added delete card and modal 2023-07-23 01:01:51 +05:30
Shubham Khunt
8c31c71251 fix: removed error toast 2023-07-22 19:27:53 +05:30
Shubham Khunt
62a08f304b padding issue fixed in delete dialog 2023-07-22 19:25:15 +05:30
Shubham Khunt
35057322a4 padding issue fixed in alert dialog 2023-07-22 19:25:14 +05:30
Shubham Khunt
b1a93de8db fix: toast error message updated 2023-07-22 19:25:14 +05:30
Shubham Khunt
aca32655cd fix: edit profile page input validation added 2023-07-22 19:25:14 +05:30
Shubham Khunt
8b14559d5f fix: Edit product page input validation completed 2023-07-22 19:25:14 +05:30
Shubham Khunt
43a623a61e fix: edit team page input validation added 2023-07-22 19:25:14 +05:30
Johannes
2f8257ae62 added new members 2023-07-22 13:41:15 +02:00
Johannes
8a5217b39c OSS Api 2023-07-22 13:26:33 +02:00
Piyush Gupta
57e6c86e6a refactor: summary header 2023-07-22 11:02:59 +05:30
Piyush Gupta
4519cb8a2d Merge branch 'main' of https://github.com/gupta-piyush19/formbricks into feat/close-date-edge-case 2023-07-21 20:38:22 +05:30
Moritz Rengert
e5d06de68e Fix multiple NPS questions in one survey not working (#596)
* clear nps question on submit

* fix onboarding color picker

* update onChange to onClick for NPS Questions

* update border color

* remove console.log

---------

Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-21 17:00:29 +02:00
Matti Nannt
49f61e2eeb Fix pnpm go bug and format code (#605) 2023-07-21 16:58:48 +02:00
Yash Gupta
4763cf3217 Enhance Github Issue Templates for better usability (#594)
* 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
2023-07-21 16:48:44 +02:00
Matti Nannt
b6a0d0fe5d Add OSS friends api endpoint (#604) 2023-07-21 16:44:41 +02:00
Matti Nannt
9be053d8a6 Fix: Add revalidation to surveys overview page (#601) 2023-07-21 15:19:29 +02:00
Matti Nannt
3a17c6b085 Fix errors in pnpm go script dependencies (#600) 2023-07-21 15:12:12 +02:00
Johannes
16b7e0d82a Improve Weekly Summary Email (#584)
* fix bugs in weekly

* fix CTA

* update bg color of completed badge
2023-07-20 16:33:01 +02:00
Johannes
ae7075c746 Fix 404 when Email exists in GitHub Login
Fix 404 when Email exists in GitHub Login
2023-07-20 09:11:55 -05:00
Johannes
78ed48adeb fix error messages 2023-07-20 15:59:21 +02:00
Matti Nannt
03ba9ecb58 fix build error (#592) 2023-07-20 15:10:18 +02:00
Matti Nannt
d360c1f741 Fix legacy sdk endpoints not working with new services (#591) 2023-07-20 14:44:58 +02:00
Johannes
cf953db18f Refactor Survey Overview Page
Refactor Survey Overview Page
2023-07-20 06:35:36 -05:00
Johannes
7475df147d Move Stripe to a new account (#589) 2023-07-20 11:03:32 +02:00
Matti Nannt
06d620dbc8 Update docs for nextjs setup with app directory (#590) 2023-07-20 10:45:06 +02:00
Matthias Nannt
feadefa90d clean up and move to new action -> service structure 2023-07-19 19:00:04 +02:00
Johannes
754832f097 Add Author Box to Blog articles
Add Author Box to Blog articles
2023-07-19 07:01:08 -05:00
Johannes
dad8ebe8da update blog articles 2023-07-19 13:44:01 +02:00
Johannes
df27b4703f add author box 2023-07-19 13:36:53 +02:00
Matthias Nannt
e385638c14 merge latest changes from main 2023-07-19 13:35:03 +02:00
Johannes
8cacb2ccee Landing Page: Balance cal.com widget with Concierge Div, Update Concierge Offer
Landing Page: Balance cal.com widget with Concierge Div, Update Concierge Offer
2023-07-19 05:56:50 -05:00
Johannes
98a62949d5 update concierge offer 2023-07-19 12:52:43 +02:00
Matti Nannt
dd6ac2e4cd Fix build errors and update contact to Formbricks GmbH (#585) 2023-07-19 12:50:19 +02:00
Matti Nannt
c52df00d39 Fix Email Notifications (#583)
* Fix email notifications not working properly

* Fix response notification not working

* fix response meta schema

* fix typo in docs

* improve error message in webhooks
2023-07-19 12:30:31 +02:00
Ankur Datta
0c7c3c9ad2 [RM] getProductWithEnvironments 2023-07-19 10:10:49 +00:00
Ankur Datta
5612fbfa22 [RM] getSurveysWithResponseCount 2023-07-19 09:41:06 +00:00
Ankur Datta
186a4269a3 [CHANGE] make survey-list as server component 2023-07-19 07:29:18 +00:00
Shubham Palriwala
503e7649e2 Fix formbricks-js unit tests not working properly (#582) 2023-07-19 08:46:39 +02:00
ShubhamPalriwala
e3b4ec4a9e fix: cal widget had an internal predefined margin causing it to be unabalanced with the concierge div 2023-07-19 00:59:52 +05:30
Piyush Gupta
b20cda2d06 fix: removed today's date from closeOnDate date picker 2023-07-19 00:11:01 +05:30
Piyush Gupta
6e8be0c0bd fixed merge conflict 2023-07-18 19:40:01 +05:30
Piyush Gupta
c68a9c8d15 fix: edge case of close on date 2023-07-18 19:38:03 +05:30
Johannes
e23f26f48c Improve Responsiveness of LP
Improve Responsiveness of LP
2023-07-18 07:04:26 -05:00
Johannes
9e9fe5c09d update logos 2023-07-18 13:57:17 +02:00
ShubhamPalriwala
3bb4a34e4c fix: hero component padding for smaller screen & github div conditional horizontal margin 2023-07-18 17:15:18 +05:30
Matti Nannt
9fcc0a360c Fix Posthog environment variables not recognized in Frontend (#578)
* move posthog variable to client in t3env

* remove groups, add revalidation to action/attributes pages
2023-07-18 12:53:40 +02:00
Shubham Palriwala
3824d95151 Move Actions & Attributes pages over to server components (#495)
* 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>
2023-07-18 12:40:03 +02:00
Matti Nannt
5bfaad9484 Improve Folder Structure for App-wide Client-imports (#577)
* move posthog to new implementation

* update folder structure
2023-07-18 11:32:58 +02:00
Matti Nannt
a5c8c1aa85 Update formbricks-js version in html docs (#576) 2023-07-18 09:12:33 +02:00
Johannes
c92011b069 Improve UI for delete account functionality (#575) 2023-07-17 19:25:48 +02:00
Anshuman Pandey
856247763c Improve Tags UI/UX (#563)
* fix: fixes tag merging logic

* fix: moves tag merge logic into transactions

* update tags settings icon

---------

Co-authored-by: Johannes <johannes@formbricks.com>
2023-07-17 19:24:08 +02:00
Matti Nannt
2199a4b102 Improve pnpm go command pipeline & remove database tsup setup (#574)
* move docker compose dev

* update all packages; pnpm format

* remove tsup from prisma

* add zod to prisma files

* delete tsup config

* improve pnpm go script, downgrade prettier

* update pnpm lock
2023-07-17 18:12:40 +02:00
Matti Nannt
cd49d687ad fix weekly summary cron workflow (#568) 2023-07-17 09:30:03 +02:00
Johannes
2852bf617a Fix ordering dropdown + Other input field
Fix ordering dropdown + Other input field
2023-07-16 09:04:22 -05:00
Johannes
30623d5fd2 fix order dropdown, other field and UX tweaks 2023-07-16 15:51:46 +02:00
Johannes
b673044890 Add Blog for v1 Release - How we got here
Add Blog for v1 Release - How we got here
2023-07-14 06:05:44 -05:00
Shubham Palriwala
bf9189c1af fix: docker compose url for curl (#557) 2023-07-14 13:00:57 +02:00
Moritz Rengert
e262006f7e Add Demo-Data to newly created teams (#521)
* 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>
2023-07-14 12:55:41 +02:00
Johannes
d44ea1f32d add v1 blog 2023-07-14 12:51:44 +02:00
Matti Nannt
e24f6cd017 Improve documentation (#552)
* update nextjs app docs

* remove prisma extendedWhereUnique from schema

* change button titles in pricing table

* fix smaller bugs
2023-07-14 12:48:57 +02:00
Matthias Nannt
c6a4b7731f merge latest changes, resolve conflict & build error 2023-07-14 11:05:00 +02:00
Johannes
62d2c1af18 improve filter ux, update summary header (#555) 2023-07-14 10:37:42 +02:00
Ankur Datta
2ea3d42ff6 [RM] logs 2023-07-14 07:43:24 +00:00
Ankur Datta
e275553425 [ADD] loading-state, [HANDLE] imports 2023-07-14 07:24:43 +00:00
Nitesh Seram
1a83373099 Fix random 0 can appear in survey menubar (#553)
Co-authored-by: Seram Nitesh Singh <nitesh.s@auzmor.com>
2023-07-14 09:08:15 +02:00
Matti Nannt
94c11193e5 Fix changesets config (#551) 2023-07-13 20:44:29 +02:00
Matti Nannt
21529da799 Fix billing page not showing current plan (#550)
* update packages, fix error getting current subscription plan

* fix billing page not showing current plan

* add revalidation constant
2023-07-13 20:28:48 +02:00
Ankur Datta
701a7d9786 [REFACTOR] survey-overview-page 2023-07-13 17:54:21 +00:00
Ankur Datta
4410b14d0c [ADD] services 2023-07-13 17:53:48 +00:00
Ankur Datta
cddbbc2be2 [ADD] server-actions 2023-07-13 17:53:09 +00:00
Ankur Datta
4fefa09ee8 [ADD] product-with-environment-type 2023-07-13 17:52:55 +00:00
Ankur Datta
09106188ba [FIX] zod-type 2023-07-13 17:52:18 +00:00
Matti Nannt
62c001cbee Update packages, Fix error getting current subscription plan (#549) 2023-07-13 18:23:31 +02:00
Shubham Palriwala
adef4c8762 Add Public Docker Image and Build Pipeline using Github Actions (#546)
* 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>
2023-07-13 17:33:54 +02:00
Dhruwang Jariwala
5d66a8b8f4 Improve Page Titles (#470)
* 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>
2023-07-13 16:52:49 +02:00
gitstart-formbricks
ec80543a95 Add Filter-Functionality to Survey Analysis (#474)
* Extensive Filtering of Responses

* Delete .env

* fix scroll

* Delete .env

* add all-time date filter option

* increase filterOption max-width, update csv selection text

* fix consent question filter

* default onlyComplete to false

* move ResponseFilterContext to app dir

* show options when we switch surveys

* Delete empty .env file

---------

Co-authored-by: gitstart-formbricks <gitstart@users.noreply.github.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-13 16:28:18 +02:00
Johannes
1d5fab3665 Add Link Source Tracking for Weekly Summary Emails (#547)
* add UTM to links, update CTA button color in mails

* add tracking, update weekly + email layout
2023-07-13 16:22:50 +02:00
Shubhdeep Chhabra
e21c2a45e0 Add option for random ordering of choices in multiple choice questions (#394)
* 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>
2023-07-13 15:09:26 +02:00
Nitesh Seram
8ae8afec0d Fix long description overflow in questions (#466)
* 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>
2023-07-13 12:03:53 +02:00
Moritz Rengert
dceb8842d3 Fix prevent duplicate team invite (#536)
* check for existing invites

* add success / error toast on invite

* add toast on member / invite removal
2023-07-13 11:58:30 +02:00
Moritz Rengert
dc6ae088bf Fix allow invited users to signin/signup with Github (#534)
* pass inviteToken through github / google redirect url

* keep invite token when switching between signup and login
2023-07-13 11:54:47 +02:00
Johannes
257287cefc Fix owners should not be deleted from the team (#543) 2023-07-13 11:24:23 +02:00
Matti Nannt
a4a771ba70 Fix multiple client-side errors in formbricks-js 2023-07-13 11:17:04 +02:00
Matti Nannt
8ea6016cf5 Sync surveys and events with formbricks-js automatically (#537)
* 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
2023-07-13 00:49:58 +02:00
Dhruwang Jariwala
cfedd0f4b8 Add 'pnpm go' command for better DX (#538)
* added go script

* let turbo manage go command

* delete unused READMEs and update contribution docs

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-12 21:19:03 +02:00
Johannes
dc25856b46 Add Integrations Page UI
Add Integrations Page UI
2023-07-12 12:25:37 -05:00
Johannes
d4fe92ab07 Merge branch 'main' of github.com:formbricks/formbricks into feature/integrations 2023-07-12 19:14:49 +02:00
Johannes
194809758b Fix Permissions for Team Actions
Fix Permissions for Team Actions
2023-07-12 12:08:52 -05:00
moritzrengert
a1a4972db3 allow admins to delete members 2023-07-12 18:36:41 +02:00
moritzrengert
5084fb6063 allow admins to change team name and delete team members 2023-07-12 17:58:23 +02:00
Johannes
8821fa2167 Fix Roadmap Template productName
Fix Roadmap Template productName
2023-07-12 08:21:44 -05:00
Johannes
64bbff56f7 add } to productName 2023-07-12 15:18:40 +02:00
Ankur Datta
ec3a20b183 Move Templates Page to server components and new services (#488)
* [ADD] types

* [ADD] methods

* [Rearrange] with-server-component

* [FIX]server-methods,[ADD]preview-survey-server

* [FIX] zod-types-normalized

* pnpm format

* [FIX] build-error-due-to-cascade

* [RM] PreviewSurveyServer

* [TMP]

* [CHANGE] file-name-hack

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-12 12:44:19 +02:00
Matti Nannt
170ed85712 fix error while saving in-app surveys (#532) 2023-07-12 09:17:11 +02:00
Matti Nannt
1c58474dc2 Fix email notification not working (#531) 2023-07-11 22:52:17 +02:00
Dhruwang Jariwala
3f2ef3e776 Fix Logic Jumps are not updated properly when questions are updated or deleted (#530)
* modified updateQuestion functio

* added type defs

* pnpm format

* fix LogicEditor fields not updating properly

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-11 18:45:54 +02:00
Johannes
83b94de977 Add Zapier Tutorial to Docs
Add Zapier Tutorial to Docs
2023-07-11 11:20:58 -05:00
Johannes
3a1a385b41 update API key page + changes 2023-07-11 18:18:31 +02:00
Johannes
c99da3165b Improve UI/UX of Response Settings (#529) 2023-07-11 17:49:32 +02:00
Johannes
b1f7e03995 remove subpages, add Zapier link 2023-07-11 16:46:26 +02:00
Johannes
69809bafa4 Merge branch 'main' of github.com:formbricks/formbricks into feature/integrations 2023-07-11 16:02:04 +02:00
Matthias Nannt
c1b1fa61b6 add link & fix typos 2023-07-11 15:18:42 +02:00
Johannes
f1a297f5e8 Merge branch 'docs/add-zapier' of github.com:formbricks/formbricks into docs/add-zapier 2023-07-11 14:13:48 +02:00
Johannes
bcf11a37fa Merge branch 'main' of github.com:formbricks/formbricks into docs/add-zapier 2023-07-11 14:13:24 +02:00
Johannes
7333bb604d add zapier, add docs links opening in new tab 2023-07-11 14:09:23 +02:00
Johannes
1101d1f268 add zapier, add docs links opening in new tab 2023-07-11 14:06:48 +02:00
Matti Nannt
7dd67e4633 Fix duplicated closeOnDate in survey service (#525)
* Remove duplicated closeOnDate

* regenerate pnpm-lock
2023-07-11 13:21:14 +02:00
Pradumn Kumar
57a64d7940 Survey Completed message shown to the enduser can now be customized (#464)
* 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>
2023-07-11 13:12:45 +02:00
gitstart-formbricks
269a504780 Fix typo in product name replace in template (#520)
* fix product name typo in template

* revert unwanted change.

---------

Co-authored-by: gitstart-formbricks <gitstart@users.noreply.github.com>
2023-07-11 12:49:58 +02:00
Piyush Gupta
c8c84d0148 Add close on date functionality for surveys (#463)
* added date-picker

* added state and handlers for closeOnDate

* closeDate -> closeOnDate

* added endpoint for CRON to close surveys

* resolved migrations

* fixed datetime format

* removed warnings

* PR review changes

* resolved merge conflicts and package update

* add github workflow for cron

* change migration order

* change migration order

* add zod types for closeOnDate

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-11 12:47:35 +02:00
Johannes
af1b29f8bc Improve QuestionID UX by updating onBlur (#523)
* change questionId on blur, fix placeholder

* fix build error

* fix UX issues
2023-07-11 12:29:50 +02:00
Johannes
4908bc77bd New Hero Graphic for Landing Page
New Hero Graphic for Landing Page
2023-07-11 03:37:11 -05:00
Johannes
20ec66481b update graphic and copy 2023-07-11 10:32:33 +02:00
Moritz Rengert
c912ebd42a Fix expired member invites are not displayed properly (#475)
* 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>
2023-07-11 10:14:58 +02:00
Moritz Rengert
1b0327edd4 Allow questionId to be changed for newly added questions (#476)
* 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>
2023-07-11 10:07:19 +02:00
tyjkerr
ce8a8df091 Fix summary showing NaN values when adding new Consent or CTA question (#518) 2023-07-11 09:54:59 +02:00
Matti Nannt
7be6879afb add SurveyId filter option to responses endpoint (#517) 2023-07-10 17:03:36 +02:00
Matti Nannt
04ec0a6827 Extend Webhook with surveyIds filter (#512)
* add surveyIds filter to webhooks. Use triggers array instead of single trigger

* include webhook id in webhook payload

* run pnpm format
2023-07-10 16:24:03 +02:00
Johannes
62ed0a7945 Update suffix of next.config in Dockerfile
fix next config suffix
2023-07-10 05:07:41 -05:00
Johannes
fc0dfec151 fix next config suffix 2023-07-10 12:06:27 +02:00
Matti Nannt
fe55a152ea add .env file to checks workflow (#508)
* add .env file to checks workflow

* update .env.example comment
2023-07-10 10:59:17 +02:00
Matti Nannt
31ccb9d43f Add new Surveys endpoint to list all surveys of an account (#500) 2023-07-10 10:44:37 +02:00
Johannes
f4237e3121 Merge pull request #493 from Dhruwang/Validation-for-Reset-Password
Add validation to password reset page, improve UX
2023-07-10 03:09:53 -05:00
Johannes
bd9b77cd9d add loading states, clarify naming 2023-07-10 10:02:35 +02:00
Johannes
70c809586c Merge branch 'main' of github.com:formbricks/formbricks into Validation-for-Reset-Password 2023-07-10 09:45:29 +02:00
Johannes
60f723d3cc Merge pull request #489 from Meetcpatel/questionid-space
Looks great, thanks for your contribution! :) 🙌
2023-07-10 02:38:27 -05:00
Matti Nannt
95eeaecafc Add empty string dataproxy env (#506)
'
2023-07-09 18:33:06 +02:00
Matti Nannt
484da80e4c Fix Zod Schema for PRISMA_GENERATE_DATAPROXY env variable (#505) 2023-07-09 18:19:49 +02:00
Moritz Rengert
25f6ccc0a0 Fix other field not working properly in multiple choice question (#502) 2023-07-09 17:30:27 +02:00
Matti Nannt
4017a5c4f9 Add t3 env for env validation (#498)
* add t3 env for env validation

* fix env variables that should be optional

* update gitignore

* add vercel ignore
2023-07-07 15:58:15 +02:00
Johannes
ffb9fd659f Merge pull request #497 from formbricks/lp/fix-landing
fix lp & update blog
2023-07-07 07:04:11 -05:00
Johannes
40dfea070c fix lp & update blog 2023-07-07 13:54:16 +02:00
Johannes
ec1f940d48 Merge pull request #496 from formbricks/lp/add-github-blog
Add GitHub Acc blog post, update lp
2023-07-07 06:18:29 -05:00
Johannes
749fdd684a fix build error 2023-07-07 13:07:43 +02:00
Subhodip Roy
60c96fe3f9 Build Display service and rebuild display endpoint in app directory (#432)
* 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>
2023-07-07 12:28:47 +02:00
Johannes
81ea563dbc update lp, add blog post 2023-07-07 12:14:57 +02:00
Meet Patel
4cc085cecf questionid can not be empty 2023-07-06 21:46:31 +05:30
Johannes
561afcc8fb Merge pull request #478 from gupta-piyush19/feature/consent-prefill-added
feat: Added prefill for consent question type and fixed the loader bug
2023-07-06 10:11:52 -05:00
Bhaskar Singh
9e9db7103e Add Weekly Summary Feature (Beta) (#431)
* 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>
2023-07-06 15:47:33 +02:00
Matti Nannt
896e91a38b add product information to api/v1/me endpoint (#494) 2023-07-06 14:36:39 +02:00
Dhruwang
8283a7d2ed restored a css class 2023-07-06 17:08:40 +05:30
Dhruwang
08fe6b0ad8 changed id name to previous one 2023-07-06 16:23:08 +05:30
Dhruwang
8eae9fc846 resolved empty password field issue 2023-07-06 16:18:40 +05:30
Dhruwang
5ae6130e89 added password validation in reset password form 2023-07-06 16:17:30 +05:30
Matti Nannt
47b9867f28 Fix autoComplete survey schema validation (#491) 2023-07-06 11:58:16 +02:00
Shubham Palriwala
8585cb8c7c Add Timestamps to person model (#490) 2023-07-06 10:26:53 +02:00
Meet Patel
82bcc0ae7e space not allowed in questionid input 2023-07-05 20:41:48 +05:30
Matti Nannt
33811f9349 Improve Authorization Checks in Layout (#487) 2023-07-05 16:01:45 +02:00
Matti Nannt
4e1d905c9e Fix people service loading time (#485)
* Fix people service loading time

* run pnpm format
2023-07-05 15:19:54 +02:00
Johannes
e840816567 Merge pull request #484 from joe-shajan/fix_user_email
too easy for you ;) Thanks!! 🙌 🙌 🙌
2023-07-05 06:47:10 -05:00
Shubham Palriwala
dbec5426b2 Move people page to server components (#479)
* 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>
2023-07-05 13:06:37 +02:00
joe-shajan
5162a84246 fix: display user email in responses 2023-07-05 16:24:34 +05:30
Johannes
419b9d0b90 Add Link Prefilling, UserId Prefilling and Nextjs App Dir Setup to Docs (#480)
* fix EventClassesList table

* doc update

* update docs

* update nextjs docs

* update prefilling docs with url encoding

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-05 12:45:28 +02:00
Moritz Rengert
183ce34cad Fix Consent Question Summary not displayed (#482)
* 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>
2023-07-05 09:43:11 +02:00
Matti Nannt
a9f4d4e28b Dev Experience Performance Improvements (#481)
* 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
2023-07-04 20:54:41 +02:00
Piyush Gupta
751d729242 feat: Added prefill for consent question type and fixed the loader bug 2023-07-04 13:54:40 +05:30
Johannes
c8c6d922c3 zapier subpage 2023-07-03 16:14:31 +02:00
Johannes
dbe9a9aa02 Merge branch 'main' of github.com:formbricks/formbricks into feature/integrations 2023-07-03 15:55:39 +02:00
Johannes
175736bb4b Merge pull request #472 from formbricks/lp/remove-github
remove GitHub Deal
2023-07-03 07:58:25 -05:00
Johannes
d3724fa9fc remove GitHub Deal 2023-07-03 14:52:32 +02:00
Matti Nannt
db0b673965 Fix formatting issues (#471) 2023-07-03 11:37:08 +02:00
Johannes
fadd56102b Merge pull request #469 from formbricks/jobenjada-patch-1
fix images
2023-07-03 04:08:21 -05:00
Johannes
f38c897e2a fix images 2023-07-03 04:08:09 -05:00
Johannes
70ac575fcf Merge pull request #468 from formbricks/jobenjada-patch-1
Add dark mode images
2023-07-03 04:03:08 -05:00
Johannes
c1815007d1 Add dark mode images 2023-07-03 04:02:59 -05:00
Johannes
8188b85335 Merge pull request #467 from formbricks/jobenjada-patch-1
Update images in ReadMe
2023-07-03 03:57:22 -05:00
Johannes
00a4919b5a Update images in ReadMe 2023-07-03 03:56:32 -05:00
Johannes
81b4624649 Add Feedback Box to Formbricks Cloud (#461)
* add feedback box

* only show product feedback on cloud

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-03 10:15:13 +02:00
Johannes
69c332a435 Merge pull request #462 from formbricks/fix/fix-readme-for-dev-setup
fix README.md for dev setup
2023-07-03 02:18:31 -05:00
Matti Nannt
73a2b077e5 add response poll endpoint for zapier (#465)
* add response poll endpoint for zapier

* fix internal server error with incorrect api key
2023-07-02 22:32:20 +02:00
Timothy Krechel
f4349d348a fix README.md for dev setup 2023-07-02 12:29:48 +02:00
Johannes
95f588d5d1 update link and ui 2023-06-30 18:47:01 +02:00
Johannes
fb909938f9 Merge pull request #460 from formbricks/fix/response-options
Fix/response options
2023-06-30 10:57:57 -05:00
Anshuman Pandey
46b7183161 Improve Tag feature with better error handling and animations (#449)
* 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
2023-06-30 17:40:25 +02:00
Johannes
4610a46b5b Merge branch 'main' of github.com:formbricks/formbricks into fix/response-options 2023-06-30 17:24:50 +02:00
Matti Nannt
f7aea59f80 fix error during onboarding when environment not fully loaded (#459) 2023-06-30 17:22:19 +02:00
Johannes
31e4965355 Merge branch 'main' of github.com:formbricks/formbricks into fix/response-options 2023-06-30 17:16:30 +02:00
Johannes
b86f837e78 fix response card not visible 2023-06-30 17:12:59 +02:00
tyjkerr
1d76365f04 Add Option to Display Invite Link in Team Settings (#452)
* add share link feature

* add grid-cols-20 in tailwind.config

* update edit members section styles

* Check for valid inviteId when sharing invite
2023-06-30 17:05:05 +02:00
Matti Nannt
aa80eb5d96 Fix Widget Position not working in Preview (#458)
* update tailwindconfig to fix widget in preview

* remove prisma studio from database package scripts
2023-06-30 16:46:53 +02:00
Shubham Palriwala
d67858e2ea Add tests to formbricks-js (#399)
* 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>
2023-06-30 16:29:38 +02:00
Moritz Rengert
888d10434a Add option ask for short answers in Open Text questions (#435)
* feat: add shortAnswer: boolean to OpenTextQuestion interface

* feat: add longAnswer switch to OpenTextForm

* toggle textare lines depending on question.shortAnswer

* fix type build error

* move long answer switch to baseline

* adjust spacing between switches

* rename shortAnswer -> longAnswer, change textarea to input field

---------

Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-30 12:10:48 +02:00
Johannes
5dc9dfdb3d Update feature_request.md (#450)
added "How we code"
2023-06-29 16:33:06 +02:00
Johannes
06817aa8bc Update PULL_REQUEST_TEMPLATE.md (#451)
added two bullets to PR template
2023-06-29 16:31:47 +02:00
Moritz Rengert
2205d98aeb Add new Consent Question Type (#342)
* feat: add consent to questionTypes and types

* feat: add default values to consent question

* feat: add consent question form

* feat: add consent question to preview / link survey

* fix: clean consent question html

* feat: add consent question to js package

* feat: add consent to summary list

* fix build errors

* fix: remove skip button, add button label input

* feat: add checked logic option

* fix: add accepted option

* update consent form to match new advanced settings layout

* remove console.log

* hide accepted condition if consent is required

* fix build errors

* update consent question return values

* remove console.log

* renamed submitted to clicked in CTA logic, removed submitted condition for consent questions

* remove logs display from demo;

* remove logs display from demo;

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-29 16:31:05 +02:00
Johannes
fa785fcafb Merge pull request #448 from PeerRich/patch-2
added contact link to readme
2023-06-29 09:04:53 -05:00
Peer Richelsen
1892b6df40 added contact link to readme 2023-06-28 20:14:04 +02:00
Matti Nannt
ef0c621e5e fix necessary hard reload on responses summary and list (#447) 2023-06-28 16:45:30 +02:00
Matti Nannt
4f12886bfc Fix userId prefilling not working properly (#446) 2023-06-28 15:35:41 +02:00
Moritz Rengert
8c838bc25c feature/position in app modal (#440)
* 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>
2023-06-28 15:25:58 +02:00
Johannes
5bb1a0678a Merge pull request #445 from formbricks/lp/forward-deal
forward /deal
2023-06-28 07:56:15 -05:00
Johannes
e1f81636a3 forward /deal 2023-06-28 14:49:13 +02:00
Matti Nannt
9cc836a775 Clean up + Bugfixes (#443)
* format code

* fix building issue in database package

* update turbo config and package jsons

* update error package with more information and license

* fix typescript issues in ui package

* update package-lock

* update packages

* clean dependencies in web

* clean up dependencies in demo & formbricks-com

* remove unsused template file

* remove legacy capture endpoint

* remove unfinished client endpoints

* clean up unused functions

* fix formbricks not loading on invalid session

* update readme
2023-06-28 13:07:51 +02:00
Johannes
9d1d0576a2 Merge pull request #444 from formbricks/lp/fix-booking
Lp/fix booking
2023-06-28 06:05:36 -05:00
Johannes
454cc01629 fix build errors 2023-06-28 12:54:34 +02:00
Johannes
a296caa3c0 fix cal, update github icon 2023-06-28 12:51:45 +02:00
Johannes
f0eb8289c1 Merge pull request #442 from formbricks/lp/concierge
Add Concierge Page to Landing Page
2023-06-28 05:36:12 -05:00
Johannes
f93e2b9ace Merge branch 'main' of github.com:formbricks/formbricks into lp/concierge 2023-06-28 12:28:07 +02:00
Johannes
0187b0e61e update concierge page 2023-06-27 11:57:35 +02:00
Johannes
252859298b add concierge page 2023-06-27 11:24:35 +02:00
Zorig
daf030b183 Add option to connect a Linksurvey with a userId (#430)
* feat: identify users in link surveys #384

* fix: identify users in link surveys formbricks#384 PR feedback

* relocate endpoint, add check for preview=true

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-27 10:01:47 +02:00
Johannes
87a0eb0a04 Merge pull request #441 from formbricks/lp-remove-early-bird
remove early bird deal
2023-06-26 11:22:11 -05:00
Johannes
a2a47f433c remove early bird 2023-06-26 18:15:19 +02:00
Matthias Nannt
59481a7f5b add js integration 2023-06-26 16:55:32 +02:00
Matti Nannt
ff001e7ea1 Update formbricks-js to 0.1.22 (#438) 2023-06-26 16:07:44 +02:00
Dhruwang Jariwala
38021d2026 Add password requirements and password validation (#412)
* resolved

* made changes

* made submit button disabled on failing password checks

* removed submitted state and fixed typos

* redactored IsPasswordValid Component

* removed cursor-pointer from XCircleIcon

* added PasswordInput component

* made some refactors in PasswordInput component

* made eye icon lighter

* removed unsed code

* fix infinite state updates

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-26 14:43:50 +02:00
Matti Nannt
f1cc434e49 add missing migration (#437) 2023-06-26 13:36:16 +02:00
Dhruwang Jariwala
8a7b16effc Add option to redirect after completed link survey (#408)
* completed

* resolved migration error

* added redirect timer and url check

* rename redirectLink to redirectUrl

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-26 13:30:02 +02:00
Nafees Nazik
55c1e354fc Add user agent as meta data to responses (#398)
* chore: add ua parser

* feat: add user agent to meta

* feat: parse ua

* feat: add tooltip

* fix: type

* fix: empty tooltip

* fix: typo

* add simple formatting to tooltip text

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-26 11:42:42 +02:00
Matti Nannt
c853f8db2c fix deleted responses still shown in frontend (#436) 2023-06-26 09:25:36 +02:00
Matti Nannt
8486e516b6 Move Summary & responses page over to serverside data-retrieval (#433)
* 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
2023-06-25 17:26:17 +02:00
Anshuman Pandey
2e662f98b9 Add tagging functionality to responses (#426)
* 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>
2023-06-25 15:43:54 +02:00
Ashutosh Bhadauriya
7ed24c9f49 Add 50% Scroll & Exit Attempt Automatic events to trigger surveys (#393)
* 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
2023-06-23 12:17:37 +02:00
Ankur Datta
c224e7995d Add option to copy surveys to other environments (#392)
* Add option to copy surveys to other environments

---------

Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-23 11:48:28 +02:00
Johannes
a1bbe5c5fb Merge pull request #428 from formbricks/remove-career
remove careers page, update remaining CTAs
2023-06-22 09:40:27 -05:00
Johannes
5b34304cfc fix build error 2023-06-22 16:30:36 +02:00
Johannes
e15309a080 remove careers page, update remaining CTAs 2023-06-22 16:04:07 +02:00
Joe
25b84102a7 Check for unsaved changes in Survey Editor before changing pages (#409)
* 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
2023-06-22 08:44:04 +02:00
Pradumn Kumar
6922b3ed3f Add snapshot of user attributes to a response (#403)
* 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>
2023-06-21 13:02:55 +02:00
Nitesh Seram
08717cd396 Add NEXT_PUBLIC_INVITE_DISABLED env variable to disable invite functionality (#373)
* 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>
2023-06-21 11:53:37 +02:00
Ankur Datta
8cfc1878fb Add iFrame Embed Option for Link Surveys (#414)
* add-embed-share-survey

* rm-use-client

* [FIX] responsive-iframe-embed
2023-06-21 10:56:35 +02:00
Matti Nannt
7ef7c39c31 Fix Zod Survey Types to represent current logic jumps (#424)
* fix survey zod types to represent question based logic jumps
2023-06-20 23:30:51 +02:00
Matti Nannt
db697a485e Make prisma call in survey service specific to avoid model conflicts (#423)
* make prisma call in survey service specific to avoid model conflicts

* make zod survey schema more readable by using enums
2023-06-20 22:31:47 +02:00
Matti Nannt
455e0779a5 fix compatibility issue with new pnpm version (#421) 2023-06-20 17:09:19 +02:00
Piyush Gupta
51e4221f33 Add QuestionType enum in place of strings (#420) 2023-06-20 16:32:03 +02:00
Francois Disubi
8f1b7ae83a Add Delete Account functionality (#363)
* 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
2023-06-20 14:33:14 +02:00
Neil Chauhan
27023eacf8 Add roles to users you invite to your team (#404)
* 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
2023-06-20 12:21:25 +02:00
Matti Nannt
4348c905f0 improve delete product dialog, send error toast on failed request (#419) 2023-06-20 11:33:27 +02:00
Johannes
aa52808bd2 Merge pull request #417 from formbricks/fix-demo-responsiveness
fix responsiveness of demo app
2023-06-20 03:23:08 -05:00
Johannes
033d4cb54a fix responsiveness 2023-06-20 10:08:03 +02:00
Matti Nannt
8f55b73c08 Format code according to prettier rules in all files (#406) 2023-06-19 13:01:20 +02:00
Surendhar
495b53e98f Add ability to mark survey as completed after x responses (#395)
* mark survey as completed after x responses
2023-06-19 12:56:07 +02:00
Joe
e64d2b9ac1 Add active & inactive surveys to attribute details view (#400) 2023-06-19 09:26:40 +02:00
Matti Nannt
ce5410a3f9 Update pnpm lock file to fix Docker build issues (#405) 2023-06-18 20:12:26 +02:00
Piyush Gupta
51c39116d0 Add URL prefilling option for the first question (#376)
Add URL prefilling option for the first question using URL search parameters
2023-06-18 13:36:31 +02:00
Johannes
117823a6f7 Merge pull request #380 from joe-shajan/preserve_nav_scroll
Fix: Preserve docs nav scroll position
2023-06-16 13:40:51 -05:00
Matti Nannt
e6f6e2296f fix email notifications display empty responses, fix webhook data format (#383) 2023-06-16 11:49:09 +02:00
Matti Nannt
2f65c8d011 Close Icon not showing on mobile in formbricks-js (#382)
* fix close icon not showing on mobile
* remove whitespaces in preview
2023-06-16 10:53:55 +02:00
Matti Nannt
9393cab76f add megaprompt (#381) 2023-06-16 10:39:36 +02:00
joe-shajan
b1fa0fefe9 fix: preserve docs nav scroll position 2023-06-16 01:00:11 +05:30
Johannes
cfacd1a63e Merge pull request #377 from Ashutosh-Bhadauriya/enhancement/add-save-button
Enhance: Add save button in deleteDialogue when creating survey
2023-06-15 11:18:21 -05:00
Ashutosh-Bhadauriya
306bf622c6 Merge branch 'main' of https://github.com/Ashutosh-Bhadauriya/formbricks into enhancement/add-save-button 2023-06-15 20:12:57 +05:30
Matti Nannt
fc66e16653 fix build errors (#379) 2023-06-15 16:35:25 +02:00
Ashutosh-Bhadauriya
6ff3371ed1 Merge branch 'main' of https://github.com/Ashutosh-Bhadauriya/formbricks into enhancement/add-save-button 2023-06-15 19:56:59 +05:30
Ashutosh-Bhadauriya
427406e9eb Enhance: add save button in delete dialog and let the user go back after saving 2023-06-15 19:15:28 +05:30
Johannes
00acdf58f1 Merge pull request #375 from formbricks/feature/FOR-772
Add Data Service for Responses, Webhooks, Surveys & Api Keys
2023-06-15 08:39:02 -05:00
Johannes
f4bb54c79c Merge branch 'main' of github.com:formbricks/formbricks into feature/FOR-772 2023-06-15 14:01:14 +02:00
Anshuman Pandey
66891318a1 Add CSV Export (#371)
* add CSV export feature to responses page
2023-06-15 13:58:03 +02:00
Johannes
478a981996 Improve Dev-Experience with a new Demo-App to test the SDK (#372)
* update demo app with new UI

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-15 09:53:56 +02:00
Johannes
f713591083 Merge pull request #374 from Ashutosh-Bhadauriya/feat/add-user-roles
Feat: Add a column to add user roles and added useMemo in attributeclassesList
2023-06-14 11:25:23 -05:00
Matthias Nannt
1334e7a3f9 fix bug creating responses, improve error handling in survey service 2023-06-14 17:55:04 +02:00
Matthias Nannt
a5e426109b Merge branch 'main' of github.com:formbricks/formbricks into feature/FOR-772 2023-06-14 17:23:53 +02:00
Ashutosh-Bhadauriya
7554ab4d97 Feat: Add a column to add user roles 2023-06-14 20:52:47 +05:30
Matthias Nannt
1ef49f6fae rewrite single response client endpoint with new error classes to minimize prisma calls 2023-06-14 17:19:31 +02:00
Matthias Nannt
b7f72fe111 update services with new error classes, update responses endpoint with new error classes and the right response codes 2023-06-14 17:08:02 +02:00
Matti Nannt
bbec1c9066 fix build errors in docker container (#370) 2023-06-14 14:49:50 +02:00
Matthias Nannt
0feaadcbc9 add new error classes, add types and services for api keys, use new error classes in webhook api 2023-06-13 15:07:15 +02:00
Johannes
a6f3bb8f87 Merge pull request #367 from formbricks/patch/note-height
update note height and fix multiple choice zod
2023-06-13 06:28:45 -05:00
Johannes
a4274da003 update note height and fix multiple choice zod 2023-06-13 13:25:24 +02:00
Johannes
eb1f4b0f0d Merge pull request #365 from Ashutosh-Bhadauriya/feat/add-attribute-archive
Feature: Add ability to archive attributes
2023-06-13 06:05:28 -05:00
Ashutosh-Bhadauriya
c5be453563 Increase badge margin and change button variant 2023-06-13 16:29:02 +05:30
Matti Nannt
c16708d12a Update webhook overview doc with more usage information (#366) 2023-06-13 12:16:26 +02:00
Ashutosh-Bhadauriya
46fadf9df0 Feat: Add ability to archive attributes 2023-06-13 15:16:57 +05:30
Johannes
7c53fa34f4 Merge pull request #344 from formbricks/FBRICKS-332
[FEATURE] Add a note to responses
2023-06-13 04:35:12 -05:00
Johannes
52a8d7beef increase width 2023-06-13 11:26:01 +02:00
Matti Nannt
842cb34942 Add Webhooks (#364) 2023-06-13 11:22:46 +02:00
Johannes
08038f292b Merge branch 'main' of github.com:formbricks/formbricks into FBRICKS-332 2023-06-13 11:20:46 +02:00
Johannes
424a2f1a69 tweak UI 2023-06-13 11:14:01 +02:00
Johannes
c1b1f6cacb Merge branch 'main' of github.com:formbricks/formbricks into FBRICKS-332 2023-06-13 09:42:18 +02:00
Matti Nannt
97263a66cc Add new client endpoints & webhook functionality (#355)
* 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>
2023-06-12 19:51:13 +02:00
Johannes
85c3069155 Merge pull request #353 from formbricks/patch/add-overflow-to-survey
[ENHANCEMENT] Add scrolling to select question when too man options are added
2023-06-12 11:23:11 -05:00
Johannes
b6e99274fe Merge branch 'patch/add-overflow-to-survey' of github.com:formbricks/formbricks into patch/add-overflow-to-survey 2023-06-12 18:16:35 +02:00
Johannes
2278fc1477 fix survey layout 2023-06-12 18:15:26 +02:00
Johannes
26e2be43bc fix survey layout 2023-06-12 18:12:11 +02:00
Johannes
583dc7af2b remove chevron 2023-06-12 17:35:36 +02:00
Johannes
c6702cecb8 fix standalone links 2023-06-12 17:22:32 +02:00
Matthias Nannt
995de207fb update responseNotes lib to plural wording 2023-06-12 14:37:37 +02:00
Johannes
d970c121a5 fix single question 2023-06-12 13:59:37 +02:00
Johannes
369379e539 Merge branch 'main' of github.com:formbricks/formbricks into patch/add-overflow-to-survey 2023-06-12 13:57:47 +02:00
gitstart-formbricks
62e47507cd show response note by default 2023-06-12 11:54:07 +00:00
gitstart-formbricks
8c87957911 Merge commit '03e83caeb7bedbf38f1c01d404a9772a73f2187e' into FBRICKS-332 2023-06-12 11:53:59 +00:00
Johannes
51621dcaff add scroll indicator on iPhone 2023-06-12 13:50:59 +02:00
Johannes
03e83caeb7 Merge pull request #351 from Ashutosh-Bhadauriya/enhance/question-card-ui
Great work @Ashutosh-Bhadauriya - thanks! 🥳
2023-06-12 03:54:48 -05:00
AshutoshBhadauriya
f312783670 Remove logiceditor import 2023-06-12 14:23:28 +05:30
Matti Nannt
ef70e7363f Fix responsiveness issue for long questions FOR-760 (#358) 2023-06-12 09:41:05 +02:00
AshutoshBhadauriya
b3ab0ad12e Minor fixes 2023-06-10 13:54:46 +05:30
gitstart-formbricks
1e3204e063 align icons 2023-06-09 18:26:23 +00:00
gitstart-formbricks
855fd87dba Update styles 2023-06-09 16:55:41 +00:00
gitstart-formbricks
7b6b1b9edb update styles 2023-06-09 16:46:01 +00:00
gitstart-formbricks
a53e67ac7d Merge commit 'ba1a17578f91bae58a938936d120883a38ed34e3' into FBRICKS-332 2023-06-09 16:45:53 +00:00
AshutoshBhadauriya
e54d8f42fb Fix description 2023-06-09 21:34:21 +05:30
AshutoshBhadauriya
ac83286b27 Fix: all the changes suggested in the issue 2023-06-09 20:31:21 +05:30
Johannes
5180fa8608 add scroll to js package 2023-06-09 14:44:46 +02:00
Johannes
92787722f0 add scroll to select 2023-06-09 14:22:01 +02:00
AshutoshBhadauriya
9d3117b9c1 Merge branch 'main' of https://github.com/Ashutosh-Bhadauriya/formbricks into enhance/question-card-ui 2023-06-09 15:07:24 +05:30
AshutoshBhadauriya
3218bbdf6a Enhancement: Revamp question card ui 2023-06-09 14:36:29 +05:30
gitstart-formbricks
ab8e42f018 fix response note header 2023-06-07 22:29:30 +00:00
gitstart-formbricks
ddbcf77e59 Add a note to responses 2023-06-07 16:10:23 +00:00
1115 changed files with 45068 additions and 17147 deletions

View File

@@ -4,8 +4,8 @@
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@formbricks/formbricks-com"]
"ignore": ["@formbricks/formbricks-com", "@formbricks/demo", "@formbricks/web"]
}

View File

@@ -46,7 +46,8 @@ NEXTAUTH_URL=http://localhost:3000
# MAIL_FROM=noreply@example.com
# SMTP_HOST=localhost
# SMTP_PORT=1025
# SMTP_SECURE_ENABLED=0 # Enable for TLS (port 465)
# Enable SMTP_SECURE_ENABLED for TLS (port 465)
# SMTP_SECURE_ENABLED=0
# SMTP_USER=smtpUser
# SMTP_PASSWORD=smtpPassword
@@ -70,6 +71,9 @@ NEXT_PUBLIC_PASSWORD_RESET_DISABLED=1
# Signup. Disable the ability for new users to create an account.
# NEXT_PUBLIC_SIGNUP_DISABLED=1
# Team Invite. Disable the ability for invited users to create an account.
# NEXT_PUBLIC_INVITE_DISABLED=1
##########
# Other #
##########
@@ -93,4 +97,7 @@ GITHUB_SECRET=
# Configure Google Login
NEXT_PUBLIC_GOOGLE_AUTH_ENABLED=0
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_CLIENT_SECRET=
# Cron Secret
CRON_SECRET=

View File

@@ -46,7 +46,8 @@ NEXTAUTH_URL=http://localhost:3000
MAIL_FROM=noreply@example.com
SMTP_HOST=localhost
SMTP_PORT=1025
SMTP_SECURE_ENABLED=0 # Enable for TLS (port 465)
# Enable SMTP_SECURE_ENABLED for TLS (port 465)
SMTP_SECURE_ENABLED=0
SMTP_USER=smtpUser
SMTP_PASSWORD=smtpPassword
@@ -70,6 +71,9 @@ SMTP_PASSWORD=smtpPassword
# Signup. Disable the ability for new users to create an account.
# NEXT_PUBLIC_SIGNUP_DISABLED=1
# Team Invite. Disable the ability for invited users to create an account.
# NEXT_PUBLIC_INVITE_DISABLED=1
##########
# Other #
##########
@@ -79,12 +83,6 @@ NEXT_PUBLIC_PRIVACY_URL=
NEXT_PUBLIC_TERMS_URL=
NEXT_PUBLIC_IMPRINT_URL=
# Disable Sentry warning
SENTRY_IGNORE_API_RESOLUTION_ERROR=1
# Enable Sentry Error Tracking
NEXT_PUBLIC_SENTRY_DSN=
# Configure Github Login
NEXT_PUBLIC_GITHUB_AUTH_ENABLED=0
GITHUB_ID=
@@ -97,7 +95,6 @@ GOOGLE_CLIENT_SECRET=
# Stripe Billing Variables
NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID=
NEXT_PUBLIC_STRIPE_PUBLIC_KEY=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
@@ -105,4 +102,7 @@ STRIPE_WEBHOOK_SECRET=
# Configure Formbricks usage within Formbricks
NEXT_PUBLIC_FORMBRICKS_API_HOST=
NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID=
NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID=
NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID=
# Cron Secret
CRON_SECRET=

View File

@@ -1,51 +0,0 @@
---
name: Bug report
about: "Found a bug? Please fill out the sections below. \U0001F44D"
title: "[BUG]"
labels: bug
assignees: ""
---
### Issue Summary
<!--
A summary of the issue. This needs to be a clear detailed-rich summary.
-->
(Write your answer here.)
### Steps to Reproduce
1. (for example) Went to ...
2. Clicked on...
3. ...
### Expected behavior
A clear and concise description of what you expected to happen.
### Other information
#### Screenshots
If applicable, add screenshots to help explain your problem.
#### Environment
- [ ] Formbricks Cloud (app.formbricks.com)
- [ ] self-hosted Formbricks, version/commit: [please provide]
#### Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
#### Node.JS version
[e.g. v18.15.0]
#### Anything else?
- Screen recording, console logs, network requests: You can make a recording with [Loom](https://www.loom.com).
- Anything else that you think could be an issue?

81
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,81 @@
name: Bug report
description: "Found a bug? Please fill out the sections below. \U0001F44D"
title: "[BUG]"
labels: bug
assignees: []
body:
- type: textarea
id: issue-summary
attributes:
label: Issue Summary
description: A summary of the issue. This needs to be a clear detailed-rich summary.
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to Reproduce
value: |
1. (for example) Went to ...
2. Clicked on...
3. ...
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
id: other-information
attributes:
label: Other information
validations:
required: false
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
validations:
required: false
- type: checkboxes
id: environment
attributes:
label: Environment
options:
- label: Formbricks Cloud (app.formbricks.com)
- label: Self-hosted Formbricks
- type: textarea
id: desktop-version
attributes:
label: Desktop (please complete the following information)
description: |
examples:
- **OS**: [e.g. iOS]
- **Browser**: [e.g. chrome, safari]
- **Version**: [e.g. 22]
value: |
- OS:
- Node:
- npm:
render: markdown
validations:
required: true
- type: markdown
id: nodejs-version
attributes:
value: |
#### Node.JS version
[e.g. v18.15.0]
- type: markdown
id: anything-else
attributes:
value: |
#### Anything else?
- Screen recording, console logs, network requests: You can make a recording with [Loom](https://www.loom.com).
- Anything else that you think could be an issue?

View File

@@ -1,19 +0,0 @@
---
name: Feature request
about: "Suggest an idea for this project \U0001F680"
title: "[FEATURE]"
labels: enhancement
assignees: ""
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -0,0 +1,45 @@
name: Feature request
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 🤓
- Everything is type-safe
- All UI components are in the package `formbricks/ui`
- Run `pnpm dev` to find a demo app to test in-app surveys at `localhost:3002`
- 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.

View File

@@ -31,6 +31,8 @@ Fixes # (issue)
<!-- 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 -->
- [ ] Added a screen recording or screenshots to this PR
- [ ] Filled out the "How to test" section in this PR
- [ ] Read the [contributing guide](https://github.com/formbricks/formbricks/blob/main/CONTRIBUTING.md)
- [ ] Self-reviewed my own code
- [ ] Commented on my code in hard-to-understand bits

6
.github/labeler.yml vendored Normal file
View File

@@ -0,0 +1,6 @@
"❗️ migrations":
- packages/database/migrations/**/migration.sql
"❗️ .env changes":
- .env.example
- .env.docker

View File

@@ -0,0 +1,74 @@
name: "Apply issue labels to PR"
on:
pull_request_target:
types:
- opened
jobs:
label_on_pr:
runs-on: ubuntu-latest
permissions:
contents: none
issues: read
pull-requests: write
steps:
- name: Apply labels from linked issue to PR
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
async function getLinkedIssues(owner, repo, prNumber) {
const query = `query GetLinkedIssues($owner: String!, $repo: String!, $prNumber: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $prNumber) {
closingIssuesReferences(first: 10) {
nodes {
number
labels(first: 10) {
nodes {
name
}
}
}
}
}
}
}`;
const variables = {
owner: owner,
repo: repo,
prNumber: prNumber,
};
const result = await github.graphql(query, variables);
return result.repository.pullRequest.closingIssuesReferences.nodes;
}
const pr = context.payload.pull_request;
const linkedIssues = await getLinkedIssues(
context.repo.owner,
context.repo.repo,
pr.number
);
const labelsToAdd = new Set();
for (const issue of linkedIssues) {
if (issue.labels && issue.labels.nodes) {
for (const label of issue.labels.nodes) {
labelsToAdd.add(label.name);
}
}
}
if (labelsToAdd.size) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
labels: Array.from(labelsToAdd),
});
}

33
.github/workflows/build-production.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Tests
on:
workflow_call:
jobs:
build:
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
runs-on: ubuntu-latest
timeout-minutes: 30
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 18.x
- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
- name: Install dependencies
run: pnpm install --config.platform=linux --config.architecture=x64
- name: create .env
run: cp .env.example .env
- name: Build formbricks-js dependencies
run: pnpm build --filter=web...

23
.github/workflows/cron-closeOnDate.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Cron - closeOnDate
on:
# "Scheduled workflows run on the latest commit on the default or base branch."
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
schedule:
# Runs “At 00:00.” (see https://crontab.guru)
- cron: "0 0 * * *"
jobs:
cron-weeklySummary:
env:
APP_URL: ${{ secrets.APP_URL }}
CRON_SECRET: ${{ secrets.CRON_SECRET }}
runs-on: ubuntu-latest
steps:
- name: cURL request
if: ${{ env.APP_URL && env.CRON_SECRET }}
run: |
curl ${{ env.APP_URL }}/api/cron/close_surveys \
-X POST \
-H 'content-type: application/json' \
-H 'x-api-key: ${{ env.CRON_SECRET }}' \
--fail

View File

@@ -0,0 +1,23 @@
name: Cron - weeklySummary
on:
# "Scheduled workflows run on the latest commit on the default or base branch."
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
schedule:
# Runs “At 08:00 on Monday.” (see https://crontab.guru)
- cron: "0 8 * * 1"
jobs:
cron-weeklySummary:
env:
APP_URL: ${{ secrets.APP_URL }}
CRON_SECRET: ${{ secrets.CRON_SECRET }}
runs-on: ubuntu-latest
steps:
- name: cURL request
if: ${{ env.APP_URL && env.CRON_SECRET }}
run: |
curl ${{ env.APP_URL }}/api/cron/weekly_summary \
-X POST \
-H 'content-type: application/json' \
-H 'x-api-key: ${{ env.CRON_SECRET }}' \
--fail

18
.github/workflows/labeler.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: "Pull Request Labeler"
on:
- pull_request_target
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
# https://github.com/actions/labeler/issues/442#issuecomment-1297359481
sync-labels: ""

View File

@@ -1,9 +1,11 @@
name: Checks
on: [push]
name: Lint
on:
workflow_call:
jobs:
build:
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
runs-on: ubuntu-latest
timeout-minutes: 15
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}

View File

@@ -0,0 +1,118 @@
name: "Next.js Bundle Analysis"
on:
workflow_call:
push:
branches:
- main
jobs:
build:
name: Production build
if: ${{ github.event_name == 'push' }}
uses: ./.github/workflows/build-production.yml
secrets: inherit
analyze:
needs: build
if: always()
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 18.x
- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
- name: Install dependencies
run: pnpm install --config.platform=linux --config.architecture=x64
- name: create .env
run: cp .env.example .env
- name: Build formbricks-js dependencies
run: pnpm build --filter=web...
- name: Upload bundle
uses: actions/upload-artifact@v2
with:
name: bundle
path: apps/web/.next/analyze/__bundle_analysis.json
- name: Analyze bundle
run: |
cd apps/web
npx -p nextjs-bundle-analysis@0.5.0 report
- name: Upload bundle
uses: actions/upload-artifact@v2
with:
name: bundle
path: apps/web/.next/analyze/__bundle_analysis.json
- name: Download base branch bundle stats
uses: dawidd6/action-download-artifact@v2
if: success() && github.event.number
with:
workflow: nextjs-bundle-analysis.yml
branch: ${{ github.event.pull_request.base.ref }}
path: apps/web/.next/analyze/base
# And here's the second place - this runs after we have both the current and
# base branch bundle stats, and will compare them to determine what changed.
# There are two configurable arguments that come from package.json:
#
# - budget: optional, set a budget (bytes) against which size changes are measured
# it's set to 350kb here by default, as informed by the following piece:
# https://infrequently.org/2021/03/the-performance-inequality-gap/
#
# - red-status-percentage: sets the percent size increase where you get a red
# status indicator, defaults to 20%
#
# Either of these arguments can be changed or removed by editing the `nextBundleAnalysis`
# entry in your package.json file.
- name: Compare with base branch bundle
if: success() && github.event.number
run: |
cd apps/web
ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare
- name: Get comment body
id: get-comment-body
if: success() && github.event.number
run: |
cd apps/web
body=$(cat .next/analyze/__bundle_analysis_comment.txt)
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo ::set-output name=body::$body
- name: Find Comment
uses: peter-evans/find-comment@v1
if: success() && github.event.number
id: fc
with:
issue-number: ${{ github.event.number }}
body-includes: "<!-- __NEXTJS_BUNDLE_@calcom/web -->"
- name: Create Comment
uses: peter-evans/create-or-update-comment@v1.4.4
if: success() && github.event.number && steps.fc.outputs.comment-id == 0
with:
issue-number: ${{ github.event.number }}
body: ${{ steps.get-comment-body.outputs.body }}
- name: Update Comment
uses: peter-evans/create-or-update-comment@v1.4.4
if: success() && github.event.number && steps.fc.outputs.comment-id != 0
with:
issue-number: ${{ github.event.number }}
body: ${{ steps.get-comment-body.outputs.body }}
comment-id: ${{ steps.fc.outputs.comment-id }}
edit-mode: replace

45
.github/workflows/pr.yml vendored Normal file
View File

@@ -0,0 +1,45 @@
name: PR Update
on:
pull_request_target:
branches:
- main
paths-ignore:
- "**.md"
- ".github/CODEOWNERS"
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
name: Unit tests
uses: ./.github/workflows/test.yml
secrets: inherit
lint:
name: Linters
uses: ./.github/workflows/lint.yml
secrets: inherit
build-production:
name: Production build (without database)
uses: ./.github/workflows/build-production.yml
secrets: inherit
analyze:
needs: build-production
uses: ./.github/workflows/nextjs-bundle-analysis.yml
secrets: inherit
required:
needs: [lint, test, build-production]
if: always()
runs-on: ubuntu-latest
steps:
- name: fail if conditional jobs failed
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')
run: exit 1

View File

@@ -1,4 +1,4 @@
name: Release
name: Release Changesets
on:
push:
@@ -7,10 +7,15 @@ on:
concurrency: ${{ github.workflow }}-${{ github.ref }}
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
timeout-minutes: 15
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
@@ -24,7 +29,7 @@ jobs:
node-version: 18.x
- name: Install pnpm
uses: pnpm/action-setup@v2.2.2
uses: pnpm/action-setup@v2.2.4
- name: Install Dependencies
run: pnpm install --config.platform=linux --config.architecture=x64

43
.github/workflows/release-docker.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Release on Dockerhub
on:
push:
tags:
- "v*"
jobs:
release-image-on-dockerhub:
name: Release on Dockerhub
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Get Release Tag
id: extract_release_tag
run: |
TAG=${{ github.ref }}
TAG=${TAG#refs/tags/v}
echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./apps/web/Dockerfile
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/formbricks:${{ env.RELEASE_TAG }}
${{ secrets.DOCKER_USERNAME }}/formbricks:latest

View File

@@ -0,0 +1,47 @@
name: "Validate PRs"
on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize
permissions:
pull-requests: write
jobs:
validate-pr:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: marocchino/sticky-pull-request-comment@v2
# When the previous steps fails, the workflow would stop. By adding this
# condition you can continue the execution with the populated error message.
if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:
header: pr-title-lint-error
message: |
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
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-title-lint-error
message: |
Thank you for following the naming conventions for pull request titles! 🙏

36
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Tests
on:
workflow_call:
jobs:
build:
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
runs-on: ubuntu-latest
timeout-minutes: 15
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 18.x
- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
- name: Install dependencies
run: pnpm install --config.platform=linux --config.architecture=x64
- name: create .env
run: cp .env.example .env
- name: Build formbricks-js dependencies
run: pnpm build --filter=js
- name: Test
run: pnpm test

View File

@@ -0,0 +1,27 @@
name: "Welcome new contributors"
on:
issues:
types: opened
pull_request:
types: opened
permissions:
pull-requests: write
issues: write
jobs:
welcome-message:
name: Welcoming New Users
runs-on: ubuntu-latest
timeout-minutes: 10
if: github.event.action == 'opened'
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pr-message: |-
Thank you so much for making your first Pull Request and taking the time to improve Formbricks! 🚀🙏❤️
Feel free to join the conversation at [Discord](https://formbricks.com/discord)
issue-message: |
Thank you for opening your first issue! 🙏❤️ One of our team members will review it and get back to you as soon as it possible. 😊

4
.gitignore vendored
View File

@@ -33,6 +33,10 @@ yarn-error.log*
.env.test.local
.env.production.local
!packages/database/.env
!apps/web/.env
# Prisma generated files
packages/database/zod
# turbo
.turbo

6
.gitpod.Dockerfile vendored Normal file
View File

@@ -0,0 +1,6 @@
FROM gitpod/workspace-full
# Install custom tools, runtime, etc.
RUN brew install yq
RUN pnpm install turbo --global

76
.gitpod.yml Normal file
View File

@@ -0,0 +1,76 @@
tasks:
- name: demo
init: |
gp sync-await init-install &&
bash .gitpod/setup-demo.bash
command: |
cd apps/demo &&
cp .env.example .env &&
sed -i -r "s#^(NEXT_PUBLIC_FORMBRICKS_API_HOST=).*#\1 $(gp url 3000)#" .env &&
gp sync-await init &&
turbo --filter "@formbricks/demo" go
- name : website
command: gp sync-await init && turbo --filter "@formbricks/formbricks-com" dev
- name: Init Formbricks
init: |
cp .env.example .env &&
bash .gitpod/init.bash &&
turbo --filter "@formbricks/js" build &&
gp sync-done init-install
command: |
gp sync-done init &&
gp tasks list &&
gp ports await 3002 && gp ports await 3000 && gp open apps/demo/.env && gp preview $(gp url 3002) --external
- name: web
init: |
gp sync-await init-install &&
bash .gitpod/setup-web.bash &&
turbo --filter "@formbricks/database" db:down
command: |
gp sync-await init &&
cp .env.example .env &&
sed -i -r "s#^(NEXT_PUBLIC_WEBAPP_URL=).*#\1 $(gp url 3000)#" .env &&
sed -i -r "s#^(NEXTAUTH_URL=).*#\1 $(gp url 3000)#" .env &&
turbo --filter "@formbricks/web" go
image:
file: .gitpod.Dockerfile
ports:
- port: 3000
visibility: public
onOpen: open-browser
- port: 3001
visibility: public
onOpen: ignore
- port: 3002
visibility: public
onOpen: ignore
- port: 5432
visibility: public
onOpen: ignore
- port: 1025
visibility: public
onOpen: ignore
- port: 8025
visibility: public
onOpen: ignore
github:
prebuilds:
master: true
pullRequests: true
addComment: true
vscode:
extensions:
- "ban.spellright"
- "bradlc.vscode-tailwindcss"
- "DavidAnson.vscode-markdownlint"
- "dbaeumer.vscode-eslint"
- "esbenp.prettier-vscode"
- "Prisma.prisma"
- "yzhang.markdown-all-in-one"

18
.gitpod/init.bash Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
images=($(yq eval '.services.*.image' packages/database/docker-compose.yml))
pull_image() {
docker pull "$1"
}
# install packages in background
pnpm i &
# pull images
for image in "${images[@]}"
do
pull_image "$image" &
done
wait

5
.gitpod/setup-demo.bash Normal file
View File

@@ -0,0 +1,5 @@
for task in $(yq -r -oy '.pipeline."@formbricks/demo#go".dependsOn[]' turbo.json); do
package="${task%#*}"
command="${task#*#}"
turbo --filter "$package" $command
done

5
.gitpod/setup-web.bash Normal file
View File

@@ -0,0 +1,5 @@
for task in $(yq -r -oy '.pipeline."@formbricks/web#go".dependsOn[]' turbo.json); do
package="${task%#*}"
command="${task#*#}"
turbo --filter "$package" $command
done

4
.husky/pre-commit Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
pnpm lint-staged

1
.vercelignore Normal file
View File

@@ -0,0 +1 @@
apps/web/.env

View File

@@ -1,9 +1,9 @@
Copyright (c) 2023 Matthias Nannt, Johannes Dancker
Copyright (c) 2023 Formbricks GmbH
Portions of this software are licensed as follows:
- 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/" directory of this repository, if that directory exists, is licensed under the "MIT" license as defined in "packages/js/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.
@@ -67,7 +67,7 @@ modification follow.
TERMS AND CONDITIONS
0. Definitions.
1. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.

View File

@@ -1,6 +1,6 @@
<p align="center">
<a href="https://github.com/formbricks/formbricks">
<img src="https://user-images.githubusercontent.com/675065/203262290-3c2bc5b8-839c-468a-b675-e26a369c7fe2.png" alt="Logo" width="500">
<a href="https://formbricks.com">
<img width="120" alt="Open Source Experience Management Solution Qualtrics Alternative Logo" src="https://github.com/formbricks/formbricks/assets/72809645/0086704f-bee7-4d38-9cc8-fa42ee59e004">
</a>
<h3 align="center">Formbricks</h3>
@@ -12,67 +12,89 @@
</p>
<p align="center">
<a href="https://github.com/formbricks/formbricks/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-AGPL-purple" alt="License"></a> <a href="https://formbricks.com/discord"><img src="https://img.shields.io/discord/979077669410979880?label=Discord&logo=discord&logoColor=%23fff" alt="Join Formbricks Discord"></a> <a href="https://github.com/formbricks/formbricks/stargazers"><img src="https://img.shields.io/github/stars/formbricks/formbricks?logo=github" alt="Github Stars"></a>
<a href="https://github.com/formbricks/formbricks/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-AGPL-purple" alt="License"></a> <a href="https://formbricks.com/discord"><img src="https://img.shields.io/discord/979077669410979880?label=Discord&logo=discord&logoColor=%23fff" alt="Join Formbricks Discord"></a> <a href="https://github.com/formbricks/formbricks/stargazers"><img src="https://img.shields.io/github/stars/formbricks/formbricks?logo=github" alt="Github Stars"></a>
<a href="https://news.ycombinator.com/item?id=32303986"><img src="https://img.shields.io/badge/Hacker%20News-122-%23FF6600" alt="Hacker News"></a>
<a href="https://www.producthunt.com/products/snoopforms"><img src="https://img.shields.io/badge/Product%20Hunt-%232%20Product%20of%20the%20Day-orange?logo=producthunt&logoColor=%23fff" alt="Product Hunt"></a>
<a href="https://github.blog/2023-04-12-github-accelerator-our-first-cohort-and-whats-next/"><img src="https://img.shields.io/badge/2023-blue?logo=github&label=Github%20Accelerator" alt="Github Accelerator"></a>
<a href="https://github.com/formbricks/formbricks/issues?q=is:issue+is:open+label:%22%F0%9F%99%8B%F0%9F%8F%BB%E2%80%8D%E2%99%82%EF%B8%8Fhelp+wanted%22"><img src="https://img.shields.io/badge/Help%20Wanted-Contribute-blue"></a>
</p>
<br/>
## About Formbricks
<p align="center">
<i>Trusted by</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://github.com/calcom/cal.com/"><img src="https://github.com/formbricks/formbricks/assets/675065/1a8763cf-f47e-4960-90f6-334f6dc12a17#gh-light-mode-only" height="20px"></a><a href="https://github.com/calcom/cal.com/"><img src="https://github.com/formbricks/formbricks/assets/72809645/9a031e8d-538f-4fdc-9338-b77e9a57d6ac#gh-dark-mode-only" height="20px"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://github.com/CrowdDotDev/crowd.dev"><img src="https://github.com/formbricks/formbricks/assets/675065/59b1a4d4-25e4-4ef3-b0bf-4426446fbfd0#gh-light-mode-only" height="20px"></a><a href="https://github.com/CrowdDotDev/crowd.dev"><img src="https://github.com/formbricks/formbricks/assets/72809645/4bb4caf7-4b64-44c8-94bd-850606d181c1#gh-dark-mode-only" height="20px"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://clovyr.io/"><img src="https://github.com/formbricks/formbricks/assets/675065/9291c8df-9aac-423a-a430-a9a581240075" height="20px"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://neverinstall.com/"><img src="https://github.com/formbricks/formbricks/assets/675065/72e5e37b-8ef7-4340-b06e-f1d12a05330f#gh-light-mode-only" height="20px"></a><a href="https://neverinstall.com/"><img src="https://github.com/formbricks/formbricks/assets/72809645/9d9711dc-75e5-4084-b7fa-bbaf621064a8#gh-dark-mode-only" height="20px">
</p>
<img width="1527" alt="formbricks-sneak" src="https://user-images.githubusercontent.com/675065/227726212-6ebf930e-6a20-4ffa-b966-56cd41bdf363.png">
## ✨ About Formbricks
Formbricks productizes best practices for qualitative in-app user discovery. Use micro-surveys to target the right users at the right time without making surveys annoying.
<img width="1527" alt="formbricks-sneak" src="https://github-production-user-asset-6210df.s3.amazonaws.com/675065/249441967-ccb89ea3-82b4-4bf2-8d2c-528721ec313b.png">
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.
**Try it out in the cloud at [formbricks.com](https://formbricks.com)**
### Mission: Base your decisions on qualitative data.
## 💪 Mission: Make customer-centric decisions based on data.
Formbricks helps you apply best practices from data-driven work and experience management to make better business decisions. Use Formbricks to collect and manage insights from your users; run a product market fit survey to know which audience to focus on and whether your value proposition is being recognized.
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
- 📲 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 and more
- 🔒 All open source, transparent and self-hostable
- 📲 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
### Built With
### Built on Open Source
- [Typescript](https://www.typescriptlang.org/)
- [Next.js](https://nextjs.org/)
- [React](https://reactjs.org/)
- [TailwindCSS](https://tailwindcss.com/)
- [Prisma](https://prisma.io/)
- 💻 [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/)
### Upcoming Features
## 🚀 Getting started
| | Feature |
| --- | ------------------------------------------ |
| 👷 | Zapier, Slack & Posthog Integration |
| 👷 | Webhooks |
| 🗒️ | Filtering Options in Survey Analysis |
| 🗒️ | Multi-Language Functionality |
| 🗒️ | Auto-complete Surveys after at x responses |
| 🗒️ | Pre-Fill Link-Surveys |
| 🗒️ | E-Mail Surveys |
### ☁️ Cloud Version
_👷 In Progress | 🗒️ Up Next_
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)
## Cloud vs. self-hosted
### 🐳 Self-hosted version
Formbricks is available Open-Source under AGPLv3 license. You can host Formbricks on your own servers without a subscription. Check out our [docs](https://formbricks.com/docs/self-hosting/deployment) to see how to self-host Formbricks.
We also have a hosted cloud offering with a generous free plan to get you up and running as quickly as possible. For more information, please visit [formbricks.com](https://formbricks.com)
Formbricks is available Open-Source under AGPLv3 license. You can host Formbricks on your own servers using Docker without a subscription. To get started with self-hosting, take a look at our [self-hosting docs](https://formbricks.com/docs/self-hosting/deployment).
(In the future we may develop additional features that aren't in the free Open-Source version)
## Contributing
## ✍️ Contribution
We are very happy if you are interested in contributing to Formbricks 🤗
There are many ways to contribute to Formbricks with writing Issues, fixing bugs, building new features or updating the docs. Please check out [our contribution guide](https://formbricks.com/docs/contributing/introduction) for more information.
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 particular issue to prioritize it within 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.
## 📆 Contact us
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` 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` for more information.

View File

@@ -1,2 +1,5 @@
NEXT_PUBLIC_FORMBRICKS_API_HOST=http://localhost:3000
NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID=YOUR_ENVIRONMENT_ID
NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID=YOUR_ENVIRONMENT_ID
# Copy the environment ID for the URL of your Formbricks App and
# paste it above to connect your Formbricks App with the Demo App.

View File

@@ -1,38 +0,0 @@
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
# or
pnpm 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.
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
## 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.

View File

@@ -5,7 +5,7 @@ const nextConfig = {
return [
{
source: "/",
destination: "/signin",
destination: "/app",
permanent: false,
},
];

View File

@@ -4,29 +4,20 @@
"private": true,
"scripts": {
"clean": "rimraf .turbo node_modules .next",
"dev": "next dev -p 3002",
"dev": "next dev -p 3002 --turbo",
"go": "next dev -p 3002",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@formbricks/js": "workspace:*",
"@heroicons/react": "^2.0.17",
"@types/node": "18.15.11",
"@types/react": "18.0.33",
"@types/react-dom": "18.0.11",
"eslint": "8.37.0",
"eslint-config-formbricks": "workspace:*",
"next": "13.2.4",
"@heroicons/react": "^2.0.18",
"next": "13.4.12",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "5.0.3"
"react-dom": "18.2.0"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.3",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.21",
"rimraf": "^5.0.0",
"tailwindcss": "^3.3.1"
"eslint-config-formbricks": "workspace:*"
}
}

View File

@@ -1,5 +1,6 @@
import formbricks, { PersonId, SurveyId } from "@formbricks/js";
import formbricks from "@formbricks/js";
import type { AppProps } from "next/app";
import Head from "next/head";
import { useRouter } from "next/router";
import { useEffect } from "react";
import "../styles/globals.css";
@@ -11,10 +12,9 @@ if (typeof window !== "undefined") {
formbricks.init({
environmentId: process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID,
apiHost: process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST,
logLevel: "debug",
debug: true,
});
window.formbricks = formbricks;
formbricks.refresh();
}
}
@@ -35,10 +35,13 @@ export default function App({ Component, pageProps }: AppProps) {
return (
<>
<Head>
<title>Demo App</title>
</Head>
{(!process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID ||
!process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST) && (
<div className="w-full bg-red-500 p-3 text-center text-sm text-white">
Please set Formbricks environment variables
Please set Formbricks environment variables in apps/demo/.env
</div>
)}
<Component {...pageProps} />

View File

@@ -1,378 +1,233 @@
import LayoutApp from "@/components/LayoutApp";
import { classNames } from "@/lib/utils";
import { Bars3CenterLeftIcon, BellIcon, ScaleIcon } from "@heroicons/react/24/outline";
import {
BanknotesIcon,
BuildingOfficeIcon,
CheckCircleIcon,
ChevronDownIcon,
ChevronRightIcon,
MagnifyingGlassIcon,
} from "@heroicons/react/24/solid";
import Image from "next/image";
import formbricks from "@formbricks/js";
const cards = [{ name: "Account balance", href: "#", icon: ScaleIcon, amount: "$30,659.45" }];
const transactions = [
{
id: 1,
name: "Payment to Molly Sanders",
href: "#",
amount: "$20,000",
currency: "USD",
status: "success",
date: "July 11, 2020",
datetime: "2020-07-11",
},
];
const statusStyles: any = {
success: "bg-green-100 text-green-800",
processing: "bg-yellow-100 text-yellow-800",
failed: "bg-slate-100 text-slate-800",
};
import Image from "next/image";
import { useEffect, useState } from "react";
import fbsetup from "../../public/fb-setup.png";
export default function AppPage({}) {
return (
<LayoutApp>
<div className="flex h-16 flex-shrink-0 border-b border-slate-200 bg-white lg:border-none">
<button
type="button"
className="border-r border-slate-200 px-4 text-slate-400 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-cyan-500 lg:hidden">
<span className="sr-only">Open sidebar</span>
<Bars3CenterLeftIcon className="h-6 w-6" aria-hidden="true" />
</button>
{/* Search bar */}
<div className="flex flex-1 justify-between px-4 sm:px-6 lg:mx-auto lg:max-w-6xl lg:px-8">
<div className="flex flex-1">
<form className="flex w-full md:ml-0" action="#" method="GET">
<label htmlFor="search-field" className="sr-only">
Search
</label>
<div className="relative w-full text-slate-400 focus-within:text-slate-600">
<div
className="pointer-events-none absolute inset-y-0 left-0 flex items-center"
aria-hidden="true">
<MagnifyingGlassIcon className="h-5 w-5" aria-hidden="true" />
</div>
<input
id="search-field"
name="search-field"
className="block h-full w-full border-transparent py-2 pl-8 pr-3 text-slate-900 placeholder-slate-500 focus:border-transparent focus:outline-none focus:ring-0 sm:text-sm"
placeholder="Search transactions"
type="search"
/>
</div>
</form>
</div>
<div className="ml-4 flex items-center md:ml-6">
<button
className="mr-2 flex max-w-xs items-center rounded-full bg-white text-sm font-medium text-slate-700 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2 lg:rounded-md lg:p-2 lg:hover:bg-slate-50"
onClick={() => {
formbricks.track("Cancel Subscription");
}}>
Feedback
</button>
<button className="mr-2 flex max-w-xs items-center rounded-full bg-white text-sm font-medium text-slate-700 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2 lg:rounded-md lg:p-2 lg:hover:bg-slate-50">
No Code Feedback Btn Click
</button>
<button
className="mr-2 flex max-w-xs items-center rounded-full bg-white text-sm font-medium text-slate-700 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2 lg:rounded-md lg:p-2 lg:hover:bg-slate-50"
onClick={() => {
formbricks.setEmail("test@web.com");
}}>
Set Email
</button>
<button
className="mr-2 flex max-w-xs items-center rounded-full bg-white text-sm font-medium text-slate-700 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2 lg:rounded-md lg:p-2 lg:hover:bg-slate-50"
onClick={() => {
formbricks.setUserId("ASDASDAAAAAASSSSSSSASDASD");
}}>
Set Long UserID
</button>
<button
className="mr-2 flex max-w-xs items-center rounded-full bg-white text-sm font-medium text-slate-700 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2 lg:rounded-md lg:p-2 lg:hover:bg-slate-50"
onClick={() => {
formbricks.setAttribute("Plan", "Free");
}}>
Set attribute &quot;Free&quot;
</button>
<button
className="mr-2 flex max-w-xs items-center rounded-full bg-white text-sm font-medium text-slate-700 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2 lg:rounded-md lg:p-2 lg:hover:bg-slate-50"
onClick={() => {
formbricks.setAttribute("Plan", "Paid");
}}>
Set attribute &quot;Paid&quot;
</button>
const [darkMode, setDarkMode] = useState(false);
{/* Profile dropdown */}
<div className="relative ml-3">
<div>
<button className="flex max-w-xs items-center rounded-full bg-white text-sm focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2 lg:rounded-md lg:p-2 lg:hover:bg-slate-50">
<Image
className="h-8 w-8 rounded-full"
src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80"
width={32}
height={32}
alt=""
/>
<span className="ml-3 hidden text-sm font-medium text-slate-700 lg:block">
<span className="sr-only">Open user menu for </span>Emilia Birch
</span>
<ChevronDownIcon
className="ml-1 hidden h-5 w-5 flex-shrink-0 text-slate-400 lg:block"
aria-hidden="true"
/>
</button>
useEffect(() => {
if (darkMode) {
document.body.classList.add("dark");
} else {
document.body.classList.remove("dark");
}
}, [darkMode]);
return (
<div className="h-full bg-white px-12 py-6 dark:bg-slate-800">
<div className="flex flex-col justify-between md:flex-row">
<div>
<h1 className="text-2xl font-bold text-slate-900 dark:text-white">
Formbricks In-product Survey Demo App
</h1>
<p className="text-slate-700 dark:text-slate-300">
This app helps you test your in-app surveys. You can create and test user actions, create and
update user attributes, etc.
</p>
</div>
<button
className="mt-2 rounded-lg bg-slate-200 px-6 py-1 dark:bg-slate-700 dark:text-slate-100"
onClick={() => setDarkMode(!darkMode)}>
Toggle Dark Mode
</button>
</div>
<div className="my-4 grid grid-cols-1 gap-6 md:grid-cols-2">
<div>
<div className="rounded-lg border border-slate-300 bg-slate-100 p-6 dark:border-slate-600 dark:bg-slate-900">
<h3 className="text-lg font-semibold text-slate-900 dark:text-white">1. Setup .env</h3>
<p className="text-slate-700 dark:text-slate-300">
Copy the environment ID of your Formbricks app to the env variable in demo/.env
</p>
<Image src={fbsetup} alt="fb setup" className="mt-4 rounded" priority />
<div className="mt-4 flex-col items-start text-sm text-slate-700 dark:text-slate-300 sm:flex sm:items-center sm:text-base">
<p className="mb-1 sm:mb-0 sm:mr-2">You&apos;re connected with env:</p>
<div className="flex items-center">
<strong className="w-32 truncate sm:w-auto">
{process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID}
</strong>
<span className="relative ml-2 flex h-3 w-3">
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-green-400 opacity-75"></span>
<span className="relative inline-flex h-3 w-3 rounded-full bg-green-500"></span>
</span>
</div>
</div>
</div>
<div className="mt-4 rounded-lg border border-slate-300 bg-slate-100 p-6 dark:border-slate-600 dark:bg-slate-900">
<h3 className="text-lg font-semibold text-slate-900 dark:text-white">2. Widget Logs</h3>
<p className="text-slate-700 dark:text-slate-300">
Look at the logs to understand how the widget works.{" "}
<strong className="dark:text-white">Open your browser console</strong> to see the logs.
</p>
{/* <div className="max-h-[40vh] overflow-y-auto py-4">
<LogsContainer />
</div> */}
</div>
</div>
<div className="md:grid md:grid-cols-3">
<div className="col-span-3 rounded-lg border border-slate-300 bg-slate-100 p-6 dark:border-gray-600 dark:bg-gray-800">
<h3 className="text-lg font-semibold dark:text-white">
Reset person / pull data from Formbricks app
</h3>
<p className="text-slate-700 dark:text-gray-300">
On formbricks.reset() a few things happen: <strong>New person is created</strong> and{" "}
<strong>surveys & no-code actions are pulled from Formbricks:</strong>.
</p>
<button
className="my-4 rounded-lg bg-slate-500 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600"
onClick={() => {
formbricks.reset();
}}>
Reset
</button>
<p className="text-xs text-slate-700 dark:text-gray-300">
If you made a change in Formbricks app and it does not seem to work, hit &apos;Reset&apos; and
try again.
</p>
</div>
<div className="p-6">
<div>
<button
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600"
onClick={() => {
formbricks.track("Code Action");
}}>
Code Action
</button>
</div>
<div>
<p className="text-xs text-slate-700 dark:text-gray-300">
This button sends a{" "}
<a href="https://formbricks.com/docs/actions/code" className="underline" target="_blank">
Code Action
</a>{" "}
to the Formbricks API called &apos;Code Action&apos;. You will find it in the Actions Tab.
</p>
</div>
</div>
<div className="p-6">
<div>
<button className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600">
No-Code Action
</button>
</div>
<div>
<p className="text-xs text-slate-700 dark:text-gray-300">
This button sends a{" "}
<a
href="https://formbricks.com/docs/actions/no-code"
className="underline dark:text-blue-500"
target="_blank">
No Code Action
</a>{" "}
as long as you created it beforehand in the Formbricks App.{" "}
<a
href="https://formbricks.com/docs/actions/no-code"
target="_blank"
className="underline dark:text-blue-500">
Here are instructions on how to do it.
</a>
</p>
</div>
</div>
<div className="p-6">
<div>
<button
onClick={() => {
formbricks.setAttribute("Plan", "Free");
}}
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600">
Set Plan to &apos;Free&apos;
</button>
</div>
<div>
<p className="text-xs text-slate-700 dark:text-gray-300">
This button sets the{" "}
<a
href="https://formbricks.com/docs/attributes/custom-attributes"
target="_blank"
className="underline dark:text-blue-500">
attribute
</a>{" "}
&apos;Plan&apos; to &apos;Free&apos;. If the attribute does not exist, it creates it.
</p>
</div>
</div>
<div className="p-6">
<div>
<button
onClick={() => {
formbricks.setAttribute("Plan", "Paid");
}}
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600">
Set Plan to &apos;Paid&apos;
</button>
</div>
<div>
<p className="text-xs text-slate-700 dark:text-gray-300">
This button sets the{" "}
<a
href="https://formbricks.com/docs/attributes/custom-attributes"
target="_blank"
className="underline dark:text-blue-500">
attribute
</a>{" "}
&apos;Plan&apos; to &apos;Paid&apos;. If the attribute does not exist, it creates it.
</p>
</div>
</div>
<div className="p-6">
<div>
<button
onClick={() => {
formbricks.setEmail("test@web.com");
}}
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600">
Set Email
</button>
</div>
<div>
<p className="text-xs text-slate-700 dark:text-gray-300">
This button sets the{" "}
<a
href="https://formbricks.com/docs/attributes/identify-users"
target="_blank"
className="underline dark:text-blue-500">
user email
</a>{" "}
&apos;test@web.com&apos;
</p>
</div>
</div>
<div className="p-6">
<div>
<button
onClick={() => {
formbricks.setUserId("THIS-IS-A-VERY-LONG-USER-ID-FOR-TESTING");
}}
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600">
Set User ID
</button>
</div>
<div>
<p className="text-xs text-slate-700 dark:text-gray-300">
This button sets an external{" "}
<a
href="https://formbricks.com/docs/attributes/identify-users"
target="_blank"
className="underline dark:text-blue-500">
user ID
</a>{" "}
to &apos;THIS-IS-A-VERY-LONG-USER-ID-FOR-TESTING&apos;
</p>
</div>
</div>
</div>
</div>
<main className="flex-1 pb-8">
{/* Page header */}
<div className="bg-white shadow">
<div className="px-4 sm:px-6 lg:mx-auto lg:max-w-6xl lg:px-8">
<div className="py-6 md:flex md:items-center md:justify-between lg:border-t lg:border-slate-200">
<div className="min-w-0 flex-1">
{/* Profile */}
<div className="flex items-center">
<Image
className="hidden h-16 w-16 rounded-full sm:block"
src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2.6&w=256&h=256&q=80"
alt=""
width={32}
height={32}
/>
<div>
<div className="flex items-center">
<Image
className="h-16 w-16 rounded-full sm:hidden"
src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2.6&w=256&h=256&q=80"
alt=""
width={32}
height={32}
/>
<h1 className="ml-3 text-2xl font-bold leading-7 text-slate-900 sm:truncate sm:leading-9">
Good morning, Emilia Birch
</h1>
</div>
<dl className="mt-6 flex flex-col sm:ml-3 sm:mt-1 sm:flex-row sm:flex-wrap">
<dt className="sr-only">Company</dt>
<dd className="flex items-center text-sm font-medium capitalize text-slate-500 sm:mr-6">
<BuildingOfficeIcon
className="mr-1.5 h-5 w-5 flex-shrink-0 text-slate-400"
aria-hidden="true"
/>
Duke street studio
</dd>
<dt className="sr-only">Account status</dt>
<dd className="mt-3 flex items-center text-sm font-medium capitalize text-slate-500 sm:mr-6 sm:mt-0">
<CheckCircleIcon
className="mr-1.5 h-5 w-5 flex-shrink-0 text-green-400"
aria-hidden="true"
/>
Verified account
</dd>
</dl>
</div>
</div>
</div>
<div className="mt-6 flex space-x-3 md:ml-4 md:mt-0">
<button
type="button"
className="inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 shadow-sm hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2">
Add money
</button>
<button
type="button"
className="inline-flex items-center rounded-md border border-transparent bg-cyan-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-cyan-700 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2">
Send money
</button>
</div>
</div>
</div>
</div>
<div className="mt-8">
<div className="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8">
<h2 className="text-lg font-medium leading-6 text-slate-900">Overview</h2>
<div className="mt-2 grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3">
{/* Card */}
{cards.map((card) => (
<div key={card.name} className="overflow-hidden rounded-lg bg-white shadow">
<div className="p-5">
<div className="flex items-center">
<div className="flex-shrink-0">
<card.icon className="h-6 w-6 text-slate-400" aria-hidden="true" />
</div>
<div className="ml-5 w-0 flex-1">
<dl>
<dt className="truncate text-sm font-medium text-slate-500">{card.name}</dt>
<dd>
<div className="text-lg font-medium text-slate-900">{card.amount}</div>
</dd>
</dl>
</div>
</div>
</div>
<div className="bg-slate-50 px-5 py-3">
<div className="text-sm">
<a href={card.href} className="font-medium text-cyan-700 hover:text-cyan-900">
View all
</a>
</div>
</div>
</div>
))}
</div>
</div>
<h2 className="mx-auto mt-8 max-w-6xl px-4 text-lg font-medium leading-6 text-slate-900 sm:px-6 lg:px-8">
Recent activity
</h2>
{/* Activity list (smallest breakpoint only) */}
<div className="shadow sm:hidden">
<ul role="list" className="mt-2 divide-y divide-slate-200 overflow-hidden shadow sm:hidden">
{transactions.map((transaction) => (
<li key={transaction.id}>
<a href={transaction.href} className="block bg-white px-4 py-4 hover:bg-slate-50">
<span className="flex items-center space-x-4">
<span className="flex flex-1 space-x-2 truncate">
<BanknotesIcon className="h-5 w-5 flex-shrink-0 text-slate-400" aria-hidden="true" />
<span className="flex flex-col truncate text-sm text-slate-500">
<span className="truncate">{transaction.name}</span>
<span>
<span className="font-medium text-slate-900">{transaction.amount}</span>{" "}
{transaction.currency}
</span>
<time dateTime={transaction.datetime}>{transaction.date}</time>
</span>
</span>
<ChevronRightIcon className="h-5 w-5 flex-shrink-0 text-slate-400" aria-hidden="true" />
</span>
</a>
</li>
))}
</ul>
<nav
className="flex items-center justify-between border-t border-slate-200 bg-white px-4 py-3"
aria-label="Pagination">
<div className="flex flex-1 justify-between">
<a
href="#"
className="relative inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:text-slate-500">
Previous
</a>
<a
href="#"
className="relative ml-3 inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:text-slate-500">
Next
</a>
</div>
</nav>
</div>
{/* Activity table (small breakpoint and up) */}
<div className="hidden sm:block">
<div className="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8">
<div className="mt-2 flex flex-col">
<div className="min-w-full overflow-hidden overflow-x-auto align-middle shadow sm:rounded-lg">
<table className="min-w-full divide-y divide-slate-200">
<thead>
<tr>
<th
className="bg-slate-50 px-6 py-3 text-left text-sm font-semibold text-slate-900"
scope="col">
Transaction
</th>
<th
className="bg-slate-50 px-6 py-3 text-right text-sm font-semibold text-slate-900"
scope="col">
Amount
</th>
<th
className="hidden bg-slate-50 px-6 py-3 text-left text-sm font-semibold text-slate-900 md:block"
scope="col">
Status
</th>
<th
className="bg-slate-50 px-6 py-3 text-right text-sm font-semibold text-slate-900"
scope="col">
Date
</th>
</tr>
</thead>
<tbody className="divide-y divide-slate-200 bg-white">
{transactions.map((transaction) => (
<tr key={transaction.id} className="bg-white">
<td className="w-full max-w-0 whitespace-nowrap px-6 py-4 text-sm text-slate-900">
<div className="flex">
<a
href={transaction.href}
className="group inline-flex space-x-2 truncate text-sm">
<BanknotesIcon
className="h-5 w-5 flex-shrink-0 text-slate-400 group-hover:text-slate-500"
aria-hidden="true"
/>
<p className="truncate text-slate-500 group-hover:text-slate-900">
{transaction.name}
</p>
</a>
</div>
</td>
<td className="whitespace-nowrap px-6 py-4 text-right text-sm text-slate-500">
<span className="font-medium text-slate-900">{transaction.amount}</span>
{transaction.currency}
</td>
<td className="hidden whitespace-nowrap px-6 py-4 text-sm text-slate-500 md:block">
<span
className={classNames(
statusStyles[transaction.status],
"inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize"
)}>
{transaction.status}
</span>
</td>
<td className="whitespace-nowrap px-6 py-4 text-right text-sm text-slate-500">
<time dateTime={transaction.datetime}>{transaction.date}</time>
</td>
</tr>
))}
</tbody>
</table>
{/* Pagination */}
<nav
className="flex items-center justify-between border-t border-slate-200 bg-white px-4 py-3 sm:px-6"
aria-label="Pagination">
<div className="hidden sm:block">
<p className="text-sm text-slate-700">
Showing <span className="font-medium">1</span> to{" "}
<span className="font-medium">10</span> of <span className="font-medium">20</span>{" "}
results
</p>
</div>
<div className="flex flex-1 justify-between sm:justify-end">
<a
href="#"
id="test-css"
className="relative inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">
CSS ID Test
</a>
<a
href="#"
className="relative ml-3 inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">
Next
</a>
</div>
</nav>
</div>
</div>
</div>
</div>
</div>
</main>
</LayoutApp>
</div>
);
}

View File

@@ -0,0 +1,202 @@
import formbricks from "@formbricks/js";
import Image from "next/image";
import { useEffect, useState } from "react";
import fbsetup from "../../public/fb-setup.png";
export default function AppPage({}) {
const [darkMode, setDarkMode] = useState(false);
useEffect(() => {
if (darkMode) {
document.body.classList.add("dark");
} else {
document.body.classList.remove("dark");
}
}, [darkMode]);
return (
<div className="h-full bg-white px-12 py-6 dark:bg-slate-800">
<div className="flex flex-col justify-between md:flex-row">
<div>
<h1 className="text-2xl font-bold text-slate-900 dark:text-white">
Formbricks In-product Survey Demo App
</h1>
<p className="text-slate-700 dark:text-slate-300">
This app helps you test your in-app surveys. You can create and test user actions, create and
update user attributes, etc.
</p>
</div>
<button
className="mt-2 rounded-lg bg-slate-200 px-6 py-1 dark:bg-slate-700 dark:text-slate-100"
onClick={() => setDarkMode(!darkMode)}>
Toggle Dark Mode
</button>
</div>
<div className="my-4 grid grid-cols-1 gap-6 md:grid-cols-2">
<div>
<div className="rounded-lg border border-slate-300 bg-slate-100 p-6 dark:border-slate-600 dark:bg-slate-900">
<h3 className="text-lg font-semibold text-slate-900 dark:text-white">1. Setup .env</h3>
<p className="text-slate-700 dark:text-slate-300">
Copy the environment ID of your Formbricks app to the env variable in demo/.env
</p>
<Image src={fbsetup} alt="fb setup" className="mt-4 rounded" priority />
<div className="mt-4 flex-col items-start text-sm text-slate-700 dark:text-slate-300 sm:flex sm:items-center sm:text-base">
<p className="mb-1 sm:mb-0 sm:mr-2">You&apos;re connected with env:</p>
<div className="flex items-center">
<strong className="w-32 truncate sm:w-auto">
{process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID}
</strong>
<span className="relative ml-2 flex h-3 w-3">
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-green-400 opacity-75"></span>
<span className="relative inline-flex h-3 w-3 rounded-full bg-green-500"></span>
</span>
</div>
</div>
</div>
<div className="mt-4 rounded-lg border border-slate-300 bg-slate-100 p-6 dark:border-slate-600 dark:bg-slate-900">
<h3 className="text-lg font-semibold text-slate-900 dark:text-white">2. Widget Logs</h3>
<p className="text-slate-700 dark:text-slate-300">
Look at the logs to understand how the widget works.{" "}
<strong className="dark:text-white">Open your browser console</strong> to see the logs.
</p>
{/* <div className="max-h-[40vh] overflow-y-auto py-4">
<LogsContainer />
</div> */}
</div>
</div>
<div className="md:grid md:grid-cols-3">
<div className="col-span-3 rounded-lg border border-slate-300 bg-slate-100 p-6 dark:border-gray-600 dark:bg-gray-800">
<h3 className="text-lg font-semibold dark:text-white">
Reset person / pull data from Formbricks app
</h3>
<p className="text-slate-700 dark:text-gray-300">
On formbricks.reset() a few things happen: <strong>New person is created</strong> and{" "}
<strong>surveys & no-code actions are pulled from Formbricks:</strong>.
</p>
<button
className="my-4 rounded-lg bg-slate-500 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600"
onClick={() => {
formbricks.reset();
}}>
Reset
</button>
<p className="text-xs text-slate-700 dark:text-gray-300">
If you made a change in Formbricks app and it does not seem to work, hit &apos;Reset&apos; and
try again.
</p>
</div>
<div className="p-6">
<div>
<button
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600"
onClick={() => {
console.log("Inner Text");
}}>
Inner Text
</button>
</div>
<div>
<p className="text-xs text-slate-700 dark:text-gray-300">Inner Text only</p>
</div>
</div>
<div className="p-6">
<div>
<button
id="css-id"
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600"
onClick={() => {
console.log("Inner Text + CSS ID");
}}>
Inner Text
</button>
</div>
<div>
<p className="text-xs text-slate-700 dark:text-gray-300">Inner Text + Css ID</p>
</div>
</div>
<div className="p-6">
<div>
<button
className="css-class mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600"
onClick={() => {
console.log("Inner Text + CSS Class");
}}>
Inner Text
</button>
</div>
<div>
<p className="text-xs text-slate-700 dark:text-gray-300">Inner Text + CSS Class</p>
</div>
</div>
<div className="p-6">
<div>
<button
id="css-id"
className="css-class mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600"
onClick={() => {
console.log("ID + Class");
}}>
ID and Class
</button>
</div>
<div>
<p className="text-xs text-slate-700 dark:text-gray-300">ID + Class</p>
</div>
</div>
<div className="p-6">
<div>
<button
id="css-id"
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600"
onClick={() => {
console.log("ID + Class");
}}>
ID only
</button>
</div>
<div>
<p className="text-xs text-slate-700 dark:text-gray-300">ID only</p>
</div>
</div>
<div className="p-6">
<div>
<button
className="css-class mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600"
onClick={() => {
console.log("Class only");
}}>
Class only
</button>
</div>
<div>
<p className="text-xs text-slate-700 dark:text-gray-300">Class only</p>
</div>
</div>
<div className="p-6">
<div>
<button
className="css-1 css-2 mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700 dark:bg-gray-700 dark:hover:bg-gray-600"
onClick={() => {
console.log("Class + Class");
}}>
Class + Class
</button>
</div>
<div>
<p className="text-xs text-slate-700 dark:text-gray-300">Class + Class</p>
</div>
</div>
</div>
</div>
</div>
);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@@ -5,6 +5,7 @@ module.exports = {
"./pages/**/*.{js,ts,jsx,tsx}",
"./components/**/*.{js,ts,jsx,tsx}",
],
darkMode: "class",
theme: {
extend: {},
},

View File

@@ -1,3 +1,6 @@
NEXT_PUBLIC_FORMBRICKS_COM_API_HOST=http://localhost:3000
NEXT_PUBLIC_FORMBRICKS_COM_ENVIRONMENT_ID=
NEXT_PUBLIC_FORMBRICKS_COM_DOCS_FEEDBACK_SURVEY_ID=
NEXT_PUBLIC_FORMBRICKS_COM_DOCS_FEEDBACK_SURVEY_ID=
# Strapi API Key
STRAPI_API_KEY=

View File

@@ -34,4 +34,4 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts
public/sitemap*.xml
public/sitemap*.xml

View File

@@ -0,0 +1,129 @@
# Tailwind UI License
## Personal License
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.

View File

@@ -1,38 +0,0 @@
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
# or
pnpm 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.
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
## 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.

View File

@@ -1,19 +1,27 @@
import { Layout } from "@/components/docs/Layout";
export const meta = {
title: "Code Actions",
description:
"Integrate code actions in Formbricks using formbricks.track() to trigger surveys based on user actions, like button clicks, for precise insights. All open-source.",
};
#### Actions
# Code Actions
Actions can also be set in the code base. You can fire an action using `formbricks.track()`
<CodeGroup title="Track an action">
```javascript
formbricks.track("Action Name");
```
</CodeGroup>
Here is an example of how to fire an action when a user clicks a button:
<CodeGroup title="Track Button Click">
```javascript
const handleClick = () => {
formbricks.track("Button Clicked");
@@ -22,4 +30,4 @@ const handleClick = () => {
return <button onClick={handleClick}>Click Me</button>;
```
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;
</CodeGroup>

View File

@@ -1,11 +1,13 @@
import { Layout } from "@/components/docs/Layout";
export const meta = {
title: "No-Code Actions",
description:
"Utilize Formbricks' No-Code Actions like Page URL, innerText, and CSS Selector for easy survey triggers and enhanced user insights.",
};
#### 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
@@ -26,5 +28,3 @@ The innerText action checks if the `innerText` of a clicked HTML element matches
## 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!
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

View File

@@ -1,11 +1,13 @@
import { Layout } from "@/components/docs/Layout";
export const meta = {
title: "What are actions and why are they useful?",
description:
"Actions in Formbricks enable targeted survey displays during specific user journey moments. Enhance user segmentation by tracking actions for granular surveying.",
};
#### 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?
@@ -19,5 +21,3 @@ When a predefined action happens in your app, the Formbricks widget notices. Thi
## 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.
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -0,0 +1,103 @@
import Image from "next/image";
import AddApiKey from "./add-api-key.webp";
import ApiKeySecret from "./api-key-secret.webp";
export const meta = {
title: "API Key Setup",
description:
"Generate, store, and delete personal API keys for secure Formbricks access. Ensure safekeeping to prevent unauthorized account control.",
};
#### 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 wont 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.
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/me">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/me' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"id": "cll2m30r70004mx0huqkitgqv",
"createdAt": "2023-08-08T18:04:59.922Z",
"updatedAt": "2023-08-08T18:04:59.922Z",
"type": "production",
"product": {
"id": "cll2m30r60003mx0hnemjfckr",
"name": "My Product"
},
"widgetSetupCompleted": false
}
```
```json {{ title: '401 Not Authenticated' }}
Not authenticated
```
</CodeGroup>
</Col>
</Row>
---
### Delete a personal API key
1. Go to settings on [app.formbricks.com](https://app.formbricks.com/).
2. Go to page “API keys”.
3. Find the key you wish to revoke and select “Delete”.
4. Your API key will stop working immediately.

View File

@@ -0,0 +1,164 @@
import { Fence } from "@/components/shared/Fence";
export const meta = {
title: "Responses API",
description:
"Explore the Formbricks Public Client API for client-side tasks and integration into your website.",
};
#### Management 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.
---
## 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.
### Mandatory Request Body JSON Keys
<Properties>
<Property name="surveyId" type="string">
Survey ID to mark as viewed for a person
</Property>
</Properties>
<Properties>
<Property name="personId" type="string">
Person ID for whom mark a survey as viewed
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/api/v1/displays">
```bash {{ title: 'cURL' }}
curl -X POST \
'https://app.formbricks.com/api/v1/client/displays' \
-H 'Content-Type: application/json' \
-d '{
"surveyId": "<survey-id>",
"personId": "<person-id>"
}'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {
"id": "clm4qiygr00uqs60h5f5ola5h",
"createdAt": "2023-09-04T10:24:36.603Z",
"updatedAt": "2023-09-04T10:24:36.603Z",
"surveyId": "<survey-id>",
"person": {
"id": "<person-id>",
"attributes": {
"userId": "CYO600",
"email": "wei@google.com",
"Name": "Wei Zhu",
"Role": "Manager",
"Company": "Google",
"Experience": "2 years",
"Usage Frequency": "Daily",
"Company Size": "2401 employees",
"Product Satisfaction Score": "4",
"Recommendation Likelihood": "3"
},
"createdAt": "2023-08-08T18:05:01.483Z",
"updatedAt": "2023-08-08T18:05:01.483Z"
},
"status": "seen"
}
}
```
```json {{ title: '400 Bad Request' }}
{
"code": "bad_request",
"message": "Fields are missing or incorrectly formatted",
"details": {
"surveyId": "Required"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Mark Survey as Responded for Person {{ tag: 'POST', label: '/api/v1/client/diplays/[displayId]/responded' }}
<Row>
<Col>
Mark a Displayed Survey as responded for a Person.
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/api/v1/client/diplays/[displayId]/responded">
```bash {{ title: 'cURL' }}
curl -X POST \
--location \
'https://app.formbricks.com/api/v1/client/displays/<displayId>/responded'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {
"id": "<displayId>",
"createdAt": "2023-09-04T10:24:36.603Z",
"updatedAt": "2023-09-04T10:33:56.978Z",
"surveyId": "<surveyId>",
"person": {
"id": "<personId>",
"attributes": {
"userId": "CYO600",
"email": "wei@google.com",
"Name": "Wei Zhu",
"Role": "Manager",
"Company": "Google",
"Experience": "2 years",
"Usage Frequency": "Daily",
"Company Size": "2401 employees",
"Product Satisfaction Score": "4",
"Recommendation Likelihood": "3"
},
"createdAt": "2023-08-08T18:05:01.483Z",
"updatedAt": "2023-08-08T18:05:01.483Z"
},
"status": "responded"
}
}
```
```json {{ title: '500 Internal Server Error' }}
{
"code": "internal_server_error",
"message": "Database operation failed",
"details": {}
}
```
</CodeGroup>
</Col>
</Row>
---

View File

@@ -0,0 +1,32 @@
export const meta = {
title: "API Overview",
description:
"Explore Formbricks' APIs: Public Client API for client-side tasks, and Management API for account management with secure API Key authentication.",
};
#### 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.
## 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.
## 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).
<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.
</Note>
---

View File

@@ -0,0 +1,76 @@
import { Fence } from "@/components/shared/Fence";
export const meta = {
title: "Responses API",
description:
"Explore the Formbricks Public Client API for client-side tasks and integration into your website.",
};
#### Management API
# People 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.
---
## Get or Create Person {{ tag: 'GET', label: '/api/v1/client/people/getOrCreate' }}
<Row>
<Col>
Fetch a Person or create (if they don't exist) by their userId and the environmentId.
### Mandatory Query Parameters
<Properties>
<Property name="userId" type="string">
User ID to fetch or create (if it does not exist)
</Property>
</Properties>
<Properties>
<Property name="enviornmentId" type="string">
Formbricks Environment ID
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/client/people/getOrCreate">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/client/people/getOrCreate?userId=<user-id>&environmentId=<env-id>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": {
"person": {
"id": "clm4bcxms02hspj0ht05k6q5c",
"environmentId": "cll2m30r70004mx0huqkitgqv"
}
}
}
```
```json {{ title: '400 Bad Request' }}
{
"code": "bad_request",
"message": "Fields are missing or incorrectly formatted",
"details": {
"userId": ""
}
}
```
</CodeGroup>
</Col>
</Row>
---

View File

@@ -0,0 +1,320 @@
import { Fence } from "@/components/shared/Fence";
export const meta = {
title: "Responses API",
description:
"Explore the Formbricks Public Client API for client-side tasks and integration into your website.",
};
#### 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.
---
## List all responses {{ tag: 'GET', label: '/api/v1/responses' }}
<Row>
<Col>
Retrieve all the responses you have received for all your surveys.
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
### Optional Query Params
<Properties>
<Property name="surveyId" type="string">
SurveyId to filter responses by.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/responses">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/responses' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data":[
{
"id":"cllnfybxd051rpl0gieavthr9",
"createdAt":"2023-08-23T07:56:33.121Z",
"updatedAt":"2023-08-23T07:56:41.793Z",
"surveyId":"cllnfy2780fromy0hy7uoxvtn",
"finished":true,
"data":{
"ec7agikkr58j8uonhioinkyk":"Loved it!",
"gml6mgy71efgtq8np3s9je5p":"clicked",
"klvpwd4x08x8quesihvw5l92":"Product Manager",
"kp62fbqe8cfzmvy8qwpr81b2":"Very disappointed",
"lkjaxb73ulydzeumhd51sx9g":"Not interesed.",
"ryo75306flyg72iaeditbv51":"Would love if it had dark theme."
},
"meta":{
"url":"https://app.formbricks.com/s/cllnfy2780fromy0hy7uoxvtn",
"userAgent":{
"os":"Linux",
"browser":"Chrome"
}
},
"personAttributes":null,
"person":null,
"notes":[],
"tags":[]
}
]
}
```
```json {{ title: '404 Not Found' }}
{
"code": "not_found",
"message": "cllnfy2780fromy0hy7uoxvt not found",
"details": {
"resource_id": "survey",
"resource_type": "cllnfy2780fromy0hy7uoxvt"
}
}
```
```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>
---
## 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
</Property>
</Properties>
### Parameters Explained
| field name | required | default | description |
| ---------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| 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. |
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/api/v1/client/responses">
```bash {{ title: 'cURL' }}
curl --location --request POST 'https://app.formbricks.com/api/v1/client/responses' \
--data-raw '{
"surveyId":"clfqz1esd0000yzah51trddn8",
"personId": "clfqjny0v000ayzgsycx54a2c",
"finished": true,
"data": {
"clfqjny0v0003yzgscnog1j9i": 10,
"clfqjtn8n0070yzgs6jgx9rog": "I love Formbricks"
}
}'
```
```json {{ title: 'Example Request Body' }}
{
"personId": "clfqjny0v000ayzgsycx54a2c",
"surveyId": "clfqz1esd0000yzah51trddn8",
"finished": true,
"data": {
"clfqjny0v0003yzgscnog1j9i": 10,
"clfqjtn8n0070yzgs6jgx9rog": "I love Formbricks"
}
}
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200 Success' }}
{
"data": {
"id": "clisyqeoi000219t52m5gopke",
"surveyId": "clfqz1esd0000yzah51trddn8",
"finished": true,
"person": {
"id": "clfqjny0v000ayzgsycx54a2c",
"attributes": {
"email": "me@johndoe.com"
}
},
"data": {
"clfqjny0v0003yzgscnog1j9i": 10,
"clfqjtn8n0070yzgs6jgx9rog": "I love Formbricks"
}
}
}
```
```json {{ title: '400 Bad Request' }}
{
"code": "bad_request",
"message": "surveyId was not provided.",
"details": {
"surveyId": "This field is required."
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Update a response {{ tag: 'POST', label: '/api/v1/client/responses/[responseId]' }}
Update an existing response in a survey.
<Row>
<Col>
### Mandatory Body Fields
<Properties>
<Property name="data" type="string">
The data of the response as JSON object (key: questionId, value: answer).
</Property>
</Properties>
### Parameters Explained
| field name | required | default | description |
| ---------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| 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. |
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/api/v1/client/responses/[responseId]">
```bash {{ title: 'cURL' }}
curl --location --request POST 'https://app.formbricks.com/api/v1/client/responses/[responseId]' \
--data-raw '{
"personId": "clfqjny0v000ayzgsycx54a2c",
"surveyId": "clfqz1esd0000yzah51trddn8",
"finished": true,
"data": {
"clggpvpvu0009n40g8ikawby8": 5,
}
}'
```
```json {{ title: 'Example Request Body' }}
{
"personId": "clfqjny0v000ayzgsycx54a2c",
"surveyId": "clfqz1esd0000yzah51trddn8",
"finished": true,
"data": {
"clggpvpvu0009n40g8ikawby8": 5,
}
}
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200 Success' }}
{
"data": {
"id": "clisyqeoi000219t52m5gopke",
"surveyId": "clfqz1esd0000yzah51trddn8",
"finished": true,
"person": {
"id": "clfqjny0v000ayzgsycx54a2c",
"attributes": {
"email": "me@johndoe.com"
}
},
"data": {
"clfqjny0v0003yzgscnog1j9i": 10,
"clfqjtn8n0070yzgs6jgx9rog": "I love Formbricks",
"clggpvpvu0009n40g8ikawby8": 5
}
}
}
```
```json {{ title: '400 Bad Request' }}
{
"code": "bad_request",
"message": "data was not provided.",
"details": {
"data": "This field is required."
}
}
```
```json {{ title: '404 Not Found' }}
{
"code": "not_found",
"message": "Response not found"
}
```
</CodeGroup>
</Col>
</Row>

View File

@@ -0,0 +1,180 @@
import { Fence } from "@/components/shared/Fence";
export const meta = {
title: "Surveys API",
description:
"Explore the Formbricks Public Client API for client-side tasks and integration into your website.",
};
#### Management API
# Surveys API
The Survey API currently has one endpoint that allows you to get all the surveys you have in your Formbricks environment. You will need the [API Key](/docs/api/api-key-setup) to access the same!
---
## List all surveys {{ tag: 'GET', label: '/api/v1/surveys' }}
<Row>
<Col>
Retrieve all the surveys you have for the environment.
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/surveys">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/surveys' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data": [
{
"id": "cllnfy2780fromy0hy7uoxvtn",
"createdAt": "2023-08-23T07:56:20.516Z",
"updatedAt": "2023-08-23T07:56:26.947Z",
"name": "Product Market Fit (Superhuman)",
"type": "link",
"environmentId": "cll2m30r70004mx0huqkitgqv",
"status": "inProgress",
"attributeFilters": [],
"displayOption": "displayOnce",
"autoClose": null,
"triggers": [],
"redirectUrl": null,
"recontactDays": null,
"questions": [
{
"id": "gml6mgy71efgtq8np3s9je5p",
"type": "cta",
"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>
---

View File

@@ -0,0 +1,399 @@
export const meta = {
title: "Webhook API Overview",
description: "Learn how to use the Formbricks Webhook API.",
};
#### Webhook API
# Webhook API
Formbricks' Webhook API offers a powerful interface for interacting with webhooks. Webhooks in Formbricks allow you to receive real-time HTTP notifications of changes to specific objects in the Formbricks environment.
Before you start managing webhooks, you need to create an API key. This will be used for authorization when making requests to the Webhook API. Please see the [API key setup page](/docs/api/api-key-setup) for more details on how to create and manage your API keys.
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.
Our API has several REST endpoints enabling you to manage these webhooks, providing a great deal of flexibility:
1. **List Webhooks:** Retrieve a list of all existing webhooks.
1. **Retrieve Webhook by ID:** Retrieve a specific webhook by it's ID.
1. **Create a New Webhook:** Add a new webhook to your system.
1. **Get a Specific Webhook:** Query the details of a specific webhook using its unique ID.
1. **Delete a Webhook:** Remove an existing webhook.
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.
---
## List Webhooks {{ tag: 'GET', label: '/api/v1/webhooks' }}
<Row>
<Col>
Learn how to retrieve a list of all webhooks via API.
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/webhooks">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/webhooks' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200 Success' }}
{
"data": [
{
"id": "cliu1kdza000219zftad4ip6c",
"createdAt": "2023-06-13T08:49:04.198Z",
"updatedAt": "2023-06-13T08:49:04.198Z",
"url": "https://mysystem.com/myendpoint",
"environmentId": "clisypjy4000319t4imm289uo",
"triggers": [
"responseFinished"
]
}
]
}
```
```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>
---
## Retrieve Webhook by ID {{ tag: 'GET', label: '/api/v1/webhooks/[webhookId]' }}
<Row>
<Col>
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/webhooks/[webhookId]">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/webhooks/[webhookId]' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200 Success' }}
{
"data": {
"id": "cliu167rk000019zfhbo68bar",
"createdAt": "2023-06-13T08:38:02.960Z",
"updatedAt": "2023-06-13T08:38:02.960Z",
"url": "https://mysystem.com/myendpoint",
"environmentId": "clisypjy4000319t4imm289uo",
"triggers": [
"responseFinished"
]
}
}
```
```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>
---
## Create Webhook {{ tag: 'POST', label: '/api/v1/webhooks' }}
Add a webhook to your product.
<Row>
<Col>
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
### Request Body Parameters
<Properties>
<Property name="url" type="string" required>
The URL where the webhook will send data to.
</Property>
<Property name="triggers" type="string[]" required>
List of events that will trigger the webhook.
</Property>
<Property name="surveyIds" type="string[]">
List of survey IDs that will trigger the webhook. If not provided, the webhook will be triggered for all surveys.
</Property>
</Properties>
| field name | required | default | description |
| ---------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------- |
| url | yes | - | The endpoint that the webhook will send data to |
| trigger | yes | - | The event that will trigger the webhook ("responseCreated" or "responseUpdated" or "responseFinished") |
| surveyIds | no | - | List of survey IDs that will trigger the webhook. If not provided, the webhook will be triggered for all surveys. |
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/api/v1/webhooks">
```bash {{ title: 'cURL' }}
curl --location --request POST 'https://app.formbricks.com/api/v1/webhooks' \
--header 'x-api-key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "https://mysystem.com/myendpoint",
"triggers": ["responseFinished"]
}'
```
```json {{ title: 'Example Request Body' }}
{
"url": "https://mysystem.com/myendpoint",
"triggers": ["responseFinished"]
}
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200 Success' }}
{
"data": {
"id": "cliu1kdza000219zftad4ip6c",
"createdAt": "2023-06-13T08:49:04.198Z",
"updatedAt": "2023-06-13T08:49:04.198Z",
"url": "https://mysystem.com/myendpoint",
"environmentId": "clisypjy4000319t4imm289uo",
"triggers": ["responseFinished"],
"surveyIds": ["clisypjy4000319t4imm289uo"]
}
}
```
```json {{ title: '400 Bad Request' }}
{
"code": "bad_request",
"message": "Missing trigger",
"details": {
"missing_field": "trigger"
}
}
```
```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>
---
## Delete Webhook by ID {{ tag: 'DELETE', label: '/api/v1/webhooks/[webhookId]' }}
<Row>
<Col>
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="DELETE" label="/api/v1/webhooks/[webhookId]">
```bash {{ title: 'cURL' }}
curl --location --request DELETE 'https://app.formbricks.com/api/v1/webhooks/[webhookId]' \
--header 'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200 Success' }}
{
"data": {
"id": "cliu167rk000019zfhbo68bar",
"createdAt": "2023-06-13T08:38:02.960Z",
"updatedAt": "2023-06-13T08:38:02.960Z",
"url": "https://mysystem.com/myendpoint",
"environmentId": "clisypjy4000319t4imm289uo",
"triggers": ["responseFinished"]
}
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
```json {{ title: '404 Not Found' }}
{
"code": "not_found",
"message": "Webhook not found.",
"details": {
"webhookId": "The requested webhook does not exist."
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Webhook Payload
This documentation helps understand the payload structure that will be received when the webhook is triggered in Formbricks.
<Row>
<Col sticky>
| Variable | Type | Description |
| --------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| webhookId | String | Webhook's Id |
| 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). |
</Col>
<Col>
### An example webhook payload
<CodeGroup title="Payload">
```json
{
"webhookId": "cljwxvjos0003qhnvj2jg4k5i",
"event": "responseCreated",
"data": {
"id": "cljwy2m8r0001qhclco1godnu",
"createdAt": "2023-07-10T14:14:17.115Z",
"updatedAt": "2023-07-10T14:14:17.115Z",
"surveyId": "cljsf3d7a000019cv9apt2t27",
"finished": false,
"data": {
"qumbk3fkr6cky8850bvvq5z1": "Executive"
},
"meta": {
"userAgent": {
"os": "Mac OS",
"browser": "Chrome"
}
},
"personAttributes": {
"email": "test@web.com",
"userId": "THIS-IS-A-VERY-LONG-USER-ID-FOR-TESTING"
},
"person": {
"id": "cljold01t0000qh8ewzigzmjk",
"attributes": {
"email": "test@web.com",
"userId": "THIS-IS-A-VERY-LONG-USER-ID-FOR-TESTING"
},
"createdAt": "2023-07-04T17:56:17.154Z",
"updatedAt": "2023-07-04T17:56:17.154Z"
},
"notes": [],
"tags": []
}
}
```
</CodeGroup>
</Col>
</Row>
---

View File

@@ -1,27 +1,35 @@
import { Layout } from "@/components/docs/Layout";
export const meta = {
title: "Setting attributes with code",
description:
"Set attributes in code using setAttribute function. Enhance user segmentation, target surveys effectively, and gather valuable insights for better decisions. All open-source.",
};
#### 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
## Setting Custom User Attributes
You can use the setAttribute function to set any custom attribute for the user (e.g. name, plan, etc.):
<CodeGroup title="Setting Plan to Pro">
```javascript
formbricks.setAttribute("Plan", "Pro");
```
</CodeGroup>
Generally speaking, the setAttribute function works like this:
<CodeGroup title="Setting Custom Attributes">
```javascript
formbricks.setAttribute("attribute_key", "attribute_value");
```
Where `attributeName` is the name of the attribute you want to set, and `attributeValue` is the value of the attribute you want to set.
</CodeGroup>
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;
Where `attributeName` is the name of the attribute you want to set, and `attributeValue` is the value of the attribute you want to set.

View File

@@ -1,11 +1,13 @@
import { Layout } from "@/components/docs/Layout";
export const meta = {
title: "Identifying Users",
description:
"Identify users with Formbricks by setting User ID, email, and custom attributes. Enhance survey targeting and recontacting while maintaining user privacy.",
};
#### 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!
@@ -14,32 +16,46 @@ Once the Formbricks widget is loaded on your web app, our SDK exposes methods fo
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).
<CodeGroup title="Setting User ID">
```javascript
formbricks.setUserId("USER_ID");
```
</CodeGroup>
## Setting User Email
You can use the setEmail function to set the user's email:
<CodeGroup title="Setting Email">
```javascript
formbricks.setEmail("user@example.com");
```
</CodeGroup>
### Setting Custom User Attributes
You can use the setAttribute function to set any custom attribute for the user (e.g. name, plan, etc.):
<CodeGroup title="Setting Custom Attributes">
```javascript
formbricks.setAttribute("attribute_key", "attribute_value");
```
</CodeGroup>
### Logging Out Users
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:
<CodeGroup title="Logging out User">
```javascript
formbricks.logout();
```
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;
</CodeGroup>

View File

@@ -1,11 +1,13 @@
import { Layout } from "@/components/docs/Layout";
export const meta = {
title: "What are attributes and why are they useful?",
description:
"How to use attributes for user segmentation, enhancing survey targeting & results. Improve feedback quality and make data-driven decisions.",
};
#### 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?
@@ -19,5 +21,3 @@ Attributes are sent from your application to Formbricks and are associated with
## 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".
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@@ -1,23 +1,24 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { Callout } from "@/components/shared/Callout";
import Image from "next/image";
import DemoPreview from "@/components/dummyUI/DemoPreview";
import CreateChurnFlow from "./create-cancel-flow.png";
import ChangeText from "./change-text.png";
import TriggerInnerText from "./trigger-inner-text.png";
import TriggerCSS from "./trigger-css-selector.png";
import TriggerPageUrl from "./trigger-page-url.png";
import RecontactOptions from "./recontact-options.png";
import PublishSurvey from "./publish-survey.png";
import SelectAction from "./select-action.png";
import CreateChurnFlow from "./create-cancel-flow.webp";
import ChangeText from "./change-text.webp";
import TriggerInnerText from "./trigger-inner-text.webp";
import TriggerCSS from "./trigger-css-selector.webp";
import TriggerPageUrl from "./trigger-page-url.webp";
import RecontactOptions from "./recontact-options.webp";
import PublishSurvey from "./publish-survey.webp";
import SelectAction from "./select-action.webp";
export const meta = {
title: "Learn from Churn",
description: "To know how to decrease churn, you have to understand it. Use a micro-survey.",
};
#### Best Practices
# Learn from Churn
Churn is hard, but can teach you a lot. Whenever a user decides that your product isnt worth it anymore, you have a unique opportunity to get deep insights. These insights are pure gold to reduce churn.
## Purpose
@@ -43,11 +44,11 @@ To run the Churn Survey in your app you want to proceed as follows:
3. Choose correct recontact options to never miss a feedback
4. Prevent that churn!
<Callout title="Formbricks Widget running?" type="note">
We assume that you have already installed the Formbricks Widget in your web app. Its required to display
messages and surveys in your app. If not, please follow the [Quick Start Guide (takes 15mins
max.)](/docs/getting-started/quickstart)
</Callout>
<Note>
## Formbricks Widget running?
We assume that you have already installed the Formbricks Widget in your web app. Its 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
@@ -55,13 +56,23 @@ If you don't have an account yet, create one at [app.formbricks.com](https://app
Click on "Create Survey" and choose the template “Churn Survey”:
<Image src={CreateChurnFlow} alt="Create churn survey by template" quality="100" className="rounded-lg" />
<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)
Youre 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" />
<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._
@@ -77,49 +88,79 @@ 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" />
<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" />
<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" />
<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.
<Callout title="Pre-churn flow coming soon" type="note">
Were currently building full-screen survey pop-ups. Youll be able to prevent users from closing the survey unless they respond to it. Its certainly debatable if you want that but you could force them to click through the survey before letting them cancel 🤷
</Callout>
<Note>
## Pre-churn flow coming soon
Were currently building full-screen survey pop-ups. Youll be able to prevent users from closing the survey
unless they respond to it. Its 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" />
<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" />
<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! Youre ready to publish your survey 💃
<Image src={PublishSurvey} alt="Publish survey" quality="100" className="rounded-lg" />
<Image
src={PublishSurvey}
alt="Publish survey"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
<Callout title="Formbricks Widget running?" type="warning">
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) to install the widget.
</Callout>
<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.
</Note>
###
# Get those insights! 🎉
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,23 +1,24 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { Callout } from "@/components/shared/Callout";
import Image from "next/image";
import DocsFeedback from "@/components/docs/DocsFeedback";
import AddAction from "./add-action.png";
import ChangeId from "./change-id.png";
import DocsNavi from "./docs-navi.png";
import DocsTemplate from "./docs-template.png";
import SelectNonevent from "./select-nonevent.png";
import SwitchToDev from "./switch-to-dev.png";
import WhenToAsk from "./when-to-ask.png";
import CopyIds from "./copy-ids.png";
import AddAction from "./add-action.webp";
import ChangeId from "./change-id.webp";
import DocsNavi from "./docs-navi.webp";
import DocsTemplate from "./docs-template.webp";
import SelectNonevent from "./select-nonevent.webp";
import SwitchToDev from "./switch-to-dev.webp";
import WhenToAsk from "./when-to-ask.webp";
import CopyIds from "./copy-ids.webp";
export const meta = {
title: "Docs Feedback",
description: "Docs Feedback allows you to measure how clear your documentation is.",
};
#### Best Practices
# Docs Feedback
Docs Feedback allows you to measure how clear your documentation is.
## Purpose
@@ -47,8 +48,7 @@ To get this running, you'll need a bit of time. Here are the steps we're going t
src={SwitchToDev}
alt="switch to dev environment"
quality="100"
className="rounded-lg"
className="rounded"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
3. Then, create a survey using the template “Docs Feedback”:
@@ -57,8 +57,7 @@ To get this running, you'll need a bit of time. Here are the steps we're going t
src={DocsTemplate}
alt="select docs template"
quality="100"
className="rounded-lg"
className="rounded"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
4. Change the Internal Question ID of the first question to **“isHelpful”** to make your life easier 😉
@@ -67,16 +66,16 @@ To get this running, you'll need a bit of time. Here are the steps we're going t
src={ChangeId}
alt="switch to dev environment"
quality="100"
className="rounded-lg"
className="rounded"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
5. In the same way, you can change the Internal Question ID of the _Please elaborate_ question to **“additionalFeedback”** and the one of the _Page URL_ question to **“pageUrl”**.
<Callout title="Answers need to be identical" type="note">
If you want different answers than “Yes 👍” and “No 👎” you need update the choices accordingly. They have
to be identical to the frontend we're building in the next step.
</Callout>
<Note>
## Answers need to be identical
If you want different answers than “Yes 👍” and “No 👎” you need update the choices accordingly. They have to
be identical to the frontend we're building in the next step.
</Note>
6. Click on “Continue to Settings or select the audience tab manually. Scroll down to “When to ask” and create a new Action:
@@ -84,26 +83,37 @@ To get this running, you'll need a bit of time. Here are the steps we're going t
src={WhenToAsk}
alt="set up when to ask card"
quality="100"
className="rounded-lg"
className="rounded"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
7. Our goal is to create an event that never fires. This is a bit nonsensical because it is a workaround. Stick with me 😃 Fill the action out like on the screenshot:
<Image src={AddAction} alt="add action" quality="100" className="rounded-lg" className="rounded" />
<Image
src={AddAction}
alt="add action"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
className="rounded"
/>
8. Select the Non-Event in the dropdown. Now you see that the “Publish survey” button is active. Publish your survey 🤝
<Image src={SelectNonevent} alt="select nonevent" quality="100" className="rounded-lg" className="rounded" />
<Image
src={SelectNonevent}
alt="select nonevent"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
**Youre all setup in Formbricks Cloud for now 👍**
### 2. Build the frontend
<Callout title="Your frontend might work differently" type="note">
Your frontend likely looks and works differently. This is an example specific to our tech stack. We want to
illustrate what you should consider building yours 😊
</Callout>
<Note>
## Your frontend might work differently
Your frontend likely looks and works differently. This is an example specific to our tech stack. We want to illustrate
what you should consider building yours 😊
</Note>
Before we start, lets talk about the widget. It works like this:
@@ -118,12 +128,20 @@ This allows us to capture and analyze partial feedback where the user is not wil
2. Likely, you have a template file or similar which renders the navigation at the bottom of the page:
<Image src={DocsNavi} alt="doc navigation" quality="100" className="rounded-lg" className="rounded" />
<Image
src={DocsNavi}
alt="doc navigation"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
className="rounded"
/>
Locate that file. We are using the [Tailwind Template “Syntax”](https://tailwindui.com/templates/syntax) for our docs. Here is our [Layout.tsx](https://github.com/formbricks/formbricks/blob/main/apps/formbricks-com/components/docs/Layout.tsx) file.
3. Write the frontend code for the widget. Here is the full component (we break it down right below):
<CodeGroup title="Entire Widget">
```tsx
import { useState } from "react";
import { handleFeedbackSubmit, updateFeedback } from "../../lib/handleFeedbackSubmit";
@@ -197,10 +215,14 @@ export default function DocsFeedback() {
}
```
</CodeGroup>
**Lets break it down!**
Setting the local states and getting the current URL:
<CodeGroup title="State Management">
```tsx
const router = useRouter(); // to get the URL of the current docs page
const [isOpen, setIsOpen] = useState(false); // to close Popover after
@@ -209,11 +231,13 @@ const [responseId, setResponseId] = useState(null); // to store responseID (will
const [freeText, setFreeText] = useState(""); // to locally store the additional info provided by user
```
</CodeGroup>
Disabling feedback if config environment variables are not set properly:
```tsx
// Disables feedback if key info like survey ID, API Host, or Formbricks environment ID are missing
<CodeGroup title="Disable feedback if incorrect config env vars">
```tsx
if (
!process.env.NEXT_PUBLIC_FORMBRICKS_COM_DOCS_FEEDBACK_SURVEY_ID ||
!process.env.NEXT_PUBLIC_FORMBRICKS_COM_API_HOST ||
@@ -223,8 +247,12 @@ if (
}
```
</CodeGroup>
The actual frontend (read comments):
<CodeGroup title="Actual Frontend">
```tsx
return (
<div className="mt-6 inline-flex cursor-default items-center rounded-md border border-slate-200 bg-white p-4 text-slate-800 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-300">
@@ -278,12 +306,16 @@ return (
}
```
</CodeGroup>
## 3. Connecting to the Formbricks API
The last step is to hook up your sparkling new frontend to the Formbricks API. To do so, we followed the “[Create Response](https://formbricks.com/docs/api/create-response)” and “[Update Response](https://formbricks.com/docs/api/update-response)” pages in our docs.
The last step is to hook up your sparkling new frontend to the Formbricks API. To do so, we followed the “[Create Response](/docs/client-api/create-response)” and “[Update Response](/docs/client-api/update-response)” pages in our docs.
Here is the code for the `handleFeedbackSubmit` function with comments:
<CodeGroup title="handleFeedbackSubmit() function definition">
```tsx
export const handleFeedbackSubmit = async (YesNo, pageUrl) => {
const response_data = {
@@ -323,8 +355,12 @@ export const handleFeedbackSubmit = async (YesNo, pageUrl) => {
};
```
</CodeGroup>
And this is the `updateFeedback` function with comments:
<CodeGroup title="updateFeedback() function definition">
```tsx
export const updateFeedback = async (freeText, responseId) => {
if (!responseId) {
@@ -362,6 +398,8 @@ export const updateFeedback = async (freeText, responseId) => {
};
```
</CodeGroup>
Thats almost it! 🤸
## 4. Setting it up for testing
@@ -373,10 +411,12 @@ Before you roll it out in production, you want to test it. To do so, you need tw
When you are on the survey detail page, youll find both of them in the URL:
<Image src={CopyIds} alt="copy IDs" quality="100" className="rounded-lg" className="rounded" />
<Image src={CopyIds} alt="copy IDs" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" />
Now, you have to replace the IDs and the API host accordingly in your `handleFeedbackSubmit`:
<CodeGroup title="Replace the ID and API accordingly">
```tsx
const payload = {
response: response_data,
@@ -390,20 +430,23 @@ Now, you have to replace the IDs and the API host accordingly in your `handleFee
};
```
</CodeGroup>
And lastly, in the `updateFeedback` function
<CodeGroup title="Replace the ID and API here as well">
```tsx
try {
const res = await fetch(
// Note that we also updated the API host to 'https://app.formbricks.com/'
// Note that we also updated the API host to 'https://app.formbricks.com/'
`https:app.formbricks.com/api/v1/client/environments/clgwcwp4z000lpf0hur7uxbuv/responses/${responseId}`, // Note that we also updated the API host to 'https://app.formbricks.com/'
}
```
</CodeGroup>
### Youre good to go! 🎉
Something doesnt work? Check your browser console for the error.
Cant figure it out? [Join our Discord!](https://formbricks.com/discord)
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

@@ -1,22 +1,23 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { Callout } from "@/components/shared/Callout";
import DemoPreview from "@/components/dummyUI/DemoPreview";
import Image from "next/image";
import ActionCSS from "./action-css.png";
import ActionText from "./action-text.png";
import ChangeText from "./change-text.png";
import CreateSurvey from "./create-survey.png";
import Publish from "./publish.png";
import RecontactOptions from "./recontact-options.png";
import SelectAction from "./select-action.png";
import ActionCSS from "./action-css.webp";
import ActionText from "./action-text.webp";
import ChangeText from "./change-text.webp";
import CreateSurvey from "./create-survey.webp";
import Publish from "./publish.webp";
import RecontactOptions from "./recontact-options.webp";
import SelectAction from "./select-action.webp";
export const meta = {
title: "Feature Chaser",
description: "Follow up with users who used a specific feature. Gather feedback and improve your product.",
};
#### Best Practices
# Feature Chaser
Following up on specific features only makes sense with very targeted surveys. Formbricks is built for that.
## Purpose
@@ -40,11 +41,11 @@ To run the Feature Chaser survey in your app you want to proceed as follows:
1. Create new Feature Chaser survey at [app.formbricks.com](http://app.formbricks.com/)
2. Setup a user action to display survey at the right point in time
<Callout title="Formbricks Widget running?" type="note">
We assume that you have already installed the Formbricks Widget in your web app. Its required to display
messages and surveys in your app. If not, please follow the [Quick Start Guide (takes 15mins
max.)](/docs/getting-started/quickstart)
</Callout>
<Note>
## Formbricks Widget running?
We assume that you have already installed the Formbricks Widget in your web app. Its 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 Feature Chaser
@@ -52,13 +53,23 @@ If you don't have an account yet, create one at [app.formbricks.com](https://app
Click on "Create Survey" and choose the template “Feature Chaser”:
<Image src={CreateSurvey} alt="Create survey by template" quality="100" className="rounded-lg" />
<Image
src={CreateSurvey}
alt="Create survey by template"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
### 2. Update questions
The questions you want to ask are dependent on your feature and can be very specific. In the template, we suggest a high-level check on how easy it was for the user to achieve their goal. We also add an opportunity to provide context:
<Image src={ChangeText} alt="Change text content" quality="100" className="rounded-lg" />
<Image
src={ChangeText}
alt="Change text content"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
Save, and move over to where the magic happens: The “Audience” tab.
@@ -72,35 +83,54 @@ There are two ways to track a button:
1. **Trigger by innerText:** You might have a button with a unique text at the end of your feature e.g. "Export Report". You can setup a user Action with the according `innerText` to trigger the survey, like so:
<Image src={ActionText} alt="Set the trigger by inner Text" quality="100" className="rounded-lg" />
<Image
src={ActionText}
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 “Export Report” 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=“export-report-featurename”` and set your user action up like so:
<Image src={ActionCSS} alt="Set the trigger by CSS Selector" quality="100" className="rounded-lg" />
<Image
src={ActionCSS}
alt="Set the trigger by CSS Selector"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
Please follow our [Actions manual](/docs/actions/why) for an in-depth description of how Actions work.
### 4. Select Action in the “When to ask” card
<Image src={SelectAction} alt="Select PMF trigger button action" quality="100" className="rounded-lg" />
<Image
src={SelectAction}
alt="Select PMF trigger button action"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
### 5. Last step: Set Recontact Options correctly
Lastly, scroll down to “Recontact Options”. Here you have full freedom to decide who you want to ask. Generally, you only want to ask every user once and prevent survey fatigue. It's up to you to decide if you want to ask again, when the user did not yet reply:
<Image src={RecontactOptions} alt="Set recontact options" quality="100" className="rounded-lg" />
<Image
src={RecontactOptions}
alt="Set recontact options"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
### 7. Congrats! Youre ready to publish your survey 💃
<Image src={Publish} alt="Publish survey" quality="100" className="rounded-lg" />
<Image src={Publish} alt="Publish survey" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" />
<Callout title="Formbricks Widget running?" type="warning">
You need to have the Formbricks Widget installed to display the Feature Chaser in your app. Please follow
[this tutorial (Step 4 onwards)](/docs/getting-started/quickstart) to install the widget.
</Callout>
<Note>
## Formbricks Widget running?
You need to have the Formbricks Widget installed to display the Feature Chaser in your app. Please follow [this
tutorial (Step 4 onwards)](/docs/getting-started/quickstart-in-app-survey) to install the widget.
</Note>
###
# Get those insights! 🎉
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

@@ -1,24 +1,25 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import Link from "next/link";
import Image from "next/image";
import { Callout } from "@/components/shared/Callout";
import DemoPreview from "@/components/dummyUI/DemoPreview";
import AddAction from "./add-action.png";
import AddCSSAction from "./add-css-action.png";
import AddHTMLAction from "./add-html-action.png";
import ChangeTextContent from "./change-text-content.png";
import CreateFeedbackBox from "./create-feedback-box-by-template.png";
import PublishSurvey from "./publish-survey.png";
import SelectAction from "./select-feedback-button-action.png";
import RecontactOptions from "./set-recontact-options.png";
import AddAction from "./add-action.webp";
import AddCSSAction from "./add-css-action.webp";
import AddHTMLAction from "./add-html-action.webp";
import ChangeTextContent from "./change-text-content.webp";
import CreateFeedbackBox from "./create-feedback-box-by-template.webp";
import PublishSurvey from "./publish-survey.webp";
import SelectAction from "./select-feedback-button-action.webp";
import RecontactOptions from "./set-recontact-options.webp";
export const meta = {
title: "Feedback Box",
description: "The Feedback Box gives your users a direct channel to share their feedback and feel heard.",
};
#### Best Practices
# Feedback Box
The Feedback Box gives your users a direct channel to share their feedback and feel heard.
## Purpose
@@ -48,58 +49,83 @@ If you don't have an account yet, create one at [app.formbricks.com](https://app
Then, create a new survey and look for the "Feedback Box" template:
<Image src={CreateFeedbackBox} alt="Create feedback box by template" quality="100" className="rounded-lg" />
<Image
src={CreateFeedbackBox}
alt="Create feedback box by template"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
### 2. Update question content
Change the questions and answer options according to your preference:
<Image src={ChangeTextContent} alt="Change text content" quality="100" className="rounded-lg" />
<Image
src={ChangeTextContent}
alt="Change text content"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
### 3. Create user action to trigger Feedback Box:
Go to the “Audience” tab, find the “When to send” card and choose “Add Action”. We will now use our super cool No-Code User Action Tracker:
<Image src={AddAction} alt="Add action" quality="100" className="rounded-lg" />
<Image src={AddAction} alt="Add action" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" />
<Callout title="You can also add actions in your code" type="note">
You can also create [Code Actions](/docs/actions/code) using `formbricks.track("Eventname")` - they will
automatically appear in your Actions overview as long as the SDK is embedded.
</Callout>
<Note>
## You can also add actions in your code
You can also create [Code Actions](/docs/actions/code) using `formbricks.track("Eventname")` - they will automatically
appear in your Actions overview as long as the SDK is embedded.
</Note>
We have two options to track the Feedback Button in your application: innerText and CSS-Selector:
1. **innerText:** This means that whenever a user clicks any HTML item in your app which has an `innerText` of `Feedback` the Feedback Box will be displayed.
2. **CSS-Selector:** This means that when an element with a specific CSS-Selector like `#feedback-button` is clicked, your Feedback Box is triggered.
<div className="grid grid-cols-2 space-x-2">
<div className="grid grid-cols-2 space-x-2 max-w-full sm:max-w-3xl">
<Image src={AddHTMLAction} alt="Add HTML action" quality="100" className="rounded-lg" />
<Image src={AddCSSAction} alt="Add CSS action" quality="100" className="rounded-lg" />
</div>
### 4. Select action in the “When to ask” card
<Image src={SelectAction} alt="Select feedback button action" quality="100" className="rounded-lg" />
<Image
src={SelectAction}
alt="Select feedback button action"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
### 5. Set Recontact Options correctly
Scroll down to “Recontact Options”. Here you have to choose the right settings so that the Feedback Box pops up every time the user action is performed. (Our default is that every user sees every survey only once):
<Image src={RecontactOptions} alt="Set recontact options" quality="100" className="rounded-lg" />
<Image
src={RecontactOptions}
alt="Set recontact options"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
### 7. Youre ready publish your survey!
### 6. Youre ready publish your survey!
<Image src={PublishSurvey} alt="Publish survey" quality="100" className="rounded-lg" />
<Image
src={PublishSurvey}
alt="Publish survey"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
## Setting up the Widget
<Callout title="Formbricks Widget running?" type="warning">
You need to have the Formbricks Widget installed to display the Feedback Box in your app. Please follow
[this tutorial (Step 4 onwards)](/docs/getting-started/quickstart) to install the widget.
</Callout>
<Note>
## Formbricks Widget running?
You need to have the Formbricks Widget installed to display the Feedback Box in your app. Please follow [this
tutorial (Step 4 onwards)](/docs/getting-started/quickstart-in-app-survey) to install the widget.
</Note>
### &nbsp;
# Thats it! 🎉
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@@ -1,22 +1,23 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { Callout } from "@/components/shared/Callout";
import DemoPreview from "@/components/dummyUI/DemoPreview";
import Image from "next/image";
import ActionText from "./action-innertext.png";
import ActionPageurl from "./action-pageurl.png";
import ChangeText from "./change-text.png";
import CreateSurvey from "./create-survey.png";
import Publish from "./publish.png";
import RecontactOptions from "./recontact-options.png";
import SelectAction from "./select-action.png";
import ActionText from "./action-innertext.webp";
import ActionPageurl from "./action-pageurl.webp";
import ChangeText from "./change-text.webp";
import CreateSurvey from "./create-survey.webp";
import Publish from "./publish.webp";
import RecontactOptions from "./recontact-options.webp";
import SelectAction from "./select-action.webp";
export const meta = {
title: "Improve Trial Conversion",
description: "Understand how to improve the trial conversions to get more paying customers.",
};
#### Best Practices
# Improve Trial Conversion
When a user doesn't convert, you want to know why. A micro-survey displayed at exactly the right time gives you a window into understanding the most relevant question: To pay or not to pay?
## Purpose
@@ -40,11 +41,11 @@ To display the Trial Conversion Survey in your app you want to proceed as follow
2. Set up the user action to display survey at right point in time
3. Print that 💸
<Callout title="Formbricks Widget running?" type="note">
We assume that you have already installed the Formbricks Widget in your web app. Its required to display
messages and surveys in your app. If not, please follow the [Quick Start Guide (takes 15mins
max.)](/docs/getting-started/quickstart)
</Callout>
<Note>
## Formbricks Widget running?
We assume that you have already installed the Formbricks Widget in your web app. Its 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 Trial Conversion Survey
@@ -52,13 +53,23 @@ If you don't have an account yet, create one at [app.formbricks.com](https://app
Click on "Create Survey" and choose the template “Improve Trial Conversion”:
<Image src={CreateSurvey} alt="Create survey by template" quality="100" className="rounded-lg" />
<Image
src={CreateSurvey}
alt="Create survey by template"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
### 2. Update questions (if you like)
Youre free to update the questions 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" />
<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!_
@@ -66,9 +77,10 @@ Save, and move over to the “Audience” tab.
### 3. Pre-segment your audience (coming soon)
<Callout title="Filter by attribute coming soon" type="note">
<Note>
## Filter by attribute coming soon
We're working on pre-segmenting users by attributes. We will update this manual in the next days.
</Callout>
</Note>
Pre-segmentation isn't relevant for this survey because you likely want to solve all people who cancel their trial. You probably have a specific user action e.g. clicking on "Cancel Trial" you can use to only display the survey to users trialing your product.
@@ -78,37 +90,56 @@ How you trigger your survey depends on your product. There are two options:
1. **Trigger by pageURL:** Lets say you have a page under “/trial-cancelled” where you forward users once they cancelled the trial subscription. You can then create an user Action with the type `pageURL` with the following settings:
<Image src={ActionPageurl} alt="Change text content" quality="100" className="rounded-lg" />
<Image
src={ActionPageurl}
alt="Change text content"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
Whenever a user visits this page, the survey will be displayed ✅
2. **Trigger by Button Click:** In a different case, you have a “Cancel Trial button in your app. You can setup a user Action with the according `innerText` like so:
<Image src={ActionText} alt="Change text content" quality="100" className="rounded-lg" />
<Image
src={ActionText}
alt="Change text content"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
Please have a look at our complete [Actions manual](/docs/actions/why) if you have questions.
### 5. Select Action in the “When to ask” card
<Image src={SelectAction} alt="Select feedback button action" quality="100" className="rounded-lg" />
<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 gather as many insights as possible. 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" />
<Image
src={RecontactOptions}
alt="Set recontact options"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
### 7. Congrats! Youre ready to publish your survey 💃
<Image src={Publish} alt="Publish survey" quality="100" className="rounded-lg" />
<Image src={Publish} alt="Publish survey" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" />
<Callout title="Formbricks Widget running?" type="warning">
You need to have the Formbricks Widget installed to display the Improve Trial Conversion Survey in your app.
Please follow [this tutorial (Step 4 onwards)](/docs/getting-started/quickstart) to install the widget.
</Callout>
<Note>
## Formbricks Widget running?
You need to have the Formbricks Widget installed to display the Feedback Box in your app. Please follow [this
tutorial (Step 4 onwards)](/docs/getting-started/quickstart-in-app-survey) to install the widget.
</Note>
###
# Go get 'em 🎉
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

Some files were not shown because too many files have changed in this diff Show More