Compare commits

..

302 Commits

Author SHA1 Message Date
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
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
Johannes
ba1a17578f fix autoFocus in FreeText standalone (#354) 2023-06-09 17:08:32 +02:00
AshutoshBhadauriya
ac83286b27 Fix: all the changes suggested in the issue 2023-06-09 20:31:21 +05:30
Matti Nannt
1243017718 Include formbricks-api into formbricks-js (#352)
* remove debug loglevel from formbricks usage;

* remove license fields from internal packages

* improve package descriptions, add logger message for survey delay

* include formbricks api into formbricks js

* make formbricks errors package private

* update formbricks-js dependencies to include formbricks-api

* update formbricks-js to 0.1.20
2023-06-09 15:10:01 +02:00
Johannes
93c66c0caf Update Notification Email Subject (#350)
* update email noti subject

* add improvement to PR template
2023-06-09 15:02:57 +02:00
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
Johannes
4bfaf68de2 Smoothen Progressbar animations and minor survey editor improvements (#339)
* auto focus on sign up

* update PR template

* add updatedAt date to survey summary

* add animation to Progress, make timer smoother

* change button size in question card, auto focus

* add transition to js widget, fix auto focus in editor

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-09 10:31:22 +02:00
Moritz Rengert
d2aa9b5f04 fix rating question button alignment (#341)
* fix: input in Link Survey / Preview alignment

* fix: input alignment in js package
2023-06-09 10:17:31 +02:00
Johannes
91d4b09453 Feature/template update (#343)
* improve layout and information design of templates view

---------

Co-authored-by: moritzrengert <moritz@rengert.de>
2023-06-09 10:14:02 +02:00
Moritz Rengert
fc6534fa19 feature/delay survey (#345)
* add delay option to survey trigger
2023-06-09 10:08:23 +02:00
Johannes
b7e6ef5bd6 Merge pull request #346 from formbricks/lp/add-careers
add careers page, update OSS friends
2023-06-08 15:45:19 +02:00
Johannes
f0d321b073 add careers page, update OSS friends 2023-06-08 15:41:12 +02:00
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
Matti Nannt
944c861b18 Fix Formbricks Usage Bug leading to unidentified users (#340)
* move formbricks client to useEffect only

* add formbricks client to onboarding
2023-06-07 11:30:31 +02:00
Moritz Rengert
8a2beab5d1 Add Other Option to Multiple Choice Questions (#314)
* add other options to multiple choice question types

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2023-06-06 20:10:47 +02:00
Matti Nannt
d7fb29607a bugfix: mark onboarding responses as finished in formbricks (#338) 2023-06-06 15:00:32 +02:00
Matti Nannt
e2ebad0735 add current page url to formbricks-js logging (#337) 2023-06-06 09:19:18 +02:00
Matti Nannt
bd31d87046 Multiple fixes for Formbricks usage within Formbricks (#336)
* use label instead of id in onboarding analysis, add logout to formbricks usage

* add await option for all sdk commands, fix logout bug in formbricks usage
2023-06-05 17:22:52 +02:00
Matti Nannt
7040755b40 send onboarding results to formbricks (#335) 2023-06-05 11:41:47 +02:00
Matti Nannt
c4e70fbfaa update package dependencies (#333) 2023-06-01 19:16:54 +02:00
Midka
7fa2a260e8 create: api wrapper & errors package (#262)
* add @formbricks/api (api abstraction layer) and @formbricks/errors package to monorepo
* use @formbricks/api in @formbricks/js to expose an api endpoint

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-01 14:02:53 +02:00
Johannes
dbe7f138b6 Merge pull request #331 from formbricks/lp/reorder-friends
Reorder OSS Friends (alphabetically)
2023-06-01 13:43:07 +02:00
Johannes
35fc7b2d25 reorder friends 2023-06-01 13:36:44 +02:00
Johannes
37a0914c5a Merge pull request #323 from kof/patch-1
Added Webstudio to oss-friends.tsx
2023-06-01 10:51:43 +02:00
Moritz Rengert
8e43939206 fix: extract activeQuestionId from submit data not the expanded form (#326) 2023-06-01 08:51:32 +02:00
Matti Nannt
c4dd7ae4a2 fix security issue in link (#330) 2023-05-31 18:22:12 +02:00
Matti Nannt
0f6210c559 fix prisma commands with new json plugin (#328)
* add prisma migration, change prisma commands

* remove userAttributes from type definitions
2023-05-31 17:45:47 +02:00
Matti Nannt
965ae44344 Create SECURITY.md (#329) 2023-05-31 17:45:23 +02:00
Matti Nannt
0e94900e2c enhance prisma json types (#327) 2023-05-31 15:57:10 +02:00
Matti Nannt
99bb6932c9 update vercel migration script to fix preview deployment (#325) 2023-05-31 10:31:10 +02:00
Matti Nannt
a2e428f3c9 update readme (#324) 2023-05-31 09:55:52 +02:00
Johannes
78f7b4d03e Duplicate Questions, Add Survey Name to Summary, Update Login Screen (#322)
* Duplicate Questions, Add Survey Name to Summary, Update Login Screen

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-05-31 09:52:58 +02:00
Oleg Isonen
38f1803188 Update oss-friends.tsx
Added Webstudio
2023-05-30 21:13:16 +02:00
Johannes
66c747d1ca Merge pull request #321 from formbricks/fix/logic-in-last-question
fix/logic in last question
2023-05-30 10:53:44 +02:00
Johannes
0b24f1fe09 add "Preview" text to survey preview 2023-05-30 10:52:19 +02:00
moritzrengert
9631776552 fix: remove comments and console.log 2023-05-30 09:51:59 +02:00
moritzrengert
726b734b1a fix: update js package to make last question work with logic. fix build errors 2023-05-30 09:45:27 +02:00
moritzrengert
7ba1cc5055 fix: upade link survey to have logic working on last question 2023-05-30 09:38:59 +02:00
moritzrengert
94a10b2870 fix: thank you card not opening on skip logic, simplify check 2023-05-30 09:32:12 +02:00
moritzrengert
f71cc87b3d fix: update goToNextQuestion logic to work in last question 2023-05-30 08:50:39 +02:00
Johannes
b70b0008c1 Merge pull request #320 from formbricks/lp/add-boxy
Add BoxyHQ to OSS Friends
2023-05-29 17:44:08 +02:00
Johannes
5601f046d7 Add BoxyHQ to OSS Friends 2023-05-29 10:40:56 -05:00
Matti Nannt
a6c703620c update prisma version (#318) 2023-05-29 14:44:58 +02:00
Matti Nannt
8b56225b6e update formbricks js to 0.1.19 (#317) 2023-05-29 14:36:46 +02:00
Matti Nannt
e07a30c12d Add new client Endpoints for App-Router (WIP) (#316) 2023-05-29 14:33:02 +02:00
Moritz Rengert
92ee5529d8 Add option to auto-close (#310)
* add option to aut-close a in-app survey

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-05-29 12:47:10 +02:00
Johannes
cda8513410 Formbricks Branding Signature (#305)
* Add Formbricks Signature Branding (can be deactivated in Look & Feel Settings)

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-05-29 11:46:07 +02:00
Johannes
2912b8bd8d Merge pull request #307 from formbricks/feature/extend-link-context-menu
Extend Menu for Link Surveys
2023-05-29 11:04:04 +02:00
Matti Nannt
1db79ffa6b update package version to 0.1.18 (#315) 2023-05-28 19:14:56 +02:00
Johannes
fe4d6a8ce8 Enable users to create a new team (#299)
* Add option to create a new team

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-05-28 19:11:23 +02:00
Moritz Rengert
7238b28fb5 Add Logic Jumps (#283)
* Add the ability to add Logic Jumps to all Question Types

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-05-28 19:05:01 +02:00
Johannes
ed0135733a Merge branch 'main' of github.com:formbricks/formbricks into feature/extend-link-context-menu 2023-05-28 13:07:08 +02:00
Johannes
e7e772e155 Merge pull request #313 from DidierRLopes/patch-1
Update oss-friends.tsx w OpenBB text
2023-05-28 12:33:02 +02:00
DidierRLopes
2fbaeae9c0 Update oss-friends.tsx w OpenBB text 2023-05-27 14:30:47 -07:00
moritzrengert
37f26fa7c6 fix: show link options only on published surveys 2023-05-27 00:58:37 +02:00
Moritz Rengert
fec3741ef4 Fix Progress Bar in in-App Survey Preview 2023-05-26 12:44:54 +02:00
Matti Nannt
3618310116 update wording in PR checklist (#312) 2023-05-26 12:35:28 +02:00
Konrad Kalemba
0a1680229d Exclude updatedAt field in survey update (#297) 2023-05-26 12:14:38 +02:00
Moritz Rengert
d0f8f8d57d fix: do not create a display if the survey is in preview mode (#304) 2023-05-26 10:29:30 +02:00
Matti Nannt
e7a0821901 fix typo in PR template (#309) 2023-05-26 09:55:24 +02:00
Matti Nannt
8e98003ea2 add hanko to oss friends (#308) 2023-05-26 09:15:08 +02:00
moritzrengert
6ea6bddc5e feat: copy link to clipboard and toast success, open preview in new tab 2023-05-25 21:46:19 +02:00
Johannes
59cb636b6e Merge pull request #306 from formbricks/lp/oss-friends
add oss-friends page
2023-05-25 17:36:25 +02:00
Johannes
5469ffb8d2 add oss-friends page 2023-05-25 17:33:18 +02:00
moritzrengert
852cfacf4b feat: add preview and copy to link survey context menu 2023-05-25 09:20:56 +02:00
Matti Nannt
ba871726a5 Fix Notification emails not sending on vercel (#303) 2023-05-24 18:40:05 +02:00
Matti Nannt
33cbbd07de fix build errors and add types to dropdown menu (#302) 2023-05-24 18:09:56 +02:00
Matti Nannt
1edd69408a fix build errors on link survey (#301) 2023-05-24 17:31:34 +02:00
Johannes
b553080443 update preview UI (#300) 2023-05-24 17:14:56 +02:00
Johannes
4636ac9806 Add email notification settings (#295)
* add email notifications settings with notification options on finished responses

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-05-24 17:07:05 +02:00
Moritz Rengert
9b187a4975 Add Preview-Mode to Link-Survey (#298)
* feat: add ?=preview to preview button url

* feat: add live survey banner and restart button
2023-05-24 16:00:15 +02:00
Moritz Rengert
96344d6123 Add new Pause/Not Found screens for surveys (#285)
* Add new screens for surveys with different status (not found, paused, completed)

---------

Co-authored-by: Johannes <johannes@formbricks.com>
2023-05-23 13:35:13 +02:00
Johannes
69c05a3133 Improvements to Auth Screen based on Design Feedback (#292) 2023-05-23 09:26:10 +02:00
Konrad Kalemba
79a86050c3 fix typo in ErrorComponent (#293) 2023-05-23 09:22:04 +02:00
Thomas Kaul
d07616d4a0 Fix typo in Pricing.tsx (#294) 2023-05-23 09:21:23 +02:00
Matthias Nannt
8ce705e08c update pr template 2023-05-22 13:59:21 +02:00
Matthias Nannt
41c61cd94a add pull request template 2023-05-22 09:38:14 +02:00
Matthias Nannt
204837b844 add google oauth migration 2023-05-22 08:58:21 +02:00
566 changed files with 25775 additions and 9821 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"]
}

View File

@@ -46,6 +46,7 @@ NEXTAUTH_URL=http://localhost:3000
# MAIL_FROM=noreply@example.com
# SMTP_HOST=localhost
# SMTP_PORT=1025
# Enable SMTP_SECURE_ENABLED for TLS (port 465)
# SMTP_SECURE_ENABLED=0 # Enable for TLS (port 465)
# 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,14 @@ GOOGLE_CLIENT_SECRET=
# Stripe Billing Variables
NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID=
NEXT_PUBLIC_STRIPE_PUBLIC_KEY=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
STRIPE_WEBHOOK_SECRET=
# Configure Formbricks usage within Formbricks
NEXT_PUBLIC_FORMBRICKS_API_HOST=
NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID=
NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID=
# Cron Secret
CRON_SECRET=

View File

@@ -17,3 +17,10 @@ A clear and concise description of any alternative solutions or features you've
**Additional context**
Add any other context or screenshots about the feature request here.
### 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.

44
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,44 @@
## What does this PR do?
<!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. -->
Fixes # (issue)
<!-- Please provide a screenshots or a loom video for visual changes to speed up reviews
Loom Video: https://www.loom.com/
-->
## Type of change
<!-- Please mark the relevant points by using [x] -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Chore (refactoring code, technical debt, workflow improvements)
- [ ] Enhancement (small improvements)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change adds a new database migration
- [ ] This change requires a documentation update
## How should this be tested?
<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration -->
- Test A
- Test B
## Checklist
<!-- We're starting to get more and more contributions. Please help us making this efficient for all of us and go through this checklist. Please tick off what you did -->
- [ ] 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
- [ ] Ran `pnpm build`
- [ ] Checked for warnings, there are none
- [ ] Removed all `console.logs`
- [ ] Merged the latest changes from main onto my branch with `git pull origin main`
- [ ] My changes don't cause any responsiveness issues
- [ ] Updated the Formbricks Docs if changes were necessary

View File

@@ -24,5 +24,14 @@ jobs:
- name: Install dependencies
run: pnpm install --config.platform=linux --config.architecture=x64
- name: Build formbricks-js dependencies
run: pnpm build --filter=js
- name: create .env
run: cp .env.example .env
- name: Lint
run: pnpm lint
#- name: Test
# run: pnpm test

23
.github/workflows/cron-closeOnDate.yml vendored Normal file
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 00:00.” (see https://crontab.guru)
- cron: "0 0 * * *"
jobs:
cron-weeklySummary:
env:
APP_URL: ${{ secrets.APP_URL }}
CRON_API_KEY: ${{ secrets.CRON_SECRET }}
runs-on: ubuntu-latest
steps:
- name: cURL request
if: ${{ env.APP_URL && env.CRON_SECRET }}
run: |
curl ${{ secrets.APP_URL }}/api/cron/close_surveys \
-X POST \
-H 'content-type: application/json' \
-H 'authorization: ${{ secrets.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_API_KEY: ${{ secrets.CRON_SECRET }}
runs-on: ubuntu-latest
steps:
- name: cURL request
if: ${{ env.APP_URL && env.CRON_SECRET }}
run: |
curl ${{ secrets.APP_URL }}/api/cron/weekly_summary \
-X POST \
-H 'content-type: application/json' \
-H 'x-api-key: ${{ secrets.CRON_SECRET }}' \
--fail

View File

@@ -0,0 +1,40 @@
name: Release Formbricks Image on Dockerhub
on:
push:
tags:
- "v*"
jobs:
release-image-on-dockerhub:
name: Release
runs-on: ubuntu-latest
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

@@ -24,7 +24,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

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

1
.vercelignore Normal file
View File

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

View File

@@ -3,7 +3,7 @@ Copyright (c) 2023 Matthias Nannt, Johannes Dancker
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

@@ -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 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 |
| 👷 | Branching Logic in Surveys |
| 🗒️ | 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.

39
SECURITY.md Normal file
View File

@@ -0,0 +1,39 @@
# Security
Contact: security@formbricks.com
Based on [https://supabase.com/.well-known/security.txt](https://supabase.com/.well-known/security.txt)
At Formbricks, we consider the security of our systems a top priority. But no matter how much effort we put into system security, there can still be vulnerabilities present.
If you discover a vulnerability, we would like to know about it so we can take steps to address it as quickly as possible. We would like to ask you to help us better protect our clients and our systems.
## Out of scope vulnerabilities:
- Clickjacking on pages with no sensitive actions.
- Unauthenticated/logout/login CSRF.
- Attacks requiring MITM or physical access to a user's device.
- Any activity that could lead to the disruption of our service (DoS).
- Content spoofing and text injection issues without showing an attack vector/without being able to modify HTML/CSS.
- Email spoofing
- Missing DNSSEC, CAA, CSP headers
- Lack of Secure or HTTP only flag on non-sensitive cookies
- Deadlinks
## Please do the following:
- E-mail your findings to [security@formbricks.com](mailto:security@formbricks.com).
- Do not run automated scanners on our infrastructure or dashboard. If you wish to do this, contact us and we will set up a sandbox for you.
- Do not take advantage of the vulnerability or problem you have discovered, for example by downloading more data than necessary to demonstrate the vulnerability or deleting or modifying other people's data,
- Do not reveal the problem to others until it has been resolved,
- Do not use attacks on physical security, social engineering, distributed denial of service, spam or applications of third parties,
- Do provide sufficient information to reproduce the problem, so we will be able to resolve it as quickly as possible. Usually, the IP address or the URL of the affected system and a description of the vulnerability will be sufficient, but complex vulnerabilities may require further explanation.
## What we promise:
- We will respond to your report within 3 business days with our evaluation of the report and an expected resolution date,
- If you have followed the instructions above, we will not take any legal action against you in regard to the report,
- We will handle your report with strict confidentiality, and not pass on your personal details to third parties without your permission,
- We will keep you informed of the progress towards resolving the problem,
- In the public information concerning the problem reported, we will give your name as the discoverer of the problem (unless you desire otherwise), and
- We strive to resolve all problems as quickly as possible, and we would like to play an active role in the ultimate publication on the problem after it is resolved.

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 --turbo",
"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.9",
"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 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,191 @@
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 fbsetup from "../../public/fb-setup.png";
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";
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 className="px-12 py-6">
<div>
<h1 className="text-2xl font-bold">Formbricks In-product Survey Demo App</h1>
<p className="text-slate-700">
This app helps you test your in-app surveys. You can create an test user actions, create and update
user attributes, etc.
</p>
</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">
<h3 className="text-lg font-semibold">Setup .env</h3>
<p className="text-slate-700">
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>
<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>
<div className="mt-4 rounded-lg border border-slate-300 bg-slate-100 p-6">
<h3 className="text-lg font-semibold">Widget Logs</h3>
<p className="text-slate-700">
Look at the logs to understand how the widget works. <strong>Open your browser console</strong>{" "}
to see the logs.
</p>
{/* <div className="max-h-[40vh] overflow-y-auto py-4">
<LogsContainer />
</div> */}
</div>
</div>
{/* 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>
</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">
<h3 className="text-lg font-semibold">Reset person / pull data from Formbricks app</h3>
<p className="text-slate-700">
On formbricks.logout() 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"
onClick={() => {
formbricks.logout();
}}>
Logout
</button>
<p className="text-xs text-slate-700">
If you made a change in Formbricks app and it does not seem to work, hit &apos;Logout&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"
onClick={() => {
formbricks.track("Code Action");
}}>
Code Action
</button>
</div>
<div>
<p className="text-xs text-slate-700">
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">
No-Code Action
</button>
</div>
<div>
<p className="text-xs text-slate-700">
This button sends a{" "}
<a href="https://formbricks.com/docs/actions/no-code" className="underline" 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">
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">
Set Plan to &apos;Free&apos;
</button>
</div>
<div>
<p className="text-xs text-slate-700">
This button sets the{" "}
<a
href="https://formbricks.com/docs/attributes/custom-attributes"
target="_blank"
className="underline">
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">
Set Plan to &apos;Paid&apos;
</button>
</div>
<div>
<p className="text-xs text-slate-700">
This button sets the{" "}
<a
href="https://formbricks.com/docs/attributes/custom-attributes"
target="_blank"
className="underline">
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">
Set Email
</button>
</div>
<div>
<p className="text-xs text-slate-700">
This button sets the{" "}
<a
href="https://formbricks.com/docs/attributes/identify-users"
target="_blank"
className="underline">
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">
Set User ID
</button>
</div>
<div>
<p className="text-xs text-slate-700">
This button sets an external{" "}
<a
href="https://formbricks.com/docs/attributes/identify-users"
target="_blank"
className="underline">
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>
);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

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

@@ -23,7 +23,7 @@ export const DocsFeedback: React.FC = () => {
<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">
{!sharedFeedback ? (
<div className="text-center md:text-left">
Was this page helpful?
Is everything on this page clear?
<Popover open={isOpen} onOpenChange={setIsOpen}>
<div className="mt-2 inline-flex space-x-3 md:ml-4 md:mt-0">
{["Yes 👍", " No 👎"].map((option) => (

View File

@@ -9,7 +9,7 @@ import { Button } from "@formbricks/ui";
import clsx from "clsx";
import Link from "next/link";
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
import { useEffect, useRef, useState } from "react";
import MetaInformation from "../shared/MetaInformation";
import DocsFeedback from "./DocsFeedback";
@@ -22,7 +22,6 @@ function GitHubIcon(props: any) {
}
function Header({ navigation }: any) {
const router = useRouter();
let [isScrolled, setIsScrolled] = useState(false);
useEffect(() => {
@@ -62,13 +61,15 @@ function Header({ navigation }: any) {
variant="secondary"
EndIcon={GitHubIcon}
endIconClassName="fill-slate-800 dark:fill-slate-200 ml-2"
onClick={() => router.push("https://github.com/formbricks/formbricks")}>
View on Github
href="https://github.com/formbricks/formbricks"
target="_blank">
Star us on Github
</Button>
<Button
variant="highlight"
className="ml-2"
onClick={() => router.push("https://app.formbricks.com/auth/signup")}>
href="https://app.formbricks.com/auth/signup"
target="_blank">
Get started
</Button>
</div>
@@ -92,6 +93,43 @@ export const Layout: React.FC<LayoutProps> = ({ children, meta }) => {
let nextPage = allLinks[linkIndex + 1];
let section = navigation.find((section) => section.links.find((link) => link.href === router.pathname));
const linkRef = useRef<HTMLLIElement>(null);
const parentRef = useRef<HTMLDivElement>(null);
const preserveScroll = () => {
const scroll = Math.abs(linkRef.current.getBoundingClientRect().top - linkRef.current.offsetTop);
sessionStorage.setItem("scrollPosition", (scroll + 89).toString());
};
const useExternalLinks = (selector: string) => {
useEffect(() => {
const links = document.querySelectorAll(selector);
links.forEach((link) => {
link.setAttribute("target", "_blank");
link.setAttribute("rel", "noopener noreferrer");
});
return () => {
links.forEach((link) => {
link.removeAttribute("target");
link.removeAttribute("rel");
});
};
}, [selector]);
};
useExternalLinks(".prose a");
useEffect(() => {
if (parentRef.current) {
const scrollPosition = Number.parseInt(sessionStorage.getItem("scrollPosition"), 10);
if (scrollPosition) {
parentRef.current.scrollTop = scrollPosition;
}
}
}, []);
return (
<>
<MetaInformation
@@ -107,8 +145,15 @@ export const Layout: React.FC<LayoutProps> = ({ children, meta }) => {
<div className="absolute inset-y-0 right-0 w-[50vw] bg-slate-50 dark:hidden" />
<div className="absolute bottom-0 right-0 top-16 hidden h-12 w-px bg-gradient-to-t from-slate-800 dark:block" />
<div className="absolute bottom-0 right-0 top-28 hidden w-px bg-slate-800 dark:block" />
<div className="sticky top-[4.5rem] -ml-0.5 h-[calc(100vh-4.5rem)] overflow-y-auto overflow-x-hidden py-16 pl-0.5">
<Navigation navigation={navigation} className="w-64 pr-8 xl:w-72 xl:pr-16" />
<div
className="sticky top-[4.5rem] -ml-0.5 h-[calc(100vh-4.5rem)] overflow-y-auto overflow-x-hidden py-16 pl-0.5"
ref={parentRef}>
<Navigation
navigation={navigation}
preserveScroll={preserveScroll}
linkRef={linkRef}
className="w-64 pr-8 xl:w-72 xl:pr-16"
/>
</div>
</div>
<div className="min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16">

View File

@@ -1,4 +1,4 @@
import type { Question } from "@formbricks/types/questions";
import { QuestionType, type Question } from "@formbricks/types/questions";
import OpenTextQuestion from "./OpenTextQuestion";
import MultipleChoiceSingleQuestion from "./MultipleChoiceSingleQuestion";
import MultipleChoiceMultiQuestion from "./MultipleChoiceMultiQuestion";
@@ -19,42 +19,42 @@ export default function QuestionConditional({
lastQuestion,
brandColor,
}: QuestionConditionalProps) {
return question.type === "openText" ? (
return question.type === QuestionType.OpenText ? (
<OpenTextQuestion
question={question}
onSubmit={onSubmit}
lastQuestion={lastQuestion}
brandColor={brandColor}
/>
) : question.type === "multipleChoiceSingle" ? (
) : question.type === QuestionType.MultipleChoiceSingle ? (
<MultipleChoiceSingleQuestion
question={question}
onSubmit={onSubmit}
lastQuestion={lastQuestion}
brandColor={brandColor}
/>
) : question.type === "multipleChoiceMulti" ? (
) : question.type === QuestionType.MultipleChoiceMulti ? (
<MultipleChoiceMultiQuestion
question={question}
onSubmit={onSubmit}
lastQuestion={lastQuestion}
brandColor={brandColor}
/>
) : question.type === "nps" ? (
) : question.type === QuestionType.NPS ? (
<NPSQuestion
question={question}
onSubmit={onSubmit}
lastQuestion={lastQuestion}
brandColor={brandColor}
/>
) : question.type === "cta" ? (
) : question.type === QuestionType.CTA ? (
<CTAQuestion
question={question}
onSubmit={onSubmit}
lastQuestion={lastQuestion}
brandColor={brandColor}
/>
) : question.type === "rating" ? (
) : question.type === QuestionType.Rating ? (
<RatingQuestion
question={question}
onSubmit={onSubmit}

View File

@@ -48,22 +48,6 @@ export default function TemplateList({ onTemplateClick, activeTemplate }: Templa
))}
</div>
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
{/* <button
type="button"
onClick={() => {
onTemplateClick(activeTemplate);
setActiveTemplate(activeTemplate);
}}
className={cn(
activeTemplate?.name === customSurvey.name
? "ring-brand border-transparent ring-2"
: "hover:border-brand-dark border-dashed border-slate-300",
"duration-120 group relative rounded-lg border-2 bg-transparent p-8 transition-colors duration-150"
)}>
<PlusCircleIcon className="text-brand-dark h-8 w-8 transition-all duration-150 group-hover:scale-110" />
<h3 className="text-md mb-1 mt-3 text-left font-bold text-slate-700 ">{customSurvey.name}</h3>
<p className="text-left text-xs text-slate-600 ">{customSurvey.description}</p>
</button> */}
{templates
.filter((template) => selectedFilter === ALL_CATEGORY_NAME || template.category === selectedFilter)
.map((template: Template) => (

View File

@@ -24,11 +24,12 @@ import {
import { createId } from "@paralleldrive/cuid2";
import type { Template } from "@formbricks/types/templates";
import { QuestionType } from "@formbricks/types/questions";
const thankYouCardDefault = {
enabled: true,
headline: "Thank you!",
subheader: "We appreciate your time and insight.",
subheader: "We appreciate your feedback.",
};
export const customSurvey: Template = {
@@ -40,10 +41,11 @@ export const customSurvey: Template = {
questions: [
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "Custom Survey",
subheader: "This is an example survey.",
placeholder: "Type your answer here...",
longAnswer: true,
required: true,
},
],
@@ -63,10 +65,11 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "How disappointed would you be if you could no longer use Formbricks?",
subheader: "Please select one of the following options:",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -84,10 +87,11 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "What is your role?",
subheader: "Please select one of the following options:",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -113,21 +117,24 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "What type of people do you think would most benefit from Formbricks?",
longAnswer: true,
required: true,
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "What is the main benefit your receive from Formbricks?",
longAnswer: true,
required: true,
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "How can we improve our service for you?",
subheader: "Please be as specific as possible.",
longAnswer: true,
required: true,
},
],
@@ -145,10 +152,11 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "What is your role?",
subheader: "Please select one of the following options:",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -174,10 +182,11 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "What's your company size?",
subheader: "Please select one of the following options:",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -203,10 +212,11 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "How did you hear about us first?",
subheader: "Please select one of the following options:",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -244,10 +254,11 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "What do you value most about our service?",
subheader: "Please select one of the following options:",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -269,10 +280,11 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "What should we improve on?",
subheader: "Please select one of the following options:",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -294,9 +306,10 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "Would you like to add something?",
subheader: "Feel free to speak your mind, we do too.",
longAnswer: true,
required: false,
},
],
@@ -313,10 +326,11 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "How did you hear about us first?",
subheader: "Please select one of the following options:",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -354,10 +368,11 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "Why did you cancel your subscription?",
subheader: "We're sorry to see you leave. Please help us do better:",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -383,9 +398,10 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "How can we win you back?",
subheader: "Feel free to speak your mind, we do too.",
longAnswer: true,
required: false,
},
],
@@ -402,10 +418,11 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "Why did you stop your trial?",
subheader: "Help us understand you better:",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -431,15 +448,17 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "Any details to share?",
longAnswer: true,
required: false,
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "How are you solving your problem instead?",
subheader: "Please name alternative tools:",
longAnswer: true,
required: false,
},
],
@@ -456,9 +475,10 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "How easy was it to change your plan?",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -484,9 +504,10 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "Is the pricing information easy to understand?",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -516,9 +537,10 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "Were you able to accomplish what you came here to do today?",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -536,7 +558,7 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "rating",
type: QuestionType.Rating,
headline: "How easy was it to achieve your goal?",
required: true,
lowerLabel: "Very difficult",
@@ -546,8 +568,9 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "What did you come here to do today?",
longAnswer: true,
required: false,
},
],
@@ -565,9 +588,10 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "What's your primary goal for using Formbricks?",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -601,7 +625,7 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "rating",
type: QuestionType.Rating,
headline: "How easy was it to achieve your goal?",
required: true,
lowerLabel: "Very difficult",
@@ -611,9 +635,10 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "Wanna add something?",
subheader: "This really helps us do better!",
longAnswer: true,
required: false,
},
],
@@ -630,7 +655,7 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "rating",
type: QuestionType.Rating,
headline: "How important is this feature for you?",
required: true,
lowerLabel: "Not important",
@@ -653,10 +678,11 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "How disappointed would you be if you could no longer use Formbricks?",
subheader: "Please select one of the following options:",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -674,9 +700,10 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "How can we improve our service for you?",
subheader: "Please be as specific as possible.",
longAnswer: true,
required: true,
},
],
@@ -693,10 +720,11 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "What's on your mind, boss?",
subheader: "Thanks for sharing. We'll get back to you asap.",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -710,8 +738,9 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "Give us the juicy details:",
longAnswer: true,
required: true,
},
],
@@ -728,9 +757,10 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "How easy was it to set this integration up?",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -756,9 +786,10 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "Which product would you like to integrate next?",
subheader: "We keep building integrations. Yours can be next:",
longAnswer: true,
required: false,
},
],
@@ -775,9 +806,10 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "Which other tools are you using?",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -803,8 +835,9 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "If you chose other, please clarify:",
longAnswer: true,
required: false,
},
],
@@ -821,9 +854,10 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "Was this page helpful?",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -837,14 +871,16 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "Please elaborate:",
longAnswer: true,
required: false,
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "Page URL",
longAnswer: true,
required: false,
},
],
@@ -861,7 +897,7 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "cta",
type: QuestionType.CTA,
headline: "Do you have 15 min to talk to us? 🙏",
html: "You're one of our power users. We would love to interview you briefly!",
buttonLabel: "Book interview",
@@ -884,7 +920,7 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "cta",
type: QuestionType.CTA,
headline: "You're one of our most valued customers! Please write a review for us.",
buttonLabel: "Write review",
buttonUrl: "https://formbricks.com/github",
@@ -905,7 +941,7 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "nps",
type: QuestionType.NPS,
headline: "How likely are you to recommend Formbricks to a friend or colleague?",
required: false,
lowerLabel: "Not likely",
@@ -925,9 +961,10 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "How many hours does your team save per week by using Formbricks?",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -961,7 +998,7 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "rating",
type: QuestionType.Rating,
headline: "How satisfied are you with the features of Formbricks?",
required: true,
lowerLabel: "Not satisfied",
@@ -971,8 +1008,9 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "What's the #1 thing you'd like to change in Formbricks?",
longAnswer: true,
required: false,
},
],
@@ -989,7 +1027,7 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "rating",
type: QuestionType.Rating,
headline: "How easy was it to achieve ... ?",
required: true,
lowerLabel: "Not easy",
@@ -999,8 +1037,9 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "What is one thing we could do better?",
longAnswer: true,
required: false,
},
],
@@ -1017,9 +1056,10 @@ export const templates: Template[] = [
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
type: QuestionType.MultipleChoiceSingle,
headline: "Do you have all the info you need to give Formbricks a try?",
required: true,
shuffleOption: "none",
choices: [
{
id: createId(),
@@ -1037,13 +1077,14 @@ export const templates: Template[] = [
},
{
id: createId(),
type: "openText",
type: QuestionType.OpenText,
headline: "Whats missing or unclear to you about Formbricks?",
longAnswer: true,
required: false,
},
{
id: createId(),
type: "cta",
type: QuestionType.CTA,
headline: "Thanks for your answer! Get 25% off your first 6 months:",
required: false,
buttonLabel: "Get discount",

View File

@@ -23,10 +23,10 @@ export const GitHubSponsorship: React.FC = () => {
/>
</div>
<h2 className="mt-4 text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-200 lg:text-2xl">
Sponsored by GitHub
Proudly Open-Source 🤍
</h2>
<p className="lg:text-md mt-4 max-w-3xl text-slate-500 dark:text-slate-400">
We&apos;re proud to join the first accelerator program by GitHub!{" "}
We&apos;re proud to to be supported by GitHubs Open-Source Program!{" "}
<span>
<Link
href="/blog/inaugural-batch-github-accelerator"

View File

@@ -5,10 +5,9 @@ import CrowdLogoDark from "@/images/clients/crowd-logo-dark.svg";
import CrowdLogoLight from "@/images/clients/crowd-logo-light.svg";
import NILogoDark from "@/images/clients/niLogoDark.svg";
import NILogoLight from "@/images/clients/niLogoWhite.svg";
import StackOceanLogoDark from "@/images/clients/stack-ocean-dark.png";
import StackOceanLogoLight from "@/images/clients/stack-ocean-light.png";
import AnimationFallback from "@/public/animations/fallback-image-open-source-feedback-software.jpg";
import AnimationFallback from "@/public/animations/opensource-xm-platform-formbricks-fallback.png";
import { Button } from "@formbricks/ui";
import { ChevronRightIcon } from "@heroicons/react/24/outline";
import { usePlausible } from "next-plausible";
import Image from "next/image";
import { useRouter } from "next/router";
@@ -19,22 +18,24 @@ export const Hero: React.FC = ({}) => {
const router = useRouter();
return (
<div className="relative">
<div className="px-4 py-20 text-center sm:px-6 lg:px-8 lg:py-28">
<h1 className="text-3xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-4xl md:text-5xl">
<span className="xl:inline">Survey any segment.</span>{" "}
<span
className="font-extralight" /* className="from-brand-light to-brand-dark bg-gradient-to-b bg-clip-text text-transparent xl:inline" */
>
No coding required.
</span>
<div className="px-4 pb-20 pt-16 text-center sm:px-6 lg:px-8 lg:pb-32 lg:pt-20">
<a
href="https://github.com/formbricks/formbricks"
target="_blank"
className="border-brand-dark rounded-full border px-6 py-1.5 text-sm text-slate-500 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800">
We&apos;re Open-Source | Star us on GitHub{" "}
<ChevronRightIcon className="inline h-5 w-5 text-slate-300" />
</a>
<h1 className="mt-10 text-3xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-4xl md:text-5xl">
<span className="xl:inline">Open-source Experience Management</span>
</h1>
<p className="xs:max-w-none mx-auto mt-3 max-w-xs text-base text-slate-500 dark:text-slate-400 sm:text-lg md:mt-5 md:text-xl">
Survey granular user segments at any point in the user journey.
Understand what customers think & feel about your product.
<br />
<span className="hidden md:block">
Gather up to 6x more insights with targeted micro-surveys.{" "}
<span className="decoration-brand-dark underline underline-offset-4">All open-source.</span>
Natively integrate user research with minimal dev attention,{" "}
<span className="decoration-brand-dark underline underline-offset-4">privacy-first.</span>
</span>
</p>
@@ -42,7 +43,7 @@ export const Hero: React.FC = ({}) => {
<p className="hidden whitespace-nowrap pt-3 text-xs text-slate-400 dark:text-slate-500 md:block">
Trusted by
</p>
<div className="grid grid-cols-3 items-center gap-8 pt-2 md:grid-cols-5">
<div className="grid grid-cols-3 items-center gap-8 pt-2 md:grid-cols-4">
<Image
src={CalLogoLight}
alt="Cal Logo"
@@ -85,18 +86,6 @@ export const Hero: React.FC = ({}) => {
className="hidden pb-1 hover:opacity-100 dark:block md:opacity-50"
width={200}
/>
<Image
src={StackOceanLogoLight}
alt="StackOcean Logo"
className="block pb-1 hover:opacity-100 dark:hidden md:opacity-50"
width={200}
/>
<Image
src={StackOceanLogoDark}
alt="StakcOcean Logo"
className="hidden pb-1 hover:opacity-100 dark:block md:opacity-50"
width={200}
/>
</div>
</div>
<div className="hidden pt-10 md:block">

View File

@@ -19,7 +19,7 @@ export const HeroAnimation: React.FC<any> = ({ fallbackImage, ...props }) => {
loop: true,
autoplay: true,
// path to your animation file, place it inside public folder
path: "/animations/formbricks-open-source-survey-software-hero-animation-v1.json",
path: "/animations/opensource-xm-platform-formbricks.json",
});
animation.addEventListener("DOMLoaded", () => {

View File

@@ -56,7 +56,7 @@ export function APILayout({ method, url, description, headers, bodies, responses
{method}
</div>
<div className="inline text-sm text-slate-500 ">
http://localhost:300
https://app.formbricks.com
<span className="font-bold text-black dark:text-slate-300">{url}</span>
</div>
<div className="ml-8 mt-4 font-bold dark:text-slate-400">{description}</div>
@@ -75,30 +75,34 @@ export function APILayout({ method, url, description, headers, bodies, responses
</div>
)}
<div className="mt-4 text-base">
<p className="not-prose -mb-1 pt-2 font-bold">Body</p>
<div>
{}
{bodies.map((b) => (
<Parameter
key={b.label}
label={b.label}
type={b.type}
description={b.description}
required={b.required}
/>
))}
{example && (
<div>
<p className="not-prose mb-2 pt-2 font-bold">Body Example</p>
{bodies && (
<div className="mt-4 text-base">
<p className="not-prose -mb-1 pt-2 font-bold">Body</p>
<div>
{}
{bodies?.map((b) => (
<Parameter
key={b.label}
label={b.label}
type={b.type}
description={b.description}
required={b.required}
/>
))}
{example && (
<div>
<pre>
<code>{example}</code>
</pre>
<p className="not-prose mb-2 pt-2 font-bold">Body Example</p>
<div>
<pre>
<code>{example}</code>
</pre>
</div>
</div>
</div>
)}
)}
</div>
</div>
)}
<div>
<div className="mt-4 text-base">
<p className="not-prose -mb-1 pt-2 font-bold">Responses</p>
<div>
@@ -194,7 +198,7 @@ function Response({ color, statusCode, description, example }: RespProps) {
</div>
</div>
{example && toggleExample && (
<div className="col-span-2 my-3 rounded-lg bg-slate-300 p-2 font-mono dark:bg-slate-600 dark:text-slate-300">
<div className="col-span-2 my-3 whitespace-pre-wrap rounded-lg bg-slate-300 p-2 font-mono dark:bg-slate-600 dark:text-slate-300">
{example}
</div>
)}

View File

@@ -84,7 +84,7 @@ export default function BestPracticeNavigation() {
<div className=" mx-auto grid grid-cols-1 gap-6 px-2 sm:grid-cols-3">
{BestPractices.map((bestPractice) => (
<Link href={bestPractice.href} key={bestPractice.name}>
<div className="drop-shadow-card duration-120 relative rounded-lg bg-slate-100 p-8 transition-all ease-in-out hover:scale-105 hover:cursor-pointer dark:bg-slate-800">
<div className="drop-shadow-card duration-120 hover:border-brand-dark relative rounded-lg border border-slate-100 bg-slate-100 p-8 transition-all ease-in-out hover:scale-105 hover:cursor-pointer dark:bg-slate-800">
<div
className={clsx(
// base styles independent what type of button it is

View File

@@ -5,6 +5,7 @@ const navigation = {
other: [
{ name: "Community", href: "/community", status: true },
{ name: "Blog", href: "/blog", status: true },
{ name: "OSS Friends", href: "/oss-friends", status: true },
{ name: "GDPR FAQ", href: "/gdpr", status: true },
{ name: "GDPR Guide", href: "/gdpr-guide", status: true },
],
@@ -47,13 +48,13 @@ export default function Footer() {
<span className="sr-only">Formbricks</span>
<FooterLogo className="mx-auto h-8 w-auto sm:h-10" />
</Link>
<p className="text-base text-slate-500 dark:text-slate-400">Experience Management for B2B SaaS</p>
<p className="text-base text-slate-500 dark:text-slate-400">Privacy-first Experience Management</p>
<div className="border-slate-500">
<p className="text-sm text-slate-400 dark:text-slate-500">
&copy; 2022. All rights reserved.
<br />
<Link href="/imprint">Imprint</Link> | <Link href="/privacy">Privacy Policy</Link> |{" "}
<Link href="/terms">Terms</Link>
<Link href="/terms">Terms</Link> | <Link href="/oss-friends">OSS Friends</Link>
</p>
</div>
<div className="flex justify-center space-x-6">

View File

@@ -1,3 +1,5 @@
import GitHubMarkWhite from "@/images/github-mark-white.svg";
import GitHubMarkDark from "@/images/github-mark.svg";
import {
BaseballIcon,
Button,
@@ -11,9 +13,9 @@ import {
} from "@formbricks/ui";
import { Popover, Transition } from "@headlessui/react";
import { Bars3Icon, ChevronDownIcon, ChevronRightIcon, XMarkIcon } from "@heroicons/react/24/outline";
import { StarIcon } from "@heroicons/react/24/solid";
import clsx from "clsx";
import { usePlausible } from "next-plausible";
import Image from "next/image";
import Link from "next/link";
import { useRouter } from "next/router";
import { Fragment, useState } from "react";
@@ -260,15 +262,19 @@ export default function Header() {
<Link
href="/blog"
className="text-base font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300">
Blog <p className="bg-brand inline rounded-full px-2 text-xs text-white">1</p>
Blog {/* <p className="bg-brand inline rounded-full px-2 text-xs text-white">1</p> */}
</Link>
{/* <Link
href="/community"
href="/careers"
className="text-base font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300">
Community
Careers <p className="bg-brand inline rounded-full px-2 text-xs text-white">2</p>
</Link> */}
<Link
href="/concierge"
className="text-base font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300">
Concierge
</Link>
*/}
</Popover.Group>
<div className="hidden flex-1 items-center justify-end md:flex">
<ThemeSelector className="relative z-10 mr-5" />
@@ -277,21 +283,24 @@ export default function Header() {
className="group px-2"
href="https://formbricks.com/github"
target="_blank">
<StarIcon className="h-6 w-6 text-amber-500 group-hover:text-amber-400" />
<Image
src={GitHubMarkDark}
alt="GitHub Sponsors Formbricks badge"
width={24}
className="block dark:hidden"
/>
<Image
src={GitHubMarkWhite}
alt="GitHub Sponsors Formbricks badge"
width={24}
className="hidden dark:block"
/>
</Button>
{/* <Button variant="secondary" className="ml-2 px-2" onClick={() => setVideoModal(true)}>
<VideoWalkThrough open={videoModal} setOpen={() => setVideoModal(false)} />
<PlayCircleIcon className="h-6 w-6" />
</Button> */}
{/* <Button
variant="secondary"
EndIcon={GitHubIcon}
endIconClassName="fill-slate-800 ml-2 dark:fill-slate-200"
href="https://github.com/formbricks/formbricks"
target="_blank">
View on Github
</Button> */}
<Button
variant="highlight"
className="ml-2"
@@ -359,10 +368,11 @@ export default function Header() {
<hr className="mx-20 my-6 opacity-25" />
</div>
)}
<Link href="/community">Community</Link>
<Link href="/concierge">Concierge</Link>
<Link href="#pricing">Pricing</Link>
<Link href="/docs">Docs</Link>
<Link href="/blog">Blog</Link>
{/* <Link href="/careers">Careers</Link> */}
<Button
variant="secondary"
EndIcon={GitHubIcon}

View File

@@ -11,9 +11,11 @@ interface NavigationProps {
}[];
}[];
className: string;
preserveScroll: () => void;
linkRef: React.RefObject<HTMLLIElement>;
}
export function Navigation({ navigation, className }: NavigationProps) {
export function Navigation({ navigation, className, preserveScroll, linkRef }: NavigationProps) {
let router = useRouter();
return (
@@ -26,8 +28,9 @@ export function Navigation({ navigation, className }: NavigationProps) {
role="list"
className="mt-2 space-y-2 border-l-2 border-slate-100 dark:border-slate-800 lg:mt-4 lg:space-y-4 lg:border-slate-200">
{section.links.map((link) => (
<li key={link.href} className="relative">
<li key={link.href} className="relative" ref={linkRef}>
<Link
onClick={preserveScroll}
href={link.href}
className={clsx(
"block w-full pl-3.5 before:pointer-events-none before:absolute before:-left-1 before:top-1/2 before:h-1.5 before:w-1.5 before:-translate-y-1/2 before:rounded-full",

View File

@@ -1,6 +1,5 @@
import { Button } from "@formbricks/ui";
import clsx from "clsx";
import EarlyBirdDeal from "./EarlyBirdDeal";
import HeadingCentered from "./HeadingCentered";
import { CheckIcon } from "@heroicons/react/24/outline";
import { usePlausible } from "next-plausible";
@@ -16,7 +15,7 @@ const tiers = [
highlight: false,
description: "Host Formbricks on your own server.",
features: [
"All Free feautres",
"All Free features",
"Easy self-hosting (Docker)",
"Unlimited surveys",
"Unlimited responses",
@@ -38,6 +37,7 @@ const tiers = [
features: [
"Unlimited surveys",
"Unlimited team members",
"Remove branding",
"Granular targeting",
"In-product surveys",
"Link surveys",
@@ -55,11 +55,11 @@ const tiers = [
priceMonthly: "$99",
paymentRythm: "/month",
button: "secondary",
discounted: true,
discounted: false,
highlight: false,
description: "All features included. Unlimited usage.",
features: ["All features of Free plan", "Unlimited responses", "Remove branding"],
ctaName: "Sign up now",
features: ["Unlimited responses per survey"],
ctaName: "Start for free",
plausibleGoal: "Pricing_CTA_ProPlan",
},
];
@@ -146,7 +146,7 @@ export default function Pricing() {
{tier.ctaName}
</Button>
{tier.name === "Free" && (
{tier.name !== "Self-hosting" && (
<p className="mt-1.5 text-center text-xs text-slate-500">No Creditcard required.</p>
)}
</div>
@@ -154,9 +154,6 @@ export default function Pricing() {
))}
</div>
</div>
<div className="mx-auto max-w-7xl sm:px-6 lg:px-8">
<EarlyBirdDeal />
</div>
</div>
);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -1,6 +0,0 @@
import { ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}

View File

@@ -11,7 +11,8 @@ const navigation = [
title: "Getting Started",
links: [
{ title: "Quickstart", href: "/docs/getting-started/quickstart" },
{ title: "Setup with Next.js", href: "/docs/getting-started/nextjs" },
{ title: "Next.js App Dir", href: "/docs/getting-started/nextjs-app" },
{ title: "Next.js Pages Dir", href: "/docs/getting-started/nextjs-pages" },
{ title: "Setup with Vue.js", href: "/docs/getting-started/vuejs" },
],
},
@@ -43,6 +44,17 @@ const navigation = [
{ title: "Docs Feedback", href: "/docs/best-practices/docs-feedback" },
],
},
{
title: "Integrations",
links: [{ title: "Zapier", href: "/docs/integrations/zapier" }],
},
{
title: "Link Surveys",
links: [
{ title: "Data Prefilling", href: "/docs/link-surveys/data-prefilling" },
{ title: "User Identification", href: "/docs/link-surveys/user-identification" },
],
},
{
title: "API",
links: [
@@ -53,8 +65,19 @@ const navigation = [
{
title: "Client API",
links: [
{ title: "Create Response", href: "/docs/api/create-response" },
{ title: "Update Response", href: "/docs/api/update-response" },
{ title: "Overview", href: "/docs/client-api/overview" },
{ title: "Create Response", href: "/docs/client-api/create-response" },
{ title: "Update Response", href: "/docs/client-api/update-response" },
],
},
{
title: "Webhook API",
links: [
{ title: "Overview", href: "/docs/webhook-api/overview" },
{ title: "List Webhooks", href: "/docs/webhook-api/list-webhooks" },
{ title: "Get Webhook", href: "/docs/webhook-api/get-webhook" },
{ title: "Create Webhook", href: "/docs/webhook-api/create-webhook" },
{ title: "Delete Webhook", href: "/docs/webhook-api/delete-webhook" },
],
},
{
@@ -66,6 +89,8 @@ const navigation = [
links: [
{ title: "Introduction", href: "/docs/contributing/introduction" },
{ title: "Setup Dev Environment", href: "/docs/contributing/setup" },
{ title: "Demo App", href: "/docs/contributing/demo" },
{ title: "Troubleshooting", href: "/docs/contributing/troubleshooting" },
],
},
];

View File

@@ -26,6 +26,11 @@ const nextConfig = {
destination: "https://github.com/formbricks/formbricks",
permanent: true,
},
{
source: "/deal",
destination: "/concierge",
permanent: false,
},
{
source: "/privacy",
destination: "/privacy-policy",
@@ -41,6 +46,11 @@ const nextConfig = {
destination: "/docs/introduction/what-is-formbricks",
permanent: true,
},
{
source: "/docs/getting-started/nextjs",
destination: "/docs/getting-started/nextjs-app",
permanent: true,
},
{
source: "/docs/formbricks-hq/self-hosting",
destination: "/docs",

View File

@@ -11,44 +11,35 @@
"lint": "next lint"
},
"dependencies": {
"@docsearch/react": "^3.3.3",
"@formbricks/ui": "workspace:*",
"@formbricks/types": "workspace:*",
"@calcom/embed-react": "^1.2.2",
"@docsearch/react": "^3.5.1",
"@formbricks/lib": "workspace:*",
"@headlessui/react": "^1.7.14",
"@heroicons/react": "^2.0.17",
"@formbricks/types": "workspace:*",
"@formbricks/ui": "workspace:*",
"@headlessui/react": "^1.7.15",
"@heroicons/react": "^2.0.18",
"@mapbox/rehype-prism": "^0.8.0",
"@mdx-js/loader": "^2.3.0",
"@mdx-js/react": "^2.3.0",
"@next/mdx": "^13.3.0",
"add": "^2.0.6",
"@next/mdx": "^13.4.9",
"@paralleldrive/cuid2": "^2.2.1",
"clsx": "^1.2.1",
"lottie-web": "^5.11.0",
"next": "13.3.0",
"next-plausible": "^3.7.2",
"next-sitemap": "^4.0.7",
"prism-react-renderer": "^1.3.5",
"lottie-web": "^5.12.2",
"next": "13.4.9",
"next-plausible": "^3.9.1",
"next-sitemap": "^4.1.8",
"prism-react-renderer": "^2.0.6",
"prismjs": "^1.29.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "^7.43.9",
"react-icons": "^4.10.1",
"react-responsive-embed": "^2.1.0",
"remark-gfm": "^3.0.1",
"sharp": "^0.32.0"
"sharp": "^0.32.2"
},
"devDependencies": {
"@formbricks/tsconfig": "workspace:*",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.9",
"@types/node": "18.15.11",
"@types/prismjs": "^1.26.0",
"@types/react": "^18.0.35",
"@types/react-dom": "^18.0.11",
"autoprefixer": "^10.4.14",
"eslint-config-formbricks": "workspace:*",
"postcss": "^8.4.22",
"rimraf": "^5.0.0",
"tailwindcss": "^3.3.1",
"typescript": "^5.0.4"
"eslint-config-formbricks": "workspace:*"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,122 @@
import Image from "next/image";
import LayoutMdx from "@/components/shared/LayoutMdx";
import TitleImage from "./formbricks-sponsored-by-github-accelerator-2023.webp";
import Demo from "./our-experience-github-acc-demo-screenshot.png";
import Mail from "./github-accelerator-selection-mail.png";
import Teams from "./github-accelerator-2022-teams.png";
import NewsletterSignup from "@/components/shared/NewsletterSignup";
export const meta = {
title: "Our GitHub Accelerator Experience 👀",
description:
"What we learned during the first GitHub Open-Source Accelerator Programm - our experience and if we would do it again.",
date: "2023-04-13",
};
_We were among the first 20 teams ever to run through the Open-Source Accelerator by Github. Read about our experience and if we would do it again:_
<Image
src={Demo}
alt="GitHub sponsors Formbricks to join their open-source accelerator program"
className="rounded-lg"
/>
## Hey there,
In December of last year, we completed a rather brief questionnaire to apply for the inaugural batch of the GitHub Open-Source Accelerator. With not much information available, we went ahead and applied, hoping for the best. The timing couldn't have been more perfect, as both Matti and I had just wrapped up our freelance gigs to start working full-time on Formbricks.
As Christmas, New Year's Eve, and my birthday passed, we continued working diligently on Formbricks, iterating to pinpoint the right niche offering. Over the preceding months, we had learned what wouldn't constitute a good venture case ([Typeform open-source](https://formbricks.com/blog/open-source-qualtrics-beats-typeform)), what wasn't technically feasible (building blocks for all form and survey solutions), and what was too narrow to start with ([PMF survey only](https://www.producthunt.com/products/product-market-fit-survey-by-formbricks)).
January and February came and went. On the 22nd of March, we received an email from the GitHub team:
<Image
src={Mail}
alt="GitHub invited us to join the GitHub Accelerator and share our experience"
className="rounded-lg"
/>
Needless to say, we were thrilled! We were selected from over 1000 open-source projects, alongside renowned and popular projects like [Nuxt](https://github.com/nuxt/nuxt), [TRPC](https://github.com/trpc/trpc), and [Responsively App](https://github.com/responsively-org/responsively-app). Here is a summary of what we got:
### What we got on paper
✅ Ten sessions with **well-known** figures from the open-source community (Wednesdays)
✅ Ten optional co-working sessions (Fridays)
✅ 20.000 USD equally divided among core maintainers
✅ One-on-one session with the GitHub team to align on goals and objectives
### What we also gained
👌 Network of builders, maintainers, and founders in the open-source space
👌 Solid connection with GitHub (including a warm introduction to GitHub's venture arm 😏)
👌 Enhanced credibility in the open-source community, thanks to association with such a significant supporter of open source
I mean look at all these happy people:
<Image
src={Teams}
alt="GitHub invited us to join the GitHub Accelerator and share our experience"
className="rounded-lg"
/>
Here's an overview of the ten sessions and their relevance to us as a venture-focused startup:
**Week 1: Kick-Off, Licensing 101 and setting up with [Abby](https://twitter.com/abbycabs)**
Great to meet everyone, Abby is a great host and the licensing session was very useful. We had already decided on our license but it was useful nontheless.
**Week 2: Finding Sponsors with [Caleb Porzio](https://twitter.com/calebporzio)**
This was a really fun one! Caleb is a driven entrepreneur with many ideas and loooots of experience monetizing his two main projects [Livewire](https://laravel-livewire.com/) and [Alpine.js](https://alpinejs.dev/). Come up with a way to monetize a popular OS project, Caleb scaled it. Not suuuper relevant for us though.
**Week 3: Taking Funding: [Brian Douglas](https://twitter.com/bdougieYO)**
Brian is building [OpenSauced](https://opensauced.pizza/) and shared his journey of raising VC as an OS startup. Lots of great insights, Brian is super approachable 😊
**Week 4: [Evan You](https://evanyou.me/): Sustainable Open Source**
Evan You famously created Vue.js (which is on track to pass React in GitHub ⭐) and Vite. Evan had a lot of useful Dos and Donts for us, great session!
**Week 5:** Didn't happen due to Maintainer Summit.
**Week 6: [Mike Perham](https://github.com/mperham) - Starting a Software Business**
Mike is an absolute legend! With [SideKiq](https://sidekiq.org/) he makes over 300k USD per month 🤯 He was very open and down to earth. One of his best advice: If a customer annoys you, stop serving them. He was able to pull this off because he has been blogging about Ruby for years and is well-known in the community. And, obviously, his solution kicks ass!
**Week 7: Duane OBrien and Dawn Foster: Working with Enterprises**
Lots of useful insights around how enterprises handle open-source, barriers for corporate use and how to handle corporate sponsorships and donations. The notes will come in really handy down the line!
**Week 8: [Marko Saric](https://twitter.com/markosaric): SaaS-side of Open Source**
Marko is the marketing co-founder of [Plausible](https://plausible.io/). I think everyone in the SaaS space knows Plausible since they hit 1M ARR bootstrapped. Marko also blogged a lot about Plausible which really helped it grow in the first years. Gifted marketeer, great session!
**Week 9: Governance with [Shauna Gordon-McKeon](https://github.com/shaunagm/)**
For us this wasnt super relevant as Formbricks is ruled by a BDFL (Benevolent Dictator For Life) i.e. us but the discussion among the teams was really insightful. Helped us a great deal to understand the challenges of purely community-driven projects.
**Week 10: VC Funding and the legal Side of OSS with [Erica Brescia](https://twitter.com/ericabrescia) from Redpoint**
Ericas talk was really impressive and so is she: Founder of Bitnami, COO of GitHub and Board Member of the Linux Foundation all happened before she started as an investor at Redpoint Ventures. Her deep insights from both the founder and the VC perspective are invaluable!
**GitHub Demo Day:** All teams presented what they achieved during the 10 week programm. It was great fun to present Formbricks, [you can watch it on Youtube.](https://www.youtube.com/live/Gj6Bez2182k?feature=share&t=1448)
## Would we do it again? And should you?
Yes, absolutely. The sessions were excellent, we met a handful of inspiring builders, and the 20k USD was a helpful financial boost. The application process might evolve, but since all of your code is open-source anyway, you might as well throw your hat in the ring.
**Gratitude to Kara, Abby, and the entire GitHub team - we learned a lot! 😊**
<Image
src={TitleImage}
alt="GitHub sponsors Formbricks to join their open-source accelerator program"
className="rounded-lg"
/>
<NewsletterSignup />
export default ({ children }) => <LayoutMdx meta={meta}>{children}</LayoutMdx>;

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

View File

@@ -0,0 +1,47 @@
import HeroTitle from "@/components/shared/HeroTitle";
import Layout from "@/components/shared/Layout";
/* const Roles = [
{
name: "Full-Stack Engineer",
description: "Join early and be a part of our journey from start to IPO 🚀",
location: "Worldwide",
workplace: "Remote",
},
{
name: "Junior Full-Stack Engineer",
description: "All you want is write code and learn? You're exactly right!",
location: "Worldwide",
workplace: "Remote",
},
]; */
export default function CareersPage() {
return (
<Layout
title="Careers"
description="Work with us on helping teams make customer-centric decisions - all privacy-focused.">
<HeroTitle
headingPt1="Help teams make"
headingTeal="customer-centric"
headingPt2="decisions."
subheading="We are currently not hiring. Contributions are always welcome!"
/>
{/*
<div className="mx-auto w-3/4">
{Roles.map((role) => (
<Link
href="https://formbricks.notion.site/Work-at-Formbricks-6c3ad218b2c7461ca2714ce2101730e4?pvs=4"
target="_blank"
key="role.name">
<div className="mb-6 rounded-lg border border-slate-300 bg-slate-100 p-6 shadow-sm hover:bg-slate-50">
<h4 className="text-xl font-bold text-slate-700">{role.name}</h4>
<p className="text-lg text-slate-500">{role.description}</p>
</div>
</Link>
))}
</div>*/}
</Layout>
);
}

View File

@@ -7,24 +7,24 @@ import { ChatBubbleOvalLeftEllipsisIcon, EnvelopeIcon } from "@heroicons/react/2
const topContributors = [
{
name: "Midka (8 commits)",
name: "Midka",
href: "https://github.com/kymppi",
},
{
name: "Timothy (6 commits)",
name: "Pandeyman",
href: "https://github.com/pandeymangg",
},
{
name: "Ashu",
href: "https://github.com/Ashutosh-Bhadauriya",
},
{
name: "Timothy",
href: "https://github.com/timothyde",
},
{
name: "Kiran (3 commits)",
href: "https://github.com/devkiran",
},
{
name: "Francois (1 commit)",
href: "https://github.com/fdis111",
},
{
name: "Chetan (1 commit)",
href: "https://github.com/chetan",
name: "Shubhdeep",
href: "https://github.com/Shubhdeep12",
},
];
@@ -34,14 +34,14 @@ const CommunityPage = () => {
<Layout
title="Community | Formbricks Open Source Forms & Surveys"
description="You're building open source forms and surveys? So are we! Get support for anything your building - or just say hi!">
<HeroTitle headingPt1="Join the" headingTeal="Formbricks" headingPt2="Community" />
<HeroTitle headingPt1="Join the" headingTeal="Formbricks" headingPt2="Community 🤍" />
<div className="mb-32 grid grid-cols-1 px-4 md:grid-cols-2 md:gap-8 md:px-16">
<div className="mb-6 rounded-lg bg-gradient-to-b from-slate-200 to-slate-300 px-10 py-6 dark:from-slate-800 dark:to-slate-700 md:mb-0">
<h2 className="mt-7 text-3xl font-bold text-slate-800 dark:text-slate-200 xl:text-4xl">
Top Contributors
</h2>
<p className="mt-2 text-sm text-slate-500 dark:text-slate-400">
The leader board of the Formbricks community contributors 🙌
Super thankful to have you guys contribute for Formbricks 🙌
</p>
<ol className="ml-4 mt-10 list-decimal">
{topContributors.map((MVP) => (

View File

@@ -0,0 +1,102 @@
import HeroTitle from "@/components/shared/HeroTitle";
import Layout from "@/components/shared/Layout";
import Cal, { getCalApi } from "@calcom/embed-react";
import { useEffect } from "react";
import { CheckBadgeIcon } from "@heroicons/react/24/solid";
const XMOffer = [
{
step: "1",
header: "Kick-off call",
description: "You share with our seasoned PMs which areas of your customer experience need improvement.",
},
{
step: "2",
header: "In-depth analysis",
description: "With a fresh pair of eyes, we analyze your customer experience to uncover potential.",
},
{
step: "3",
header: "Research design",
description: "We set up systems for continuous discovery. Benefit from an ongoing stream of insights.",
},
{
step: "4",
header: "Setup assistance",
description: "Our core developers help you get Formbricks up and running in no more than 60 minutes.",
},
{
step: "5",
header: "Actionable insights",
description:
"Once the results are in, we perform a thorough analysis and derive concrete Next Action Steps to retain your customers better.",
},
];
const ConciergePage = () => {
useEffect(() => {
(async function () {
const cal = await getCalApi();
cal("ui", {
theme: "light",
styles: { branding: { brandColor: "#000000" } },
hideEventTypeDetails: false,
});
})();
}, []);
return (
<Layout
title="Community | Formbricks Open Source Forms & Surveys"
description="You're building open source forms and surveys? So are we! Get support for anything your building - or just say hi!">
<HeroTitle
headingPt1="XM"
headingTeal="Concierge"
headingPt2="Service"
subheading="Let's set up your system for continuous user discovery together."
/>
<div className="-mt-16 grid grid-cols-1 space-y-4 px-4 md:grid-cols-2 md:gap-8 md:px-16">
<div className="rounded-xl bg-slate-100 p-12">
{XMOffer.map((offer) => (
<div key={offer.step} className="mb-8 flex items-center gap-x-4">
<div className=" flex items-center justify-center rounded-full bg-emerald-50 p-4 text-2xl font-bold text-emerald-700">
{offer.step}
</div>
<div>
<h4 className="font-semibold text-slate-700">{offer.header}</h4>
<p className="text-sm text-slate-800">{offer.description}</p>
</div>
</div>
))}
<div className="border-b border-t border-slate-300 p-6 text-4xl font-semibold text-slate-800">
<p className="mr-2 font-light">$2.290</p>
</div>
<div className="p-6 text-sm text-slate-800">
<p>
<CheckBadgeIcon className="mr-1 inline h-5 w-5 text-slate-800" />
100% Risk-free: Pay after the kick-off call.
</p>
<p>
<CheckBadgeIcon className="mr-1 inline h-5 w-5 text-slate-800" />
Money-back: If you&apos;re not happy, get a full refund.
</p>
</div>
</div>
<div className="rounded-xl">
<Cal
calLink="johannes/kick-off"
style={{
width: "100%",
height: "100%",
overflow: "scroll",
borderRadius: "0.5rem",
}}
config={{ layout: "month_view" }}
/>
</div>
</div>
</Layout>
);
};
export default ConciergePage;

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -2,6 +2,10 @@ import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { APILayout } from "@/components/shared/APILayout.tsx";
import { Callout } from "@/components/shared/Callout";
import Image from "next/image";
import AddApiKey from "./add-api-key.png";
import ApiKeySecret from "./api-key-secret.png";
export const meta = {
title: "API Key Setup",
@@ -16,9 +20,11 @@ The API requests are authorized with a personal API key. This API key gives you
### 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”.
2. Go to page “API keys”
<Image src={AddApiKey} alt="Add API Key" quality="100" className="rounded-lg" />
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" />
<Callout title="Store API key safely" type="warning">
Anyone who has your API key has full control over your account. For security reasons, you cannot view the
@@ -27,7 +33,7 @@ The API requests are authorized with a personal API key. This API key gives you
### Delete a personal API key
1. Go to settings on [app.formbricks.com](https://app.formbricks.com/app/me/settings).
1. Go to settings on [app.formbricks.com](https://app.formbricks.com/me/settings).
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

@@ -1,72 +0,0 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { APILayout } from "@/components/shared/APILayout.tsx";
export const meta = {
title: "API: Create response",
description: "Learn how to create a new response to a survey via API.",
};
<APILayout
method="POST"
url="/api/v1/client/environments/{environmentId}/responses"
description="Add a new submission to a form by form ID."
headers={[]}
bodies={[
{
label: "surveyId",
type: "string",
description: "The customer and metadata you want to link the submission to.",
},
{
label: "personId",
type: "string",
description: "Customer or user email. This is the primary key to identify users",
required: true,
},
{
label: "response",
type: "JSON",
description: "The content of the submission.",
},
{
label: "response.data",
type: "string",
description: "The data of the response as JSON object.",
required: true,
},
{
label: "response.finished",
type: "boolean",
description: "Determines if submission is marked as complete.",
},
]}
example={`{
"response": {
data: {
"clfqjny0v0003yzgscnog1j9i": 10,
"clfqjtn8n0070yzgs6jgx9rog": "I love Formbricks"
},
finished: true, // optional
},
"personId: "clfqjny0v000ayzgsycx54a2c",
"surveyId": "clfqz1esd0000yzah51trddn8"
}`}
responses={[
{
color: "green",
statusCode: "200",
description: "success",
example: "{ // Response Object as JSON }",
},
]}
/>
| field name | required | default | description |
| ---------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| response | yes | - | The response object (answers to the survey). It requires a `data` object. In this object the key is the questionId, the value the answer of the user to this question. |
| personId | yes | - | The person this response is connected to. |
| surveyId | yes | - | The survey this response is connected to. |
| finished | no | false | Mark a response as complete to be able to filter accordingly. |
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

View File

@@ -1,75 +0,0 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { APILayout } from "@/components/shared/APILayout.tsx";
export const meta = {
title: "API: Update submission",
description: "Learn how to update a new response to a survey via API.",
};
<APILayout
method="POST"
url="/api/v1/client/environments/{environmentId}/responses/{responseId}"
description="Update an existing response in a survey."
headers={[]}
bodies={[
{
label: "customer",
type: "JSON",
description: "The customer and metadata you want to link the submission to.",
},
{
label: "customer.email",
type: "email",
description: "Customer or user email. This is the primary key to identify users",
required: true,
},
{
label: "customer.prop",
type: "string",
description:
"Pass value to create user property. You can filter / create cohorts for future surveys based on props.",
},
{
label: "data",
type: "JSON",
description: "The content of the submission.",
},
{
label: "data.fieldName",
type: "string",
description: "Add value to input field by name.",
required: true,
},
{
label: "finished",
type: "boolean",
description: "Determines if submission is marked as complete.",
},
]}
example={`{
"response": {
data: {
"clfqjny0v0003yzgscnog1j9i": 10,
"clfqjtn8n0070yzgs6jgx9rog": "I love Formbricks"
},
finished: true, // optional
},
"personId: "clfqjny0v000ayzgsycx54a2c",
"surveyId": "clfqz1esd0000yzah51trddn8"
}`}
responses={[
{
color: "green",
statusCode: "200",
description: "success",
example: "{ // Response }",
},
]}
/>
| field name | required | default | description |
| ---------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| response | yes | - | The response object (answers to the survey). It requires a `data` object. In this object the key is the questionId, the value the answer of the user to this question. |
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

View File

@@ -43,33 +43,15 @@ To get this running, you'll need a bit of time. Here are the steps we're going t
2. In the Menu (top right) you see that you can switch between a “Development” and a “Production” environment. These are two separate environments so your test data doesnt mess up the insights from prod. Switch to “Development”:
<Image
src={SwitchToDev}
alt="switch to dev environment"
quality="100"
className="rounded-lg"
className="rounded"
/>
<Image src={SwitchToDev} alt="switch to dev environment" quality="100" className="rounded-lg" />
3. Then, create a survey using the template “Docs Feedback”:
<Image
src={DocsTemplate}
alt="select docs template"
quality="100"
className="rounded-lg"
className="rounded"
/>
<Image src={DocsTemplate} alt="select docs template" quality="100" className="rounded-lg" />
4. Change the Internal Question ID of the first question to **“isHelpful”** to make your life easier 😉
<Image
src={ChangeId}
alt="switch to dev environment"
quality="100"
className="rounded-lg"
className="rounded"
/>
<Image src={ChangeId} alt="switch to dev environment" quality="100" className="rounded-lg" />
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”**.
@@ -80,13 +62,7 @@ To get this running, you'll need a bit of time. Here are the steps we're going t
6. Click on “Continue to Settings or select the audience tab manually. Scroll down to “When to ask” and create a new Action:
<Image
src={WhenToAsk}
alt="set up when to ask card"
quality="100"
className="rounded-lg"
className="rounded"
/>
<Image src={WhenToAsk} alt="set up when to ask card" quality="100" className="rounded-lg" />
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:
@@ -94,7 +70,7 @@ To get this running, you'll need a bit of time. Here are the steps we're going t
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" />
**Youre all setup in Formbricks Cloud for now 👍**
@@ -280,7 +256,7 @@ return (
## 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:
@@ -373,7 +349,7 @@ 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" />
Now, you have to replace the IDs and the API host accordingly in your `handleFeedbackSubmit`:

View File

@@ -0,0 +1,95 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { APILayout } from "@/components/shared/APILayout.tsx";
export const meta = {
title: "API: Create response",
description: "Learn how to create a new response to a survey via API.",
};
<APILayout
method="POST"
url="/api/v1/client/responses"
description="Add a new response to a survey."
headers={[]}
bodies={[
{
label: "surveyId",
type: "string",
description: "The id of the survey the response belongs to.",
required: true,
},
{
label: "personId",
type: "string",
description: "Internal Formbricks id to identify the user sending the response (optional)",
required: false,
},
{
label: "finished",
type: "boolean",
description: "Marks whether the response is complete or not.",
required: true,
},
{
label: "data",
type: "string",
description: "The data of the response as JSON object (key: questionId, value: answer).",
required: true,
},
]}
example={`{
"personId: "clfqjny0v000ayzgsycx54a2c",
"surveyId": "clfqz1esd0000yzah51trddn8",
"finished": true,
"data": {
"clfqjny0v0003yzgscnog1j9i": 10,
"clfqjtn8n0070yzgs6jgx9rog": "I love Formbricks"
}
}`}
responses={[
{
color: "green",
statusCode: "200",
description: "success. Returns a response object as JSON.",
example: `{
"data": {
"id": "clisyqeoi000219t52m5gopke",
"surveyId": "clfqz1esd0000yzah51trddn8",
"finished": true,
"person": {
id: "clfqjny0v000ayzgsycx54a2c",
attributes: {
"email": "me@johndoe.com"
}
},
"data": {
"clfqjny0v0003yzgscnog1j9i": 10,
"clfqjtn8n0070yzgs6jgx9rog": "I love Formbricks"
}
}
}`,
},
{
color: "brown",
statusCode: "400",
description: "error. bad request",
example: `{
"code": "bad_request",
"message": "surveyId was not provided.",
"details": {
"surveyId": "This field is required."
}
}`,
},
]}
/>
| 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. |
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

View File

@@ -0,0 +1,12 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
export const meta = {
title: "Client API Overview",
description:
"Explore the Formbricks Public Client API for client-side tasks and integration into your website.",
};
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.
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

View File

@@ -0,0 +1,84 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { APILayout } from "@/components/shared/APILayout.tsx";
export const meta = {
title: "API: Update submission",
description: "Learn how to update a new response to a survey via API.",
};
<APILayout
method="POST"
url="/api/v1/client/responses/[responseId]"
description="Update an existing response in a survey."
headers={[]}
bodies={[
{
label: "data",
type: "string",
description: "The data of the response as JSON object (key: questionId, value: answer).",
required: true,
},
]}
example={`{
"personId: "clfqjny0v000ayzgsycx54a2c",
"surveyId": "clfqz1esd0000yzah51trddn8",
"finished": true,
"data": {
"clggpvpvu0009n40g8ikawby8": 5,
}
}`}
responses={[
{
color: "green",
statusCode: "200",
description: "success. Returns a response object as JSON.",
example: `{
"data": {
"id": "clisyqeoi000219t52m5gopke",
"surveyId": "clfqz1esd0000yzah51trddn8",
"finished": true,
"person": {
id: "clfqjny0v000ayzgsycx54a2c",
attributes: {
"email": "me@johndoe.com"
}
},
"data": {
"clfqjny0v0003yzgscnog1j9i": 10,
"clfqjtn8n0070yzgs6jgx9rog": "I love Formbricks",
"clggpvpvu0009n40g8ikawby8": 5
}
}
}`,
},
{
color: "brown",
statusCode: "400",
description: "error. bad request",
example: `{
"code": "bad_request",
"message": "data was not provided.",
"details": {
"data": "This field is required."
}
}`,
},
{
color: "brown",
statusCode: "404",
description: "error. not found",
example: `{
"code": "not_found",
"message": "Response not found"
}`,
},
]}
/>
| 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. |
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

View File

@@ -0,0 +1,67 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { Callout } from "@/components/shared/Callout";
import Image from "next/image";
import DemoApp from "./demoapp.png";
export const meta = {
title: "Demo App",
description: "To test in-app surveys, trigger actions and set attributes, you can use the Demo App.",
};
To play around with the in-app [User Actions](/docs/actions/why), you can use the Demo App. It's a simple React app that you can run locally and use to trigger actions and set [Attributes](/docs/attributes/why).
<Image src={DemoApp} alt="Demo App Preview" quality="100" className="rounded-lg" />
## Functionality
### Code Action
This button sends a <a href="/docs/actions/code">Code Action</a> to the Formbricks API called 'Code Action'. You will find it in the Actions Tab.
```tsx
formbricks.track("Code Action");
```
### No Code Action
This button sends a <a href="/docs/actions/no-code">No Code Action</a> as long as you created it beforehand in the Formbricks App. For it to work, you need to add the No Code Action within Formbricks.
```tsx
<button>No-Code Action</button>
```
### Set Plan to "Free"
This button sets the <a href="/docs/attributes/custom-attributes">attribute</a> 'Plan' to 'Free'. If the attribute does not exist, it creates it.
```tsx
formbricks.setAttribute("Plan", "Free");
```
### Set Plan to "Paid"
This button sets the <a href="/docs/attributes/custom-attributes">attribute</a> 'Plan' to 'Paid'. If the attribute does not exist, it creates it.
```tsx
formbricks.setAttribute("Plan", "Paid");
```
### Set Email
This button sets the <a href="/docs/attributes/identify-users">user email</a> 'test@web.com'
```tsx
formbricks.setEmail("test@web.com");
```
### Set UserId
This button sets an external <a href="/docs/attributes/identify-users">user ID</a> to 'THIS-IS-A-VERY-LONG-USER-ID-FOR-TESTING'
```tsx
formbricks.setUserId("THIS-IS-A-VERY-LONG-USER-ID-FOR-TESTING");
```
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

View File

@@ -31,36 +31,24 @@ To get the project running locally on your machine you need to have the followin
pnpm install
```
1. To make the process of installing a dev dependencies easier, we offer a [`docker-compose.yml`](https://docs.docker.com/compose/) with the following servers:
- a `postgres` container and environment variables preset to reach it,
- a `mailhog` container that acts as a mock SMTP server and shows received mails in a web UI (forwarded to your host's `localhost:8025`)
```bash
docker-compose -f docker-compose.dev.yml up -d
```
1. Create a `.env` file based on `.env.example`. It's already preset to work with the docker-compose setup but you can also change values if needed.
```bash
cp .env.example .env
```
1. Make sure your Docker containers are running. Then let prisma set up the database for you:
1. Make sure you have [`Docker`](https://docs.docker.com/compose/) & [`docker-compose`](https://docs.docker.com/compose/) installed and running on your machine. Then run the following command to start the formbricks dev setup:
```bash
pnpm dlx prisma migrate dev
pnpm go
```
1. Start the development server of the app:
This starts the Formbricks main app (plus all its dependencies) as well as the following services using Docker:
```bash
pnpm dev --filter=web...
```
- a `postgres` container for hosting your database,
- a `mailhog` container that acts as a mock SMTP server and shows received mails in a web UI (forwarded to your host's `localhost:8025`)
This only starts the Formbricks main app plus all its dependencies to save memory. If you want to start all apps at once, run `pnpm dev` instead.
**You can now access the app on [http://localhost:3000](http://localhost:3000)**. You will be automatically redirected to the login. To use your local installation of formbricks, create a new account.
**You can now access the Formbricks app on [http://localhost:3000](http://localhost:3000)**. You will be automatically redirected to the login. To use your local installation of formbricks, create a new account.
For viewing the confirmation email and other emails the system sends you, you can access mailhog at [http://localhost:8025](http://localhost:8025)
@@ -72,4 +60,24 @@ To build all apps and packages and check for build errors, run the following com
pnpm build
```
### Access Demo app
To run the [Demo app](/docs/contributing/demo), run the following command in a separate terminal window:
```bash
pnpm dev --filter=demo
```
You can now access the Demo app on [http://localhost:3002](http://localhost:3002).
### Access Formbricks website
If you want to make changes to the Formbricks website, e.g. to update the documentation, run the following command in a separate terminal window:
```bash
pnpm dev --filter=formbricks-com
```
You can now access the Formbricks website on [http://localhost:3001](http://localhost:3001).
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -0,0 +1,65 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { Callout } from "@/components/shared/Callout";
import Image from "next/image";
import ClearAppData from "./clear-app-data.png";
import UncaughtPromise from "./uncaught-promise.png";
import Logout from "./logout.png";
export const meta = {
title: "Troubleshooting",
description:
"Formbricks is a complex application in constant development. Sometimes, things don't go as planned. Here are some tips to help you troubleshoot.",
};
Here you'll find help with Frequently Recurring Problems
## "The app doesn't work after doing a prisma migration"
This can happen but fear not, the fix is easy: Delete the application storage of your browser and reload the page. This will force the app to re-fetch the data from the server:
<Image src={ClearAppData} alt="Demo App Preview" quality="100" className="rounded-lg" />
## "I ran 'pnpm i' but there seems to be an error with the packages"
If nothing helps, run `pnpm clean` and then `pnpm i` again. This solves a lot.
## "I get a full-screen error with cryptic strings"
This usually happens when the Formbricks Widget wasn't correctly or completely built.
```bash
// Build formbricks-js first
pnpm build --filter=js
// Run the app again
pnpm dev
```
## My machine struggles with the repository
Since we're working with a monorepo structure, the repository can get quite big. If you're having trouble working with the repository, try the following:
```bash
// Only run the Formbricks app
pnpm dev --filter=web...
// Only run the landing page app
pnpm dev --filter=formbricks-com...
// Only run the demo app
pnpm dev --filter=demo...
```
However, in our experience it's better to run `pnpm dev` than having two terminals open (one with the Formbricks app and one with the demo).
## Uncaught (in promise) SyntaxError: Unexpected token !DOCTYPE ... is not valid JSON
<Image src={UncaughtPromise} alt="Uncaught promise" quality="100" className="rounded-lg" />
This happens when you're using the Demo App and delete the Person within the Formbricks app which the widget is currently connected with. We're fixing it, but you can also just logout your test person and reload the page to get rid of it.
<Image src={Logout} alt="Logout Person" quality="100" className="rounded-lg" />
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,97 @@
import { Layout } from "@/components/docs/Layout";
import Image from "next/image";
import SetupChecklist from "./env-id.png";
import WidgetNotConnected from "./widget-not-connected.png";
import WidgetConnected from "./widget-connected.png";
export const meta = {
title: "Setting up Formbricks SDK with Next.js App Directory",
description:
"Setting up Formbricks with the new Next.js 13 App Directory can be tricky. Follow this guide to make sure you get it right.",
};
This guide will walk you through the process of integrating the Formbricks SDK into a Next.js application using the new app directory. As the Formbricks SDK only works on the client side, it's essential to ensure proper integration to avoid any issues.
## Prerequisites
Before getting started, make sure you have:
1. A Next.js application set up and running.
2. A Formbricks account with access to your environment ID and API host. You can find these in the **Setup Checklist** in the Settings:
<Image src={SetupChecklist} alt="Step 2 - Setup Checklist" quality="100" className="rounded-lg" />
## Installing Formbricks SDK
First, you need to install the Formbricks SDK using one of the following commands:
```bash
npm install --save @formbricks/js
# or
yarn add @formbricks/js
# or
pnpm add @formbricks/js
```
## Integrating with Next.js 13 App Directory
The Next.js 13 app directory requires us to initialize Formbricks differently than the pages directory. Specifically, the app directory server-side renders components by default, and the formbricks-js library is a client-side library. To make these work together, create a `formbricks.js` file (or formbricks.ts if you are using Typescript) and set up the FormbricksProvider with the 'use client' directive:
```tsx
// app/formbricks.js
"use client";
import formbricks from "@formbricks/js";
if (typeof window !== "undefined") {
formbricks.init({
environmentId: "your-environment-id",
apiHost: "your-api-host", // e.g. https://app.formbricks.com
debug: true, // remove when in production
});
}
export default function Providers({ Component, pageProps }: AppProps) {
const pathname = usePathname();
const searchParams = useSearchParams();
useEffect(() => {
formbricks?.registerRouteChange();
}, [pathname, searchParams]);
return null;
}
```
Once we do this, we can then import the `provider.js` file in our `app/layout.js` file, and wrap our app in the Formbricks provider.
```tsx
// app/layout.js
import Providers from "./formbricks";
export const metadata = {
title: "Create Next App",
description: "Generated by create next app",
};
export default function RootLayout({ children }) {
return (
<html lang="en">
<Providers />
<body>{children}</body>
</html>
);
}
```
## Validate your setup
Once you have completed the steps above, you can validate your setup by checking the **Setup Checklist** in the Settings. Your widget status indicator should go from this:
<Image src={WidgetNotConnected} alt="Widget isnt connected" quality="100" className="rounded-lg" />
To this:
<Image src={WidgetConnected} alt="Widget is connected" quality="100" className="rounded-lg" />
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,88 @@
import { Layout } from "@/components/docs/Layout";
import Image from "next/image";
import SetupChecklist from "./env-id.png";
import WidgetNotConnected from "./widget-not-connected.png";
import WidgetConnected from "./widget-connected.png";
export const meta = {
title: "Setting up Formbricks SDK with Next.js Pages Directory",
description:
"Setting up Formbricks with the new Next.js 13 Pages Directory can be tricky. Follow this guide to make sure you get it right.",
};
This guide will walk you through the process of integrating the Formbricks SDK into a Next.js application using the Pages Directory. As the Formbricks SDK only works on the client side, it's essential to ensure proper integration to avoid any issues.
## Prerequisites
Before getting started, make sure you have:
1. A Next.js application with Pages Directory set up and running.
2. A Formbricks account with access to your environment ID and API host. You can find these in the **Setup Checklist** in the Settings:
<Image src={SetupChecklist} alt="Step 2 - Setup Checklist" quality="100" className="rounded-lg" />
## Installing Formbricks SDK
First, you need to install the Formbricks SDK using one of the following commands:
```bash
npm install --save @formbricks/js
# or
yarn add @formbricks/js
# or
pnpm add @formbricks/js
```
## Integrating with Next.js 13 Pages Directory
Update your Pages component in the \_app.ts file like so:
```tsx
import "@/styles/globals.css";
import type { PagesProps } from "next/app";
import { useEffect } from "react";
import { useRouter } from "next/router";
import formbricks from "@formbricks/js";
if (typeof window !== "undefined") {
formbricks.init({
environmentId: "your-environment-id",
apiHost: "your-api-host", // e.g. https://app.formbricks.com
debug: true, // remove when in production
});
}
export default function Pages({ Component, pageProps }: PagesProps) {
const router = useRouter();
useEffect(() => {
// Connect next.js router to Formbricks
const handleRouteChange = formbricks?.registerRouteChange;
router.events.on("routeChangeComplete", handleRouteChange);
return () => {
router.events.off("routeChangeComplete", handleRouteChange);
};
}, []);
return <Component {...pageProps} />;
}
```
## What are we doing here?
1. First we need to initialize the Formbricks SDK, making sure it only runs on the client side.
2. To connect the Next.js router to Formbricks and ensure the SDK can keep track of every page change, we are registering the route change event.
## Validate your setup
Once you have completed the steps above, you can validate your setup by checking the **Setup Checklist** in the Settings. Your widget status indicator should go from this:
<Image src={WidgetNotConnected} alt="Widget isnt connected" quality="100" className="rounded-lg" />
To this:
<Image src={WidgetConnected} alt="Widget is connected" quality="100" className="rounded-lg" />
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -1,82 +0,0 @@
import { Layout } from "@/components/docs/Layout";
export const meta = {
title: "Setting up Formbricks SDK with Next.js",
description: "Integrate Formbricks SDK into your Next.js app for seamless in-product micro-surveys. Follow our step-by-step guide to enhance user feedback and product experience.",
};
This guide will walk you through the process of integrating the Formbricks SDK into a Next.js application. As the Formbricks SDK only works on the client side, it's essential to ensure proper integration to avoid any issues.
## Introduction
Formbricks SDK allows you to seamlessly integrate in-product micro-surveys into your Next.js application. By following the steps outlined in this guide, you'll be able to gather valuable insights from your users and improve your product experience.
## Prerequisites
Before getting started, make sure you have:
1. A Next.js application set up and running.
2. A Formbricks account with access to your environment ID and API host. You can find these in the Setup Checklist in the Settings.
## Installing Formbricks SDK
First, you need to install the Formbricks SDK using one of the following commands:
```bash
npm install --save @formbricks/js
# or
yarn add @formbricks/js
# or
pnpm add @formbricks/js
```
## Integrating Formbricks SDK with Next.js
Update your App component in the \_app.ts file like so:
```tsx
import "@/styles/globals.css";
import type { AppProps } from "next/app";
import { useEffect } from "react";
import { useRouter } from "next/router";
import formbricks from "@formbricks/js";
if (typeof window !== "undefined") {
formbricks.init({
environmentId: "your-environment-id",
apiHost: "your-api-host", // e.g. https://app.formbricks.com
logLevel: "debug", // remove when in production
});
}
export default function App({ Component, pageProps }: AppProps) {
const router = useRouter();
useEffect(() => {
// Connect next.js router to Formbricks
const handleRouteChange = formbricks?.registerRouteChange;
router.events.on("routeChangeComplete", handleRouteChange);
return () => {
router.events.off("routeChangeComplete", handleRouteChange);
};
}, []);
return <Component {...pageProps} />;
}
```
**What are we doing here?**
First we need to initialize the Formbricks SDK, making sure it only runs on the client side.
To connect the Next.js router to Formbricks and ensure the SDK can keep track of every page change, we are registering the route change event.
That's it! 🎉
You should now see that the Widget Status in the setup checklist updated accordingly:
If it doesnt work, please [join our Discord](https://formbricks.com/discord) and let us know!
You have now successfully integrated the Formbricks SDK into your Next.js application. You can start creating and customizing in-product micro-surveys to gather valuable feedback from your users and improve your product experience.
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -0,0 +1,102 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { Callout } from "@/components/shared/Callout";
import Image from "next/image";
import AddNewZap from "./add-new-zap.png";
import ChooseEvent from "./choose-event.png";
import ConnectWithFB1 from "./connect-with-formbricks-1.png";
import ConnectWithFB2 from "./connect-with-formbricks-2.png";
import DuplicateSurvey from "./duplicate-survey.png";
import SelectSurvey from "./select-survey.png";
import SlackChannelMsg from "./slack-channel-msg.png";
import SlackMsg from "./slack-message.png";
import SubmitTestResponse from "./submit-test-response.png";
import SuccessConnection from "./success-connected.png";
import TestSubmission from "./test-submission.png";
import UpdateQuestionId from "./update-question-id.png";
import ZapierMessage from "./zapier-message.png";
export const meta = {
title: "Zapier Setup",
description: "Wire up Formbricks with Zapier and 5000+ other apps",
};
Zapier is a powerful ally. Hook up Formbricks with Zapier and you can send your data to 5000+ other apps. Here is how to do it.
<Callout title="Nail down your survey first" type="note">
Any changes in the survey cause additional work in the Zap. It makes sense to first settle on the survey you
want to run and then get to setting up Zapier.
</Callout>
## Step 1: Setup your survey incl. `questionId` for every question
When setting up the Zap your life will be easier when you change the `questionId`s of your survey questions. You can only do so **before** you publish your survey.
<Image src={UpdateQuestionId} alt="Update Question ID" quality="100" className="rounded-lg" />
_In every question card in the Advanced Settings you find the Question ID field. Update it so that youll recognize the response tied to this question._
<Callout title="Already published? Duplicate survey" type="note">
You can only update the questionId when the survey was not yet published. Already published it? Just
**duplicate it** to update the questionIds.
<Image src={DuplicateSurvey} alt="Duplicate Survey" quality="100" className="rounded-lg" />
</Callout>
## Step 3: Send a test response
In order to set up Zapier youll need a test response. This allows you to select the individual values of each response in your Zap. If you have Formbricks running locally and you want to set up an in-app survey, you can use our [Demo App](/docs/contributing/demo) to trigger a survey and submit a response.
<Image src={SubmitTestResponse} alt="Submit Test Response" quality="100" className="rounded-lg" />
## Step 4: Setup your Zap
Go to [zapier.com](https://zapier.com) and create a new Zap. Search for “Formbricks” to get started:
<Image src={AddNewZap} alt="Add New Zap" quality="100" className="rounded-lg" />
Then, choose the event you want to trigger the Zap on:
<Image src={ChooseEvent} alt="Choose Event" quality="100" className="rounded-lg" />
## Step 5: Connect Formbricks with Zapier
Now, you have to connect Zapier with Formbricks via an API Key:
<Image src={ConnectWithFB1} alt="Connect with Formbricks - 1" quality="100" className="rounded-lg" />
<Image src={ConnectWithFB2} alt="Connect with Formbricks - 2" quality="100" className="rounded-lg" />
Now you need an API key. Please refer to the [API Key Setup](/docs/api/api-key-setup) page to learn how to create one.
Once you copied it in the newly opened Zapier window, you will be connected:
<Image src={SuccessConnection} alt="Successful Connection" quality="100" className="rounded-lg" />
## Step 6: Select Survey
Next, you can choose from all the surveys you have created in this environment:
<Image src={SelectSurvey} alt="Select Survey" quality="100" className="rounded-lg" />
## Step 7: Test your trigger
Once you hit “Test” you will see the three most recent submissions for this survey. If you dont have any submissions in the survey, submit one to continue setting up your Zap:
<Image src={TestSubmission} alt="Test Submission" quality="100" className="rounded-lg" />
_Now you're happy that you updated the questionId's_
## Step 8: Set up your Zap
Now you have all the data you need at hand. The next steps depend on what you want to do with it. In this tutorial, we will send submissions to a Slack channel:
<Image src={SlackChannelMsg} alt="Slack Channel Message" quality="100" className="rounded-lg" />
In the action itself we can determine the data and layout of the message. Here, we only choose the submission data. You can also refer to the meta data of the submission and the [attributes](/docs/attributes/why) of the person who submitted the survey.
<Image src={SlackMsg} alt="Slack Message" quality="100" className="rounded-lg" />
We now receive a notifcation in our Slack channel whenever a Churn survey is completed:
<Image src={ZapierMessage} alt="Zapier Message" quality="100" className="rounded-lg" />
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@@ -0,0 +1,115 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { Callout } from "@/components/shared/Callout";
import Image from "next/image";
import QuestionId from "./question-id.png";
export const meta = {
title: "Data Prefilling in Link Surveys",
description: "Prefill data in your surveys to make it easier for your users to provide feedback.",
};
Data prefilling via the URL allows you to increase conversion rate by prefilling data you already have in a different system.
## Purpose
URL prefilling of data comes in handy when you:
- Have data for some of the respondents, but not all
- Have data in a different system (e.g. your database) and want to add it to the user profile in Formbricks
- Want to embed the first question in an email and increase conversion by prefilling the choice
## Quick Example
```tsx
https://app.formbricks.com/s/clin3dxja02k8l80hpwmx4bjy?question_id=5
```
## How it works
To prefill the first question of a survey, append `?question_id=answer` at the end of the survey URL. The answer has to match the expected type of the question. For example, if the first question is a rating question, the answer has to be a number. If the first question is a single select question, the answer has to be a string.
Please make sure the answer is [URL encoded](https://www.urlencoder.org/).
<Callout title="Prefill only the first question" type="note">
Currently, you can only prefill the first question of a link survey.
</Callout>
## Where do I find my question Id?
You find the `questionId` in the Advanced Settings at the bottom of each question card in the Survey Editor. As you see, you can update the `questionId` to any string you like. However, once you published your survey, this `questionId` cannot be updated anymore:
<Image
src={QuestionId}
alt="The question Id is located at the bottom of each question card in the survey editor."
quality="100"
className="rounded-lg"
/>
## Examples
Here are a few examples to get you started:
### Rating Question
```tsx
https://app.formbricks.com/s/clin3yxja52k8l80hpwmx4bjy?rating_question_id=5
// -> translates to 5 stars / points / emojis
```
### NPS Question
```tsx
https://app.formbricks.com/s/clin3yxja52k8l80hpwmx4bjy?nps_question_id=10
// -> translates to an NPS rating of 10
```
### Single Select Question (Radio)
```tsx
https://app.formbricks.com/s/clin3yxja52k8l80hpwmx4bjy?single_select_question_id=Very%20disappointed
// -> Chooses the option "Very disappointed" in the single select question. The string has to be identical to the option in your question.
```
### Multi Select Question (Checkbox)
```tsx
https://app.formbricks.com/s/clin3yxja52k8l80hpwmx4bjy?multi_select_question_id=Sun%2CPalms%2CBeach
// -> Selects three options "Sun, Palms and Beach" in the multi select question. The strings have to be identical to the options in your question.
```
### Open Text Question
```tsx
https://app.formbricks.com/s/clin3yxja52k8l80hpwmx4bjy?openText_question_id=I%20love%20Formbricks
// -> Adds "I love Formbricks" as the answer to the open text question
```
### CTA Question
```tsx
https://app.formbricks.com/s/clin3yxja52k8l80hpwmx4bjy?cta_question_id=clicked
// -> Adds "clicked" as the answer to the CTA question. Alternatively, you can set it to "dismissed" to skip the question.
```
## Validation
Make sure that the answer in the URL matches the expected type for the first question.
The URL validation works as follows:
- For Rating or NPS questions, the response is parsed as a number and verified if it's accepted by the schema.
- For CTA type questions, the valid values are "clicked" (main CTA) and "dismissed" (skip CTA).
- For Consent type questions, the valid values are "accepted" (consent given) and "dismissed" (consent not given).
- All other question types are strings.
### Youre good to go! 🎉
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@@ -0,0 +1,57 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { Callout } from "@/components/shared/Callout";
import Image from "next/image";
import PeopleView from "./people-view.png";
export const meta = {
title: "User Identification in Link Surveys",
description:
"Identify users in link surveys via URL parameter. Connect responses to existing users in Formbricks.",
};
Identifying users in link features lets you connect responses from link surveys with existing users in your Formbricks database.
## Purpose
Identifying users in link surveys comes in handy when you:
- Want to send out link surveys to existing users in your database
- Want to connect responses from link surveys with existing users in your database
- Want to gather data and later connect it to a user who has not signed up yet
## Quick Example
```tsx
https://app.formbricks.com/s/clin3dxja02k8l80hpwmx4bjy?userId=ABC123
```
## How it works
To link a response to a user in your Formbricks database, you can pass your internal user Id as a URL parameter.
## Where do I find my userId?
The `userId` we are refering to is the `userId` of your own system. For example, a user signs up to your app and gets the Id `ABC123` assigned then this is the Id you pass along in the URL parameter.
This allows you to connect the response to the user profile of this specific in the Formbricks database. You can then use the response data to create segments for further surveying or invite them to an interview, etc.
## getOrCreateUser - how it works exactly
By default, respondents of link surveys are **not** recorded and displayed in the People view. This would lead to your People view to be spammend with unidentified people.
If you add the `userId` URL parameter a Person will be created, if there is no existing person in your database with a matching `userId`.
**Case 1:** User with userId `ABC111` exists, the response from the link survey will be added to this users profile.
**Case 2:** User with userId `ABC222` does not yet exists, so it is created with the response from the link survey connected to this user.
<Image
src={PeopleView}
alt="If users are identified by email, it will show. If not, the internal Id will be set."
quality="100"
className="rounded-lg"
/>
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -8,68 +8,151 @@ export const meta = {
"Utilize Docker-Compose for easy deployment on your machine. Clone the repo, configure settings, and build the image to access the app on localhost.",
};
<Callout title="Public Beta" type="warning">
Formbricks is not yet stable. Please reach out to us when you deploy Formbricks in production:
hola@formbricks.com
</Callout>
At Formbricks, we understand that different users have different needs, and we strive to cater to a wide variety of situations. This is why we provide two ways of running our application using Docker:
## Deploy with Docker-Compose
1. **Fast Setup with a Pre-built Docker Image:** This method is designed for those who want to quickly set up and start using Formbricks without getting into the technicalities of Docker or the build process. When you choose this method, you're using an image that we've already built for you. The pre-built image is ready-to-run, and it only requires minimal configuration on your part. This approach is perfect for getting a functional instance of Formbricks up and running with minimal hassle. It's as easy as downloading the Docker image and firing up the container.
The easiest way to deploy Formbricks on your own machine is using Docker. This requires Docker and the docker compose plugin on your system to work.
2. **Manual Setup by Building the Docker Image from Source:** This approach provides the flexibility to configure every aspect of your Formbricks instance, including environment variables that need to be set at build time. While we don't recommend changing the source code of Formbricks, this method allows you to set your own configuration that might be necessary for specific deployment needs. Keep in mind that this method requires a more in-depth understanding of Docker and the build process. However, the trade-off is the additional control and flexibility you gain, making it worth considering if you're a more advanced user or have very specific configuration needs.
Clone the repository:
Please note that regardless of the method you choose, Formbricks is designed to be easy-to-use and flexible. So choose the method that best fits your comfort level and requirements, and start leveraging the power of Formbricks today!
```bash
git clone https://github.com/formbricks/formbricks.git && cd formbricks
```
---
Create a `.env` file based on `.env.docker` and change all fields according to your setup. This file comes with a basic setup and Formbricks works without making any changes to the file. To enable email sending functionality you need to configure the SMTP settings in the `.env` file. If you configured your email credentials, you can also comment the following lines to enable email verification (`# NEXT_PUBLIC_EMAIL_VERIFICATION_DISABLED=1`) and password reset (`# NEXT_PUBLIC_PASSWORD_RESET_DISABLED=1`)
## Requirements
Copy the `.env.docker` file to `.env` and edit it with an editor of your choice if needed.
Ensure `docker` & `docker compose` are installed on your server/system. Both are typically included with Docker utilities, like Docker Desktop and Rancher Desktop.
```bash
cp .env.docker .env
```
**Note**: `docker compose` without the hyphen is now the primary method of using docker-compose, according to the Docker documentation.
Note: The environment variables are used at build time. When you change environment variables later, you need to rebuild the image with `docker compose build` for the changes to take effect.
## (Most users) Running the pre-built Docker Image
Finally start the docker compose process to build and spin up the Formbricks container as well as the PostgreSQL database.
This is suitable for those who are testing Formbricks or running it with minimal to no modifications. For this we use the [public Docker image](https://hub.docker.com/r/formbricks/formbricks) and a simple docker-compose file.
```bash
docker compose up -d
# (use docker-compose if you are on an older docker version)
```
1. **Create a New Directory for Formbricks**
You can now access the app on [http://localhost:3000](http://localhost:3000). You will be automatically redirected to the login. To use your local installation of Formbricks, create a new account.
Open a terminal and create a new directory for Formbricks, then navigate into this new directory:
## Stop the containers
```bash
mkdir formbricks-quickstart && cd formbricks-quickstart
```
To stop the containers, run:
2. **Download the Docker-Compose File**
```bash
docker compose down
```
Download the docker-compose file directly from the Formbricks repository:
## Update Formbricks
```bash
curl -o docker-compose.yml https://raw.githubusercontent.com/formbricks/formbricks/docker/main/docker-compose.yml
```
To update Formbricks, pull the latest changes from the repository:
3. **Generate NextAuth Secret**
```bash
git pull
```
Next, you need to generate a NextAuth secret. This will be used for session signing and encryption. The `sed` command below generates a random string using `openssl`, then replaces the `NEXTAUTH_SECRET:` placeholder in the `docker-compose.yml` file with this generated secret:
and rebuild the image:
```bash
sed -i "/NEXTAUTH_SECRET:$/s/NEXTAUTH_SECRET:.\*/NEXTAUTH_SECRET: $(openssl rand -base64 32)/" docker-compose.yml
```
```bash
docker compose build
```
4. **Start the Docker Setup**
Then you can stop and restart the containers again:
You're now ready to start the Formbricks Docker setup. The following command will start Formbricks together with a postgreSQL database using Docker Compose:
```bash
docker compose down
docker compose up -d
```
```bash
docker compose up -d
```
The `-d` flag will run the containers in detached mode, meaning they'll run in the background.
5. **Visit Formbricks in Your Browser**
After starting the Docker setup, visit http://localhost:3000 in your browser to interact with the Formbricks application. The first time you access this page, you'll be greeted by a setup wizard. Follow the prompts to define your first user and get started.
## Updating Formbricks
1. Stop the Formbricks stack
```bash
docker compose down
```
2. Pull the latest changes
```bash
docker compose pull
```
3. Update env vars as necessary.
4. Re-start the Formbricks stack
```bash
docker compose up -d
```
## (Advanced users) Build and Run Formbricks
1. Clone the repository:
```bash
git clone https://github.com/formbricks/formbricks.git && cd formbricks
```
Create a `.env` file based on `.env.docker` and change all fields according to your setup. This file comes with a basic setup and Formbricks works without making any changes to the file. To enable email sending functionality you need to configure the SMTP settings in the `.env` file. If you configured your email credentials, you can also comment the following lines to enable email verification (`# NEXT_PUBLIC_EMAIL_VERIFICATION_DISABLED=1`) and password reset (`# NEXT_PUBLIC_PASSWORD_RESET_DISABLED=1`)
2. Copy the `.env.docker` file to `.env` and edit it with an editor of your choice if needed.
```bash
cp .env.docker .env
```
Note: The environment variables are used at build time. When you change environment variables later, you need to rebuild the image with `docker compose build` for the changes to take effect.
3. Finally start the docker compose process to build and spin up the Formbricks container as well as the PostgreSQL database.
```bash
docker compose up -d
# (use docker-compose if you are on an older docker version)
```
You can now access the app on [http://localhost:3000](http://localhost:3000). You will be automatically redirected to the login. To use your local installation of Formbricks, create a new account.
Certainly, here is the reformatted version for Formbricks environment variables.
### Important Run-time Variables
These variables must also be provided at runtime.
| Variable | Description | Required | Default |
| ---------------------- | --------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------- |
| NEXT_PUBLIC_WEBAPP_URL | Base URL of the site. | required | `http://localhost:3000` |
| DATABASE_URL | Database URL with credentials. | required | `postgresql://postgres:postgres@postgres:5432/formbricks?schema=public` |
| NEXTAUTH_SECRET | Secret for NextAuth, used for session signing and encryption. | required | (Generated by the user) |
| NEXTAUTH_URL | Location of the auth server. By default, this is the Formbricks docker instance itself. | required | `http://localhost:3000` |
### Build-time Variables
These variables must be provided at the time of the docker build and can be provided by updating the `.env` file.
| Variable | Description | Required | Default |
| --------------------------------------- | -------------------------------------------------------------------------------------------- | --------------------------------------------- | ----------------------- |
| NEXT_PUBLIC_WEBAPP_URL | Base URL injected into static files. | required | `http://localhost:3000` |
| PRISMA_GENERATE_DATAPROXY | Enables a dedicated connection pool for Prisma using Prisma Data Proxy. Uncomment to enable. | optional | |
| NEXT_PUBLIC_EMAIL_VERIFICATION_DISABLED | Disables email verification if set to `1`. | optional | |
| NEXT_PUBLIC_PASSWORD_RESET_DISABLED | Disables password reset functionality if set to `1`. | optional | |
| NEXT_PUBLIC_SIGNUP_DISABLED | Disables the ability for new users to create an account if set to `1`. | optional | |
| NEXT_PUBLIC_INVITE_DISABLED | Disables the ability for invited users to create an account if set to `1`. | optional | |
| NEXT_PUBLIC_PRIVACY_URL | URL for privacy policy. | optional | |
| NEXT_PUBLIC_TERMS_URL | URL for terms of service. | optional | |
| NEXT_PUBLIC_IMPRINT_URL | URL for imprint. | optional | |
| SENTRY_IGNORE_API_RESOLUTION_ERROR | Disables Sentry warning if set to `1`. | optional | |
| NEXT_PUBLIC_SENTRY_DSN | DSN for Sentry error tracking. | optional | |
| NEXT_PUBLIC_GITHUB_AUTH_ENABLED | Enables GitHub login if set to `1`. | optional | |
| GITHUB_ID | Client ID for GitHub. | optional (required if GitHub auth is enabled) | |
| GITHUB_SECRET | Secret for GitHub. | optional (required if GitHub auth is enabled) | |
| NEXT_PUBLIC_GOOGLE_AUTH_ENABLED | Enables Google login if set to `1`. | optional | |
| GOOGLE_CLIENT_ID | Client ID for Google. | optional (required if Google auth is enabled) | |
| GOOGLE_CLIENT_SECRET | Secret for Google. | optional (required if Google auth is enabled) | |
| CRON_SECRET | Secret for running cron jobs. | optional | |
Please refer to the [Formbricks Instructions](https://github.com/formbricks/formbricks) for more details on generating these variables.
## Debugging

View File

@@ -0,0 +1,98 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { APILayout } from "@/components/shared/APILayout.tsx";
export const meta = {
title: "API: Create webhook",
description: "Learn how to create a new webhook via API.",
};
<APILayout
method="POST"
url="/api/v1/webhooks"
description="Add a new webhook."
headers={[
{
label: "x-Api-Key",
type: "string",
description: "Your Formbricks API key.",
required: true,
},
]}
bodies={[
{
label: "url",
type: "string",
description: "The URL where the webhook will send data to.",
required: true,
},
{
label: "triggers",
type: "string[]",
description: "List of events that will trigger the webhook",
required: true,
},
{
label: "surveyIds",
type: "string[]",
description:
"List of survey IDs that will trigger the webhook. If not provided, the webhook will be triggered for all surveys.",
},
]}
example={`{
"url": "https://mysystem.com/myendpoint",
"trigger": "responseFinished"
}`}
responses={[
{
color: "green",
statusCode: "200",
description: "Success. Returns a webhook object as JSON.",
example: `{
"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"]
}
}`,
},
{
color: "brown",
statusCode: "400",
description: "Error. Bad request.",
example: `{
"code": "bad_request",
"message": "Missing trigger",
"details": {
"missing_field": "trigger"
}
}`,
},
{
color: "brown",
statusCode: "401",
description: "Error. Not authenticated.",
example: `{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}`,
},
]}
/>
| 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. |
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

View File

@@ -0,0 +1,67 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { APILayout } from "@/components/shared/APILayout.tsx";
export const meta = {
title: "API: Delete Webhook",
description: "Learn how to delete a specific webhook by its ID via API.",
};
<APILayout
method="DELETE"
url="/api/v1/webhooks/[webhookId]"
description="Delete a specific webhook by its ID."
headers={[
{
label: "x-Api-Key",
type: "string",
description: "Your Formbricks API key.",
required: true,
},
]}
responses={[
{
color: "green",
statusCode: "200",
description: "Success. Returns the deleted webhook object as JSON.",
example: `{
"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"
]
}
}`,
},
{
color: "brown",
statusCode: "401",
description: "Error. Not authenticated.",
example: `{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}`,
},
{
color: "brown",
statusCode: "404",
description: "Error. Webhook not found.",
example: `{
"code": "not_found",
"message": "Webhook not found.",
"details": {
"webhookId": "The requested webhook does not exist."
}
}`,
},
]}
/>
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

View File

@@ -0,0 +1,55 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { APILayout } from "@/components/shared/APILayout.tsx";
export const meta = {
title: "API: Get Webhook",
description: "Learn how to retrieve a specific webhook by its ID via API.",
};
<APILayout
method="GET"
url="/api/v1/webhooks/[webhookId]"
description="Retrieve a specific webhook by its ID."
headers={[
{
label: "x-Api-Key",
type: "string",
description: "Your Formbricks API key.",
required: true,
},
]}
responses={[
{
color: "green",
statusCode: "200",
description: "Success. Returns a webhook object as JSON.",
example: `{
"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"
]
}
}`,
},
{
color: "brown",
statusCode: "401",
description: "Error. Not authenticated.",
example: `{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}`,
},
]}
/>
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

View File

@@ -0,0 +1,57 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
import { APILayout } from "@/components/shared/APILayout.tsx";
export const meta = {
title: "API: List Webhooks",
description: "Learn how to retrieve a list of all webhooks via API.",
};
<APILayout
method="GET"
url="/api/v1/webhooks"
description="Retrieve a list of all webhooks."
headers={[
{
label: "x-Api-Key",
type: "string",
description: "Your Formbricks API key.",
required: true,
},
]}
responses={[
{
color: "green",
statusCode: "200",
description: "Success. Returns an array of webhook objects as JSON.",
example: `{
"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"
]
}
]
}`,
},
{
color: "brown",
statusCode: "401",
description: "Error. Not authenticated.",
example: `{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}`,
},
]}
/>
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

View File

@@ -0,0 +1,26 @@
import { Layout } from "@/components/docs/Layout";
import { Fence } from "@/components/shared/Fence";
export const meta = {
title: "Webhook API Overview",
description: "Learn how to use the Formbricks 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.
2. **Create a New Webhook:** Add a new webhook to your system.
3. **Get a Specific Webhook:** Query the details of a specific webhook using its unique ID.
4. **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.
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

View File

@@ -10,7 +10,7 @@ import BestPractices from "@/components/shared/BestPractices";
const IndexPage = () => (
<Layout
title="Formbricks | Embedded User Research"
title="Formbricks | Privacy-first Experience Management"
description="Build qualitative user research into your product. Leverage Best practices to increase Product-Market Fit.">
<Hero />
<div className="hidden lg:block">

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