Compare commits

...

932 Commits

Author SHA1 Message Date
github-actions[bot]
fc0feda5e9 Release formbricks-js 1.0.1 (#625)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-31 16:44:56 +02:00
Matti Nannt
3d0d633bc8 Fix new Session event not triggered every time a new session is created (#624)
* Fix new Session event not triggered every time a new session is created

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

* Fix session creation endpoint throw unexpected error
2023-07-31 11:59:21 +02:00
Matti Nannt
38d3de2165 Add sentry error reporting (#619) 2023-07-31 10:26:59 +02:00
Matti Nannt
5d380a4986 Fix smileys in rating questions not showing in Safari Browser (#618) 2023-07-30 21:23:02 +02:00
Matti Nannt
e32e47e272 Fix: Disable autoFocus when embedded with iframe (#615) 2023-07-28 21:08:45 +02:00
Moritz Rengert
e864829a79 Fix: Logic Jumps stop working when options get renamed (#540)
* update logic values if multi select options change

* run pnpm format

---------

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

* ran pnpm format

* update data.id explanation, reformat

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-28 10:41:21 +02:00
Shubham Palriwala
469590c2f6 Add Quickstart for self-hosting using automated Shell Script (#613)
* feat: poc

* merge: individual docker-compose files

* fix: nits

* feat: postgres now only accessible internally

* feat: emoji time

* cleanup: my commented commands

* better emoji and warning on domain name

* fix: better handling of docker check

* feat: follow principle of least privilege and remove excess sudo in commands

* feat: read machine name dynamically

* feat: documentation for prod script

* feat: remove custom networks in the docker compose

* cleanup: comments in script

* update emojis to fix spacing

* attempt: new groyp

* attemp: move new group command at end for the ability to parse vars

* feat: it all works without sudo yay

* feat: cleanup docs as suggested

* documentation: self hosting for prod script

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-26 16:12:33 +02:00
Dhruwang Jariwala
a165143c2a Add Input Validation to the Survey Editor (#588)
* added validation to survey edit

* made refactors

* extracted validation rules into a single object and resolved draggable issue

* ran pnpm format

* fixed a validation bug

* fixed similar  validation bug in other component

* implemented default and specific validation

* made some code refactors

* handled case where a question is deleted

* instead of storing questionIdx now we are storing question id in invalidQuestions array && ran pnpm format

* removed unused comment

* run pnpm format

* made requested changes

* removed unused export

* add types to validation.ts

* run pnpm format

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-25 11:27:09 +02:00
Meet Patel
6b3f977d83 Store current Url in the responses meta data (#566)
* url add to link-survey

* fixed

* fixed

* fixed

* fixed

* ran pnpm format

* make url optional in response input to not break existing integrations

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-24 17:05:54 +02:00
Salim B
f743fb18fb Fix Formatting in Docker Readme (#608)
Fix formatting
2023-07-24 10:57:14 +02:00
Moritz Rengert
e5d06de68e Fix multiple NPS questions in one survey not working (#596)
* clear nps question on submit

* fix onboarding color picker

* update onChange to onClick for NPS Questions

* update border color

* remove console.log

---------

Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-21 17:00:29 +02:00
Matti Nannt
49f61e2eeb Fix pnpm go bug and format code (#605) 2023-07-21 16:58:48 +02:00
Yash Gupta
4763cf3217 Enhance Github Issue Templates for better usability (#594)
* feat: adds enhanced bug report github page and removes md version of it

* feat: adds enhanced feature request .yml github page and removes .md version of it

* refactor: makes the Desktop field as md editor on Bug Report Github Page

* refactor: converts the Environment field as checkbox on Bug Report Github Page
2023-07-21 16:48:44 +02:00
Matti Nannt
b6a0d0fe5d Add OSS friends api endpoint (#604) 2023-07-21 16:44:41 +02:00
Matti Nannt
9be053d8a6 Fix: Add revalidation to surveys overview page (#601) 2023-07-21 15:19:29 +02:00
Matti Nannt
3a17c6b085 Fix errors in pnpm go script dependencies (#600) 2023-07-21 15:12:12 +02:00
Johannes
16b7e0d82a Improve Weekly Summary Email (#584)
* fix bugs in weekly

* fix CTA

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

* Fix response notification not working

* fix response meta schema

* fix typo in docs

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

* remove groups, add revalidation to action/attributes pages
2023-07-18 12:53:40 +02:00
Shubham Palriwala
3824d95151 Move Actions & Attributes pages over to server components (#495)
* feat: server rendering of event actions summary page & server actions

* chore: renaming event to action and minor refactoring

* fix: logging message

* delete: unnecessary file

* feat: migrate attributes overview page

* feat: impl grouped page & layout, logically differentiate attributes and actions

* pnpm format

* fix: logical addressing of dirs and minot bugs

* move: actionsAndAttributes navbar to dedicated dir from components

* fix: use server-only build-time checks and move actionsAttributes navbar

* revert: unnecessary docker compose changes

* resolve merge conflicts dynamically

* fix: address feedback comments

* use sparkles icon from heroicons

* fix updated action not updating in table

* remove async from client function due to warning

* move router.refresh in AddNoActionModal

* small rename

* feat: replace swr w server action in ActionSettingsTab

* replace custom error with ResourceNotFoundError error class

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-18 12:40:03 +02:00
Matti Nannt
5bfaad9484 Improve Folder Structure for App-wide Client-imports (#577)
* move posthog to new implementation

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

* fix: moves tag merge logic into transactions

* update tags settings icon

---------

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

* update all packages; pnpm format

* remove tsup from prisma

* add zod to prisma files

* delete tsup config

* improve pnpm go script, downgrade prettier

* update pnpm lock
2023-07-17 18:12:40 +02:00
Matti Nannt
cd49d687ad fix weekly summary cron workflow (#568) 2023-07-17 09:30:03 +02:00
Johannes
2852bf617a Fix ordering dropdown + Other input field
Fix ordering dropdown + Other input field
2023-07-16 09:04:22 -05:00
Johannes
30623d5fd2 fix order dropdown, other field and UX tweaks 2023-07-16 15:51:46 +02:00
Johannes
b673044890 Add Blog for v1 Release - How we got here
Add Blog for v1 Release - How we got here
2023-07-14 06:05:44 -05:00
Shubham Palriwala
bf9189c1af fix: docker compose url for curl (#557) 2023-07-14 13:00:57 +02:00
Moritz Rengert
e262006f7e Add Demo-Data to newly created teams (#521)
* create people and survey on team create

* create people and responses / displays

* drafting GPT input

* add attributeClass, eventClass and people

* fix link in person detail page

* fix email instead of uid

* added two surveys

* add events, 3 more surveys

---------

Co-authored-by: Johannes <johannes@formbricks.com>
2023-07-14 12:55:41 +02:00
Johannes
d44ea1f32d add v1 blog 2023-07-14 12:51:44 +02:00
Matti Nannt
e24f6cd017 Improve documentation (#552)
* update nextjs app docs

* remove prisma extendedWhereUnique from schema

* change button titles in pricing table

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

* fix billing page not showing current plan

* add revalidation constant
2023-07-13 20:28:48 +02:00
Ankur Datta
701a7d9786 [REFACTOR] survey-overview-page 2023-07-13 17:54:21 +00:00
Ankur Datta
4410b14d0c [ADD] services 2023-07-13 17:53:48 +00:00
Ankur Datta
cddbbc2be2 [ADD] server-actions 2023-07-13 17:53:09 +00:00
Ankur Datta
4fefa09ee8 [ADD] product-with-environment-type 2023-07-13 17:52:55 +00:00
Ankur Datta
09106188ba [FIX] zod-type 2023-07-13 17:52:18 +00:00
Matti Nannt
62c001cbee Update packages, Fix error getting current subscription plan (#549) 2023-07-13 18:23:31 +02:00
Shubham Palriwala
adef4c8762 Add Public Docker Image and Build Pipeline using Github Actions (#546)
* feat: github action to build and push to dockerhub on release

* feat: docker repo and quickstart readmne

* fix: check for NEXTAUTH_SECRET in dockerfile before running

* fix: check for NEXTAUTH_SECRET as null or not

* add deployment guide

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-13 17:33:54 +02:00
Dhruwang Jariwala
5d66a8b8f4 Improve Page Titles (#470)
* added metadata template

* created layout file in [survedId]

* changed Link to  <a> for complete reload of individual survey

* added prop types for generateMetadata

* added page titles for sub pages

* Replaced survey title with Your Surveys

* fix layout metadata not working with latest changes to getAnalysisData()

* run pnpm format

* add new analysis folder for common layout

* fix conflicts

* add metadata to integrations page

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-13 16:52:49 +02:00
gitstart-formbricks
ec80543a95 Add Filter-Functionality to Survey Analysis (#474)
* Extensive Filtering of Responses

* Delete .env

* fix scroll

* Delete .env

* add all-time date filter option

* increase filterOption max-width, update csv selection text

* fix consent question filter

* default onlyComplete to false

* move ResponseFilterContext to app dir

* show options when we switch surveys

* Delete empty .env file

---------

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

* add tracking, update weekly + email layout
2023-07-13 16:22:50 +02:00
Shubhdeep Chhabra
e21c2a45e0 Add option for random ordering of choices in multiple choice questions (#394)
* feat: added a option to set ordering of choices

* changed the parameter for random ordering and used Switch instead of Select

* added logic for shuffle

* added shuffleOption in zod schema and fixed some copy.

* run pnpm format

* make shuffleOption optional in zod to prevent errors in existing data

* made fixes as asked in peer review and ran pnpm format

* minor bug fixes

* Update env.mjs

* fix shuffleArray to not shuffle reference object

* update shuffle method

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-13 15:09:26 +02:00
Nitesh Seram
8ae8afec0d Fix long description overflow in questions (#466)
* Fix issue 427

* Address review comment

* jump back to top on long questions

* add to JS widget

---------

Co-authored-by: Seram Nitesh Singh <nitesh.s@auzmor.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2023-07-13 12:03:53 +02:00
Moritz Rengert
dceb8842d3 Fix prevent duplicate team invite (#536)
* check for existing invites

* add success / error toast on invite

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

* keep invite token when switching between signup and login
2023-07-13 11:54:47 +02:00
Johannes
257287cefc Fix owners should not be deleted from the team (#543) 2023-07-13 11:24:23 +02:00
Matti Nannt
a4a771ba70 Fix multiple client-side errors in formbricks-js 2023-07-13 11:17:04 +02:00
Matti Nannt
8ea6016cf5 Sync surveys and events with formbricks-js automatically (#537)
* add first part of sync service

* add actionClasses to js sync

* fix errors, add product to sync

* rewrite formbricks-js for new states and types

* fix tests

* fix build errors

* add cors

* fix cors errors and other bugs

* comment test in checks until working again
2023-07-13 00:49:58 +02:00
Dhruwang Jariwala
cfedd0f4b8 Add 'pnpm go' command for better DX (#538)
* added go script

* let turbo manage go command

* delete unused READMEs and update contribution docs

---------

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

* [ADD] methods

* [Rearrange] with-server-component

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

* [FIX] zod-types-normalized

* pnpm format

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

* [RM] PreviewSurveyServer

* [TMP]

* [CHANGE] file-name-hack

---------

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

* added type defs

* pnpm format

* fix LogicEditor fields not updating properly

---------

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

* regenerate pnpm-lock
2023-07-11 13:21:14 +02:00
Pradumn Kumar
57a64d7940 Survey Completed message shown to the enduser can now be customized (#464)
* feat: added surveyClosedMessage field to database and also added it's types

* feat: added the custom closed message to the frontend

* fix: fixes build issue

* fix: refactored the code to toggle surveyClosedMessage and redirectUrl

* pnpm format

* recreate prisma migration

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-11 13:12:45 +02:00
gitstart-formbricks
269a504780 Fix typo in product name replace in template (#520)
* fix product name typo in template

* revert unwanted change.

---------

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

* added state and handlers for closeOnDate

* closeDate -> closeOnDate

* added endpoint for CRON to close surveys

* resolved migrations

* fixed datetime format

* removed warnings

* PR review changes

* resolved merge conflicts and package update

* add github workflow for cron

* change migration order

* change migration order

* add zod types for closeOnDate

---------

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

* fix build error

* fix UX issues
2023-07-11 12:29:50 +02:00
Johannes
4908bc77bd New Hero Graphic for Landing Page
New Hero Graphic for Landing Page
2023-07-11 03:37:11 -05:00
Johannes
20ec66481b update graphic and copy 2023-07-11 10:32:33 +02:00
Moritz Rengert
c912ebd42a Fix expired member invites are not displayed properly (#475)
* add expiresAt prop to members call

* add expired badge in addition to pending in members list

* check for expired on invite link

* fix type error

* update invite expired message

* remove console.log

---------

Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-11 10:14:58 +02:00
Moritz Rengert
1b0327edd4 Allow questionId to be changed for newly added questions (#476)
* add isDraft=true to all new questions and remove it on save

* update button to show on draft questions

* re-add input validation

---------

Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-11 10:07:19 +02:00
tyjkerr
ce8a8df091 Fix summary showing NaN values when adding new Consent or CTA question (#518) 2023-07-11 09:54:59 +02:00
Matti Nannt
7be6879afb add SurveyId filter option to responses endpoint (#517) 2023-07-10 17:03:36 +02:00
Matti Nannt
04ec0a6827 Extend Webhook with surveyIds filter (#512)
* add surveyIds filter to webhooks. Use triggers array instead of single trigger

* include webhook id in webhook payload

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

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

* fix env variables that should be optional

* update gitignore

* add vercel ignore
2023-07-07 15:58:15 +02:00
Johannes
ffb9fd659f Merge pull request #497 from formbricks/lp/fix-landing
fix lp & update blog
2023-07-07 07:04:11 -05:00
Johannes
40dfea070c fix lp & update blog 2023-07-07 13:54:16 +02:00
Johannes
ec1f940d48 Merge pull request #496 from formbricks/lp/add-github-blog
Add GitHub Acc blog post, update lp
2023-07-07 06:18:29 -05:00
Johannes
749fdd684a fix build error 2023-07-07 13:07:43 +02:00
Subhodip Roy
60c96fe3f9 Build Display service and rebuild display endpoint in app directory (#432)
* created new create-display and updated display endpoints with zod, db service-layer, and next.js route handlers

* changed the api URL and changed few type definations

* new getTeamDetails service is created which will be further used by display and response endpoints

* changed the prisma call with getTeamDetails service

* created display services and zod validation schema

* removed envId from func parameter

* fix build error by adding a type annotation

* Moved the return inside try block

* Removed comments

* changed the update display service name to markDisplayResponded

* Update route.ts

* reference person type in display, check response code first then transform to json

* add createdAt & updatedAt to person when query display

* pnpm format

* small optimizations

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-07 12:28:47 +02:00
Johannes
81ea563dbc update lp, add blog post 2023-07-07 12:14:57 +02:00
Meet Patel
4cc085cecf questionid can not be empty 2023-07-06 21:46:31 +05:30
Johannes
561afcc8fb Merge pull request #478 from gupta-piyush19/feature/consent-prefill-added
feat: Added prefill for consent question type and fixed the loader bug
2023-07-06 10:11:52 -05:00
Bhaskar Singh
9e9db7103e Add Weekly Summary Feature (Beta) (#431)
* Added Notification API

* Added Email functionality to the weekly
notification

* Added no live survey email notification

* Activating weeklySummary notification alertSwitch

* Adding check to include only surveys which
have weeklySummary enabled

* Updated the condition for weekSummary
notification check

* update UI

* Update to reduce number of database calls

* Updated the email subject when no survey in weeklysummary

* applied pnpm format

* update notification settings with new types and fix functionality

* loop through all products to send weekly summary email, colocate files

* fix build errors

* add more types

* add vercel.json for cron configuration

* remove console.logs, limit responses to 5 per survey

* update email subject

* improve how responses are displayed in summary email

* update email layout

* add cron to github action instead of vercel

* add github action

* add beta flag

---------

Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-06 15:47:33 +02:00
Matti Nannt
896e91a38b add product information to api/v1/me endpoint (#494) 2023-07-06 14:36:39 +02:00
Dhruwang
8283a7d2ed restored a css class 2023-07-06 17:08:40 +05:30
Dhruwang
08fe6b0ad8 changed id name to previous one 2023-07-06 16:23:08 +05:30
Dhruwang
8eae9fc846 resolved empty password field issue 2023-07-06 16:18:40 +05:30
Dhruwang
5ae6130e89 added password validation in reset password form 2023-07-06 16:17:30 +05:30
Matti Nannt
47b9867f28 Fix autoComplete survey schema validation (#491) 2023-07-06 11:58:16 +02:00
Shubham Palriwala
8585cb8c7c Add Timestamps to person model (#490) 2023-07-06 10:26:53 +02:00
Meet Patel
82bcc0ae7e space not allowed in questionid input 2023-07-05 20:41:48 +05:30
Matti Nannt
33811f9349 Improve Authorization Checks in Layout (#487) 2023-07-05 16:01:45 +02:00
Matti Nannt
4e1d905c9e Fix people service loading time (#485)
* Fix people service loading time

* run pnpm format
2023-07-05 15:19:54 +02:00
Johannes
e840816567 Merge pull request #484 from joe-shajan/fix_user_email
too easy for you ;) Thanks!! 🙌 🙌 🙌
2023-07-05 06:47:10 -05:00
Shubham Palriwala
dbec5426b2 Move people page to server components (#479)
* feat: person overview is now a server rendered page

* feat: loader component & fix: minor changes as suggested

* hide: session count

* getAttributeValue always returns string

* fix: remove createdAt & updatedAt fields from user for now

* fix: use select instead of include to specify retreival fields

* feat: suspense streaming

* feat: skeleton table for streaming and loading

* fix: use integrated loading and cleanup components

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-05 13:06:37 +02:00
joe-shajan
5162a84246 fix: display user email in responses 2023-07-05 16:24:34 +05:30
Johannes
419b9d0b90 Add Link Prefilling, UserId Prefilling and Nextjs App Dir Setup to Docs (#480)
* fix EventClassesList table

* doc update

* update docs

* update nextjs docs

* update prefilling docs with url encoding

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-05 12:45:28 +02:00
Moritz Rengert
183ce34cad Fix Consent Question Summary not displayed (#482)
* enable consent summary

* fix type error

* fix Consent Summary to use dismissed instead of skipped and move to Server Component

* change Skipped to Dismissed in UI

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-07-05 09:43:11 +02:00
Matti Nannt
a9f4d4e28b Dev Experience Performance Improvements (#481)
* only add packages once to their main package and remove them from other packages to avoid version conflicts

* update package versions

* update package versions, clean packages

* remove old vscode settings

* exclude formbricks-com from pnpm dev

* narrow down tsconfig includes, pnpm-lock update

* add pnpm test to github action
2023-07-04 20:54:41 +02:00
Piyush Gupta
751d729242 feat: Added prefill for consent question type and fixed the loader bug 2023-07-04 13:54:40 +05:30
Johannes
c8c6d922c3 zapier subpage 2023-07-03 16:14:31 +02:00
Johannes
dbe9a9aa02 Merge branch 'main' of github.com:formbricks/formbricks into feature/integrations 2023-07-03 15:55:39 +02:00
Johannes
175736bb4b Merge pull request #472 from formbricks/lp/remove-github
remove GitHub Deal
2023-07-03 07:58:25 -05:00
Johannes
d3724fa9fc remove GitHub Deal 2023-07-03 14:52:32 +02:00
Matti Nannt
db0b673965 Fix formatting issues (#471) 2023-07-03 11:37:08 +02:00
Johannes
fadd56102b Merge pull request #469 from formbricks/jobenjada-patch-1
fix images
2023-07-03 04:08:21 -05:00
Johannes
f38c897e2a fix images 2023-07-03 04:08:09 -05:00
Johannes
70ac575fcf Merge pull request #468 from formbricks/jobenjada-patch-1
Add dark mode images
2023-07-03 04:03:08 -05:00
Johannes
c1815007d1 Add dark mode images 2023-07-03 04:02:59 -05:00
Johannes
8188b85335 Merge pull request #467 from formbricks/jobenjada-patch-1
Update images in ReadMe
2023-07-03 03:57:22 -05:00
Johannes
00a4919b5a Update images in ReadMe 2023-07-03 03:56:32 -05:00
Johannes
81b4624649 Add Feedback Box to Formbricks Cloud (#461)
* add feedback box

* only show product feedback on cloud

---------

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

* fix internal server error with incorrect api key
2023-07-02 22:32:20 +02:00
Timothy Krechel
f4349d348a fix README.md for dev setup 2023-07-02 12:29:48 +02:00
Johannes
95f588d5d1 update link and ui 2023-06-30 18:47:01 +02:00
Johannes
fb909938f9 Merge pull request #460 from formbricks/fix/response-options
Fix/response options
2023-06-30 10:57:57 -05:00
Anshuman Pandey
46b7183161 Improve Tag feature with better error handling and animations (#449)
* fix: adds animation on duplicate tag

* fix: fixes error data flow

* fix: fixes tag getting animated on all errors

* fix: changes icon to heroicons

* fix: fixes error being thrown when adding duplicate tag

* fix: fixes responses not getting refetched
2023-06-30 17:40:25 +02:00
Johannes
4610a46b5b Merge branch 'main' of github.com:formbricks/formbricks into fix/response-options 2023-06-30 17:24:50 +02:00
Matti Nannt
f7aea59f80 fix error during onboarding when environment not fully loaded (#459) 2023-06-30 17:22:19 +02:00
Johannes
31e4965355 Merge branch 'main' of github.com:formbricks/formbricks into fix/response-options 2023-06-30 17:16:30 +02:00
Johannes
b86f837e78 fix response card not visible 2023-06-30 17:12:59 +02:00
tyjkerr
1d76365f04 Add Option to Display Invite Link in Team Settings (#452)
* add share link feature

* add grid-cols-20 in tailwind.config

* update edit members section styles

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

* remove prisma studio from database package scripts
2023-06-30 16:46:53 +02:00
Shubham Palriwala
d67858e2ea Add tests to formbricks-js (#399)
* init: jest for formbricks/js

* test: formbricks init

* test: formbricks set attributes

* test: formbricks updated attributes

* test: formbricks track, refresh, route change

* test: formbricks logout

* chore: use strict checking & replace let w const

* chore: destructure variables

* feat: test coverage visibility

* updated: pnpm lock file

* feat: tests now use a mock API

* fix: mock actual formbricks survey response and not empty placeholders

* rename: unit test for clarity

* chore: destructure setting attributes into individual tests

* feat: mock console logger for cleaner cli during tests

* add top level test script for turbo

* update babel config to fix errors in formbricks-js build

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-30 16:29:38 +02:00
Moritz Rengert
888d10434a Add option ask for short answers in Open Text questions (#435)
* feat: add shortAnswer: boolean to OpenTextQuestion interface

* feat: add longAnswer switch to OpenTextForm

* toggle textare lines depending on question.shortAnswer

* fix type build error

* move long answer switch to baseline

* adjust spacing between switches

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

---------

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

* feat: add default values to consent question

* feat: add consent question form

* feat: add consent question to preview / link survey

* fix: clean consent question html

* feat: add consent question to js package

* feat: add consent to summary list

* fix build errors

* fix: remove skip button, add button label input

* feat: add checked logic option

* fix: add accepted option

* update consent form to match new advanced settings layout

* remove console.log

* hide accepted condition if consent is required

* fix build errors

* update consent question return values

* remove console.log

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

* remove logs display from demo;

* remove logs display from demo;

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-29 16:31:05 +02:00
Johannes
fa785fcafb Merge pull request #448 from PeerRich/patch-2
added contact link to readme
2023-06-29 09:04:53 -05:00
Peer Richelsen
1892b6df40 added contact link to readme 2023-06-28 20:14:04 +02:00
Matti Nannt
ef0c621e5e fix necessary hard reload on responses summary and list (#447) 2023-06-28 16:45:30 +02:00
Matti Nannt
4f12886bfc Fix userId prefilling not working properly (#446) 2023-06-28 15:35:41 +02:00
Moritz Rengert
8c838bc25c feature/position in app modal (#440)
* add placement enum and prop to db scheme

* enable placement toggle in setttings

* enable in-app survey placement demo

* add position helper function

* add placement to in-app-modal preview

* add placement prop to api endpoint

* add placement to widget

* remove coming soon

* add styling

* add apply tailwind styles instead of a ts function

* add clickoutside and darkoverlay prop

* add darkOverlay and clickOutside form

* update js package tailwind apply classes

* add background to widget and close on click outside

* only show backdrop and clickOutside if is center

* only display background when modal is centered

* responsive changes in js widget

* add updated migration, move styles from global.css to function

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-28 15:25:58 +02:00
Johannes
5bb1a0678a Merge pull request #445 from formbricks/lp/forward-deal
forward /deal
2023-06-28 07:56:15 -05:00
Johannes
e1f81636a3 forward /deal 2023-06-28 14:49:13 +02:00
Matti Nannt
9cc836a775 Clean up + Bugfixes (#443)
* format code

* fix building issue in database package

* update turbo config and package jsons

* update error package with more information and license

* fix typescript issues in ui package

* update package-lock

* update packages

* clean dependencies in web

* clean up dependencies in demo & formbricks-com

* remove unsused template file

* remove legacy capture endpoint

* remove unfinished client endpoints

* clean up unused functions

* fix formbricks not loading on invalid session

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

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

* relocate endpoint, add check for preview=true

---------

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

* made changes

* made submit button disabled on failing password checks

* removed submitted state and fixed typos

* redactored IsPasswordValid Component

* removed cursor-pointer from XCircleIcon

* added PasswordInput component

* made some refactors in PasswordInput component

* made eye icon lighter

* removed unsed code

* fix infinite state updates

---------

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

* resolved migration error

* added redirect timer and url check

* rename redirectLink to redirectUrl

---------

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

* feat: add user agent to meta

* feat: parse ua

* feat: add tooltip

* fix: type

* fix: empty tooltip

* fix: typo

* add simple formatting to tooltip text

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-26 11:42:42 +02:00
Matti Nannt
c853f8db2c fix deleted responses still shown in frontend (#436) 2023-06-26 09:25:36 +02:00
Matti Nannt
8486e516b6 Move Summary & responses page over to serverside data-retrieval (#433)
* use new services for server-side data retrieval in survey responses & summary

* fix build errors

* add notes to response schema

* add response notes

* fix type conflicts

* add tag functionality

* run pnpm format

* fix tag state not updating correctly
2023-06-25 17:26:17 +02:00
Anshuman Pandey
2e662f98b9 Add tagging functionality to responses (#426)
* fat: added prisma model for Tag

* feat: adds api route for tags

* fat: added prisma model for Tag

* feat: adds mutation hook for creating a tag

* feat: adds apis for creating and retrieving tags

* feat: adds sample UI for creating and retrieving tags

* feat: adds UI components for Combobox

* feat: adds api router for fetching all tags for a product

* feat: adds combobox and api for appending tag to a response

* feat: adds api call for removing a tag from a response

* fix: relaced normal post with swr mutations

* fix: mutations for adding and deleting tags

* feat: integrated the create and delete tags apis and combobox

* fix: fixes api routes and db queries for tags apis

* fix: fixes api routes and headers

* feat: adds tag delete functionality

* feat: adds update tag api and UI

* feat: adds tags count api and integration

* feat: inital UI for tags table

* fix: UI for autosave name component

* fix: fixes api response

* fix: fixes errors on merge tags

* fat: added prisma model for Tag

* fix: replaces lodash.debounce with lodash

* fix: fixes capital letter tags not getting added

* fix: changed tag table to relate to environment

* fix: migrated tag apis from product to environment

* fix: formatting with prettier

* fix: fixes tags interface in single response

* fix: fixes UI bugs

* fix: fixes text on no tags

* fix: deleted local migrations

* fix: synced migrations with main

* fix: fixes combobox bugs

* fix: fixes placeholder

* update migrations

* fix build issues

* fix tag adding functionality

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-25 15:43:54 +02:00
Ashutosh Bhadauriya
7ed24c9f49 Add 50% Scroll & Exit Attempt Automatic events to trigger surveys (#393)
* Add exit intent and scroll depth automatic actions

* Remove lorem ipsum text

* Modified event listeners to not get called if survey is already running

* Add trackEvent inside event listeners

* Remove lorem ipsum

* Move event listeners to init

* Fix exit intent listener

* Modify event listeners to get called everytime and change exit intent text

* Add missed files

* Move events to separate file and add name check

* Add name check

* Fix build error
2023-06-23 12:17:37 +02:00
Ankur Datta
c224e7995d Add option to copy surveys to other environments (#392)
* Add option to copy surveys to other environments

---------

Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-23 11:48:28 +02:00
Johannes
a1bbe5c5fb Merge pull request #428 from formbricks/remove-career
remove careers page, update remaining CTAs
2023-06-22 09:40:27 -05:00
Johannes
5b34304cfc fix build error 2023-06-22 16:30:36 +02:00
Johannes
e15309a080 remove careers page, update remaining CTAs 2023-06-22 16:04:07 +02:00
Joe
25b84102a7 Check for unsaved changes in Survey Editor before changing pages (#409)
* fix: remove environmentsNavbar on survey editor

* objects deep comparision utility function

* feat: confirm on window reload or close

* feat: confirm save on back

* feat: custom alert dialog

* remove radixui alert dialog

* replaced shadcn alert with new custom alert dialog

* fix: save button varient to darkCTA

* fix: moved beforeunload logic to surveymenubar

* fix: remove deepequal function

* installed lodash

* fix: survey not comparing on change

* fix: isqual import
2023-06-22 08:44:04 +02:00
Pradumn Kumar
6922b3ed3f Add snapshot of user attributes to a response (#403)
* feat: added current person attributes to the user response

* feat: added tooltip showing user attributes in response view

* fix: switched to using the service layer and added annotations for json field

* rename PersonAttributesData to ResponsePersonAttributes to fit current naming scheme

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-21 13:02:55 +02:00
Nitesh Seram
08717cd396 Add NEXT_PUBLIC_INVITE_DISABLED env variable to disable invite functionality (#373)
* Add env variable to check for team invite

* Check for only public invite env for invite

* Disable Add Member and block the invite API

* Change the invite disabled condition

* Update the condition for env variable

---------

Co-authored-by: Seram Nitesh Singh <nitesh.s@auzmor.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-21 11:53:37 +02:00
Ankur Datta
8cfc1878fb Add iFrame Embed Option for Link Surveys (#414)
* add-embed-share-survey

* rm-use-client

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

* make zod survey schema more readable by using enums
2023-06-20 22:31:47 +02:00
Matti Nannt
455e0779a5 fix compatibility issue with new pnpm version (#421) 2023-06-20 17:09:19 +02:00
Piyush Gupta
51e4221f33 Add QuestionType enum in place of strings (#420) 2023-06-20 16:32:03 +02:00
Francois Disubi
8f1b7ae83a Add Delete Account functionality (#363)
* feat: add deletes account button on profile section.

* feat: add delete account action when user click on delete account button

* feat:logout user when his account is deleted

* feat: added warning message before user deletes account

* feat: add description to Delete account
 section

* fix: fix: build issue.

* fix: avoid giving the ownership of a team to a member who is not an admin

* fix: merge conflict

* fix: use !== in delete button disabled prop

* fix: typo semething -> Something

* refactor: simplified user deletion logic

* refactor: explain user deletion logic

* refactor: remove unecessary delete membership queries

* feat: add deletes account button on profile section.

* feat: add delete account action when user click on delete account button

* feat:logout user when his account is deleted

* feat: added warning message before user deletes account

* fix merge conlicts

* update to  delete info text

* feat: delete the team if the owner deletes his account and the team has no admins

* add await
2023-06-20 14:33:14 +02:00
Neil Chauhan
27023eacf8 Add roles to users you invite to your team (#404)
* Add method to check if user is admin or owner

* Add method to enable role based member invites

* Add Select Control element to UI to handle role based invite

* Add flag to allow add member feature for owner or admin level users only

* Fix error with role select element

* Add UI view to modify membership

* Add RoleElement component to handle the Role display

* Integrate api for Updating Accepted Member Role

* Integrate api for Updating Invitee's Role

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

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-06-15 09:53:56 +02:00
Johannes
f713591083 Merge pull request #374 from Ashutosh-Bhadauriya/feat/add-user-roles
Feat: Add a column to add user roles and added useMemo in attributeclassesList
2023-06-14 11:25:23 -05:00
Matthias Nannt
1334e7a3f9 fix bug creating responses, improve error handling in survey service 2023-06-14 17:55:04 +02:00
Matthias Nannt
a5e426109b Merge branch 'main' of github.com:formbricks/formbricks into feature/FOR-772 2023-06-14 17:23:53 +02:00
Ashutosh-Bhadauriya
7554ab4d97 Feat: Add a column to add user roles 2023-06-14 20:52:47 +05:30
Matthias Nannt
1ef49f6fae rewrite single response client endpoint with new error classes to minimize prisma calls 2023-06-14 17:19:31 +02:00
Matthias Nannt
b7f72fe111 update services with new error classes, update responses endpoint with new error classes and the right response codes 2023-06-14 17:08:02 +02:00
Matti Nannt
bbec1c9066 fix build errors in docker container (#370) 2023-06-14 14:49:50 +02:00
Matthias Nannt
0feaadcbc9 add new error classes, add types and services for api keys, use new error classes in webhook api 2023-06-13 15:07:15 +02:00
Johannes
a6f3bb8f87 Merge pull request #367 from formbricks/patch/note-height
update note height and fix multiple choice zod
2023-06-13 06:28:45 -05:00
Johannes
a4274da003 update note height and fix multiple choice zod 2023-06-13 13:25:24 +02:00
Johannes
eb1f4b0f0d Merge pull request #365 from Ashutosh-Bhadauriya/feat/add-attribute-archive
Feature: Add ability to archive attributes
2023-06-13 06:05:28 -05:00
Ashutosh-Bhadauriya
c5be453563 Increase badge margin and change button variant 2023-06-13 16:29:02 +05:30
Matti Nannt
c16708d12a Update webhook overview doc with more usage information (#366) 2023-06-13 12:16:26 +02:00
Ashutosh-Bhadauriya
46fadf9df0 Feat: Add ability to archive attributes 2023-06-13 15:16:57 +05:30
Johannes
7c53fa34f4 Merge pull request #344 from formbricks/FBRICKS-332
[FEATURE] Add a note to responses
2023-06-13 04:35:12 -05:00
Johannes
52a8d7beef increase width 2023-06-13 11:26:01 +02:00
Matti Nannt
842cb34942 Add Webhooks (#364) 2023-06-13 11:22:46 +02:00
Johannes
08038f292b Merge branch 'main' of github.com:formbricks/formbricks into FBRICKS-332 2023-06-13 11:20:46 +02:00
Johannes
424a2f1a69 tweak UI 2023-06-13 11:14:01 +02:00
Johannes
c1b1f6cacb Merge branch 'main' of github.com:formbricks/formbricks into FBRICKS-332 2023-06-13 09:42:18 +02:00
Matti Nannt
97263a66cc Add new client endpoints & webhook functionality (#355)
* add new zod schema for responses
* add new client endpoints for responses
* add services for responses and surveys
* add new responses model to webhooks & email

---------

Co-authored-by: Johannes <johannes@formbricks.com>
2023-06-12 19:51:13 +02:00
Johannes
85c3069155 Merge pull request #353 from formbricks/patch/add-overflow-to-survey
[ENHANCEMENT] Add scrolling to select question when too man options are added
2023-06-12 11:23:11 -05:00
Johannes
b6e99274fe Merge branch 'patch/add-overflow-to-survey' of github.com:formbricks/formbricks into patch/add-overflow-to-survey 2023-06-12 18:16:35 +02:00
Johannes
2278fc1477 fix survey layout 2023-06-12 18:15:26 +02:00
Johannes
26e2be43bc fix survey layout 2023-06-12 18:12:11 +02:00
Johannes
583dc7af2b remove chevron 2023-06-12 17:35:36 +02:00
Johannes
c6702cecb8 fix standalone links 2023-06-12 17:22:32 +02:00
Matthias Nannt
995de207fb update responseNotes lib to plural wording 2023-06-12 14:37:37 +02:00
Johannes
d970c121a5 fix single question 2023-06-12 13:59:37 +02:00
Johannes
369379e539 Merge branch 'main' of github.com:formbricks/formbricks into patch/add-overflow-to-survey 2023-06-12 13:57:47 +02:00
gitstart-formbricks
62e47507cd show response note by default 2023-06-12 11:54:07 +00:00
gitstart-formbricks
8c87957911 Merge commit '03e83caeb7bedbf38f1c01d404a9772a73f2187e' into FBRICKS-332 2023-06-12 11:53:59 +00:00
Johannes
51621dcaff add scroll indicator on iPhone 2023-06-12 13:50:59 +02:00
Johannes
03e83caeb7 Merge pull request #351 from Ashutosh-Bhadauriya/enhance/question-card-ui
Great work @Ashutosh-Bhadauriya - thanks! 🥳
2023-06-12 03:54:48 -05:00
AshutoshBhadauriya
f312783670 Remove logiceditor import 2023-06-12 14:23:28 +05:30
Matti Nannt
ef70e7363f Fix responsiveness issue for long questions FOR-760 (#358) 2023-06-12 09:41:05 +02:00
AshutoshBhadauriya
b3ab0ad12e Minor fixes 2023-06-10 13:54:46 +05:30
gitstart-formbricks
1e3204e063 align icons 2023-06-09 18:26:23 +00:00
gitstart-formbricks
855fd87dba Update styles 2023-06-09 16:55:41 +00:00
gitstart-formbricks
7b6b1b9edb update styles 2023-06-09 16:46:01 +00:00
gitstart-formbricks
a53e67ac7d Merge commit 'ba1a17578f91bae58a938936d120883a38ed34e3' into FBRICKS-332 2023-06-09 16:45:53 +00:00
AshutoshBhadauriya
e54d8f42fb Fix description 2023-06-09 21:34:21 +05:30
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
Matthias Nannt
d8f4ee598d add google provider to nextauth 2023-05-19 14:28:46 +02:00
Johannes
c6aabc77b4 Revamp sign up page (#288)
* New cleaner signup/login screen
2023-05-19 12:08:24 +02:00
Johannes
b9cdf329e3 fix checkmark color on disabled 2023-05-19 10:55:10 +02:00
Moritz Rengert
953f04b42a Fix Preview on Delete in Survey Builder & Fix Button Text on light brand color (#284)
* Fix Preview on Delete in Survey Builder
* Fix Button Text on light brand color

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-05-19 08:46:46 +02:00
Johannes
41443267c9 Revamp survey settings (#287)
* improve survey settings flow

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-05-19 08:33:52 +02:00
Matthias Nannt
b76289c9d8 remove console.log, add loading state to response delete button 2023-05-16 14:31:12 +02:00
Shubhdeep Chhabra
c352c9ff5d Add ability to delete products and responses (#276)
* #263 long strings edge cases fixed

* Add ability to delete products and responses

---------

Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-05-16 14:23:14 +02:00
Matthias Nannt
eea8500501 format & update README 2023-05-16 13:28:35 +02:00
Shubhdeep Chhabra
48f53a2120 localhost urls fixed in documentation (#286) 2023-05-16 09:48:51 +02:00
Matti Nannt
26b4fd9b3e Add Attribute Filtering to Surveys (#282)
* add attribute filtering to surveys

---------

Co-authored-by: Johannes <johannes@formbricks.com>
2023-05-15 17:28:37 +02:00
Johannes
80ae43646f Update README.md 2023-05-15 01:22:43 -05:00
Johannes
14ae404b0e fix best practices 2023-05-15 07:55:19 +02:00
Johannes
a652f0df9a fix onboarding in menu 2023-05-12 14:35:56 +02:00
Johannes
b5928e71e5 Add Best Practices to Landingpage (#281)
* Update landingpage
2023-05-12 14:25:17 +02:00
Matthias Nannt
9b38f9bf9a add clean command to all packages 2023-05-12 13:13:19 +02:00
Matthias Nannt
e3f5bba755 allow survey type to be changed after publishing 2023-05-11 19:43:08 +02:00
Johannes
fbfc80dd4e ux tweaks, add skip to product in onboarding 2023-05-11 13:54:33 +02:00
Matthias Nannt
e95407ca44 revert dockerfile to fix deployment issue 2023-05-11 07:15:15 +02:00
Matthias Nannt
0617157ccf Merge branch 'main' of github.com:formbricks/formbricks 2023-05-11 06:33:56 +02:00
Midka
1fdfdb585a Add types for common response types in the API (#270)
* add: WIP stuff for structured API responses

* revert: files with modified api responses

* fix: vscode not using @lib/ import
2023-05-10 20:48:46 +02:00
Johannes
423541e5d5 Merge branch 'main' of github.com:formbricks/formbricks 2023-05-10 16:57:38 +02:00
Matthias Nannt
59930ecac5 Merge branch 'main' of github.com:formbricks/formbricks 2023-05-10 13:35:19 +02:00
Matthias Nannt
68500de8bf update js package to 0.1.17 2023-05-10 13:35:03 +02:00
Matthias Nannt
c4ba0fe5d2 update js package to 0.1.17 2023-05-10 13:32:54 +02:00
Matti Nannt
3206637e22 Add Rating Question (Numbers, Stars & Smileys) (#271)
Add new Star Rating Question Type with different ranges and variations.

---------

Co-authored-by: moritzrengert <moritz@rengert.de>
2023-05-10 13:31:49 +02:00
Matthias Nannt
106afd12c3 update context-menu buttons in question card 2023-05-10 10:22:50 +02:00
Moritz Rengert
56e500397a feature/move question cards (#278)
* add moveQuestion function to handle index changes

* add dropdown arrows to context menu, disable on first / last element and call moveQuestion function

* fix: build error StartIcon typing

* fix: endIcon type for button
2023-05-10 10:08:00 +02:00
Matthias Nannt
58e5dc6e7b fix demo throws error when environment variables not set 2023-05-10 08:58:51 +02:00
Matti Nannt
60f7103198 Revert & gradually use updated files (#280)
* revert to last working version

* add updated ui components

* update formbricks-com components

* apply prettier formatting

* update apps/web files
2023-05-10 00:20:43 +02:00
Matti Nannt
ef4e5ed17a Fix Dev Environment Errors & Docker Deployment (#279)
* fix prisma errors
* add new database build process
* fix js widget needing @prisma/client
2023-05-09 20:12:48 +02:00
Matthias Nannt
520f282384 update type imports in @formbricks/js` 2023-05-09 15:33:39 +02:00
Matthias Nannt
bc4e2379cf update package-lock 2023-05-09 13:19:29 +02:00
Matti Nannt
650b674e24 update all packages, fix typescript errors (#277)
* simplify ui package, update all packages

* fix typescript errors that occur during build
2023-05-09 13:18:07 +02:00
Johannes
bfcc62e8ff issue toast after question id upate 2023-05-08 17:07:22 +02:00
Matthias Nannt
9b42808d6d update dependencies 2023-05-08 13:52:52 +02:00
Matthias Nannt
957a5b3e8c change webhook endpoint to only accept one trigger 2023-05-05 15:50:09 +02:00
Matti Nannt
325eda064e Add Webhooks for Zapier Integration (#273)
* add simple webhooks

* add pipelines endpoint to handle internal events
2023-05-05 10:53:54 +02:00
Matthias Nannt
eecb10e255 Merge branch 'main' of github.com:formbricks/formbricks 2023-05-05 09:57:53 +02:00
Matthias Nannt
8d38031b11 fix docker build errors, simplify docker file to fix startup issue, update nextjs 2023-05-05 09:53:25 +02:00
Johannes
d2c837b54f fix "other" option, add Ids for posthog 2023-05-04 08:54:38 +02:00
Matthias Nannt
ea084c3075 update packages in apps/web 2023-05-03 22:31:51 +02:00
Matthias Nannt
bac12eb552 add posthog to onboarding 2023-05-03 22:25:59 +02:00
Matthias Nannt
035652556d Merge branch 'main' of github.com:formbricks/formbricks 2023-05-03 16:59:23 +02:00
Matthias Nannt
f0aeed763a add simple me endpoint to api 2023-05-03 16:51:07 +02:00
Johannes
b84e54c63c fix "skip" in onboarding 2023-05-03 16:20:13 +02:00
Matthias Nannt
730296055b improve error resistence in environmentNavbar, fix memberships endpoint 2023-05-03 16:09:31 +02:00
Matthias Nannt
7b1edfe654 set previous brand color in onboarding if productname not already changed 2023-05-03 15:36:30 +02:00
Matthias Nannt
fe1314634a rename onboarding flag to fix onboarding not shown 2023-05-03 15:28:20 +02:00
Matti Nannt
04f536b7c6 Add support for Next.js Server-Components (#272)
* Add new env variable NEXT_PUBLIC_WEBAPP_URL that is used server-side for the current address

* Move Next-Auth to App-Directory

* Move Membership-API & User-API to App-Directory

* Update env-examples with new structure
2023-05-03 15:17:23 +02:00
Timothy
056ddff709 #586: Add new Onboarding for new & existing users (#266)
* add new onboarding for new and existing Formbricks users
* Add new personalized template view

---------

Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-05-03 14:00:11 +02:00
Johannes
d66c417bab fix double toast 2023-05-03 13:42:40 +02:00
Johannes
12bf20fe1f fix double toast on survey creation 2023-05-03 12:12:36 +02:00
Johannes
510231296e update survey created toast + link survey modal UI 2023-05-03 11:12:49 +02:00
Matthias Nannt
0509ac0e51 fix posthog pageview not firing with next-router 2023-05-02 16:22:13 +02:00
Matthias Nannt
63ce05d35e add surveyType to posthog response tracking 2023-05-02 15:36:54 +02:00
Johannes
478d4e16f8 Feature/duplicate surveys (#268)
* add duplicate to menu

* add duplicate survey API endpoint

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-05-02 15:33:45 +02:00
Matti Nannt
a0acc945b2 update docs pages for deployment and contribution with more detailed setup instructions (#269) 2023-05-01 18:17:05 +02:00
CJ
3426232b70 Fix responsiveness on summary page (#257)
* fix responsiveness on summary page
2023-05-01 15:39:00 +02:00
Shubhdeep Chhabra
ae0bf3e90d #263 long strings edge cases fixed (#267)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-05-01 15:24:48 +02:00
Johannes
13508f42be Add Team switch (#259)
* add team switch when user has multiple teams

* fix hydration error by changing the way env variables load

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-05-01 15:11:53 +02:00
Johannes
c20ca5e789 update variable names 2023-04-29 16:25:34 +02:00
Johannes
3de164623b add templates + objective 2023-04-29 16:20:04 +02:00
Johannes
efce2c106a ux tweaks 2023-04-28 16:27:47 +02:00
Moritz Rengert
bcd4f953ee Add Rating Question Type (numbers) (#256)
Add Rating Question Type (with numbers)

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-04-28 12:05:29 +02:00
Johannes
7e9b336954 Improve UX with multiple tweaks (#258) 2023-04-27 20:11:44 +02:00
Johannes
b01d2409de add Best Practices to Docs(#255)
* add Docs Feedback to Docs
2023-04-27 09:53:20 +02:00
Matthias Nannt
8a7f8eb94c update formbricks/js 2023-04-26 14:46:15 +02:00
Johannes
ddec12740d update docs template, adjust link survey width 2023-04-26 11:05:45 +02:00
Midka
09356bbded add: error handling to SDK (#240)
* improve error handling and add new `errorHandler` to sdk init function.

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-04-25 20:24:42 +02:00
Johannes
ad17ea957d added docs feedback (#251)
* add feedback button on every docs page

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-04-25 20:08:16 +02:00
Johannes
6ec3878c77 Merge branch 'main' of github.com:formbricks/formbricks 2023-04-25 19:21:53 +02:00
Johannes
6fd11fb54c replace ID with email if available 2023-04-25 19:21:22 +02:00
Matthias Nannt
47605493e9 update next features in README 2023-04-25 17:42:14 +02:00
Matthias Nannt
5b273cc194 add error message when action with same name already exists 2023-04-25 17:04:46 +02:00
Matthias Nannt
c81bfadb66 fix width in link surveys 2023-04-25 16:48:12 +02:00
Matthias Nannt
96ac6a2a6f add delete action functionality 2023-04-25 16:26:15 +02:00
Vishwash Bajpai
97e5398adf add functionality to make events editable after creating them (#245) 2023-04-25 15:42:42 +02:00
Matthias Nannt
29064b3bde fix build errors, fix z-index in sdk 2023-04-24 21:12:11 +02:00
Matthias Nannt
7abe1d877a Merge branch 'main' of github.com:formbricks/formbricks 2023-04-24 20:14:32 +02:00
Matti Nannt
7eefdd336c Add CTA Question Type (#246)
* add CTA question type together with new Text Editor based on Lexical and CTA summary

---------

Co-authored-by: moritzrengert <moritz@rengert.de>
2023-04-24 20:13:39 +02:00
Matthias Nannt
1a9400139c fix sdk bug on initialization 2023-04-24 12:06:52 +02:00
Matthias Nannt
501ce56de6 show different placeholder in link summary empty page filler 2023-04-20 15:43:52 +02:00
Matthias Nannt
9eb3f2e605 update GDPR page 2023-04-20 15:32:13 +02:00
Matthias Nannt
1b251b8ad0 reduce information posthog can receive 2023-04-20 15:18:48 +02:00
Matthias Nannt
e7e4406e91 fix formating issues in wording in privacy policy 2023-04-20 15:08:51 +02:00
Matthias Nannt
f6ea9f6375 improve wording in survey delete dialog 2023-04-20 15:02:43 +02:00
Matthias Nannt
90eaab9c9e remove posthog client on survey frontend 2023-04-20 15:00:15 +02:00
Matthias Nannt
9a494a3f8a fix link survey pausable when sdk not initialized 2023-04-20 12:56:16 +02:00
Matthias Nannt
5e6ac0a141 fix display event name 2023-04-20 12:50:52 +02:00
Matthias Nannt
d889775c56 add display track event to posthog 2023-04-20 09:54:45 +02:00
Matthias Nannt
ce0179a2c7 add legal footer to link survey 2023-04-19 16:39:48 +02:00
Matthias Nannt
d835e78d92 remove duplicated question types, update js sdk to 0.1.11 2023-04-19 16:03:26 +02:00
Matthias Nannt
8352d05d04 fix nps summary NaN bug, fix add question not working for some question types 2023-04-19 14:55:06 +02:00
Matthias Nannt
fbc1c74046 fix migrations 2023-04-19 14:36:54 +02:00
Moritz Rengert
48bac2128e Add NPS Question Type (#243)
Add NPS Question Type
---------

Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-04-19 14:28:58 +02:00
Moritz Rengert
d15d062581 Add MultipleChoice Multi-Select Question Type (#238)
Add MultipleChoice Multi-Select Question Type

---------

Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-04-19 13:38:23 +02:00
Johannes
72c6ea6f39 Updated Landingpage (#242)
* add /demo to LP

* add best practices

* add clovyr logo to lp

* new animation, best pracitces, CTA tracking, etc.

* update animation
2023-04-18 17:52:55 +02:00
Matthias Nannt
3b5ab29669 remove snoopForms from README 2023-04-18 13:36:47 +02:00
Matthias Nannt
793aff4585 update README 2023-04-18 13:34:33 +02:00
Matthias Nannt
8734127143 update surveyList template to make room for more infos 2023-04-18 12:04:19 +02:00
Matti Nannt
d2ee0d6a9a Add Link Survey Functionality (#239)
Users can now create & send link surveys to their customers.
2023-04-18 11:40:30 +02:00
Johannes
c9f5f8cd16 Update Pricing tables 2023-04-17 13:49:50 +02:00
Johannes
392bbfd911 landing page pricing 2023-04-17 13:23:32 +02:00
Matthias Nannt
a7fd1fc754 question id can now be changed in advanced settings 2023-04-17 12:21:17 +02:00
Matthias Nannt
c118fbb0bd add contributing guide to docs, update readme with simple roadmap 2023-04-17 10:40:41 +02:00
Matthias Nannt
d6868c3d40 fix add margins for survey modal FOR-596 2023-04-17 10:01:13 +02:00
Matthias Nannt
8ef8c93f3d fix response questions in wrong order FOR-558 2023-04-17 09:49:10 +02:00
Matthias Nannt
324a150a90 fix typo in module import 2023-04-16 15:39:56 +02:00
Matthias Nannt
1ec4dcb02d build free limit into formbricks cloud 2023-04-16 13:47:51 +02:00
Johannes
d470b6576f "events" -> "actions" 2023-04-14 20:54:57 +02:00
Matthias Nannt
3778ed80d4 add formbricks client to app 2023-04-14 17:51:28 +02:00
Matthias Nannt
87ee687d51 release formbricks-js version 0.1.10 2023-04-14 17:01:03 +02:00
Matthias Nannt
a917668b3a Merge branch 'main' of github.com:formbricks/formbricks 2023-04-14 16:56:14 +02:00
Matthias Nannt
e6d091d35e fix widget styling, add z-index, remove env to fix vercel error 2023-04-14 16:56:07 +02:00
Johannes
7ee8cb98e1 Merge branch 'main' of github.com:formbricks/formbricks 2023-04-14 16:11:19 +02:00
Johannes
3a2c697736 fix people list, display email instead of ID 2023-04-14 16:11:07 +02:00
Matthias Nannt
b28fad2ffa fix edit product name not showing in navbar 2023-04-14 16:08:40 +02:00
Matthias Nannt
6024cad566 fix "edit brand color" not showing FOR-581 2023-04-14 16:04:38 +02:00
Matthias Nannt
9e1a17a3ef fix build errors in formbricks-com 2023-04-14 15:53:00 +02:00
Matthias Nannt
da998d9820 fix logout not working FOR-562 2023-04-14 14:48:56 +02:00
Matthias Nannt
1bcdcee799 fix client error when survey builder contains no questions FOR-564 2023-04-14 14:26:36 +02:00
Matthias Nannt
1c58b0c95c update web dependencies 2023-04-14 14:22:12 +02:00
Matthias Nannt
0bbb9ad3d7 fix warnings on events overview 2023-04-14 14:00:14 +02:00
Matthias Nannt
5163f36e53 format files according to prettier config 2023-04-14 12:52:13 +02:00
Matthias Nannt
529bf4611c add z-index to js modal 2023-04-14 12:49:34 +02:00
Ramsay Sewell
29cf117fda #230: add required attr to multiple choice inputs (#232)
* add required attr to multiple choice inputs

* add required field to multiple choice preview components

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-04-14 09:29:48 +02:00
Johannes
50435413c3 github sponsorship + blog 2023-04-13 18:04:13 +02:00
Matthias Nannt
e614e4bd00 fix invite email in serveless functions 2023-04-13 12:47:58 +02:00
Johannes
3c31e5fe84 SEO listicle, all blog links in new tab 2023-04-12 23:48:03 +02:00
Midka
6cce82d9bf Update issue templates (#1) (#233) 2023-04-12 21:28:03 +02:00
Johannes
1bb5fcfcb2 update SEO descriptions 2023-04-12 15:27:17 +02:00
Johannes
4ddb09cd39 Merge branch 'main' of github.com:formbricks/formbricks 2023-04-12 14:34:23 +02:00
Johannes
0a6a12cacb SEO Health + descriptions 2023-04-12 14:34:19 +02:00
Matthias Nannt
76a4d49c2d update package json of js widget 2023-04-12 13:21:28 +02:00
Matthias Nannt
08229c1761 update JS Readme, release js 0.1.7, fix quickstart instructions 2023-04-12 13:08:27 +02:00
Moritz Rengert
a0baa25864 Feature Thank You Card (#222)
add thankyou card to surveys.

---------

Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-04-12 12:35:04 +02:00
Johannes
bc771bc188 Merge branch 'main' of github.com:formbricks/formbricks 2023-04-12 12:15:28 +02:00
Johannes
957a7b4b69 update price and docs 2023-04-12 12:15:13 +02:00
Johannes
64afd6ed00 Fixes radio to overwrite waiting time (#225)
* Fixes radio to overwrite waiting time

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-04-12 11:04:35 +02:00
Matthias Nannt
4f7fb96e3f add description to posthog attribute import 2023-04-11 17:58:12 +02:00
Matthias Nannt
065c0d352c only import attributes for existing users with posthog 2023-04-11 17:46:11 +02:00
Matthias Nannt
418bd956eb log users in posthog endpoint 2023-04-11 14:04:45 +02:00
Matthias Nannt
c510da3879 update posthog eventnames in export integration 2023-04-11 13:33:03 +02:00
Matthias Nannt
68cd7a9a81 add loading spinner to logout process 2023-04-11 10:52:16 +02:00
Johannes
357628b0d6 Feature create new products (#220)
* feat: add modal to add new product to current team

* feat: add create product endpoint and helper function

* feat: display available products in dropdown and include environmentId in request

* new icon

---------

Co-authored-by: moritzrengert <moritz@rengert.de>
2023-04-11 10:42:33 +02:00
Matthias Nannt
edc149417a update payment link for cloud 2023-04-11 10:19:04 +02:00
Johannes
028d1631bd remove console logs, tweak auth UI (#224) 2023-04-11 09:51:00 +02:00
Matthias Nannt
b62eaa7bb2 fix docker compose file 2023-04-10 09:24:28 +02:00
Matthias Nannt
a934fa3897 add stripe payment to cloud 2023-04-08 16:53:42 +02:00
Matthias Nannt
01a637d0f6 update information about cloud offering in Readme 2023-04-08 08:08:33 +02:00
Matthias Nannt
0560526b53 fix response summary / list not working without personId 2023-04-07 16:39:46 +02:00
Matthias Nannt
d12bb98f8c update html js link in docs and setup instructions 2023-04-06 17:32:18 +02:00
Matthias Nannt
1cb1687958 publish js widget v0.1.6 2023-04-06 17:29:20 +02:00
Moritz Rengert
fb404a8452 Add innerHtml and cssSelector No-Code Event Creation (#219)
* feat: make cssSelector and innerHtml available as noCode Events
2023-04-06 17:12:04 +02:00
Matthias Nannt
6e761b0a91 add migration 2023-04-06 14:51:23 +02:00
Matthias Nannt
5111efdfdf make personId optional in response 2023-04-06 14:47:53 +02:00
Johannes
764e16a1d8 update posthog auth 2023-04-05 17:49:59 +02:00
Johannes
3bbc4b7742 Merge branch 'api-keys' 2023-04-05 17:40:52 +02:00
Johannes
76276a7938 change auth of API 2023-04-05 17:37:07 +02:00
Matthias Nannt
8436e3d826 update github action release 2023-04-05 13:44:58 +02:00
Matthias Nannt
4e18b3f4e0 update checks github action 2023-04-05 13:43:24 +02:00
Matthias Nannt
3f4e53c5e3 update pnpm version in package.json 2023-04-05 13:39:21 +02:00
Matthias Nannt
55cf24a1c8 update github action 2023-04-05 13:35:24 +02:00
Matti Nannt
46e6a32a3a Add Posthog sync endpoints (#217)
* Add new API endpoints to sync events and persons with Posthog
2023-04-05 13:20:55 +02:00
Matthias Nannt
7802e1fbca update js dependencies 2023-04-05 13:08:49 +02:00
Matthias Nannt
a328e7902e update packages 2023-04-05 11:41:47 +02:00
Johannes
072a5947cf UI tweaks (#216)
* preview hint, warnings, survey status indicator

* add event in survey builder, add surveystatusdropdown

* update wording, add survey status toasts, update LP

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-04-05 11:28:46 +02:00
Matthias Nannt
5b1c4f7208 fix widget error not showing widget twice, fix bug in get client settings, update demo with feedback button 2023-04-04 15:39:55 +02:00
Matthias Nannt
070d69f094 small bugfixes, add simple posthog out endpoint 2023-04-04 15:10:08 +02:00
Matthias Nannt
1d39373117 add posthog app 2023-04-04 09:27:04 +02:00
Matthias Nannt
06233dd1bd update github linting action 2023-04-03 16:16:57 +02:00
Matthias Nannt
ca981ff7c2 remove console.log from posthog-app 2023-04-03 15:38:51 +02:00
Matthias Nannt
d11456b9b0 add posthog-siteapp, update widget logging 2023-04-03 15:25:19 +02:00
Matthias Nannt
54a6061748 fix build errors 2023-04-03 14:00:37 +02:00
Matthias Nannt
951b4e8d99 fix pricing desc in billing, add plan to user session, add permissions check to Invite API 2023-04-03 12:38:07 +02:00
Matthias Nannt
2d8fbbabfb Merge branch 'main' of github.com:formbricks/formbricks 2023-04-03 12:08:11 +02:00
Johannes
fdacc73c0c fix responsiveness logos 2023-04-03 12:08:01 +02:00
Matthias Nannt
ebc53e4bc8 bugfix widget init error, fix widget dark mode colors 2023-04-03 12:07:14 +02:00
Johannes
3780225a42 add social proof 2023-04-03 11:45:56 +02:00
Johannes
6d768913e3 add default light mode to app 2023-04-03 09:28:46 +02:00
Johannes
295b300654 update hero piece 2023-04-01 14:40:13 +02:00
Johannes
71f29406d8 add pricing to lp 2023-04-01 14:18:23 +02:00
Matthias Nannt
afb985b233 Merge branch 'main' of github.com:formbricks/formbricks 2023-03-31 18:02:01 +02:00
Matthias Nannt
d2f8c1ebd8 make personId optional in capture api call 2023-03-31 18:01:51 +02:00
Matthias Nannt
48e2026ef0 fix font in widget not showing in darkmode 2023-03-31 17:38:00 +02:00
Johannes
db4c50d834 broken teams link 2023-03-31 17:37:02 +02:00
Matthias Nannt
ce977aa927 Merge branch 'main' of github.com:formbricks/formbricks 2023-03-31 17:23:47 +02:00
Matthias Nannt
1051c9f779 update javascript snippet in setup instructions and docs 2023-03-31 17:23:38 +02:00
Matthias Nannt
26a4e2f710 fix widget window not found error 2023-03-31 16:56:03 +02:00
Johannes
afa055f004 fix typo 2023-03-31 16:43:11 +02:00
Johannes
5968d764ca fix /demo 404, update docs 2023-03-31 12:02:11 +02:00
Matthias Nannt
40fb28f5e1 switch telemetry identifier to random id on startup 2023-03-30 23:00:02 +02:00
Matthias Nannt
a8377c9b24 add Dockerfile, fixes in README 2023-03-30 22:21:00 +02:00
Johannes
fbcc9d5628 Update Docs, add Walkthrough Video to App & LP (#212)
* update LP with walk through

* update docs with attributes and events

* update team UI + form validation

* add walk through to app

* small fixes

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-03-30 17:24:04 +02:00
Matthias Nannt
a01b01d065 allow github profile images in next image 2023-03-30 13:51:43 +02:00
Matthias Nannt
b73939d9d0 fix home page not working with invalid session 2023-03-30 13:44:13 +02:00
Matthias Nannt
e2d76a6ba3 add legacy endpoint 2023-03-30 13:20:33 +02:00
Matthias Nannt
22d4120a2d update tailwind config to include @formbricks/ui 2023-03-30 12:02:17 +02:00
Matthias Nannt
3dcdc3a45b fix build error on vercel, fix types in invite api 2023-03-30 10:59:48 +02:00
Matthias Nannt
6e0cb443b6 fix github actions error in new packages 2023-03-30 10:15:30 +02:00
Matthias Nannt
1237749464 fix website github icon color 2023-03-29 23:55:13 +02:00
Matthias Nannt
d5ff4710d2 add docs redirect to first page 2023-03-29 23:52:32 +02:00
Matthias Nannt
c80154bb7d update cta on website 2023-03-29 23:50:10 +02:00
Matti Nannt
27d63c01e1 Introducing the new Formbricks (#210)
### New Formbricks Release: Complete Rewrite, New Features & Enhanced UI 🚀

We're thrilled to announce the release of the new Formbricks, a complete overhaul of our codebase, packed with powerful features and an improved user experience.

#### What's New:

1. **Survey Builder**: Design and customize your in-product micro-surveys with our intuitive survey builder.
2. **Trigger Micro-Surveys**: Set up micro-surveys to appear at specific points within your app, allowing you to gather feedback when it matters most.
3. **JavaScript SDK**: Our new JavaScript SDK makes integration a breeze - just embed it once and you're ready to go.
4. **No-Code Events**: Set up events and triggers without writing a single line of code, making it accessible for everyone on your team.
5. **Revamped UI**: Enjoy an entirely new user interface that enhances usability and provides a smooth, delightful experience.

This release marks a major step forward for Formbricks, enabling you to better understand your users and build an outstanding product experience.

Please update your Formbricks integration to take advantage of these exciting new features, and let us know in the Discord if you have any questions or feedback!

Happy surveying! 🎉
2023-03-29 23:34:29 +02:00
Matthias Nannt
bf45973ccf fix typo in blog 2023-03-25 16:21:36 +01:00
Matti Nannt
84d209fe4c Weekly update (#209)
* add new blog post
* remove old weeklys

---------

Co-authored-by: Johannes <johannes@formbricks.com>
2023-03-25 16:02:38 +01:00
knugget
462fa0c871 weekly-100323 🚢 2023-03-10 13:31:31 +01:00
knugget
ca35d4c734 change wording in email 2023-03-10 10:19:03 +01:00
knugget
ef13db666d fix label on Add API Modal 2023-03-06 09:24:12 +01:00
knugget
04e3d647d5 Merge branch 'main' of https://github.com/formbricks/formbricks into main 2023-03-03 16:21:37 +01:00
knugget
778d25c164 typo 2023-03-03 16:21:34 +01:00
Matthias Nannt
a47b20da2d fix feedback modal tab bug 2023-03-03 16:15:51 +01:00
knugget
f1c5fee91b update teaser 2023-03-03 14:58:48 +01:00
knugget
b584d3f9e4 weekly 030323 2023-03-03 14:19:18 +01:00
Matti Nannt
c13547af1a Cleanup 2023-03-03 13:57:44 +01:00
Matthias Nannt
4922c29fd2 fix filter navigation build error 2023-02-25 11:15:40 +01:00
Matthias Nannt
349868be40 Merge branch 'main' of github.com:formbricks/formbricks 2023-02-25 11:13:52 +01:00
Matthias Nannt
94487cf524 persist filters when tags are added/removed 2023-02-25 11:11:37 +01:00
knugget
a0271057ad Merge branch 'main' of https://github.com/formbricks/formbricks into main 2023-02-24 17:25:40 +01:00
knugget
ba5d7bffbe weekly-240223 2023-02-24 17:25:37 +01:00
Matthias Nannt
a62f5a7cbd fix build errors 2023-02-24 11:27:30 +01:00
Matthias Nannt
ce172c3b9e update packages to latest version 2023-02-24 08:52:22 +01:00
Johannes
318f14c4b2 Add tags (#208)
* add tag functionality to responses

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-02-23 19:26:24 +01:00
knugget
6cebf594b8 remove comment 2023-02-22 11:16:01 +01:00
knugget
f6f0d53435 relative time 2023-02-22 11:15:23 +01:00
Matthias Nannt
f1a2a6aadc add more pipelines to demo, pull demo data using function instead of object to be able to implement logic 2023-02-21 15:44:22 +01:00
Matthias Nannt
ea074425ef update custom survey docs 2023-02-21 14:43:15 +01:00
Matthias Nannt
b3007249df fix delete customer on demo page 2023-02-21 14:14:21 +01:00
Johannes
97dcccd6fc add deleteCustomer, fix view link in customer overview (#206)
* add deleteCustomer functionality

* add migration for cascade delete

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-02-21 14:07:02 +01:00
Sandra Dylus
54196faf46 Use auto-enumeration in README (#207)
Indent code blocks and texts in enumeration appropriately to make auto-enumeration work.
Use auto-enumeration (aka 1. for every enum item) to be more robust with respect to changes.
2023-02-21 13:00:02 +01:00
knugget
c56388c54b update custom survey docs 2023-02-21 12:36:54 +01:00
knugget
0ba85592ee custom survey docs 2023-02-21 12:27:23 +01:00
knugget
63f165c11f update submission counter, replace "results" 2023-02-21 12:04:19 +01:00
knugget
59e16f2550 update PMF setup manual 2023-02-21 11:46:29 +01:00
knugget
cbef066730 add loading spinner to auth buttons 2023-02-21 11:31:50 +01:00
knugget
44ac65f076 fix typo in PMF widget styling 2023-02-20 15:17:11 +01:00
knugget
43ddd8fd35 typo onboarding survey 2023-02-20 09:59:20 +01:00
Matthias Nannt
e57316f4c8 update weekly update 2023-02-17 23:35:56 +01:00
Matthias Nannt
04e259b07f fix typo in weekly update 2023-02-17 19:08:15 +01:00
Matthias Nannt
2408ba4588 update posthog user attributes 2023-02-17 19:04:59 +01:00
Matthias Nannt
564753af77 update posthog tracking to identify users by id 2023-02-17 18:46:03 +01:00
Matthias Nannt
88ad834ef9 fix build issues 2023-02-17 18:36:42 +01:00
Matthias Nannt
36933ad68a Merge branch 'main' of github.com:formbricks/formbricks 2023-02-17 18:29:51 +01:00
Matthias Nannt
25549f4064 update posthog tracking method 2023-02-17 18:29:40 +01:00
knugget
60a1407e0f weekly-170223 2023-02-17 17:49:29 +01:00
knugget
2449c66c22 typo and removed filter on superhuman page 2023-02-17 17:33:30 +01:00
knugget
4f9f7dbf39 add scrolling to submission overview table 2023-02-16 15:11:46 +01:00
knugget
d93a58ba18 fix responsive 2023-02-16 09:50:18 +01:00
Matthias Nannt
485d7cd47d update wording 2023-02-15 22:30:22 +01:00
Matthias Nannt
21c79c9efb update Pmf Superhuman view 2023-02-15 21:26:54 +01:00
knugget
81da4ea5c8 AI Summaries + first Step Superhuman 2023-02-15 17:27:45 +01:00
knugget
ea15e662bf Merge branch 'main' of https://github.com/formbricks/formbricks into main 2023-02-15 16:40:18 +01:00
knugget
84ed5e7f35 superhuman report 2023-02-15 16:40:15 +01:00
Matthias Nannt
7d1e73dfa8 edit main benefits in demo data 2023-02-15 16:34:02 +01:00
Matthias Nannt
ad46f14235 add more demo submissions and sample sentences 2023-02-15 15:19:28 +01:00
Matthias Nannt
04c6462f41 fix build errors 2023-02-15 13:17:40 +01:00
knugget
f01b7f688c Merge branch 'main' of https://github.com/formbricks/formbricks into main 2023-02-15 12:39:49 +01:00
knugget
d310ff7f80 update customer view, responses link to user 2023-02-15 12:39:46 +01:00
Matthias Nannt
2b64ab7139 bugfix filter navigation in superhuman dashboard 2023-02-15 12:15:28 +01:00
Matthias Nannt
4f5e023c52 Merge branch 'main' of github.com:formbricks/formbricks 2023-02-15 12:09:04 +01:00
Matthias Nannt
b3f060c77e fix filter navigation bug, fix to prevent archived show in SubmissionCounter 2023-02-15 12:09:00 +01:00
knugget
10df0a811d update email template 2023-02-15 11:00:49 +01:00
Matthias Nannt
8e887f5714 Merge branch 'main' of github.com:formbricks/formbricks 2023-02-14 14:54:22 +01:00
Matthias Nannt
98a1e8ac08 update github issue templates 2023-02-14 14:54:18 +01:00
Johannes
5c25980d82 Email templates (#203)
* add basic html template

* update email content

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-02-14 14:47:15 +01:00
Matti Nannt
5dc5f968d1 Update custom form layout (#204)
* add new layout for custom survey view

* make filterNavigation work without schema
2023-02-14 14:30:34 +01:00
knugget
0d82a21b8f Merge branch 'main' of https://github.com/formbricks/formbricks into main 2023-02-14 11:21:03 +01:00
knugget
9bc8148fd5 add scrollbar to submission overview 2023-02-14 11:19:25 +01:00
Midka
eb931720a8 add: support for custom error handling (#201)
* add: devcontaier (codespaces)

* add: custom errors & other stuff lmao

* fixes #199
2023-02-14 11:17:46 +01:00
Johannes
8f24f21b87 Prevent smartphone view + responsiveness settings for dashboards (#202)
* responsiveness PMF & FB dashboards

* prevent smartphone view

---------

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-02-14 11:14:34 +01:00
Matthias Nannt
afdc4f1ee9 update pmf survey dashboard with quick optimizations 2023-02-14 10:53:57 +01:00
Matthias Nannt
8a02ebc9db fix build error 2023-02-13 15:25:08 +01:00
Matthias Nannt
efdd2bd257 fix filter navigation by removing duplicates 2023-02-13 15:22:21 +01:00
Matthias Nannt
8e277e030a update posthog events to also submit form type 2023-02-13 15:13:08 +01:00
Matthias Nannt
52d5bb7c44 Merge branch 'main' of github.com:formbricks/formbricks 2023-02-13 14:52:18 +01:00
Matthias Nannt
261e3a59c9 add pins to filter navigation 2023-02-13 14:52:14 +01:00
knugget
709591ec33 pmf page btn tracking 2023-02-13 14:49:04 +01:00
Matthias Nannt
35da57d06d Merge branch 'main' of github.com:formbricks/formbricks 2023-02-13 14:01:48 +01:00
Matthias Nannt
1884655c85 rename pmf demo to product market fit demo 2023-02-13 14:01:32 +01:00
knugget
14a8ea9b2c Merge branch 'main' of https://github.com/formbricks/formbricks into main 2023-02-13 12:20:39 +01:00
knugget
6779cac4c4 update quick manual 2023-02-13 12:18:01 +01:00
Matthias Nannt
7e2b76216c Merge branch 'main' of github.com:formbricks/formbricks 2023-02-13 12:09:53 +01:00
Matthias Nannt
c2a272a072 update docs 2023-02-13 12:09:39 +01:00
Matthias Nannt
1f143dab22 fix pmf widget colors, add error alert 2023-02-13 11:57:09 +01:00
Matthias Nannt
35df900d70 update feedback docs 2023-02-13 11:48:38 +01:00
knugget
8ae1353114 404 page formbricks.com 2023-02-13 11:43:05 +01:00
Matthias Nannt
b43fbba9aa merge 2023-02-13 11:40:42 +01:00
Matthias Nannt
dc984ac7ba fix feedback widget render & alert on error 2023-02-13 11:39:38 +01:00
knugget
508508869a forward /demo to PMF Demo 2023-02-13 11:35:13 +01:00
knugget
db55f29231 updated feedback box docs, pmf page, typos in blog 2023-02-13 11:13:02 +01:00
Matthias Nannt
113a573573 update feedback widget package information 2023-02-13 09:58:01 +01:00
Matthias Nannt
fb82e92471 formbricks-app: change divId to containerId in feedback widget embeds 2023-02-12 19:03:46 +01:00
Matthias Nannt
ddc33d309b change divId to containerId in feedback widget embeds 2023-02-12 18:49:54 +01:00
Matthias Nannt
10b92b368c add new weekly report 2023-02-12 18:16:50 +01:00
Matthias Nannt
ff067d63f1 Merge branch 'main' of github.com:formbricks/formbricks 2023-02-10 15:29:43 +01:00
Matti Nannt
5ee5af3e8b Docs revamp (#197)
* add new docs for user research approach

---------

Co-authored-by: knugget <johannes@knugget.de>
2023-02-10 15:29:21 +01:00
Matthias Nannt
b4753c34b4 feedback-widget: rename divId -> containerId, add closeOnOutsideClick config option 2023-02-10 11:35:34 +01:00
Matthias Nannt
7c7119380f remove console log from onboarding survey 2023-02-10 10:46:14 +01:00
Matthias Nannt
6b473b7a4b update target in pmf page 2023-02-09 17:04:46 +01:00
Matthias Nannt
c83beffeae fix feedback-button interfering with forms 2023-02-09 16:57:23 +01:00
knugget
cec677eaae revamped instructions 2023-02-09 15:53:25 +01:00
knugget
3701487534 updating instructions 2023-02-09 13:16:55 +01:00
Matthias Nannt
187bf3ca49 remove session from formbricks-app feedback button 2023-02-09 12:08:43 +01:00
Matthias Nannt
a94a35c89d update feedback button to solve build issues 2023-02-09 12:00:51 +01:00
Matthias Nannt
3d3ced5f4b Merge branch 'main' of github.com:formbricks/formbricks 2023-02-09 11:54:45 +01:00
Matthias Nannt
97a20c4f7f update feedback button to solve build issues 2023-02-09 11:54:29 +01:00
knugget
d8f40a44fa Merge branch 'main' of https://github.com/formbricks/formbricks into main 2023-02-09 11:44:10 +01:00
knugget
afe94f9266 fix pmf page layout 2023-02-09 11:44:04 +01:00
Matthias Nannt
d7547fb594 update robots.txt 2023-02-09 11:41:33 +01:00
Matthias Nannt
b8f272ceb9 Merge branch 'main' of github.com:formbricks/formbricks 2023-02-09 11:37:24 +01:00
knugget
16c9e5beb3 old docs forwards 2023-02-09 11:36:24 +01:00
knugget
5d00e87d1e replace "Superhuman" with PMF 2023-02-09 11:27:44 +01:00
knugget
6d7d77087c open CTA in new tab 2023-02-09 11:21:18 +01:00
Matthias Nannt
838ac1d6b7 update engine-react version to 0.1.1 2023-02-09 11:20:52 +01:00
knugget
bfca2b7385 Merge branch 'main' of https://github.com/formbricks/formbricks into main 2023-02-09 11:17:16 +01:00
Matthias Nannt
797a8e69bb update package-lock 2023-02-09 11:10:08 +01:00
Matthias Nannt
a67312fa97 Merge branch 'main' of github.com:formbricks/formbricks 2023-02-09 11:07:39 +01:00
Matthias Nannt
28245cf604 update feedback button 2023-02-09 11:07:10 +01:00
knugget
fa04bae030 Merge branch 'pmf-page' into main 2023-02-09 10:56:11 +01:00
knugget
ad703df3b6 pmf page v1 2023-02-09 10:53:03 +01:00
Matti Nannt
9f2487cabf Add a PMF demo dashboard at /demo (#195)
* add pmf demo page with sample submissions

* add customer demo view
2023-02-08 19:29:30 +01:00
Matthias Nannt
ad8d906429 add label to integration survey elements 2023-02-08 15:46:29 +01:00
Matthias Nannt
0af31fdc9d send schema along with onboarding survey 2023-02-08 15:43:09 +01:00
Matthias Nannt
5f58c50865 add finished flag to onboarding survey submission 2023-02-08 14:19:38 +01:00
Matthias Nannt
24c350829c fix layout to allow page layout to be full width 2023-02-08 14:14:42 +01:00
Matthias Nannt
3af58e80d2 update <a> with <Link> 2023-02-08 14:11:58 +01:00
Matthias Nannt
9c4b2e99ae formbricks-app: use feedback widget from packages 2023-02-08 14:02:12 +01:00
Matti Nannt
edacd3507a Integration survey (#194)
* add integrations tab with surveys

* add new horizontal navbar

---------

Co-authored-by: knugget <johannes@knugget.de>
2023-02-08 13:55:02 +01:00
Matthias Nannt
29db5394f7 fix filterNavigation warning, add database_urls to db:migrate:vercel in turbo.json 2023-02-08 13:11:21 +01:00
Matthias Nannt
f8759aa2f2 update lock file 2023-02-08 12:46:28 +01:00
Matthias Nannt
31d751b89c Merge branch 'main' of github.com:formbricks/formbricks 2023-02-08 12:05:31 +01:00
Matthias Nannt
51c80cb9d5 fix reply-to header in email 2023-02-08 12:04:45 +01:00
knugget
efb52bdab4 Merge branch 'main' of https://github.com/formbricks/formbricks into main 2023-02-08 11:54:42 +01:00
knugget
00ba12a511 fix logo on FF 2023-02-08 11:54:32 +01:00
Matthias Nannt
623d54d6e5 fix submission capture typo, fix feedback demo 2023-02-08 11:48:50 +01:00
Matthias Nannt
264c931624 clean up & fix build issues 2023-02-08 11:20:08 +01:00
Matti Nannt
6bfc46042b Add Onboarding Survey after User-Signup (#193)
* add onboarding survey after user signup

* add user flag finishedOnboarding to database and session

* fix submission capture endpoint to allow customer property update

---------

Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: knugget <johannes@knugget.de>
2023-02-08 11:12:12 +01:00
Matthias Nannt
1fec6e34a9 add superhuman view to pmf survey 2023-02-07 09:25:57 +01:00
Matthias Nannt
750f05420a Fix FilterNavigation to work with Checkboxes 2023-02-06 16:11:35 +01:00
Matthias Nannt
1d2834fabc update pnpm lockfile 2023-02-06 15:43:49 +01:00
Matthias Nannt
92b750c87e show percentage in pie chart instead of total number, add total number of submissions to pmf overview 2023-02-06 15:42:23 +01:00
Matthias Nannt
c898af0390 outsource form-engine in own package 2023-02-06 14:53:48 +01:00
Matthias Nannt
a9b9f022b5 refactor demos to include a demo-overview, change demos to use env variables, fix react lib to work with new schema 2023-02-06 10:46:42 +01:00
Matthias Nannt
b833e21b10 use only organisationId for posthog tracking 2023-02-06 09:47:53 +01:00
Matthias Nannt
1758bef978 make ee package privat to fix deployment pipeline issues 2023-02-05 21:44:46 +01:00
Matthias Nannt
6f5e43f0e5 add confetti to waitlist survey 2023-02-05 21:37:05 +01:00
Matthias Nannt
5b9a829f3f Merge branch 'main' of github.com:formbricks/formbricks 2023-02-04 11:40:18 +01:00
Matthias Nannt
ee7b74cd5d fix survey fields are saved only in customer 2023-02-04 11:39:58 +01:00
knugget
bc06197126 update blog 2023-02-03 17:54:36 +01:00
knugget
60166c1292 Merge branch 'main' of https://github.com/formbricks/formbricks into main 2023-02-03 17:45:38 +01:00
knugget
bc663bd104 weekly 3rd of Feb 2023-02-03 17:45:35 +01:00
Matthias Nannt
892bb9d65a bugfix build errors 2023-02-03 17:14:52 +01:00
Matthias Nannt
e63d57667c add api functionality to add fields to customer with submission update, update waitlist to create customer once he submits email field 2023-02-03 17:06:48 +01:00
Matthias Nannt
a809110b13 add db:migrate:vercel to turbo json 2023-02-03 15:32:23 +01:00
Matthias Nannt
524f35aba1 update database packages and prisma version, add db:migrate:vercel command to use MIGRATE_DATABASE_URL 2023-02-03 15:29:00 +01:00
Matthias Nannt
6c7b1a9540 update pmf widget version number 2023-02-03 14:13:27 +01:00
Matti Nannt
a2cbf87a20 Add Payment to Formbricks Cloud (#192)
* add enterprise license, add ee package

* migrate database from workspaces to organisations

* add payment api endpoints and billing pages

* add stripe env variables to .env.example
2023-02-03 11:42:40 +01:00
Johannes
97a0accca0 session type 2023-01-31 16:11:54 +00:00
Johannes
55a6d57921 update wording survey 2023-01-31 16:00:36 +00:00
Matthias Nannt
79f420e45d update demo & web dependencies 2023-01-31 09:56:48 +01:00
Matthias Nannt
26f5d39baf formbricks-com make waitlist submission synchronous again, add warmup request 2023-01-30 16:34:28 +01:00
Matthias Nannt
53749d191b update telemetry endpoint 2023-01-30 15:05:23 +01:00
Matthias Nannt
d2b10d6502 update tslint config with noUnusedLocals and clean up code accordingly 2023-01-30 14:40:12 +01:00
knugget
94f0cf490f PMFPage 2023-01-30 14:07:29 +01:00
Matthias Nannt
bfe4ad0f87 app: underline privacy policy and terms link in signup 2023-01-30 14:04:00 +01:00
Matthias Nannt
2e6c7eabdc update privacy policy with new cloud url 2023-01-30 13:53:49 +01:00
Matthias Nannt
067022e69c FOR-201 fix hqUrl in feedback and pmf widget to work with trailing slash 2023-01-30 13:42:59 +01:00
Matthias Nannt
b8fd9ee624 add target to ui button link 2023-01-30 13:34:14 +01:00
Matthias Nannt
1392bc9ad2 updated feedback widget version in formbricks-com & formbricks-app 2023-01-30 12:21:51 +01:00
Matthias Nannt
86be8d7c4b fix pnpm lock, move formbricks feedback widget to app.formbricks.com 2023-01-30 12:14:34 +01:00
Matthias Nannt
6c85188d4d pmf widget: add focus trap, make radio buttons accesible via keyboard 2023-01-30 11:58:46 +01:00
knugget
825a6e8c39 update imports 2023-01-30 11:23:47 +01:00
knugget
7f9111472e pmf page pt 1 2023-01-30 11:23:47 +01:00
Matthias Nannt
58e643bac5 update css classes in pmf widget to avoid conflicts with feedback widget 2023-01-30 10:10:50 +01:00
knugget
f06b9b1de9 fix deploy 2023-01-27 21:44:43 +01:00
knugget
3446814efe redeploy 2023-01-27 21:01:55 +01:00
Johannes
9a7bf766db weekly-270123 (#190) 2023-01-27 20:27:04 +01:00
Matthias Nannt
4e1386978c fix customer view in formbricks app, rename pmf overview 2023-01-27 17:16:42 +01:00
Matthias Nannt
0d832b65b3 add warmup call to pmfwidget; 2023-01-27 14:59:10 +01:00
Matthias Nannt
50a9c2bc8a update pmf widget to 0.0.6 2023-01-27 12:17:37 +01:00
Matthias Nannt
c99b4a8754 pmf widget change window.formbricks to window.formbricksPmf 2023-01-27 12:12:59 +01:00
Matthias Nannt
2c111bdcb2 merged change 2023-01-27 11:33:07 +01:00
Matthias Nannt
ea0383dc2b update pmf widget version 2023-01-27 11:32:12 +01:00
knugget
bfa24987cc Merge branch 'main' of https://github.com/formbricks/formbricks into main 2023-01-27 11:31:58 +01:00
knugget
d8d6480876 update PMF Widget, delete old LP subpages 2023-01-27 11:31:43 +01:00
Matthias Nannt
26f200e4c4 add onFinished method to pmf widget 2023-01-27 11:31:06 +01:00
knugget
6cbd58bc2d update feedback button, snappy waitlist 2023-01-26 14:23:26 +01:00
knugget
bbe573ec6f responsivenes scale 2023-01-26 13:18:56 +01:00
Matthias Nannt
28b004e2fe formbricks-com async waitlist form submissions 2023-01-26 11:47:39 +01:00
Matthias Nannt
0ca3a6f876 fix github sso 404 error 2023-01-26 11:12:10 +01:00
Matti Nannt
0e2e57a837 Add PMF dashboard to Formbricks App (#189)
* add PMF results dashboard
* add PMF Segmentation View
* add PMF setup instructions
* Built new Filter Navigation that is also used in Feedback

Co-authored-by: knugget <johannes@knugget.de>
2023-01-25 20:50:54 +01:00
knugget
090ac903e8 fix slider button blocking UI 2023-01-25 13:51:50 +01:00
knugget
c444d500a4 Merge branch 'main' of https://github.com/formbricks/formbricks into main 2023-01-25 12:10:35 +01:00
knugget
a3ef84ba30 PMF Widget UI tweaking 2023-01-25 12:09:37 +01:00
Matthias Nannt
4b49dfa6a4 pmf widget: reset-method, add finished flag, make textareas required 2023-01-25 10:26:46 +01:00
Matti Nannt
70346cf1f6 Add pmf frontend widget (#188)
* add pmf widget code

* update widget, add pmf demo page
2023-01-24 16:58:08 +01:00
knugget
e64df610d9 Merge branch 'main' of https://github.com/formbricks/formbricks into main 2023-01-23 14:45:15 +01:00
knugget
8fbce22474 waitlist update + fix blog link 2023-01-23 14:45:12 +01:00
Matthias Nannt
7d0c548477 fix emailNotification input field label 2023-01-23 13:27:36 +01:00
Matthias Nannt
427cf17a8d Merge branch 'main' of github.com:formbricks/formbricks 2023-01-23 13:17:11 +01:00
Matthias Nannt
5bfb3a1864 update feedback widget to overwrite config with open(), fix customer view in feedback timeline in app 2023-01-23 13:16:56 +01:00
Matthias Nannt
7b72ffb82e update feedback widget to add finished flag after sending 2023-01-21 18:26:17 +01:00
Johannes
16ad208f8e remove free plan from waitlist thank-you page 2023-01-21 18:18:01 +01:00
Matthias Nannt
14be6ce407 fix ui icons to use jsx notation for properties 2023-01-21 11:23:24 +01:00
Matthias Nannt
7bf0a76f29 use nextjs built-in cors approach for formbricks app 2023-01-21 11:19:57 +01:00
Matthias Nannt
81f26e3eb6 Merge branch 'main' of github.com:formbricks/formbricks 2023-01-21 10:33:12 +01:00
Matthias Nannt
3275f60e10 fix import error in demo, fix jsx style in core-api & email icon, add finished flag to capture endpoint 2023-01-21 10:25:38 +01:00
knugget
d0bf119f9d fix typo on screenshot 2023-01-20 18:33:18 +01:00
knugget
47a81aff19 weekly + animation update 2023-01-20 18:15:57 +01:00
knugget
e5aaf4bcb6 update wording lp 2023-01-20 16:21:54 +01:00
knugget
0186103c01 Merge branch 'main' of https://github.com/formbricks/formbricks into main 2023-01-20 16:21:46 +01:00
knugget
7b0b479e88 update wording 2023-01-20 16:21:38 +01:00
Matthias Nannt
e02df9683e update waitlist questions, add skip button 2023-01-20 16:18:45 +01:00
Matthias Nannt
8339bb9d65 add plausible events to waitlist form 2023-01-20 15:35:47 +01:00
Matthias Nannt
fb2cd315e5 Merge branch 'main' of github.com:formbricks/formbricks 2023-01-20 12:25:49 +01:00
Matthias Nannt
dbc68c810f add new pipeline events submissionUpdated & submissionFinished 2023-01-20 12:25:45 +01:00
Matthias Nannt
e5ce84b03d add finished flag to submission 2023-01-20 11:01:33 +01:00
knugget
7dc9c61122 update beta question 2023-01-20 09:50:40 +01:00
knugget
944235ef00 fix discord btn + waitlist dark 2023-01-19 16:19:26 +01:00
Johannes
75d0f51df4 fix waitlist dark (#186) 2023-01-19 16:02:20 +01:00
Matthias Nannt
5bb3bd2031 update waitlist formId in formbricks-com 2023-01-19 15:52:01 +01:00
Matthias Nannt
2e881c0914 add github auth env variables to example files 2023-01-19 15:47:05 +01:00
Matti Nannt
80617811c2 Add new landingpage with waitlist, update Formbricks App to handle custom waitlist survey (#185)
* add new landingpage for user research surveys
* update Formbricks App to support custom surveys

Co-authored-by: knugget <johannes@knugget.de>
2023-01-19 15:34:22 +01:00
Matthias Nannt
09c822c52e update dockerfile to work with new folder structure 2023-01-15 14:10:20 +01:00
Matthias Nannt
a86b9c6e19 rebuild formbricks app folder structure, rename team -> workspace 2023-01-15 12:57:34 +01:00
Matti Nannt
99c1d155e3 Update HQ with experience management approach and feedback widget (#184)
* create basis for feedback form creation

* add icons to ui package

* add prototype feedback results view

* add react feedback widget to demo, add connection between widget and hq, update capture submission api, update results view

* update single customer view to new design, update feedback modal interface, fix smaller bugs

* add feedback widget

* fix signup route, fix persistForm functionality

* feedback box widget pre animation

* fix intro text in widget

* feedback-widget: clean old switch-button

* tweaks

* feedback widget: fix click listener

* formbricks feedback package setup

* finish styling

* Change "Compliments" to "Love"

* form card width

* update demo page with feedback widget

* update feedback widget

* load from NPM

* add highlightcolor styles

* add style to feedback widget config

* fix send email in hq feedback, fix error when styling not present in feedback widget config

* feedback widget: fix header subtitle color by adding opacity, re-add focus

* with rgba variables

* updated with HEX and examples

* hq: add pipelines to form

* feedback widget: outside click closes widget

* update sentry config

* update recommended nodejs version to 18 in hq readme

* switch css update

* update feedback widget demo

* feedback widget: hide cta by default

* fix config contact in widget not checked correctly

* feedbackwidget: init on open if init failed previously

* fix margin bottom

* fix margins feedback box

* release feedback widget v0.1.5

* hq: add replyTo field in submission mail if customer present

* fix contact subtitle css

* add setup instructions in XM

* add divId support for feedback widget

* add feedback-box to hq

* add slackNotification (#181)

* update slack pipeline wording

* fix formbricks url in email and slack notifications

* lotus config + borderRadius

* rebase xm branch to current main

* remove formbricks-com cloud offering links

* update Readme for xm approach

Co-authored-by: knugget <johannes@knugget.de>
2023-01-14 11:41:35 +01:00
Matthias Nannt
8794de78fb update blog post 2023-01-13 21:03:43 +01:00
Johannes
be5a333d7a weekly update (#183) 2023-01-13 20:59:41 +01:00
Johannes
51f0bdfbe9 Weekly 130123 (#182)
* weekly-130123

* weekly-130123
2023-01-13 20:00:13 +01:00
knugget
a653775c5f new size mobile 2023-01-11 16:45:05 +01:00
knugget
1b67b8469a shorten feedback box 2023-01-11 16:29:17 +01:00
Matthias Nannt
29f5b7a95c formbricks-com update xs breakpoint 2023-01-11 12:34:38 +01:00
Matti Nannt
5b174b0e8e Feedback Box on formbricks.com (#180)
* build and integrate feedback widget on formbricks-com

Co-authored-by: knugget <johannes@knugget.de>
2023-01-11 12:23:03 +01:00
Matthias Nannt
3f8811f5f3 update feedback box in formbricks.com 2023-01-09 09:54:41 +01:00
Matthias Nannt
76d9587b26 fix typos in blog 2023-01-06 23:16:19 +01:00
Matti Nannt
91cf027f16 Weekly 060123 (#179)
* weekly 060123 draft

* add calcom screenshot

Co-authored-by: knugget <johannes@knugget.de>
2023-01-06 23:00:47 +01:00
Matthias Nannt
1d739f75f1 formbricks.com hide feedback widget 2023-01-05 16:34:39 +01:00
Matthias Nannt
104edbd214 use jsdeliver for loading feedback widget on formbricks.com 2023-01-04 17:56:49 +01:00
Matthias Nannt
fc0b730652 move feedback widget on formbricks.com to own component, add plausible tracking on feedback click 2023-01-04 17:31:54 +01:00
Matthias Nannt
b4b0b89df3 add feedback widget to formbricks.com 2023-01-04 17:16:39 +01:00
knugget
2576447d85 fix responsive iframe 2022-12-30 16:28:36 +01:00
Matti Nannt
3faf6661d5 weekly 301222 (#178)
Co-authored-by: knugget <johannes@knugget.de>
2022-12-30 14:37:42 +01:00
Matthias Nannt
81fa18053d update dockerfile from alpine to slim to fix openssl errors 2022-12-19 09:13:07 +01:00
Matti Nannt
c256bab985 weekly-161222 + nav bar adapt (#177)
Co-authored-by: knugget <johannes@knugget.de>
2022-12-16 16:42:38 +01:00
Matthias Nannt
a4d21222a6 react: throw error on sendToHq failing 2022-12-14 13:38:54 +01:00
Matthias Nannt
fbfc1acd61 update feedback demo 2022-12-13 15:57:57 +01:00
Matthias Nannt
9b16d182d4 fix react lib missing in demo dependencies 2022-12-13 15:32:08 +01:00
Matthias Nannt
237febf512 update react example 2022-12-13 15:21:00 +01:00
Matthias Nannt
19bb1565f6 add sentry error tracking to hq 2022-12-12 12:51:38 +01:00
Matthias Nannt
270754521e fix posthog tracking new user, use next link in form tabs to improve speed 2022-12-12 11:14:55 +01:00
Matthias Nannt
0cff6e799f Merge branch 'main' of github.com:snoopForms/snoopforms 2022-12-12 11:01:41 +01:00
Matti Nannt
3383d1e896 fix broken settings + UX improvements (#176)
Co-authored-by: knugget <johannes@knugget.de>
2022-12-12 09:11:19 +01:00
Matthias Nannt
49a273c7c4 update hq demo with pmf modal 2022-12-11 10:57:17 +01:00
Johannes
aa5f4654a5 updated launch hq (#174) 2022-12-09 18:37:44 +01:00
Johannes
3daf96c2bb weekly-09122022 (#175) 2022-12-09 18:37:04 +01:00
Matthias Nannt
37bd6c054d fix charts and react package 2022-12-09 09:08:38 +01:00
Matthias Nannt
846f0fe7bf clean up code, fix typo in blog 2022-12-08 18:53:37 +01:00
Matthias Nannt
a56fddbb37 update launch blog post 2022-12-08 18:43:27 +01:00
Matthias Nannt
8cba54aa86 fix add react lib to formbricks-com 2022-12-08 18:34:22 +01:00
Matti Nannt
0f1e5e5fb0 Launch hq blog (#173)
* draft-1

* update

Co-authored-by: knugget <johannes@knugget.de>
2022-12-08 18:25:06 +01:00
Matthias Nannt
aec2a922d4 update cors headers in hq 2022-12-08 17:46:33 +01:00
Matthias Nannt
65a157e6ea fix hq pipeline prisma not found, remove cors in api route files 2022-12-08 17:43:50 +01:00
Matthias Nannt
ae3780880c add demo app, update cors on hq 2022-12-08 17:19:54 +01:00
Matthias Nannt
2463fb8d17 update Readme 2022-12-08 15:56:48 +01:00
Matthias Nannt
7e7f27d232 add self-hosting doc for hq 2022-12-08 15:49:08 +01:00
Matthias Nannt
ea1b0c9c70 Merge branch 'main' of github.com:snoopForms/snoopforms 2022-12-08 15:41:15 +01:00
Matthias Nannt
43da64b2f1 update docs link in hq 2022-12-08 15:41:08 +01:00
Johannes
59db0d357e update privacy policy (#171) 2022-12-08 15:33:24 +01:00
github-actions[bot]
64ad948039 Version Packages (#172)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-12-08 15:29:26 +01:00
Matthias Nannt
bcecdc0f3d hq - update forms overview, add Nps Type, update charts lib, update react lib 2022-12-08 15:26:17 +01:00
Matthias Nannt
273aad391e improve posthog events in hq 2022-12-07 16:47:57 +01:00
Matthias Nannt
b0554757df move hq from app folder to pages folder, update react lib classNames 2022-12-07 16:38:09 +01:00
Matthias Nannt
3a5e297302 hq - add more posthog events 2022-12-07 14:06:17 +01:00
Matthias Nannt
f6d7a023cd update postgres version in docker compose, reset migrations in hq 2022-12-05 16:07:12 +01:00
Matthias Nannt
cbd74936ca fix pnpm lock, update hq dockerfile 2022-12-05 15:45:19 +01:00
Matthias Nannt
9f902354bb hq add telemetry, add posthog tracking, add single customer page 2022-12-05 13:41:54 +01:00
Matthias Nannt
5954a22ff3 enable search in docs 2022-12-02 16:36:01 +01:00
Matthias Nannt
69320e8119 fix link in blog 2022-12-02 16:22:28 +01:00
Matthias Nannt
a51c884e7f update code in weekly update 2022-12-02 15:44:56 +01:00
Matthias Nannt
4a87ebbec3 clean up charts lib - 0.0.1 release 2022-12-02 15:28:36 +01:00
Johannes
03bd1107cf Weekyl 2nd dec 2022 (#170) 2022-12-02 14:27:00 +01:00
Matthias Nannt
b45a32343e make ui package private 2022-12-02 12:48:45 +01:00
Matthias Nannt
334d95fe2a hq - move auth to client side searchparams to avoid problems with vercel 2022-12-02 12:47:07 +01:00
Matthias Nannt
7e24c065f0 sort submissions in hq, add number of submissions to summary 2022-12-02 12:41:25 +01:00
Matthias Nannt
83f3df4e81 render auth page client-side to avoid vercel bug on searchParams 2022-12-01 16:22:35 +01:00
Johannes
2335c72234 hq favicon (#169)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2022-12-01 16:02:37 +01:00
Matthias Nannt
6d2b26b391 Merge branch 'main' of github.com:snoopForms/snoopforms 2022-12-01 15:59:51 +01:00
Matthias Nannt
23fd92f85c add sendToHq helper to formbricks react, update class merge in react lib, update capture endpoints in hq to support cors 2022-12-01 15:59:33 +01:00
Johannes
17b8bb1324 added docs, fix doc header (#168) 2022-12-01 15:57:15 +01:00
Johannes
515b23859a Api & schema docs (#167)
* api docs images v1

* schema & api docs

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2022-12-01 10:53:52 +01:00
Matthias Nannt
cabe59dcea update gitignore 2022-12-01 10:49:46 +01:00
Matthias Nannt
ed5b1cc263 add simple table graph (placeholder), fix build errors in hq 2022-12-01 10:08:45 +01:00
Matthias Nannt
d8a7d1a72e add simple charts library, add simple summary to hq 2022-11-30 21:03:19 +01:00
Matthias Nannt
013fec0fe0 hq - fix toasts 2022-11-30 16:21:12 +01:00
Matthias Nannt
5bd09c13b6 add schema to submission display if available 2022-11-30 16:15:40 +01:00
Matthias Nannt
47dd1d04de hq - add full pipeline functionality 2022-11-30 15:46:21 +01:00
Matthias Nannt
69985f5f39 add basic pipeline view to hq 2022-11-29 21:02:13 +01:00
Matthias Nannt
e0d0458d7f add submissions table 2022-11-29 18:12:37 +01:00
Matthias Nannt
a977cc403b update hq db schema, add form overview page 2022-11-29 15:34:55 +01:00
Matthias Nannt
ec695df017 fix redirect to login not working - formbricks hq 2022-11-28 18:51:11 +01:00
Matthias Nannt
99dd6478d2 change db:push command 2022-11-28 18:41:46 +01:00
Matthias Nannt
0070f9c69d formhq: add simple layout, add forms overview, add customers overview, add api endpoints 2022-11-28 18:31:19 +01:00
Matthias Nannt
c834cbf8ce add dashboard infobox to formbricks hq 2022-11-26 12:37:45 +01:00
Matthias Nannt
8535986ae8 Merge branch 'main' of github.com:snoopForms/snoopforms 2022-11-26 11:56:05 +01:00
Matthias Nannt
8cf06c6ea5 add api key functionality to formbricks HQ 2022-11-26 11:55:57 +01:00
Johannes
43e6e4ad91 Update Image Names (#166)
* updated names
2022-11-25 17:50:40 +01:00
Tomas Valenta
3fe3ca7ee4 Fix typo (#163) 2022-11-25 17:44:48 +01:00
Tomas Valenta
d215371ec4 Make the GitHub link in docs point to the formbricks repo (#164) 2022-11-25 17:42:15 +01:00
Johannes
7e63da2977 Img names (#165)
* weekly-update

* updated names
2022-11-25 17:41:10 +01:00
Johannes
fc58e9badf weekly-update (#162) 2022-11-25 16:53:48 +01:00
Matti Nannt
7c77a36ca1 weekly-251122 (#161)
Co-authored-by: knugget <johannes@knugget.de>
2022-11-25 15:01:33 +01:00
Johannes
3550a51cea Update react intro (#159)
* updated react intro

* docs: icon page

* add name attr to Submit
2022-11-25 11:21:57 +01:00
Matthias Nannt
0f638c3f6b fix get started link on mobile formbricks-com 2022-11-24 13:25:37 +01:00
Matthias Nannt
4a8e1c563d fix typo in docs 2022-11-24 13:07:04 +01:00
Matthias Nannt
32afef77ea add VERCEL_URL to turbo.json 2022-11-24 13:02:19 +01:00
Matthias Nannt
a3db36fef5 update docs intro page 2022-11-24 13:00:09 +01:00
Matthias Nannt
0a17676981 move development of formbricks HQ to monorepo 2022-11-24 12:30:08 +01:00
Matthias Nannt
74b1cb0687 Merge branch 'main' of github.com:snoopForms/snoopforms 2022-11-23 14:59:09 +01:00
Matthias Nannt
3444f5b828 update docs 2022-11-23 14:50:09 +01:00
Matti Nannt
e2f625cd02 Fix Markdown issue 2022-11-23 14:45:42 +01:00
Johannes
af5c9c8785 Update README.md 2022-11-23 07:44:23 -06:00
Johannes
1c962433f3 Update Readme for npm 2022-11-23 07:43:12 -06:00
Matthias Nannt
d8d2ac115d Merge branch 'main' of github.com:snoopForms/snoopforms 2022-11-23 14:13:46 +01:00
Matti Nannt
104a3d22ff React Lib HTML Input Docs (#158)
Co-authored-by: knugget <johannes@knugget.de>
2022-11-23 14:13:20 +01:00
Matthias Nannt
0eadbfce9d update react package version to 0.2.1 2022-11-23 14:09:16 +01:00
github-actions[bot]
542caf80d9 Version Packages (#157)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-23 14:02:12 +01:00
Matthias Nannt
898ad44c51 Merge branch 'main' of github.com:snoopForms/snoopforms 2022-11-23 13:59:51 +01:00
Matthias Nannt
493bc3c3af Add Input Types: Checkbox, Email, Number, Password, Phone, Radio, Search, Url | Add validations: accepted, email, url 2022-11-23 13:59:31 +01:00
Matti Nannt
b2da7306d2 terms, privacy policy update, gdpr, gdpr guide (#155)
Co-authored-by: knugget <johannes@knugget.de>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2022-11-23 11:11:33 +01:00
Matti Nannt
e2fa13031f radio docs v1 (#156)
Co-authored-by: knugget <johannes@knugget.de>
2022-11-23 11:08:26 +01:00
Johannes
d20fc9512a Formbricks hq (#154)
* radio docs v1

* update Form HQ to Formbricks HQ

* added redirect

* correct typo
2022-11-23 11:05:58 +01:00
Matthias Nannt
2a23326dad refactor radio buttons, add checkbox input type to react lib 2022-11-23 10:10:52 +01:00
Matthias Nannt
0982506d1c Merge branch 'main' of github.com:snoopForms/snoopforms 2022-11-23 09:20:43 +01:00
Matthias Nannt
d8d48f14f8 add radio buttons to react lib 2022-11-22 17:45:27 +01:00
Matti Nannt
65c57398e0 Launch blog (#153)
* react lib docs v0.1

* react lib launch blog article

* add code example

* add wrapper docs

Co-authored-by: knugget <johannes@knugget.de>
2022-11-22 13:38:00 +01:00
Matthias Nannt
9311dc0f6f update react lib 2022-11-22 12:27:46 +01:00
Matthias Nannt
a0ee1b424a Merge branch 'main' of github.com:snoopForms/snoopforms 2022-11-22 11:41:51 +01:00
Matthias Nannt
bafd98ef14 fix image issues; 2022-11-22 11:41:41 +01:00
github-actions[bot]
7ba9704af2 Version Packages (#151)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-22 11:23:41 +01:00
Matthias Nannt
16254951ba update docs, react lib 0.1 2022-11-22 11:13:38 +01:00
Matthias Nannt
86f6811271 update lockfile 2022-11-22 09:20:49 +01:00
Matti Nannt
f8b90505c3 react lib docs v0.1 (#150)
Co-authored-by: knugget <johannes@knugget.de>
2022-11-22 09:18:07 +01:00
Matthias Nannt
f649cdb674 add more validations to react lib 2022-11-21 20:37:58 +01:00
Matthias Nannt
d4f0478a77 add error messages to react lib, multiple bugfixes, minify styles.css for react lib 2022-11-21 19:17:32 +01:00
Matthias Nannt
b890570a7d remove merge markers from blog post 2022-11-18 15:50:15 +01:00
Matthias Nannt
f69626a5c7 add newsletter signup form to blogpost 2022-11-18 15:36:45 +01:00
Matthias Nannt
b775d458c4 Merge branch 'main' of github.com:snoopForms/snoopforms 2022-11-18 15:22:31 +01:00
Matti Nannt
0a02b1a184 Vs google weekly (#149)
* vs OhMyForm page

* vs Google Forms, weekly, tweaks

Co-authored-by: knugget <johannes@knugget.de>
2022-11-18 15:22:23 +01:00
Matthias Nannt
3b4d5f1446 add tailwind forms to formbricks-com 2022-11-18 15:18:16 +01:00
Matthias Nannt
820fcc2c29 update favicon path formbricks-com 2022-11-18 14:37:46 +01:00
Matthias Nannt
d435f6ff72 add storybook gitignore 2022-11-18 11:59:11 +01:00
Matthias Nannt
ce6269fa6f add storybook 2022-11-18 11:58:20 +01:00
Matthias Nannt
212fa99ab4 fix typo on website 2022-11-18 09:18:08 +01:00
Matthias Nannt
126700870f Merge branch 'main' of github.com:snoopForms/snoopforms 2022-11-18 09:14:37 +01:00
Johannes
c4328b8709 vs OhMyForm page (#148) 2022-11-18 09:06:36 +01:00
Matthias Nannt
d687158c0c reorganize react package, add option to change classes of inputs 2022-11-17 17:11:31 +01:00
Matthias Nannt
497654bdcd update react package json 2022-11-17 10:04:57 +01:00
Matthias Nannt
b631ee9c11 update entrypoint in react package 2022-11-17 09:27:39 +01:00
Johannes
f575e41063 react comparison page + tweaks (#146)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2022-11-16 11:38:42 +01:00
1133 changed files with 80079 additions and 5590 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"]
}

16
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=18-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
# [Optional] Uncomment if you want to install more global node modules
# RUN su node -c "npm install -g <your-package-list-here>"
RUN su node -c "npm install -g pnpm"

View File

@@ -0,0 +1,30 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/javascript-node-postgres
// Update the VARIANT arg in docker-compose.yml to pick a Node.js version
{
"name": "Node.js & PostgreSQL",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// This can be used to network with other containers or with the host.
"forwardPorts": [3000, 5432, 8025],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pnpm install",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
}

View File

@@ -0,0 +1,52 @@
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
# Update 'VARIANT' to pick an LTS version of Node.js: 18, 16, 14.
# Append -bullseye or -buster to pin to an OS version.
# Use -bullseye variants on local arm64/Apple Silicon.
VARIANT: "18"
volumes:
- ..:/workspace:cached
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db
# Uncomment the next line to use a non-root user for all processes.
# user: node
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
db:
image: postgres:latest
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
# Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
mailhog:
image: mailhog/mailhog
network_mode: service:app
logging:
driver: "none" # disable saving logs
# ports:
# - 8025:8025 # web ui
# 1025:1025 # smtp server
volumes:
postgres-data: null

37
.dockerignore Normal file
View File

@@ -0,0 +1,37 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
**/node_modules
.pnp
.pnp.js
.pnpm-store/
# testing
coverage
# next.js
**/.next
**/out
**/build
# node
**/dist
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# turbo
.turbo
# nixos stuff
.direnv
.vscode
.github
**/.turbo

103
.env.docker Normal file
View File

@@ -0,0 +1,103 @@
########################################################################
# ------------ MANDATORY (CHANGE ACCORDING TO YOUR SETUP) ------------#
########################################################################
############
# BASICS #
############
NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
##############
# DATABASE #
##############
DATABASE_URL='postgresql://postgres:postgres@postgres:5432/formbricks?schema=public'
# Uncomment to enable a dedicated connection pool for Prisma using Prisma Data Proxy
# Cold boots will be faster and you'll be able to scale your DB independently of your app.
# @see https://www.prisma.io/docs/data-platform/data-proxy/use-data-proxy
# PRISMA_GENERATE_DATAPROXY=true
PRISMA_GENERATE_DATAPROXY=
###############
# NEXT AUTH #
###############
# @see: https://next-auth.js.org/configuration/options#nextauth_secret
# You can use: `openssl rand -base64 32` to generate one
NEXTAUTH_SECRET=RANDOM_STRING
# Set this to your public-facing URL, e.g., https://example.com
# You do not need the NEXTAUTH_URL environment variable in Vercel.
NEXTAUTH_URL=http://localhost:3000
# If you encounter NEXT_AUTH URL problems this should always be localhost:3000 (or whatever port your app is running on)
# NEXTAUTH_URL_INTERNAL=http://localhost:3000
################
# MAIL SETUP #
################
# Necessary if email verification and password reset are enabled.
# See optional configurations below if you want to disable these features.
# 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
########################################################################
# ------------------------------ OPTIONAL -----------------------------#
########################################################################
# Uncomment the variables you would like to use and customize the values.
#####################
# Disable Features #
#####################
# Email Verification. If you enable Email Verification you have to setup SMTP-Settings, too.
NEXT_PUBLIC_EMAIL_VERIFICATION_DISABLED=1
# Password Reset. If you enable Password Reset functionality you have to setup SMTP-Settings, too.
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 #
##########
# Display privacy policy, imprint and terms of service links in the footer of signup & public pages.
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=
GITHUB_SECRET=
# Configure Google Login
NEXT_PUBLIC_GOOGLE_AUTH_ENABLED=0
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# Cron Secret
CRON_SECRET=

108
.env.example Normal file
View File

@@ -0,0 +1,108 @@
########################################################################
# ------------ MANDATORY (CHANGE ACCORDING TO YOUR SETUP) ------------#
########################################################################
############
# BASICS #
############
NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
##############
# DATABASE #
##############
DATABASE_URL='postgresql://postgres:postgres@localhost:5432/formbricks?schema=public'
# Uncomment to enable a dedicated connection pool for Prisma using Prisma Data Proxy
# Cold boots will be faster and you'll be able to scale your DB independently of your app.
# @see https://www.prisma.io/docs/data-platform/data-proxy/use-data-proxy
# PRISMA_GENERATE_DATAPROXY=true
PRISMA_GENERATE_DATAPROXY=
###############
# NEXT AUTH #
###############
# @see: https://next-auth.js.org/configuration/options#nextauth_secret
# You can use: `openssl rand -base64 32` to generate one
NEXTAUTH_SECRET=RANDOM_STRING
# Set this to your public-facing URL, e.g., https://example.com
# You do not need the NEXTAUTH_URL environment variable in Vercel.
NEXTAUTH_URL=http://localhost:3000
# If you encounter NEXT_AUTH URL problems this should always be localhost:3000 (or whatever port your app is running on)
# NEXTAUTH_URL_INTERNAL=http://localhost:3000
################
# MAIL SETUP #
################
# Necessary if email verification and password reset are enabled.
# See optional configurations below if you want to disable these features.
MAIL_FROM=noreply@example.com
SMTP_HOST=localhost
SMTP_PORT=1025
# Enable SMTP_SECURE_ENABLED for TLS (port 465)
SMTP_SECURE_ENABLED=0
SMTP_USER=smtpUser
SMTP_PASSWORD=smtpPassword
########################################################################
# ------------------------------ OPTIONAL -----------------------------#
########################################################################
# Uncomment the variables you would like to use and customize the values.
#####################
# Disable Features #
#####################
# Email Verification. If you enable Email Verification you have to setup SMTP-Settings, too.
# NEXT_PUBLIC_EMAIL_VERIFICATION_DISABLED=1
# Password Reset. If you enable Password Reset functionality you have to setup SMTP-Settings, too.
# 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 #
##########
# Display privacy policy, imprint and terms of service links in the footer of signup & public pages.
NEXT_PUBLIC_PRIVACY_URL=
NEXT_PUBLIC_TERMS_URL=
NEXT_PUBLIC_IMPRINT_URL=
# Configure Github Login
NEXT_PUBLIC_GITHUB_AUTH_ENABLED=0
GITHUB_ID=
GITHUB_SECRET=
# Configure Google Login
NEXT_PUBLIC_GOOGLE_AUTH_ENABLED=0
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# Stripe Billing Variables
NEXT_PUBLIC_STRIPE_PUBLIC_KEY=
STRIPE_SECRET_KEY=
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

@@ -1,44 +0,0 @@
---
name: Bug report
about: Something not working as expected? Let us look into it
title: ""
labels: bug
assignees: ""
---
Found a bug? Please fill out the sections below. 👍
### Issue Summary
<!--
A summary of the issue. This needs to be a clear detailed-rich summary.
-->
(Write your answer here.)
### Steps to Reproduce
<!--
1. (for example) Went to ...
2. Clicked on...
3. ...
Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?
-->
(Write your answer here.)
## Environment
- [ ] snoopForms Cloud (app.snoopforms.com)
- [ ] self-hosted snoopForms, version/commit: [please provide]
### Additional Context
<!--
- Browser version, screen recording, console logs, network requests: You can make a recording with [Bird Eats Bug](https://birdeatsbug.com/).
- Node.js version
- Anything else that you think could be an issue.
-->
(Write your answer here.)

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

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

View File

@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Questions
url: https://discord.gg/3YFcABF2Ts
url: https://formbricks.com/discord
about: Ask a general question about the project on our Discord server

View File

@@ -1,41 +0,0 @@
---
name: Feature request
about: Suggest a feature or idea
title: ""
labels: feature
assignees: ""
---
### Is your proposal related to a problem?
<!--
Provide a clear and concise description of what the problem is.
For example, "I'm always frustrated when..."
-->
(Write your answer here.)
### Describe the solution you'd like
<!--
Provide a clear and concise description of what you want to happen.
-->
(Describe your proposed solution here.)
### Describe alternatives you've considered
<!--
Let us know about other solutions you've tried or researched.
-->
(Write your answer here.)
### Additional context
<!--
Is there anything else you can add about the proposal?
You might want to link to related issues here, if you haven't already.
-->
(Write your answer here.)

View File

@@ -0,0 +1,45 @@
name: Feature request
description: "Suggest an idea for this project \U0001F680"
title: "[FEATURE]"
labels: enhancement
assignees: []
body:
- type: textarea
id: problem-description
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: true
- type: textarea
id: solution-description
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: alternate-solution-description
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false
- type: markdown
id: formbricks-info
attributes:
value: |
### How we code at Formbricks 🤓
- Everything is type-safe
- All UI components are in the package `formbricks/ui`
- Run `pnpm dev` to find a demo app to test in-app surveys at `localhost:3002`
- We use **chatGPT** to help refactor code. Use our [Formbricks ✨ megaprompt ✨](https://github.com/formbricks/formbricks/blob/main/megaprompt.md) to create the right
context before you write your prompt.

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

@@ -13,16 +13,25 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Node.js 16.x
- name: Setup Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 16.x
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
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_SECRET: ${{ secrets.CRON_SECRET }}
runs-on: ubuntu-latest
steps:
- name: cURL request
if: ${{ env.APP_URL && env.CRON_SECRET }}
run: |
curl ${{ env.APP_URL }}/api/cron/weekly_summary \
-X POST \
-H 'content-type: application/json' \
-H 'x-api-key: ${{ env.CRON_SECRET }}' \
--fail

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

@@ -18,16 +18,16 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setup Node.js 16.x
- name: Setup Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 16.x
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
run: pnpm install --config.platform=linux --config.architecture=x64
- name: Create Release Pull Request or Publish to npm
id: changesets

7
.gitignore vendored
View File

@@ -33,10 +33,15 @@ yarn-error.log*
.env.test.local
.env.production.local
!packages/database/.env
!apps/web/.env
# Prisma generated files
packages/database/zod
# turbo
.turbo
# nixos stuff
.direnv
apps/examples
Zone.Identifier

1
.vercelignore Normal file
View File

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

21
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,21 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch localhost:3002",
"type": "firefox",
"request": "launch",
"reAttach": true,
"url": "http://localhost:3002/",
"webRoot": "${workspaceFolder}"
},
{
"name": "Attach",
"type": "firefox",
"request": "attach"
}
]
}

4
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,4 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.preferences.importModuleSpecifier": "non-relative"
}

683
LICENSE
View File

@@ -1,21 +1,670 @@
MIT License
Copyright (c) 2023 Formbricks GmbH
Copyright (c) 2022 Matthias Nannt
Portions of this software are licensed as follows:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
- All content that resides under the "packages/ee/" directory of this repository, if that directory exists, is licensed under the license defined in "packages/ee/LICENSE".
- All content that resides under the "packages/js/", "packages/errors/" and "packages/api/" directories of this repository, if that directories exist, is licensed under the "MIT" license as defined in the "LICENSE" files of these packages.
- All third party components incorporated into the Formbricks Software are licensed under the original license provided by the owner of the applicable component.
- Content outside of the above mentioned directories or restrictions above is available under the "AGPLv3" license as defined below.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
1. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.

117
README.md
View File

@@ -1,83 +1,100 @@
<p align="center">
<a href="https://github.com/formbricks/formbricks">
<img src="https://user-images.githubusercontent.com/675065/201035557-a94a6bde-dff0-4bd3-9693-ec9257a9b1b3.svg" alt="Logo" width="500">
<img src="https://user-images.githubusercontent.com/675065/203262290-3c2bc5b8-839c-468a-b675-e26a369c7fe2.png" alt="Logo" width="500">
</a>
<h3 align="center">Formbricks</h3>
<p align="center">
The Open Source Forms & Survey Toolbox
The Open Source Survey & Experience Management solution for fast growing companies
<br />
<a href="https://formbricks.com/">Website</a> | <a href="https://formbricks.com/discord">Join Discord community</a>
</p>
</p>
<p align="center">
<a href="https://github.com/formbricks/formbricks/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-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/>
> :octocat: Are you looking for snoopForms - the Open Source Typeform Alternative? We're building the next stage of the snoopForms evolution here with Formbricks - more modular, more open, and for all your form needs. If you still are looking for the code of snoopForms you can find it in the [snoopforms branch](https://github.com/formbricks/formbricks/tree/snoopforms).
<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>
> :warning: Repository still in progress `#buildinpublic`
## ✨ About Formbricks
## About Formbricks
<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-twitter-header-open source forms and survey tools_smaller](https://user-images.githubusercontent.com/72809645/201055057-0883bbcf-86f2-4ea1-83f0-3a190a12f6cd.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.
We're building all essential form functionality so you don't have to. Modular, customizable, extendable. And open source.
**Try it out in the cloud at [formbricks.com](https://formbricks.com)**
### Mission: Stop rewriting existing code
## 💪 Mission: Make customer-centric decisions based on data.
We want to solve forms once and for all. If, in 10 years, a web developer rewrites core form functionality instead of building on top of our stack, we didnt do our job. We want you to build your next big thing faster. Our big thing is the last form tool humanity needs. Hold us accountable!
[Read more in our blog](https://formbricks-com.vercel.app/blog/snoopforms-becomes-formbricks)
## Our Toolbox
Build a 'home-cooked' solution at the fraction of the time. We do the heavy lifting, you customize to your needs.
### React Forms Library
Building React forms has never been quicker. But there is more...
Loads of question types, validation, multi-page forms, logic jumps, i18n, custom styles - all the good stuff you want, but don't want to build yourself.
Building forms fast is great, but where do you pipe your data? And what is it worth without a schema?"
### Core API - The OS form engine
Your form looks perfect? Time to build integrations...
Our core API handles all of the submission handling of your forms and surveys. Our main objective is versatility, so that you can use it with any currently existing form. Soon we will integrate it with our React Form Builder. This allows for handling schemas so that you get a full image of your submission data.
Formbricks helps you apply best practices from data-driven work and experience management to make better business decisions. Ask users as they experience your product - and leverage a significantly higher conversion rate. Gather all insights you can - including partial submissions and build conviction for the next product decision. Better data, better business.
### Features
- **Fast Form Creation**: Build complex forms with our React Lib. Our data pipes also work with any other form.
- **Data Pipelines**: Save your data where you need it. Use webhooks or pre-built integrations.
- **Powerful Data Insights**: View and manage your results quicker. Handle submissions in our dahsboard.
- **No-Code Builder**: Let your operators create and change forms. Stick with React to style and embed forms. `(coming soon)`
- **Built-in Analytics**: Opening rate, drop-offs, conversions. Use privacy-first analytics out of the box. `(coming soon)`
- **Survey Templates**: NPS, CSAT, Employee Surveys. Name your business objective, we have the questions. `(coming soon)`
- 📲 Create **in-product surveys** with our no code editor with multiple question types
- 📚 Choose from a variety of best-practice **templates**
- 👩🏻 Launch and **target your surveys to specific user groups** without changing your application code
- 🔗 Create shareable **link surveys**
- 👨‍👩‍👦 Invite your team members to **collaborate** on your surveys
- 🔌 Integrate Formbricks with **Slack, Posthog, Zapier and more**
- 🔒 All **open source**, transparent and self-hostable
### Why Formbricks
### Built on Open Source
- **Futureproof**: Form needs change. With Formbricks youll avoid island solutions right from the start.
- **Privacy by design**: Self-host the entire product and fly through privacy compliance reviews.
- **Community driven**: We're building for you. If you need something specific, were happy to build it!
- **Great DX**: We love a solid developer experience. We felt your pain and do our best to avoid it.
- **Customizable**: We have to build opinionated. If it doesn't suit your need, just change it up.
- **Extendable**: Even though we try, we cannot build every single integration. With Formbricks, you can.
- 💻 [Typescript](https://www.typescriptlang.org/)
- 🚀 [Next.js](https://nextjs.org/)
- ⚛️ [React](https://reactjs.org/)
- 🎨 [TailwindCSS](https://tailwindcss.com/)
- 📚 [Prisma](https://prisma.io/)
- 🔒 [Auth.js](https://authjs.dev/)
- 🧘‍♂️ [Zod](https://zod.dev/)
### Built With
## 🚀 Getting started
- [Typescript](https://www.typescriptlang.org/)
- [Next.js](https://nextjs.org/)
- [React](https://reactjs.org/)
- [TailwindCSS](https://tailwindcss.com/)
- [Prisma](https://prisma.io/)
### ☁️ Cloud Version
## Installation and usage
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)
Coming soon - we will update this Readme in the weeks ahead and show you how to leverage all the advantages of Formbricks
### 🐳 Self-hosted version
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)
## ✍️ Contribution
We are very happy if you are interested in contributing to Formbricks 🤗
Here are a few options:
- Star this repo
- Create issues every time you feel something is missing or goes wrong
- Upvote issues with 👍 reaction so we know what's the demand for 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.

2
apps/demo/.env.example Normal file
View File

@@ -0,0 +1,2 @@
NEXT_PUBLIC_FORMBRICKS_API_HOST=http://localhost:3000
NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID=YOUR_ENVIRONMENT_ID

4
apps/demo/.eslintrc.js Normal file
View File

@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: ["formbricks"],
};

36
apps/demo/.gitignore vendored Normal file
View File

@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
.env*.local
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts

View File

@@ -0,0 +1,13 @@
import Sidebar from "./Sidebar";
export default function LayoutApp({ children }: { children: React.ReactNode }) {
return (
<div className="min-h-full">
{/* Static sidebar for desktop */}
<div className="hidden lg:fixed lg:inset-y-0 lg:flex lg:w-64 lg:flex-col">
<Sidebar />
</div>
<div className="flex flex-1 flex-col lg:pl-64">{children}</div>
</div>
);
}

View File

@@ -0,0 +1,65 @@
import { classNames } from "@/lib/utils";
import {
ClockIcon,
CogIcon,
CreditCardIcon,
DocumentChartBarIcon,
HomeIcon,
QuestionMarkCircleIcon,
ScaleIcon,
ShieldCheckIcon,
UserGroupIcon,
} from "@heroicons/react/24/outline";
const navigation = [
{ name: "Home", href: "#", icon: HomeIcon, current: true },
{ name: "History", href: "#", icon: ClockIcon, current: false },
{ name: "Balances", href: "#", icon: ScaleIcon, current: false },
{ name: "Cards", href: "#", icon: CreditCardIcon, current: false },
{ name: "Recipients", href: "#", icon: UserGroupIcon, current: false },
{ name: "Reports", href: "#", icon: DocumentChartBarIcon, current: false },
];
const secondaryNavigation = [
{ name: "Settings", href: "#", icon: CogIcon },
{ name: "Help", href: "#", icon: QuestionMarkCircleIcon },
{ name: "Privacy", href: "#", icon: ShieldCheckIcon },
];
export default function Sidebar({}) {
return (
<div className="flex flex-grow flex-col overflow-y-auto bg-cyan-700 pb-4 pt-5">
<nav
className="mt-5 flex flex-1 flex-col divide-y divide-cyan-800 overflow-y-auto"
aria-label="Sidebar">
<div className="space-y-1 px-2">
{navigation.map((item) => (
<a
key={item.name}
href={item.href}
className={classNames(
item.current ? "bg-cyan-800 text-white" : "text-cyan-100 hover:bg-cyan-600 hover:text-white",
"group flex items-center rounded-md px-2 py-2 text-sm font-medium leading-6"
)}
aria-current={item.current ? "page" : undefined}>
<item.icon className="mr-4 h-6 w-6 flex-shrink-0 text-cyan-200" aria-hidden="true" />
{item.name}
</a>
))}
</div>
<div className="mt-6 pt-6">
<div className="space-y-1 px-2">
{secondaryNavigation.map((item) => (
<a
key={item.name}
href={item.href}
className="group flex items-center rounded-md px-2 py-2 text-sm font-medium leading-6 text-cyan-100 hover:bg-cyan-600 hover:text-white">
<item.icon className="mr-4 h-6 w-6 text-cyan-200" aria-hidden="true" />
{item.name}
</a>
))}
</div>
</div>
</nav>
</div>
);
}

3
apps/demo/lib/utils.ts Normal file
View File

@@ -0,0 +1,3 @@
export function classNames(...classes: any) {
return classes.filter(Boolean).join(" ");
}

5
apps/demo/next-env.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

27
apps/demo/next.config.js Normal file
View File

@@ -0,0 +1,27 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
async redirects() {
return [
{
source: "/",
destination: "/app",
permanent: false,
},
];
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "tailwindui.com",
},
{
protocol: "https",
hostname: "images.unsplash.com",
},
],
},
};
module.exports = nextConfig;

23
apps/demo/package.json Normal file
View File

@@ -0,0 +1,23 @@
{
"name": "@formbricks/demo",
"version": "0.1.0",
"private": true,
"scripts": {
"clean": "rimraf .turbo node_modules .next",
"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.18",
"next": "13.4.12",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"eslint-config-formbricks": "workspace:*"
}
}

50
apps/demo/pages/_app.tsx Normal file
View File

@@ -0,0 +1,50 @@
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";
declare const window: any;
if (typeof window !== "undefined") {
if (process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID && process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST) {
formbricks.init({
environmentId: process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID,
apiHost: process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST,
debug: true,
});
window.formbricks = formbricks;
}
}
export default function App({ Component, pageProps }: AppProps) {
const router = useRouter();
useEffect(() => {
// Connect next.js router to Formbricks
if (process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID && process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST) {
const handleRouteChange = formbricks?.registerRouteChange;
router.events.on("routeChangeComplete", handleRouteChange);
return () => {
router.events.off("routeChangeComplete", handleRouteChange);
};
}
}, []);
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 in apps/demo/.env
</div>
)}
<Component {...pageProps} />
</>
);
}

View File

@@ -0,0 +1,13 @@
import { Html, Head, Main, NextScript } from "next/document";
export default function Document() {
return (
<Html lang="en" className="h-full bg-gray-50">
<Head />
<body className="h-full">
<Main />
<NextScript />
</body>
</Html>
);
}

View File

@@ -0,0 +1,191 @@
import fbsetup from "../../public/fb-setup.png";
import formbricks from "@formbricks/js";
import Image from "next/image";
export default function AppPage({}) {
return (
<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="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>
<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>
</div>
);
}

View File

@@ -0,0 +1,152 @@
import formbricks from "@formbricks/js";
import { useRouter } from "next/router";
import { FormEvent } from "react";
export default function SiginPage() {
const router = useRouter();
const submitAction = (e: FormEvent) => {
e.preventDefault();
if (process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID && process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST) {
formbricks.setEmail("matti@example.com");
formbricks.setUserId("123456");
formbricks.setAttribute("Plan", "Premium");
}
router.push("/app");
};
return (
<div className="flex min-h-full flex-col justify-center py-12 sm:px-6 lg:px-8">
<div className="sm:mx-auto sm:w-full sm:max-w-md">
<h2 className="mt-6 text-center text-3xl font-bold tracking-tight text-gray-900">
Sign in to your account
</h2>
<p className="mt-2 text-center text-sm text-gray-600">
Or{" "}
<a href="#" className="font-medium text-indigo-600 hover:text-indigo-500">
start your 14-day free trial
</a>
</p>
</div>
<div className="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
<div className="bg-white px-4 py-8 shadow sm:rounded-lg sm:px-10">
<form className="space-y-6" onSubmit={submitAction}>
<div>
<label htmlFor="email" className="block text-sm font-medium leading-6 text-gray-900">
Email address
</label>
<div className="mt-2">
<input
id="email"
name="email"
type="email"
autoComplete="email"
required
className="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
/>
</div>
</div>
<div>
<label htmlFor="password" className="block text-sm font-medium leading-6 text-gray-900">
Password
</label>
<div className="mt-2">
<input
id="password"
name="password"
type="password"
autoComplete="current-password"
required
className="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
/>
</div>
</div>
<div className="flex items-center justify-between">
<div className="flex items-center">
<input
id="remember-me"
name="remember-me"
type="checkbox"
className="h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600"
/>
<label htmlFor="remember-me" className="ml-2 block text-sm text-gray-900">
Remember me
</label>
</div>
<div className="text-sm">
<a href="#" className="font-medium text-indigo-600 hover:text-indigo-500">
Forgot your password?
</a>
</div>
</div>
<div>
<button
type="submit"
className="flex w-full justify-center rounded-md bg-indigo-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">
Sign in
</button>
</div>
</form>
<div className="mt-6">
<div className="relative">
<div className="absolute inset-0 flex items-center">
<div className="w-full border-t border-gray-300" />
</div>
<div className="relative flex justify-center text-sm">
<span className="bg-white px-2 text-gray-500">Or continue with</span>
</div>
</div>
<div className="mt-6 grid grid-cols-3 gap-3">
<div>
<a
href="#"
className="inline-flex w-full justify-center rounded-md bg-white px-4 py-2 text-gray-500 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0">
<span className="sr-only">Sign in with Facebook</span>
<svg className="h-5 w-5" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20">
<path
fillRule="evenodd"
d="M20 10c0-5.523-4.477-10-10-10S0 4.477 0 10c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V10h2.54V7.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V10h2.773l-.443 2.89h-2.33v6.988C16.343 19.128 20 14.991 20 10z"
clipRule="evenodd"
/>
</svg>
</a>
</div>
<div>
<a
href="#"
className="inline-flex w-full justify-center rounded-md bg-white px-4 py-2 text-gray-500 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0">
<span className="sr-only">Sign in with Twitter</span>
<svg className="h-5 w-5" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20">
<path d="M6.29 18.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0020 3.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.073 4.073 0 01.8 7.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 010 16.407a11.616 11.616 0 006.29 1.84" />
</svg>
</a>
</div>
<div>
<a
href="#"
className="inline-flex w-full justify-center rounded-md bg-white px-4 py-2 text-gray-500 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0">
<span className="sr-only">Sign in with GitHub</span>
<svg className="h-5 w-5" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20">
<path
fillRule="evenodd"
d="M10 0C4.477 0 0 4.484 0 10.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0110 4.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.942.359.31.678.921.678 1.856 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0020 10.017C20 4.484 15.522 0 10 0z"
clipRule="evenodd"
/>
</svg>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
);
}

View File

@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="31" fill="none"><g opacity=".9"><path fill="url(#a)" d="M13 .4v29.3H7V6.3h-.2L0 10.5V5L7.2.4H13Z"/><path fill="url(#b)" d="M28.8 30.1c-2.2 0-4-.3-5.7-1-1.7-.8-3-1.8-4-3.1a7.7 7.7 0 0 1-1.4-4.6h6.2c0 .8.3 1.4.7 2 .4.5 1 .9 1.7 1.2.7.3 1.6.4 2.5.4 1 0 1.7-.2 2.5-.5.7-.3 1.3-.8 1.7-1.4.4-.6.6-1.2.6-2s-.2-1.5-.7-2.1c-.4-.6-1-1-1.8-1.4-.8-.4-1.8-.5-2.9-.5h-2.7v-4.6h2.7a6 6 0 0 0 2.5-.5 4 4 0 0 0 1.7-1.3c.4-.6.6-1.3.6-2a3.5 3.5 0 0 0-2-3.3 5.6 5.6 0 0 0-4.5 0 4 4 0 0 0-1.7 1.2c-.4.6-.6 1.2-.6 2h-6c0-1.7.6-3.2 1.5-4.5 1-1.3 2.2-2.3 3.8-3C25 .4 26.8 0 28.8 0s3.8.4 5.3 1.1c1.5.7 2.7 1.7 3.6 3a7.2 7.2 0 0 1 1.2 4.2c0 1.6-.5 3-1.5 4a7 7 0 0 1-4 2.2v.2c2.2.3 3.8 1 5 2.2a6.4 6.4 0 0 1 1.6 4.6c0 1.7-.5 3.1-1.4 4.4a9.7 9.7 0 0 1-4 3.1c-1.7.8-3.7 1.1-5.8 1.1Z"/></g><defs><linearGradient id="a" x1="20" x2="20" y1="0" y2="30.1" gradientUnits="userSpaceOnUse"><stop/><stop offset="1" stop-color="#3D3D3D"/></linearGradient><linearGradient id="b" x1="20" x2="20" y1="0" y2="30.1" gradientUnits="userSpaceOnUse"><stop/><stop offset="1" stop-color="#3D3D3D"/></linearGradient></defs></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 283 64"><path fill="black" d="M141 16c-11 0-19 7-19 18s9 18 20 18c7 0 13-3 16-7l-7-5c-2 3-6 4-9 4-5 0-9-3-10-7h28v-3c0-11-8-18-19-18zm-9 15c1-4 4-7 9-7s8 3 9 7h-18zm117-15c-11 0-19 7-19 18s9 18 20 18c6 0 12-3 16-7l-8-5c-2 3-5 4-8 4-5 0-9-3-11-7h28l1-3c0-11-8-18-19-18zm-10 15c2-4 5-7 10-7s8 3 9 7h-19zm-39 3c0 6 4 10 10 10 4 0 7-2 9-5l8 5c-3 5-9 8-17 8-11 0-19-7-19-18s8-18 19-18c8 0 14 3 17 8l-8 5c-2-3-5-5-9-5-6 0-10 4-10 10zm83-29v46h-9V5h9zM37 0l37 64H0L37 0zm92 5-27 48L74 5h10l18 30 17-30h10zm59 12v10l-3-1c-6 0-10 4-10 10v15h-9V17h9v9c0-5 6-9 13-9z"/></svg>

After

Width:  |  Height:  |  Size: 629 B

View File

@@ -0,0 +1,12 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./app/**/*.{js,ts,jsx,tsx}",
"./pages/**/*.{js,ts,jsx,tsx}",
"./components/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [require("@tailwindcss/forms")],
};

23
apps/demo/tsconfig.json Normal file
View File

@@ -0,0 +1,23 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"paths": {
"@/*": ["./*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}

View File

@@ -0,0 +1,3 @@
NEXT_PUBLIC_FORMBRICKS_COM_API_HOST=http://localhost:3000
NEXT_PUBLIC_FORMBRICKS_COM_ENVIRONMENT_ID=
NEXT_PUBLIC_FORMBRICKS_COM_DOCS_FEEDBACK_SURVEY_ID=

View File

@@ -23,7 +23,6 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
.env*.local
@@ -35,4 +34,4 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts
.vscode
public/sitemap*.xml

View File

@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2022 Matthias Nannt
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,34 +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
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
## Learn More
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

View File

@@ -0,0 +1,74 @@
import { useState } from "react";
import { handleFeedbackSubmit, updateFeedback } from "../../lib/handleFeedbackSubmit";
import { Popover, PopoverTrigger, PopoverContent } from "@formbricks/ui";
import { Button } from "@formbricks/ui";
import { useRouter } from "next/router";
export const DocsFeedback: React.FC = () => {
const router = useRouter();
const [isOpen, setIsOpen] = useState(false);
const [sharedFeedback, setSharedFeedback] = useState(false);
const [responseId, setResponseId] = useState(null);
const [freeText, setFreeText] = useState("");
if (
!process.env.NEXT_PUBLIC_FORMBRICKS_COM_DOCS_FEEDBACK_SURVEY_ID ||
!process.env.NEXT_PUBLIC_FORMBRICKS_COM_API_HOST ||
!process.env.NEXT_PUBLIC_FORMBRICKS_COM_ENVIRONMENT_ID
) {
return null;
}
return (
<div className="mt-6 inline-flex cursor-default items-center rounded-md border border-slate-200 bg-white p-4 text-slate-800 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-300">
{!sharedFeedback ? (
<div className="text-center md:text-left">
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) => (
<PopoverTrigger
key={option}
className="rounded border border-slate-200 bg-slate-50 px-4 py-2 text-slate-900 hover:bg-slate-100 hover:text-slate-600 focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-1 dark:border-slate-700 dark:bg-slate-700 dark:text-slate-300 dark:hover:bg-slate-600 dark:hover:text-slate-300"
onClick={async () => {
const id = await handleFeedbackSubmit(option, router.asPath);
setResponseId(id);
}}>
{option}
</PopoverTrigger>
))}
</div>
<PopoverContent className="border-slate-300 bg-white dark:border-slate-500 dark:bg-slate-700">
<form>
<textarea
value={freeText}
onChange={(e) => setFreeText(e.target.value)}
placeholder="Please explain why..."
className="focus:border-brand-dark focus:ring-brand-dark mb-2 w-full rounded-md bg-white text-sm text-slate-900 dark:bg-slate-600 dark:text-slate-200 dark:placeholder:text-slate-200"
/>
<div className="text-right">
<Button
type="submit"
variant="primary"
onClick={(e) => {
e.preventDefault();
updateFeedback(freeText, responseId);
setIsOpen(false);
setFreeText("");
setSharedFeedback(true);
}}>
Send
</Button>
</div>
</form>
</PopoverContent>
</Popover>
</div>
) : (
<div>Thanks a lot, boss! 🤝</div>
)}
</div>
);
};
export default DocsFeedback;

View File

@@ -0,0 +1,13 @@
import { Button } from "@formbricks/ui";
declare global {
interface Window {
formbricks: any;
}
}
export const FeedbackButton: React.FC = () => {
return <Button variant="secondary">Open Feedback</Button>;
};
export default FeedbackButton;

View File

@@ -1,18 +1,17 @@
import { useCallback, useEffect, useState } from "react";
import Link from "next/link";
import { useRouter } from "next/router";
import clsx from "clsx";
import { Hero } from "@/components/shared/Hero";
import { FooterLogo, Logomark } from "@/components/shared/Logo";
import { FooterLogo } from "@/components/shared/Logo";
import { MobileNavigation } from "@/components/shared/MobileNavigation";
import { Navigation } from "@/components/shared/Navigation";
import { Prose } from "@/components/shared/Prose";
import { Search } from "@/components/shared/Search";
import { ThemeSelector } from "@/components/shared/ThemeSelector";
import navigation from "@/lib/docsNavigation";
import Button from "../shared/Button";
import { Button } from "@formbricks/ui";
import clsx from "clsx";
import Link from "next/link";
import { useRouter } from "next/router";
import { useEffect, useRef, useState } from "react";
import MetaInformation from "../shared/MetaInformation";
import DocsFeedback from "./DocsFeedback";
function GitHubIcon(props: any) {
return (
@@ -23,7 +22,6 @@ function GitHubIcon(props: any) {
}
function Header({ navigation }: any) {
const router = useRouter();
let [isScrolled, setIsScrolled] = useState(false);
useEffect(() => {
@@ -40,9 +38,9 @@ function Header({ navigation }: any) {
return (
<header
className={clsx(
"sticky top-0 z-50 flex flex-wrap items-center justify-between bg-white px-4 py-5 shadow-md shadow-slate-900/5 transition duration-500 dark:shadow-none sm:px-6 lg:px-8",
"sticky top-0 z-50 flex flex-wrap items-center justify-between bg-slate-100 px-4 py-5 shadow-md shadow-slate-900/5 transition duration-500 dark:shadow-none sm:px-6 lg:px-8",
isScrolled
? "dark:bg-slate-900/95 dark:backdrop-blur dark:[@supports(backdrop-filter:blur(0))]:bg-slate-900/75"
? "bg-slate-100/90 backdrop-blur dark:bg-slate-900/90 [@supports(backdrop-filter:blur(0))]:bg-slate-100/75 dark:[@supports(backdrop-filter:blur(0))]:bg-slate-900/75"
: "dark:bg-transparent"
)}>
<div className="mr-6 flex lg:hidden">
@@ -50,27 +48,30 @@ function Header({ navigation }: any) {
</div>
<div className="relative flex flex-grow basis-0 items-center">
<Link href="/" aria-label="Home page">
<Logomark className="h-9 w-9 lg:hidden" />
<FooterLogo className="hidden h-9 w-auto fill-slate-700 dark:fill-slate-100 lg:block" />
<FooterLogo className="h-8 w-auto sm:h-10" />
</Link>
<div>
<Button
variant="secondary"
onClick={() => router.push("/")}
size="sm"
className="ml-10 flex justify-center opacity-60">
&larr; Back to Mainpage
</Button>
</div>
</div>
<div className="-my-5 mr-6 sm:mr-8 md:mr-0">
<Search />
</div>
<div className="relative flex basis-0 justify-end gap-6 sm:gap-8 md:flex-grow">
<ThemeSelector className="relative z-10" />
<Link href="https://github.com" className="group" aria-label="GitHub">
<GitHubIcon className="h-6 w-6 fill-slate-400 group-hover:fill-slate-500 dark:group-hover:fill-slate-300" />
</Link>
<div className="hidden items-center justify-end md:flex md:flex-1 lg:w-0">
<ThemeSelector className="relative z-10 mr-5" />
<Button
variant="secondary"
EndIcon={GitHubIcon}
endIconClassName="fill-slate-800 dark:fill-slate-200 ml-2"
href="https://github.com/formbricks/formbricks"
target="_blank">
Star us on Github
</Button>
<Button
variant="highlight"
className="ml-2"
href="https://app.formbricks.com/auth/signup"
target="_blank">
Get started
</Button>
</div>
</header>
);
@@ -80,38 +81,82 @@ interface LayoutProps {
children: React.ReactNode;
meta: {
title: string;
description?: string;
};
}
export function Layout({ children, meta }: LayoutProps) {
export const Layout: React.FC<LayoutProps> = ({ children, meta }) => {
let router = useRouter();
let isHomePage = router.pathname === "/";
let allLinks = navigation.flatMap((section) => section.links);
let linkIndex = allLinks.findIndex((link) => link.href === router.pathname);
let previousPage = allLinks[linkIndex - 1];
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
title="Formbricks Documentation"
description="Modular, customizable, extendable. Take what you like, build on top what you need. Build your next big thing faster."
title={`Formbricks Docs | ${meta.title}`}
description={
meta.description ? meta.description : "Open-source Experience Management for Digital Products."
}
/>
<Header navigation={navigation} />
{isHomePage && <Hero />}
<div className="max-w-8xl relative mx-auto flex justify-center sm:px-2 lg:px-8 xl:px-12">
<div className="hidden lg:relative lg:block lg:flex-none">
<div className="absolute inset-y-0 right-0 w-[50vw] bg-slate-50 dark:hidden" />
<div className="absolute top-16 bottom-0 right-0 hidden h-12 w-px bg-gradient-to-t from-slate-800 dark:block" />
<div className="absolute top-28 bottom-0 right-0 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="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"
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:pr-0 lg:pl-8 xl:px-16">
<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">
<article>
{(meta.title || section) && (
<header className="mb-9 space-y-1">
@@ -129,6 +174,7 @@ export function Layout({ children, meta }: LayoutProps) {
)}
<Prose className="">{children}</Prose>
</article>
<DocsFeedback />
<dl className="mt-12 flex border-t border-slate-200 pt-6 dark:border-slate-800">
{previousPage && (
<div>
@@ -159,8 +205,17 @@ export function Layout({ children, meta }: LayoutProps) {
</div>
)}
</dl>
<div className="mt-16 rounded-xl border-2 border-slate-200 bg-slate-300 p-8 dark:border-slate-700/50 dark:bg-slate-800">
<h4 className="text-3xl font-semibold text-slate-500 dark:text-slate-50">Need help? 🤓</h4>
<p className="my-4 text-slate-500 dark:text-slate-400">
Join our Discord and ask away. We&apos;re happy to help where we can!
</p>
<Button variant="highlight" href="/discord" target="_blank">
Join Discord
</Button>
</div>
</div>
</div>
</>
);
}
};

View File

@@ -0,0 +1,74 @@
import { Button, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@formbricks/ui";
import { PlusIcon, TrashIcon } from "@heroicons/react/24/solid";
import { useState } from "react";
const DummyUI: React.FC = () => {
const eventClasses = [
{ id: "1", name: "View Dashboard" },
{ id: "2", name: "Upgrade to Pro" },
{ id: "3", name: "Cancel Plan" },
];
const [triggers, setTriggers] = useState<string[]>([eventClasses[0].id]);
const setTriggerEvent = (index: number, eventClassId: string) => {
setTriggers((prevTriggers) =>
prevTriggers.map((trigger, idx) => (idx === index ? eventClassId : trigger))
);
};
const addTriggerEvent = () => {
setTriggers((prevTriggers) => [...prevTriggers, eventClasses[0].id]);
};
const removeTriggerEvent = (index: number) => {
setTriggers((prevTriggers) => prevTriggers.filter((_, idx) => idx !== index));
};
return (
<>
{triggers.map((triggerEventClassId, idx) => (
<div className="mt-2" key={idx}>
<div className="inline-flex items-center">
<p className="mr-2 w-14 text-right text-sm text-slate-800 dark:text-slate-300">
{idx === 0 ? "When" : "or"}
</p>
<Select
value={triggerEventClassId}
onValueChange={(eventClassId) => setTriggerEvent(idx, eventClassId)}>
<SelectTrigger className="w-[180px] text-slate-800 dark:border-slate-400 dark:bg-slate-700 dark:text-slate-300">
<SelectValue className="" />
</SelectTrigger>
<SelectContent>
{eventClasses.map((eventClass) => (
<SelectItem
key={eventClass.id}
className="px-0.5 py-1 text-slate-800 dark:bg-slate-700 dark:text-slate-300 dark:ring-slate-700"
value={eventClass.id}>
{eventClass.name}
</SelectItem>
))}
</SelectContent>
</Select>
<button onClick={() => removeTriggerEvent(idx)}>
<TrashIcon className="ml-3 h-4 w-4 text-slate-400" />
</button>
</div>
</div>
))}
<div className="p-3">
<Button
variant="secondary"
className="dark:bg-slate-700 dark:text-slate-200 dark:hover:bg-slate-600"
onClick={() => {
addTriggerEvent();
}}>
<PlusIcon className="mr-2 h-4 w-4" />
Add event
</Button>
</div>
</>
);
};
export default DummyUI;

View File

@@ -0,0 +1,133 @@
import {
Button,
Input,
Label,
RadioGroup,
RadioGroupItem,
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@formbricks/ui";
import { CursorArrowRaysIcon } from "@heroicons/react/24/solid";
import Modal from "../shared/Modal";
interface EventDetailModalProps {
open: boolean;
setOpen: (v: boolean) => void;
}
export const AddNoCodeEventModalDummy: React.FC<EventDetailModalProps> = ({ open, setOpen }) => {
return (
<Modal open={open} setOpen={setOpen} noPadding>
<div className="flex h-full flex-col rounded-lg bg-slate-50 dark:bg-slate-800">
<div className="rounded-t-lg bg-slate-100 dark:bg-slate-700">
<div className="flex items-center justify-between p-6">
<div className="flex items-center space-x-2">
<div className="mr-1.5 h-6 w-6 text-slate-500">
<CursorArrowRaysIcon />
</div>
<div>
<div className="text-xl font-medium text-slate-700 dark:text-slate-300">Add Action</div>
<div className="text-sm text-slate-500">
Create a new user action to display surveys when it&apos;s triggered.
</div>
</div>
</div>
</div>
</div>
<form>
<div className="flex justify-between rounded-lg p-6">
<div className="space-y-4">
<div>
<Label>Select By</Label>
<RadioGroup className="grid grid-cols-2 gap-1 md:grid-cols-3" defaultValue="pageUrl">
<div className="flex items-center space-x-2 rounded-lg border border-slate-200 p-3 dark:border-slate-500">
<RadioGroupItem value="pageUrl" id="pageUrl" className="bg-slate-50" />
<Label htmlFor="pageUrl" className="cursor-pointer dark:text-slate-200">
Page URL
</Label>
</div>
<div className="flex items-center space-x-2 rounded-lg bg-slate-50 p-3 dark:bg-slate-600">
<RadioGroupItem disabled value="innerHtml" id="innerHtml" className="bg-slate-50" />
<Label
htmlFor="innerHtml"
className="flex cursor-not-allowed items-center text-slate-500 dark:text-slate-400">
Inner Text
</Label>
</div>
<div className="hidden items-center space-x-2 rounded-lg bg-slate-50 p-3 dark:bg-slate-600 md:flex">
<RadioGroupItem disabled value="cssSelector" id="cssSelector" className="bg-slate-50" />
<Label
htmlFor="cssSelector"
className="flex cursor-not-allowed items-center text-slate-500">
CSS Selector
</Label>
</div>
</RadioGroup>
</div>
<div className="grid grid-cols-2 gap-x-2">
<div>
<Label>Name</Label>
<Input placeholder="e.g. Dashboard Page View" defaultValue="Dashboard view" />
</div>
<div>
<Label>Description</Label>
<Input placeholder="e.g. User visited dashboard" defaultValue="User visited dashboard" />
</div>
</div>
<div className="grid w-full grid-cols-3 gap-x-8">
<div className="col-span-1">
<Label>URL</Label>
<Select defaultValue="endsWith">
<SelectTrigger
className="w-[110px] dark:text-slate-200 md:w-[180px]"
onClick={(e) => e.preventDefault()}
disabled>
<SelectValue placeholder="Select match type" />
</SelectTrigger>
<SelectContent>
<SelectItem value="exactMatch">Exactly matches</SelectItem>
<SelectItem value="contains">Contains</SelectItem>
<SelectItem value="startsWith">Starts with</SelectItem>
<SelectItem value="endsWith">Ends with</SelectItem>
<SelectItem value="notMatch">Does not exactly match</SelectItem>
<SelectItem value="notContains">Does not contain</SelectItem>
</SelectContent>
</Select>
</div>
<div className="col-span-2 flex w-full items-end">
<Input type="text" defaultValue="/dashboard" />
</div>
</div>
</div>
</div>
<div className="flex justify-end border-t border-slate-200 p-6 dark:border-slate-700">
<div className="flex space-x-2">
<Button
variant="minimal"
onClick={(e) => {
e.preventDefault();
setOpen(false);
}}>
Cancel
</Button>
<Button
variant="primary"
onClick={(e) => {
e.preventDefault();
setOpen(false);
}}>
Add event
</Button>
</div>
</div>
</form>
</div>
</Modal>
);
};
export default AddNoCodeEventModalDummy;

View File

@@ -0,0 +1,45 @@
import type { CTAQuestion } from "@formbricks/types/questions";
import Headline from "./Headline";
import HtmlBody from "./HtmlBody";
interface CTAQuestionProps {
question: CTAQuestion;
onSubmit: (data: { [x: string]: any }) => void;
lastQuestion: boolean;
brandColor: string;
}
export default function CTAQuestion({ question, onSubmit, lastQuestion, brandColor }: CTAQuestionProps) {
return (
<div>
<Headline headline={question.headline} questionId={question.id} />
<HtmlBody htmlString={question.html || ""} questionId={question.id} />
<div className="mt-4 flex w-full justify-end">
<div></div>
{!question.required && (
<button
type="button"
onClick={() => {
onSubmit({ [question.id]: "dismissed" });
}}
className="mr-4 flex items-center rounded-md px-3 py-3 text-base font-medium leading-4 text-slate-500 hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-slate-500 focus:ring-offset-2 dark:border-slate-400 dark:text-slate-400">
{question.dismissButtonLabel || "Skip"}
</button>
)}
<button
type="button"
onClick={() => {
if (question.buttonExternal && question.buttonUrl) {
window?.open(question.buttonUrl, "_blank")?.focus();
}
onSubmit({ [question.id]: "clicked" });
}}
className="flex items-center rounded-md border border-transparent px-3 py-3 text-base font-medium leading-4 text-white shadow-sm hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-slate-500 focus:ring-offset-2"
style={{ backgroundColor: brandColor }}>
{question.buttonLabel || (lastQuestion ? "Finish" : "Next")}
</button>
</div>
</div>
);
}

View File

@@ -0,0 +1,10 @@
import clsx from "clsx";
interface ContentWrapperProps {
children: React.ReactNode;
className?: string;
}
export default function ContentWrapper({ children, className }: ContentWrapperProps) {
return <div className={clsx("mx-auto max-w-7xl p-6", className)}>{children}</div>;
}

View File

@@ -0,0 +1,44 @@
// DemoPreview.tsx
import React, { useEffect, useState } from "react";
import PreviewSurvey from "./PreviewSurvey";
import { findTemplateByName } from "./templates";
import type { Template } from "@formbricks/types/templates";
interface DemoPreviewProps {
template: string;
}
const DemoPreview: React.FC<DemoPreviewProps> = ({ template }) => {
const [activeQuestionId, setActiveQuestionId] = useState<string | null>(null);
const selectedTemplate: Template | undefined = findTemplateByName(template);
useEffect(() => {
if (selectedTemplate) {
setActiveQuestionId(selectedTemplate.preset.questions[0].id);
}
}, [selectedTemplate]);
if (!selectedTemplate) {
return <div>Template not found.</div>;
}
return (
<div className="mx-2 flex items-center justify-center rounded-xl border-2 border-slate-300 bg-slate-200 py-6 transition-transform duration-150 dark:border-slate-500 dark:bg-slate-700 md:mx-0">
<div className="flex flex-col items-center justify-around">
<p className="my-3 text-sm text-slate-500 dark:text-slate-300">Preview</p>
<div className="">
{selectedTemplate && (
<PreviewSurvey
activeQuestionId={activeQuestionId}
questions={selectedTemplate.preset.questions}
brandColor="#94a3b8"
setActiveQuestionId={setActiveQuestionId}
/>
)}
</div>
</div>
</div>
);
};
export default DemoPreview;

View File

@@ -0,0 +1,41 @@
import type { Template } from "@formbricks/types/templates";
import { useEffect, useState } from "react";
import PreviewSurvey from "./PreviewSurvey";
import TemplateList from "./TemplateList";
import { templates } from "./templates";
export default function SurveyTemplatesPage({}) {
const [activeTemplate, setActiveTemplate] = useState<Template | null>(null);
const [activeQuestionId, setActiveQuestionId] = useState<string | null>(null);
useEffect(() => {
if (templates.length > 0) {
setActiveTemplate(templates[0]);
setActiveQuestionId(templates[0]?.preset.questions[0]?.id || null);
}
}, []);
return (
<div className="flex h-screen flex-col overflow-x-auto">
<div className="relative z-0 flex flex-1 overflow-hidden">
<TemplateList
activeTemplate={activeTemplate}
onTemplateClick={(template) => {
setActiveQuestionId(template.preset.questions[0].id);
setActiveTemplate(template);
}}
/>
<aside className="group relative h-full flex-1 flex-shrink-0 overflow-hidden rounded-r-lg bg-slate-200 shadow-inner dark:bg-slate-700 md:flex md:flex-col">
{activeTemplate && (
<PreviewSurvey
activeQuestionId={activeQuestionId}
questions={activeTemplate.preset.questions}
brandColor="#94a3b8"
setActiveQuestionId={setActiveQuestionId}
/>
)}
</aside>
</div>
</div>
);
}

View File

@@ -0,0 +1,11 @@
export const Headline: React.FC<{ headline: string; questionId: string }> = ({ headline, questionId }) => {
return (
<label
htmlFor={questionId}
className="mb-1.5 block text-base font-semibold leading-6 text-slate-900 dark:text-slate-100">
{headline}
</label>
);
};
export default Headline;

View File

@@ -0,0 +1,11 @@
/* import { cleanHtml } from "../../lib/cleanHtml"; */
import { cleanHtml } from "@formbricks/lib/cleanHtml";
export default function HtmlBody({ htmlString, questionId }: { htmlString: string; questionId: string }) {
return (
<label
htmlFor={questionId}
className="fb-block fb-font-normal fb-leading-6 text-sm text-slate-500 dark:text-slate-300"
dangerouslySetInnerHTML={{ __html: cleanHtml(htmlString) }}></label>
);
}

View File

@@ -0,0 +1,31 @@
import { ReactNode, useEffect, useState } from "react";
import { cn } from "@formbricks/lib/cn";
export default function Modal({
children,
isOpen,
}: {
children: ReactNode;
isOpen: boolean;
reset: () => void;
}) {
const [show, setShow] = useState(false);
useEffect(() => {
setShow(isOpen);
}, [isOpen]);
return (
<div aria-live="assertive" className="flex items-end">
<div className="flex w-full flex-col items-center p-4 sm:items-end md:min-w-[390px]">
<div
className={cn(
show ? "translate-x-0 opacity-100" : "translate-x-28 opacity-0",
"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg bg-white px-4 py-6 shadow-lg ring-1 ring-black ring-opacity-5 transition-all duration-500 ease-in-out dark:bg-slate-900 sm:p-6"
)}>
{children}
</div>
</div>
</div>
);
}

View File

@@ -0,0 +1,107 @@
import { useState, useEffect } from "react";
import { cn } from "@formbricks/lib/cn";
import type { MultipleChoiceMultiQuestion } from "@formbricks/types/questions";
import Headline from "./Headline";
import Subheader from "./Subheader";
interface MultipleChoiceMultiProps {
question: MultipleChoiceMultiQuestion;
onSubmit: (data: { [x: string]: any }) => void;
lastQuestion: boolean;
brandColor: string;
}
export default function MultipleChoiceMultiQuestion({
question,
onSubmit,
lastQuestion,
brandColor,
}: MultipleChoiceMultiProps) {
const [selectedChoices, setSelectedChoices] = useState<string[]>([]);
const [isAtLeastOneChecked, setIsAtLeastOneChecked] = useState(false);
useEffect(() => {
setIsAtLeastOneChecked(selectedChoices.length > 0);
}, [selectedChoices]);
return (
<form
onSubmit={(e) => {
e.preventDefault();
if (question.required && selectedChoices.length <= 0) {
return;
}
const data = {
[question.id]: selectedChoices,
};
onSubmit(data);
setSelectedChoices([]); // reset value
}}>
<Headline headline={question.headline} questionId={question.id} />
<Subheader subheader={question.subheader} questionId={question.id} />
<div className="mt-4">
<fieldset>
<legend className="sr-only">Options</legend>
<div className="relative space-y-2 rounded-md bg-white dark:bg-slate-900">
{question.choices &&
question.choices.map((choice) => (
<label
key={choice.id}
className={cn(
selectedChoices.includes(choice.label)
? "z-10 border-slate-400 bg-slate-50 dark:border-slate-400 dark:bg-slate-600"
: "border-slate-200 dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600",
"relative flex cursor-pointer flex-col rounded-md border p-4 focus:outline-none"
)}>
<span className="flex items-center text-sm">
<input
type="checkbox"
id={choice.id}
name={question.id}
value={choice.label}
className="h-4 w-4 border border-slate-300 focus:ring-0 focus:ring-offset-0 dark:border-slate-600 dark:bg-slate-500"
aria-labelledby={`${choice.id}-label`}
checked={selectedChoices.includes(choice.label)}
onChange={(e) => {
if (e.currentTarget.checked) {
setSelectedChoices([...selectedChoices, e.currentTarget.value]);
} else {
setSelectedChoices(
selectedChoices.filter((label) => label !== e.currentTarget.value)
);
}
}}
style={{ borderColor: brandColor, color: brandColor }}
/>
<span
id={`${choice.id}-label`}
className="ml-3 font-medium text-slate-900 dark:text-slate-200">
{choice.label}
</span>
</span>
</label>
))}
</div>
</fieldset>
</div>
<input
type="text"
className="clip-[rect(0,0,0,0)] absolute m-[-1px] h-1 w-1 overflow-hidden whitespace-nowrap border-0 p-0 text-transparent caret-transparent focus:border-transparent focus:ring-0"
required={question.required}
value={isAtLeastOneChecked ? "checked" : ""}
onChange={() => {}}
/>
<div className="mt-4 flex w-full justify-between">
<div></div>
<button
type="submit"
className="flex items-center rounded-md border border-transparent px-3 py-3 text-base font-medium leading-4 text-white shadow-sm hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-slate-500 focus:ring-offset-2"
style={{ backgroundColor: brandColor }}>
{question.buttonLabel || (lastQuestion ? "Finish" : "Next")}
</button>
</div>
</form>
);
}

View File

@@ -0,0 +1,85 @@
import { cn } from "@formbricks/lib/cn";
import type { MultipleChoiceSingleQuestion } from "@formbricks/types/questions";
import { useState } from "react";
import Headline from "./Headline";
import Subheader from "./Subheader";
interface MultipleChoiceSingleProps {
question: MultipleChoiceSingleQuestion;
onSubmit: (data: { [x: string]: any }) => void;
lastQuestion: boolean;
brandColor: string;
}
export default function MultipleChoiceSingleQuestion({
question,
onSubmit,
lastQuestion,
brandColor,
}: MultipleChoiceSingleProps) {
const [selectedChoice, setSelectedChoice] = useState<string | null>(null);
return (
<form
onSubmit={(e) => {
e.preventDefault();
const data = {
[question.id]: e.currentTarget[question.id].value,
};
onSubmit(data);
setSelectedChoice(null); // reset form
}}>
<Headline headline={question.headline} questionId={question.id} />
<Subheader subheader={question.subheader} questionId={question.id} />
<div className="mt-4">
<fieldset>
<legend className="sr-only">Options</legend>
<div className="relative space-y-2 rounded-md">
{question.choices &&
question.choices.map((choice, idx) => (
<label
key={choice.id}
className={cn(
selectedChoice === choice.label
? "z-10 border-slate-400 bg-slate-50 dark:border-slate-400 dark:bg-slate-600"
: "border-slate-200 dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600",
"relative flex cursor-pointer flex-col rounded-md border p-4 hover:bg-slate-50 focus:outline-none"
)}>
<span className="flex items-center text-sm">
<input
type="radio"
id={choice.id}
name={question.id}
value={choice.label}
className="h-4 w-4 border border-slate-300 focus:ring-0 focus:ring-offset-0 dark:border-slate-600 dark:bg-slate-500"
aria-labelledby={`${choice.id}-label`}
onChange={(e) => {
setSelectedChoice(e.currentTarget.value);
}}
checked={selectedChoice === choice.label}
style={{ borderColor: brandColor, color: brandColor }}
required={question.required && idx === 0}
/>
<span
id={`${choice.id}-label`}
className="ml-3 font-medium text-slate-900 dark:text-slate-200">
{choice.label}
</span>
</span>
</label>
))}
</div>
</fieldset>
</div>
<div className="mt-4 flex w-full justify-between">
<div></div>
<button
type="submit"
className="flex items-center rounded-md border border-transparent px-3 py-3 text-base font-medium leading-4 text-white shadow-sm hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-slate-500 focus:ring-offset-2"
style={{ backgroundColor: brandColor }}>
{question.buttonLabel || (lastQuestion ? "Finish" : "Next")}
</button>
</div>
</form>
);
}

View File

@@ -0,0 +1,84 @@
import { useState } from "react";
import { cn } from "@formbricks/lib/cn";
import type { NPSQuestion } from "@formbricks/types/questions";
import Headline from "./Headline";
import Subheader from "./Subheader";
interface NPSQuestionProps {
question: NPSQuestion;
onSubmit: (data: { [x: string]: any }) => void;
lastQuestion: boolean;
brandColor: string;
}
export default function NPSQuestion({ question, onSubmit, lastQuestion, brandColor }: NPSQuestionProps) {
const [selectedChoice, setSelectedChoice] = useState<number | null>(null);
const handleSelect = (number: number) => {
setSelectedChoice(number);
if (question.required) {
onSubmit({
[question.id]: number,
});
}
};
return (
<form
onSubmit={(e) => {
e.preventDefault();
const data = {
[question.id]: selectedChoice,
};
onSubmit(data);
// reset form
}}>
<Headline headline={question.headline} questionId={question.id} />
<Subheader subheader={question.subheader} questionId={question.id} />
<div className="my-4">
<fieldset>
<legend className="sr-only">Options</legend>
<div className="flex">
{Array.from({ length: 11 }, (_, i) => i).map((number) => (
<label
key={number}
className={cn(
selectedChoice === number
? "z-10 bg-slate-50 dark:bg-slate-500"
: "dark:bg-slate-700 dark:hover:bg-slate-500",
"relative h-10 flex-1 cursor-pointer border bg-white text-center text-sm leading-10 text-slate-900 first:rounded-l-md last:rounded-r-md hover:bg-gray-100 focus:outline-none dark:border-slate-600 dark:text-white "
)}>
<input
type="radio"
name="nps"
value={number}
className="absolute h-full w-full cursor-pointer opacity-0"
onChange={() => handleSelect(number)}
required={question.required}
/>
{number}
</label>
))}
</div>
<div className="flex justify-between px-1.5 text-xs leading-6 text-slate-500">
<p>{question.lowerLabel}</p>
<p>{question.upperLabel}</p>
</div>
</fieldset>
</div>
{!question.required && (
<div className="mt-4 flex w-full justify-between">
<div></div>
<button
type="submit"
className="flex items-center rounded-md border border-transparent px-3 py-3 text-base font-medium leading-4 text-white shadow-sm hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-slate-500 focus:ring-offset-2"
style={{ backgroundColor: brandColor }}>
{question.buttonLabel || (lastQuestion ? "Finish" : "Next")}
</button>
</div>
)}
</form>
);
}

View File

@@ -0,0 +1,56 @@
import type { OpenTextQuestion } from "@formbricks/types/questions";
import { useState } from "react";
import Headline from "./Headline";
import Subheader from "./Subheader";
interface OpenTextQuestionProps {
question: OpenTextQuestion;
onSubmit: (data: { [x: string]: any }) => void;
lastQuestion: boolean;
brandColor: string;
}
export default function OpenTextQuestion({
question,
onSubmit,
lastQuestion,
brandColor,
}: OpenTextQuestionProps) {
const [value, setValue] = useState<string>("");
return (
<form
onSubmit={(e) => {
e.preventDefault();
const data = {
[question.id]: value,
};
setValue(""); // reset value
onSubmit(data);
}}>
<Headline headline={question.headline} questionId={question.id} />
<Subheader subheader={question.subheader} questionId={question.id} />
<div className="mt-4">
<textarea
rows={3}
name={question.id}
id={question.id}
value={value}
onChange={(e) => setValue(e.target.value)}
placeholder={question.placeholder}
required={question.required}
className="block w-full rounded-md border border-slate-100 bg-slate-50 p-2 shadow-sm focus:border-slate-500 focus:ring-0 dark:border-slate-500 dark:bg-slate-700 dark:text-white sm:text-sm"></textarea>
</div>
<div className="mt-4 flex w-full justify-between">
<div></div>
<button
type="submit"
className="flex items-center rounded-md border border-transparent px-3 py-3 text-base font-medium leading-4 text-white shadow-sm hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-slate-500 focus:ring-offset-2"
style={{ backgroundColor: brandColor }}>
{question.buttonLabel || (lastQuestion ? "Finish" : "Next")}
</button>
</div>
</form>
);
}

View File

@@ -0,0 +1,27 @@
import clsx from "clsx";
import { ReactNode, useEffect, useState } from "react";
export const Modal: React.FC<{ children: ReactNode; isOpen: boolean }> = ({ children, isOpen }) => {
const [show, setShow] = useState(false);
useEffect(() => {
setShow(isOpen);
}, [isOpen]);
return (
<div
aria-live="assertive"
className="pointer-events-none absolute inset-0 flex items-end px-4 py-6 sm:p-6">
<div className="flex w-full flex-col items-center space-y-4 sm:items-end">
<div
className={clsx(
show ? "translate-x-0 opacity-100" : "translate-x-28 opacity-0",
"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg bg-white px-4 py-6 shadow-lg ring-1 ring-black ring-opacity-5 transition-all duration-500 ease-in-out sm:p-6"
)}>
{children}
</div>
</div>
</div>
);
};
export default Modal;

View File

@@ -0,0 +1,89 @@
import { useState } from "react";
import Modal from "./Modal";
import QuestionConditional from "./QuestionConditional";
import type { Question } from "@formbricks/types/questions";
import { Survey } from "@formbricks/types/surveys";
import ThankYouCard from "./ThankYouCard";
interface PreviewSurveyProps {
localSurvey?: Survey;
setActiveQuestionId: (id: string | null) => void;
activeQuestionId?: string | null;
questions: Question[];
brandColor: string;
}
export default function PreviewSurvey({
localSurvey,
setActiveQuestionId,
activeQuestionId,
questions,
brandColor,
}: PreviewSurveyProps) {
const [isModalOpen, setIsModalOpen] = useState(true);
const gotoNextQuestion = () => {
const currentIndex = questions.findIndex((q) => q.id === activeQuestionId);
if (currentIndex < questions.length - 1) {
setActiveQuestionId(questions[currentIndex + 1].id);
} else {
if (localSurvey?.thankYouCard?.enabled) {
setActiveQuestionId("thank-you-card");
} else {
setIsModalOpen(false);
setTimeout(() => {
setActiveQuestionId(questions[0].id);
setIsModalOpen(true);
}, 500);
if (localSurvey?.thankYouCard?.enabled) {
setActiveQuestionId("thank-you-card");
} else {
setIsModalOpen(false);
setTimeout(() => {
setActiveQuestionId(questions[0].id);
setIsModalOpen(true);
}, 500);
}
}
}
};
const resetPreview = () => {
setIsModalOpen(false);
setTimeout(() => {
setActiveQuestionId(questions[0].id);
setIsModalOpen(true);
}, 500);
};
if (!activeQuestionId) {
return null;
}
return (
<>
<Modal isOpen={isModalOpen} reset={resetPreview}>
{activeQuestionId == "thank-you-card" ? (
<ThankYouCard
brandColor={brandColor}
headline={localSurvey?.thankYouCard?.headline || ""}
subheader={localSurvey?.thankYouCard?.subheader || ""}
/>
) : (
questions.map(
(question, idx) =>
activeQuestionId === question.id && (
<QuestionConditional
key={question.id}
question={question}
brandColor={brandColor}
lastQuestion={idx === questions.length - 1}
onSubmit={gotoNextQuestion}
/>
)
)
)}
</Modal>
</>
);
}

View File

@@ -0,0 +1,11 @@
export const Progress: React.FC<{ progress: number; brandColor: string }> = ({ progress, brandColor }) => {
return (
<div className="h-1 w-full rounded-full bg-slate-200">
<div
className="h-1 rounded-full bg-slate-700"
style={{ backgroundColor: brandColor, width: `${Math.floor(progress * 100)}%` }}></div>
</div>
);
};
export default Progress;

View File

@@ -0,0 +1,65 @@
import { QuestionType, type Question } from "@formbricks/types/questions";
import OpenTextQuestion from "./OpenTextQuestion";
import MultipleChoiceSingleQuestion from "./MultipleChoiceSingleQuestion";
import MultipleChoiceMultiQuestion from "./MultipleChoiceMultiQuestion";
import NPSQuestion from "./NPSQuestion";
import CTAQuestion from "./CTAQuestion";
import RatingQuestion from "./RatingQuestion";
interface QuestionConditionalProps {
question: Question;
onSubmit: (data: { [x: string]: any }) => void;
lastQuestion: boolean;
brandColor: string;
}
export default function QuestionConditional({
question,
onSubmit,
lastQuestion,
brandColor,
}: QuestionConditionalProps) {
return question.type === QuestionType.OpenText ? (
<OpenTextQuestion
question={question}
onSubmit={onSubmit}
lastQuestion={lastQuestion}
brandColor={brandColor}
/>
) : question.type === QuestionType.MultipleChoiceSingle ? (
<MultipleChoiceSingleQuestion
question={question}
onSubmit={onSubmit}
lastQuestion={lastQuestion}
brandColor={brandColor}
/>
) : question.type === QuestionType.MultipleChoiceMulti ? (
<MultipleChoiceMultiQuestion
question={question}
onSubmit={onSubmit}
lastQuestion={lastQuestion}
brandColor={brandColor}
/>
) : question.type === QuestionType.NPS ? (
<NPSQuestion
question={question}
onSubmit={onSubmit}
lastQuestion={lastQuestion}
brandColor={brandColor}
/>
) : question.type === QuestionType.CTA ? (
<CTAQuestion
question={question}
onSubmit={onSubmit}
lastQuestion={lastQuestion}
brandColor={brandColor}
/>
) : question.type === QuestionType.Rating ? (
<RatingQuestion
question={question}
onSubmit={onSubmit}
lastQuestion={lastQuestion}
brandColor={brandColor}
/>
) : null;
}

View File

@@ -0,0 +1,91 @@
import type { RatingQuestion } from "@formbricks/types/questions";
import { useState } from "react";
import { cn } from "@formbricks/lib/cn";
import Headline from "./Headline";
import Subheader from "./Subheader";
interface RatingQuestionProps {
question: RatingQuestion;
onSubmit: (data: { [x: string]: any }) => void;
lastQuestion: boolean;
brandColor: string;
}
export default function RatingQuestion({
question,
onSubmit,
lastQuestion,
brandColor,
}: RatingQuestionProps) {
const [selectedChoice, setSelectedChoice] = useState<number | null>(null);
const handleSelect = (number: number) => {
setSelectedChoice(number);
if (question.required) {
onSubmit({
[question.id]: number,
});
setSelectedChoice(null); // reset choice
}
};
return (
<form
onSubmit={(e) => {
e.preventDefault();
const data = {
[question.id]: selectedChoice,
};
setSelectedChoice(null); // reset choice
onSubmit(data);
}}>
<Headline headline={question.headline} questionId={question.id} />
<Subheader subheader={question.subheader} questionId={question.id} />
<div className="my-4">
<fieldset>
<legend className="sr-only">Options</legend>
<div className="flex">
{Array.from({ length: question.range }, (_, i) => i + 1).map((number) => (
<label
key={number}
className={cn(
selectedChoice === number
? "z-10 border-slate-400 bg-slate-50"
: "bg-white hover:bg-gray-100 dark:bg-slate-700 dark:hover:bg-slate-500",
"relative h-10 flex-1 cursor-pointer border border-slate-100 text-center text-sm leading-10 text-slate-800 first:rounded-l-md last:rounded-r-md focus:outline-none dark:border-slate-500 dark:text-slate-200 "
)}>
<input
type="radio"
name="rating"
value={number}
className="absolute h-full w-full cursor-pointer opacity-0"
onChange={() => handleSelect(number)}
required={question.required}
/>
{number}
</label>
))}
</div>
<div className="flex justify-between px-1.5 text-xs leading-6 text-slate-500">
<p>{question.lowerLabel}</p>
<p>{question.upperLabel}</p>
</div>
</fieldset>
</div>
{!question.required && (
<div className="mt-4 flex w-full justify-between">
<div></div>
<button
type="submit"
className="flex items-center rounded-md border border-transparent px-3 py-3 text-base font-medium leading-4 text-white shadow-sm hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-slate-500 focus:ring-offset-2"
style={{ backgroundColor: brandColor }}>
{question.buttonLabel || (lastQuestion ? "Finish" : "Next")}
</button>
</div>
)}
</form>
);
}

View File

@@ -0,0 +1,14 @@
export const Subheader: React.FC<{ subheader?: string; questionId: string }> = ({
subheader,
questionId,
}) => {
return (
<label
htmlFor={questionId}
className="mt-2 block text-sm font-normal leading-6 text-slate-500 dark:text-slate-400">
{subheader}
</label>
);
};
export default Subheader;

View File

@@ -0,0 +1,77 @@
import type { Template } from "@formbricks/types/templates";
import { useEffect, useState } from "react";
import { cn } from "@formbricks/lib/cn";
import { templates } from "./templates";
type TemplateList = {
onTemplateClick: (template: Template) => void;
activeTemplate: Template | null;
};
const ALL_CATEGORY_NAME = "All";
export default function TemplateList({ onTemplateClick, activeTemplate }: TemplateList) {
const [selectedFilter, setSelectedFilter] = useState(ALL_CATEGORY_NAME);
const [categories, setCategories] = useState<Array<string>>([]);
useEffect(() => {
const defaultCategories = [
/* ALL_CATEGORY_NAME, */
...(Array.from(new Set(templates.map((template) => template.category))) as string[]),
];
const fullCategories = [ALL_CATEGORY_NAME, ...defaultCategories];
setCategories(fullCategories);
const activeFilter = ALL_CATEGORY_NAME;
setSelectedFilter(activeFilter);
}, []);
return (
<main className="relative z-0 flex-1 overflow-y-auto rounded-l-lg bg-slate-100 px-8 py-6 focus:outline-none dark:bg-slate-800">
<div className="mb-6 flex flex-wrap space-x-1">
{categories.map((category) => (
<button
key={category}
type="button"
onClick={() => setSelectedFilter(category)}
className={cn(
selectedFilter === category
? "text-brand-dark border-brand-dark font-semibold"
: "border-slate-300 text-slate-700 hover:bg-slate-100 dark:border-slate-600 dark:text-slate-300",
"mt-2 rounded border bg-slate-50 px-3 py-1 text-xs transition-all duration-150 dark:bg-slate-600 dark:hover:bg-slate-500"
)}>
{category}
</button>
))}
</div>
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
{templates
.filter((template) => selectedFilter === ALL_CATEGORY_NAME || template.category === selectedFilter)
.map((template: Template) => (
<button
type="button"
onClick={() => {
onTemplateClick(template); // Pass the 'template' object instead of 'activeTemplate'
}}
key={template.name}
className={cn(
activeTemplate?.name === template.name && "ring-brand ring-2",
"duration-120 group relative rounded-lg bg-white p-6 shadow transition-all duration-150 hover:scale-105 dark:bg-slate-700"
)}>
<div className="absolute right-6 top-6 rounded border border-slate-300 bg-slate-50 px-1.5 py-0.5 text-xs text-slate-500 dark:border-slate-400 dark:bg-slate-800 dark:text-slate-400">
{template.category}
</div>
<template.icon className="h-8 w-8" />
<h3 className="text-md mb-1 mt-3 text-left font-bold text-slate-700 dark:text-slate-300">
{template.name}
</h3>
<p className="text-left text-xs text-slate-600 dark:text-slate-400">{template.description}</p>
</button>
))}
</div>
</main>
);
}

View File

@@ -0,0 +1,52 @@
import Headline from "./Headline";
import Subheader from "./Subheader";
interface ThankYouCardProps {
headline: string;
subheader: string;
brandColor: string;
}
export default function ThankYouCard({ headline, subheader, brandColor }: ThankYouCardProps) {
return (
<div className="text-center">
<div className="flex items-center justify-center" style={{ color: brandColor }}>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth="1.5"
stroke="currentColor"
className="h-24 w-24">
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
</div>
<span className="mb-[10px] inline-block h-1 w-16 rounded-[100%] bg-slate-300"></span>
<div>
<Headline headline={headline} questionId="thankYouCard" />
<Subheader subheader={subheader} questionId="thankYouCard" />
</div>
{/* <span
className="mb-[10px] mt-[35px] inline-block h-[2px] w-4/5 rounded-full opacity-25"
style={{ backgroundColor: brandColor }}></span>
<div>
<p className="text-xs text-slate-500">
Powered by{" "}
<b>
<a href="https://formbricks.com" target="_blank" className="hover:text-slate-700">
Formbricks
</a>
</b>
</p>
</div> */}
</div>
);
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,111 +1,66 @@
import {
PlusIcon,
SquaresPlusIcon,
ChartBarIcon,
ArrowTrendingUpIcon,
DocumentPlusIcon,
RectangleGroupIcon,
} from "@heroicons/react/24/outline";
import clsx from "clsx";
import { CodeFileIcon, EyeIcon, HandPuzzleIcon } from "@formbricks/ui";
import HeadingCentered from "../shared/HeadingCentered";
const features = [
{
id: "formCreation",
name: "Fast Form Creation",
description: "Build complex forms with our React Lib. Our data pipes also work with any other form.",
icon: PlusIcon,
id: "customizable",
name: "Fully Customizable",
description: "Full customizability and extendability. Integrate with your stack easily.",
icon: HandPuzzleIcon,
},
{
id: "dataPipelines",
name: "Data Pipelines",
description: "Save your data where you need it. Use webhooks or pre-built integrations.",
icon: SquaresPlusIcon,
id: "compliance",
name: "Smoothly Compliant",
description: "Self-host the entire product and fly through privacy compliance reviews.",
icon: EyeIcon,
},
{
id: "dataInsights",
name: "Powerful Data Insights",
description: "View and manage your results quicker. Handle submissions in our dahsboard.",
icon: ChartBarIcon,
},
{
id: "nocodeBuilder",
name: "No-Code Builder",
description: "Let your operators create and change forms. Stick with React to style and embed forms.",
icon: RectangleGroupIcon,
comingSoon: true,
},
{
id: "analytics",
name: "Built-in Analytics",
description: "Opening rate, drop-offs, conversions. Use privacy-first analytics out of the box.",
icon: ArrowTrendingUpIcon,
comingSoon: true,
},
{
id: "templates",
name: "Survey Templates",
description: "NPS, CSAT, Employee Surveys. Name your business objective, we have the questions.",
icon: DocumentPlusIcon,
comingSoon: true,
id: "independent",
name: "Stay independent",
description: "The code is open-source. Do with it what your organization needs.",
icon: CodeFileIcon,
},
];
export default function Features() {
export const Features: React.FC = () => {
return (
<div className="relative px-4 pt-16 pb-20 sm:px-6 lg:px-8 lg:pt-24 lg:pb-28">
<div className="absolute inset-0">
<div className="h-1/3 sm:h-2/3" />
</div>
<div className="relative px-4 pb-10 sm:px-6 lg:px-8 lg:pb-14 lg:pt-24">
<div className="relative mx-auto max-w-7xl">
<HeadingCentered
closer
teaser="the Swiss army knife for forms & surveys"
heading="Home-cooked taste, delivered in minutes"
subheading="Build a 'home-cooked' solution at the fraction of the time. We do the heavy lifting, you customize
to your needs."
teaser="DATA Privacy at heart"
heading="The only open-source solution"
subheading="Comply with all data privacy regulation with ease. Simply self-host."
/>
<ul role="list" className="grid grid-cols-1 gap-6 pt-8 sm:grid-cols-2 md:grid-cols-3">
{features.map((feature) => (
<li
key={feature.id}
className={clsx(
feature.comingSoon
? "bg-gradient-to-b from-slate-200 to-slate-100 dark:from-slate-800 dark:to-slate-900"
: "bg-slate-200 drop-shadow-sm dark:bg-slate-800 ",
"relative col-span-1 mt-16 flex flex-col rounded-xl text-center"
)}>
<div className="absolute -mt-12 w-full">
<div
className={clsx(
feature.comingSoon
? "from-slate-100 via-slate-200 to-slate-200 dark:from-slate-800 dark:to-slate-900"
: "from-slate-200 via-slate-100 to-slate-100 dark:from-slate-900 dark:to-slate-700 ",
"mx-auto flex h-20 w-20 items-center justify-center rounded-full bg-gradient-to-br shadow"
)}>
<feature.icon className="text-brand-dark dark:text-brand-light mx-auto h-10 w-10 flex-shrink-0" />
<ul role="list" className="grid grid-cols-1 gap-4 pt-8 sm:grid-cols-2 md:grid-cols-3 lg:gap-10">
{features.map((feature) => {
const IconComponent: React.ElementType = feature.icon;
return (
<li
key={feature.id}
className="relative col-span-1 mt-16 flex flex-col rounded-xl bg-slate-100 text-center dark:bg-slate-700">
<div className="absolute -mt-12 w-full">
<div className="mx-auto flex h-20 w-20 items-center justify-center rounded-3xl bg-slate-200 shadow dark:bg-slate-800">
<IconComponent className="text-brand-dark dark:text-brand-light mx-auto h-10 w-10 flex-shrink-0" />
</div>
</div>
</div>
<div className="flex flex-1 flex-col p-10">
<h3 className="my-4 text-lg font-medium text-slate-800 dark:text-slate-200">
{feature.name}
</h3>
<dl className="mt-1 flex flex-grow flex-col justify-between">
<dt className="sr-only">Description</dt>
<dd className="text-sm text-gray-600 dark:text-slate-400">{feature.description}</dd>
{feature.comingSoon && (
<dd className="mt-4">
<span className="rounded-full bg-slate-200 px-3 py-1 text-xs font-medium text-slate-500 dark:bg-slate-700 dark:text-slate-300">
coming soon
</span>
</dd>
)}
</dl>
</div>
</li>
))}
<div className="flex flex-1 flex-col p-10">
<h3 className="my-4 text-lg font-medium text-slate-800 dark:text-slate-200">
{feature.name}
</h3>
<dl className="mt-1 flex flex-grow flex-col justify-between">
<dt className="sr-only">Description</dt>
<dd className="text-sm text-slate-600 dark:text-slate-400">{feature.description}</dd>
</dl>
</div>
</li>
);
})}
</ul>
</div>
</div>
);
}
};
export default Features;

View File

@@ -0,0 +1,45 @@
import GitHubMarkWhite from "@/images/github-mark-white.svg";
import GitHubMarkDark from "@/images/github-mark.svg";
import Image from "next/image";
import Link from "next/link";
export const GitHubSponsorship: React.FC = () => {
return (
<div className="mx-4 my-4 mb-12 mt-12 rounded-xl bg-gradient-to-br from-slate-100 to-slate-200 px-4 py-8 dark:from-slate-800 dark:via-slate-800 dark:to-slate-700 sm:px-6 sm:pb-12 sm:pt-8 md:max-w-none lg:mt-6 lg:px-8 lg:pt-8">
<style jsx>{`
@media (min-width: 426px);
`}</style>
<div className="right-10 lg:absolute">
<Image
src={GitHubMarkDark}
alt="GitHub Sponsors Formbricks badge"
width={100}
height={100}
className="mr-12 block dark:hidden md:mr-4 "
/>
<Image
src={GitHubMarkWhite}
alt="GitHub Sponsors Formbricks badge"
width={100}
height={100}
className="mr-12 hidden dark:block md:mr-4 "
/>
</div>
<h2 className="mt-4 text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-200 lg:text-2xl">
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 to be supported by GitHubs Open-Source Program!{" "}
<span>
<Link
href="/blog/inaugural-batch-github-accelerator"
className="decoration-brand-dark underline underline-offset-4">
Read more.
</Link>
</span>
</p>
</div>
);
};
export default GitHubSponsorship;

View File

@@ -1,28 +1,119 @@
import Button from "../shared/Button";
import HeroAnimation from "../shared/HeroAnimation";
import HeroTitle from "../shared/HeroTitle";
import CalLogoDark from "@/images/clients/cal-logo-dark.svg";
import CalLogoLight from "@/images/clients/cal-logo-light.svg";
import ClovyrLogo from "@/images/clients/clovyr-logo.svg";
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 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";
import HeroAnimation from "./HeroAnimation";
interface Props {}
export default function Hero({}: Props) {
export const Hero: React.FC = ({}) => {
const plausible = usePlausible();
const router = useRouter();
return (
<div className="relative">
<HeroTitle
headingPt1="The"
headingTeal="Open Source"
headingPt2="Forms & Survey Toolbox"
subheading="We're building all essential form functionality so you don't have to. Modular, customizable,
extendable. And open source.">
<Button variant="secondary" onClick={() => router.push("/docs")}>
Read docs
</Button>
<Button variant="primary" className="ml-3" onClick={() => router.push("/get-started")}>
Get started
</Button>
</HeroTitle>
<HeroAnimation />
<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-4 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">
Understand what customers think & feel about your product.
<br />
<span className="hidden md:block">
Natively integrate user research with minimal dev attention,{" "}
<span className="decoration-brand-dark underline underline-offset-4">privacy-first.</span>
</span>
</p>
<div className="mx-auto mt-5 max-w-3xl items-center px-4 sm:flex sm:justify-center md:mt-8 md:space-x-8 md:px-0">
<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-4 items-center gap-5 pt-2 md:gap-8">
<Image
src={CalLogoLight}
alt="Cal Logo"
className="block rounded-lg hover:opacity-100 dark:hidden md:opacity-50"
width={170}
/>
<Image
src={CalLogoDark}
alt="Cal Logo"
className="hidden rounded-lg hover:opacity-100 dark:block md:opacity-50"
width={170}
/>
<Image
src={CrowdLogoLight}
alt="Crowd.dev Logo"
className="block rounded-lg pb-1 hover:opacity-100 dark:hidden md:opacity-50"
width={200}
/>
<Image
src={CrowdLogoDark}
alt="Crowd.dev Logo"
className="hidden rounded-lg pb-1 hover:opacity-100 dark:block md:opacity-50"
width={200}
/>
<Image
src={ClovyrLogo}
alt="Clovyr Logo"
className="rounded-lg pb-1 hover:opacity-100 md:opacity-50"
width={200}
/>
<Image
src={NILogoDark}
alt="Neverinstall Logo"
className="block pb-1 hover:opacity-100 dark:hidden md:opacity-50"
width={200}
/>
<Image
src={NILogoLight}
alt="Neverinstall Logo"
className="hidden pb-1 hover:opacity-100 dark:block md:opacity-50"
width={200}
/>
</div>
</div>
<div className="hidden pt-10 md:block">
<Button
variant="highlight"
className="mr-3 px-6"
onClick={() => {
router.push("https://app.formbricks.com/auth/signup");
plausible("Hero_CTA_CreateSurvey");
}}>
Create survey
</Button>
<Button
variant="secondary"
className="px-6"
onClick={() => {
router.push("/demo");
plausible("Hero_CTA_LaunchDemo");
}}>
Live demo
</Button>
</div>
</div>
<div className="relative px-2 md:px-0">
<HeroAnimation fallbackImage={AnimationFallback} />
</div>
</div>
);
}
};
export default Hero;

View File

@@ -0,0 +1,53 @@
import { useEffect, useRef, useState } from "react";
import type { LottiePlayer } from "lottie-web";
import Image from "next/image";
export const HeroAnimation: React.FC<any> = ({ fallbackImage, ...props }) => {
const [loaded, setLoaded] = useState(false);
const ref = useRef<HTMLDivElement>(null);
const [lottie, setLottie] = useState<LottiePlayer | null>(null);
useEffect(() => {
import("lottie-web").then((Lottie) => setLottie(Lottie.default));
}, []);
useEffect(() => {
if (lottie && ref.current) {
const animation = lottie.loadAnimation({
container: ref.current,
renderer: "svg",
loop: true,
autoplay: true,
// path to your animation file, place it inside public folder
path: "/animations/opensource-xm-platform-formbricks.json",
});
animation.addEventListener("DOMLoaded", () => {
setLoaded(true);
});
return () => animation.destroy();
}
}, [lottie]);
return (
<div className="relative" {...props}>
<div ref={ref} />
{!loaded && (
<div className="absolute inset-0">
<Image
src={fallbackImage}
alt="Fallback Image"
layout="fill"
objectFit="cover"
objectPosition="center"
className="transition-opacity duration-300"
style={{ opacity: loaded ? 0 : 1 }}
/>
</div>
)}
</div>
);
};
export default HeroAnimation;

View File

@@ -1,66 +1,68 @@
import ImageAttributesDark from "@/images/attributes-dark.svg";
import ImageAttributesLight from "@/images/attributes-light.svg";
import ImageEventTriggerDark from "@/images/event-trigger-dark.svg";
import ImageEventTriggerLight from "@/images/event-trigger-light.svg";
import Image from "next/image";
import ImageReactLib from "@/images/react-lib.png";
import ImageDataPipelines from "@/images/data-pipelines.png";
import Link from "next/link";
import Button from "../shared/Button";
import { useRouter } from "next/router";
export default function Highlights({}) {
const router = useRouter();
export const Highlights: React.FC = ({}) => {
return (
<>
<div className="mt-8 md:mt-32">
<div className="mx-auto max-w-md px-4 sm:max-w-3xl sm:px-6 lg:max-w-7xl lg:px-8">
<div className="grid lg:grid-cols-2 lg:items-center lg:gap-24">
<div className="order-last lg:order-first">
<h2 className="text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-3xl">
Build forms in minutes with our{" "}
<span className="text-brand-dark dark:text-brand-light font-light">lightweight</span> React
Form Builder.
<div className="mx-auto mb-12 mt-8 max-w-lg md:mb-0 md:mt-32 md:max-w-none">
<div className="px-4 sm:max-w-4xl sm:px-6 lg:max-w-7xl lg:px-8">
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
<div className="pb-8 md:pb-0">
<h2 className="xs:text-3xl text-2xl font-bold leading-7 tracking-tight text-slate-800 dark:text-slate-200">
Ask at the right moment,
<br />
<span className="font-light">get the data you need.</span>
</h2>
<p className="text-md mt-6 max-w-3xl leading-7 text-slate-500 dark:text-slate-400">
Loads of question types, validation, multi-page forms, logic jumps, i18n, custom styles - all
the good stuff you want, but don&apos;t want to build yourself.
<br />
<br />
Build <span className="font-semibold">exactly</span> the form you want in a fraction of the
time.
<p className="text-md mt-6 max-w-lg leading-7 text-slate-500 dark:text-slate-400">
Follow up emails are so 2010. Ask users as they experience your product - and leverage a
significantly higher conversion rate.
</p>
<div className="my-6">
<Button variant="minimal" size="sm" onClick={() => router.push("/react-form-library")}>
Read more
</Button>
</div>
</div>
<Image src={ImageReactLib} alt="react library" className="mb-8 rounded-lg lg:mb-0" />
<div className="rounded-lg bg-slate-100 py-6 pr-4 dark:bg-slate-800 sm:py-16 sm:pr-8">
<Image
src={ImageEventTriggerLight}
alt="react library"
className="block rounded-lg dark:hidden"
/>
<Image
src={ImageEventTriggerDark}
alt="react library"
className="hidden rounded-lg dark:block"
/>
</div>
</div>
</div>
</div>
<div className="mt-16 md:mt-32">
<div className="mx-auto max-w-md px-4 sm:max-w-3xl sm:px-6 lg:max-w-7xl lg:px-8">
<div className="lg:grid lg:grid-cols-2 lg:items-center lg:gap-24">
<Image src={ImageDataPipelines} alt="react library" className="mb-8 rounded-lg lg:mb-0" />
<div>
<h2 className="text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-100 sm:text-3xl">
<span className="text-brand-dark dark:text-brand-light ">API</span> all the way
<div className="mx-auto mb-12 mt-8 max-w-lg md:mb-0 md:mt-32 md:max-w-none">
<div className="px-4 sm:max-w-4xl sm:px-6 lg:max-w-7xl lg:px-8">
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
<div className="order-last rounded-lg bg-slate-100 p-4 dark:bg-slate-800 sm:p-8 md:order-first">
<Image
src={ImageAttributesLight}
alt="react library"
className="block rounded-lg dark:hidden"
/>
<Image src={ImageAttributesDark} alt="react library" className="hidden rounded-lg dark:block" />
</div>
<div className="pb-8 md:pb-0">
<h2 className="xs:text-3xl text-2xl font-bold leading-7 tracking-tight text-slate-800 dark:text-slate-100 sm:text-3xl">
Dont&apos; Spray and pray.
<br />
<span className="font-light">Pre-segment granularly.</span>
</h2>
<p className="text-md mt-6 max-w-3xl leading-7 text-slate-500 dark:text-slate-400">
Your form looks perfect? Time to build integrations...
<br />
<br />
<span className="font-semibold">Or use our prebuilt data pipelines.</span> Pipe submissions
right into your database. Set up webhooks, email notifications and 3rd party integrations in
our webUI.
<p className="text-md mt-6 max-w-md leading-7 text-slate-500 dark:text-slate-400">
Pre-segment who sees your survey based on custom attributes. Keep the signal, cancel out the
noise.
</p>
<div className="mt-6">
<Button variant="minimal" size="sm" onClick={() => router.push("/core-api")}>
Read more
</Button>
</div>
</div>
</div>
</div>
</div>
</>
);
}
};
export default Highlights;

View File

@@ -0,0 +1,71 @@
import clsx from "clsx";
import { useState } from "react";
import { IoLogoHtml5, IoLogoNpm } from "react-icons/io5";
import CodeBlock from "../shared/CodeBlock";
interface SecondNavbarProps {
tabs: { id: string; label: string; icon?: React.ReactNode }[];
activeId: string;
setActiveId: (id: string) => void;
}
export const TabBar: React.FC<SecondNavbarProps> = ({ tabs, activeId, setActiveId }) => {
return (
<div className="flex h-14 items-center justify-center rounded-lg bg-slate-200 dark:bg-slate-700">
<nav className="flex h-full items-center space-x-4" aria-label="Tabs">
{tabs.map((tab) => (
<button
key={tab.id}
onClick={() => setActiveId(tab.id)}
className={clsx(
tab.id === activeId
? " border-brand-dark border-b-2 font-semibold text-slate-900 dark:text-slate-300"
: "text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200",
"flex h-full items-center px-3 text-sm font-medium"
)}
aria-current={tab.id === activeId ? "page" : undefined}>
{tab.icon && <div className="flex h-5 w-5 items-center">{tab.icon}</div>}
{tab.label}
</button>
))}
</nav>
</div>
);
};
const tabs = [
{ id: "npm", label: "NPM", icon: <IoLogoNpm /> },
{ id: "html", label: "HTML", icon: <IoLogoHtml5 /> },
];
export const SetupInstructions: React.FC = ({}) => {
const [activeTab, setActiveTab] = useState(tabs[0].id);
return (
<div>
<TabBar tabs={tabs} activeId={activeTab} setActiveId={setActiveTab} />
<div className="h-80 max-w-xs px-4 sm:max-w-lg">
{activeTab === "npm" ? (
<>
<CodeBlock>npm install @formbricks/js</CodeBlock>
<CodeBlock>{`import formbricks from "@formbricks/js";
if (typeof window !== "undefined") {
formbricks.init({
environmentId: "claV2as2kKAqF28fJ8",
apiHost: "https://app.formbricks.com",
});
}`}</CodeBlock>
</>
) : activeTab === "html" ? (
<CodeBlock>{`<script type="text/javascript">
!function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="./dist/index.umd.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e),setTimeout(function(){window.formbricks.init("claDadXk29dak92dK9","https://app.formbricks.com")},500)}();
</script>`}</CodeBlock>
) : null}
</div>
</div>
);
};
export default SetupInstructions;

View File

@@ -0,0 +1,148 @@
import DemoPreview from "@/components/dummyUI/DemoPreview";
import DashboardMockupDark from "@/images/dashboard-mockup-dark.png";
import DashboardMockup from "@/images/dashboard-mockup.png";
import { Button } from "@formbricks/ui";
import { CursorArrowRaysIcon } from "@heroicons/react/24/solid";
import Image from "next/image";
import { useState } from "react";
import AddEventDummy from "../dummyUI/AddEventDummy";
import AddNoCodeEventModalDummy from "../dummyUI/AddNoCodeEventModalDummy";
import HeadingCentered from "../shared/HeadingCentered";
import SetupTabs from "./SetupTabs";
export const Steps: React.FC = () => {
const [isAddEventModalOpen, setAddEventModalOpen] = useState(false);
return (
<>
<HeadingCentered
closer
teaser="Leave your engineers in peace"
heading="Set Formbricks up in minutes"
subheading="Formbricks is designed for as little dev attention as possible. Heres how:"
/>
<div id="howitworks" className="mx-auto mb-12 mt-16 max-w-lg md:mb-0 md:mt-8 md:max-w-none">
<div className="px-4 sm:max-w-4xl sm:px-6 lg:max-w-7xl lg:px-8">
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
<div className="pb-8 sm:pl-10 md:pb-0">
<h4 className="text-brand-dark font-bold">Step 1</h4>
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-200">
Copy + Paste
</h2>
<p className="text-md mt-6 max-w-lg leading-7 text-slate-500 dark:text-slate-400">
Simply copy a &lt;script&gt; tag to your HTML head - thats about it. Or use NPM to install
Formbricks for React, Vue, Svelte, etc.
</p>
</div>
<div className="rounded-lg bg-slate-100 dark:bg-slate-800">
<SetupTabs />
</div>
</div>
</div>
</div>
<div className="mx-auto mb-12 mt-8 max-w-lg md:mb-0 md:mt-32 md:max-w-none">
<div className="px-4 sm:max-w-4xl sm:px-6 lg:max-w-7xl lg:px-8">
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
<div className="order-last w-full rounded-lg bg-slate-100 p-4 dark:bg-slate-800 sm:py-8 md:order-first">
<div className="flex h-40 items-center justify-center">
<Button
variant="primary"
className=""
onClick={() => {
setAddEventModalOpen(true);
}}>
<CursorArrowRaysIcon className="mr-2 h-5 w-5 text-white" />
Add Action
</Button>
</div>
</div>
<div className="pb-8 md:pb-0">
<h4 className="text-brand-dark font-bold">Step 2</h4>
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-100 sm:text-3xl">
No-Code: Track User Actions
</h2>
<p className="text-md mt-6 max-w-lg leading-7 text-slate-500 dark:text-slate-400">
Set up user actions which can trigger your survey without writing a single line of code.
Surveys can be triggered on specific pages or after an element is clicked.
</p>
</div>
</div>
</div>
</div>
<div className="mx-auto mb-12 mt-8 max-w-lg md:mb-0 md:mt-32 md:max-w-none">
<div className="px-4 sm:max-w-4xl sm:px-6 lg:max-w-7xl lg:px-8">
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
<div className="pb-8 sm:pl-10 md:pb-0">
<h4 className="text-brand-dark font-bold">Step 3</h4>
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-3xl">
Create your survey
</h2>
<p className="text-md mt-6 max-w-lg leading-7 text-slate-500 dark:text-slate-400">
Start from a template - or from scratch. Ask what you want, in any language. You can also
adjust the look and feel of your survey.
</p>
</div>
<div className="relative w-full rounded-lg p-1 dark:bg-slate-800 sm:p-8">
<DemoPreview template="Product Market Fit Survey (short)" />
</div>
</div>
</div>
</div>
<div className="mx-auto mb-12 mt-8 max-w-lg md:mb-0 md:mt-32 md:max-w-none">
<div className="px-4 sm:max-w-4xl sm:px-6 lg:max-w-7xl lg:px-8">
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
<div className="order-last w-full rounded-lg bg-slate-100 p-4 dark:bg-slate-800 sm:py-8 md:order-first">
<div className="mx-auto md:w-3/4">
<AddEventDummy />
</div>
</div>
<div className="pb-8 md:pb-0">
<h4 className="text-brand-dark font-bold">Step 4</h4>
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-100 sm:text-3xl">
Set segment and trigger
</h2>
<p className="text-md mt-6 max-w-lg leading-7 text-slate-500 dark:text-slate-400">
Create a custom segment for each survey. Use attributes and past user actions to only survey
the people who have answers. Trigger your survey on any user action in your app.
</p>
</div>
</div>
</div>
</div>
<div className="mx-auto mb-12 mt-8 max-w-lg md:mb-0 md:mt-32 md:max-w-none">
<div className="px-4 sm:max-w-4xl sm:px-6 lg:max-w-7xl lg:px-8">
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
<div className="pb-8 sm:pl-10 md:pb-0">
<h4 className="text-brand-dark font-bold">Step 5</h4>
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-3xl">
Make better decisions
</h2>
<p className="text-md mt-6 max-w-lg leading-7 text-slate-500 dark:text-slate-400">
Gather all insights you can - including partial submissions. Build conviction for the next
product decision. Better data, better business.
</p>
</div>
<div className="sm:scale-125 sm:p-8">
<Image
src={DashboardMockup}
quality="100"
alt="Data Pipelines"
className="block rounded-lg dark:hidden"
/>
<Image
src={DashboardMockupDark}
quality="100"
alt="Data Pipelines"
className="hidden dark:block"
/>
</div>
</div>
</div>
</div>
<AddNoCodeEventModalDummy open={isAddEventModalOpen} setOpen={setAddEventModalOpen} />
</>
);
};
export default Steps;

View File

@@ -0,0 +1,17 @@
import { ResponsiveVideo } from "@formbricks/ui";
import Modal from "../shared/Modal";
interface VideoWalkThroughProps {
open: boolean;
setOpen: (v: boolean) => void;
}
export const VideoWalkThrough: React.FC<VideoWalkThroughProps> = ({ open, setOpen }) => {
return (
<Modal open={open} setOpen={setOpen}>
<div className="mt-5">
<ResponsiveVideo src="/videos/walkthrough-v1.mp4" />
</div>
</Modal>
);
};

View File

@@ -0,0 +1,207 @@
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "@heroicons/react/24/solid";
import clsx from "clsx";
import { useState } from "react";
interface APICallProps {
method: "GET" | "POST";
url: string;
description: string;
headers: {
label: string;
type: string;
description: string;
}[];
bodies: {
label: string;
type: string;
description: string;
required?: boolean;
}[];
responses: {
color: string;
statusCode: string;
description: string;
example?: string;
}[];
example?: string;
}
export function APILayout({ method, url, description, headers, bodies, responses, example }: APICallProps) {
const [switchState, setSwitchState] = useState(true);
function handleOnChange() {
setSwitchState(!switchState);
}
return (
<div className="rounded-lg bg-slate-200 p-8 dark:bg-slate-700">
{switchState ? (
<ChevronDownIcon
className="hover:text-brand-dark dark:hover:text-brand-dark mr-3 inline h-5 w-5 hover:cursor-pointer"
aria-hidden="true"
onClick={handleOnChange}
/>
) : (
<ChevronRightIcon
className="hover:text-brand-dark dark:hover:text-brand-dark mr-3 inline h-5 w-5 hover:cursor-pointer"
aria-hidden="true"
onClick={handleOnChange}
/>
)}
<div
className={clsx(
"mr-3 inline rounded-full p-1 px-3 font-semibold text-white",
method === "POST" && "bg-red-400 dark:bg-red-800",
method === "GET" && "bg-green-400 dark:bg-green-800"
)}>
{method}
</div>
<div className="inline text-sm text-slate-500 ">
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>
<div>
<div className={clsx(switchState ? "block" : "hidden", "ml-8")}>
<p className="mb-2 mt-6 text-lg font-semibold">Parameters</p>
<div>
{headers.length > 0 && (
<div className="text-base">
<p className="not-prose -mb-1 pt-2 font-bold">Headers</p>
<div>
{headers.map((q) => (
<Parameter key={q.label} label={q.label} type={q.type} description={q.description} />
))}
</div>
</div>
)}
{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>
<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 className="mt-4 text-base">
<p className="not-prose -mb-1 pt-2 font-bold">Responses</p>
<div>
{responses.map((r) => (
<Response
key={r.color}
color={r.color}
statusCode={r.statusCode}
description={r.description}
example={r.example}
/>
))}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
);
}
interface ParaProps {
label: string;
type: string;
description: string;
required?: boolean;
}
function Parameter({ label, type, description, required }: ParaProps) {
return (
<>
<div className="my-2 grid grid-cols-4 text-sm">
<div className="inline font-mono">
{label}
{required && <p className="inline font-bold text-red-500">*</p>}
</div>
<div>{type}</div>
<div className="col-span-2">{description}</div>
</div>
</>
);
}
interface RespProps {
color: string;
statusCode: string;
description: string;
example?: string;
}
function Response({ color, statusCode, description, example }: RespProps) {
const [toggleExample, setSwitchState] = useState(false);
function handleOnChange() {
setSwitchState(!toggleExample);
}
return (
<div className="my-2 grid grid-cols-2 text-sm">
<div className="text-md inline-flex items-center font-semibold">
<div
className={clsx(
"mr-3 inline h-3 w-3 rounded-full",
color === "green" && "bg-green-400",
color === "brown" && "bg-amber-800"
)}>
&nbsp;
</div>
<div>{statusCode}</div>
</div>
<div className="flex items-center justify-between">
<div>{description}</div>
<div className="font-bold">
{example &&
(toggleExample ? (
<ChevronDownIcon
className={clsx(
toggleExample ? "block" : "hidden",
"hover:text-brand-dark dark:hover:text-brand-dark mr-3 inline h-6 w-6 hover:cursor-pointer"
)}
aria-hidden="true"
onClick={handleOnChange}
/>
) : (
<ChevronLeftIcon
className={clsx(
toggleExample ? "hidden" : "block",
"hover:text-brand-dark dark:hover:text-brand-dark mr-3 inline h-6 w-6 hover:cursor-pointer"
)}
aria-hidden="true"
onClick={handleOnChange}
/>
))}
</div>
</div>
{example && toggleExample && (
<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>
)}
</div>
);
}

View File

@@ -0,0 +1,36 @@
import Image from "next/image";
import AuthorJohannes from "@/images/blog/johannes-co-founder-formbricks-small.jpg";
interface AuthorBoxProps {
name: string;
title: string;
date: string;
duration: string;
}
export default function AuthorBox({ name, title, date, duration }: AuthorBoxProps) {
return (
<div className="mb-8 flex items-center space-x-4 rounded-lg border border-slate-200 bg-slate-100 px-6 py-3 dark:border-slate-700 dark:bg-slate-800">
<Image
className="m-0 rounded-full"
src={AuthorJohannes}
alt={name}
width={45}
height={45}
quality={100}
placeholder="blur"
style={{ objectFit: "contain" }}
/>
<div className="flex w-full items-end justify-between">
<div>
<p className="m-0 font-medium text-slate-600 dark:text-slate-300">{name}</p>
<p className="m-0 text-sm text-slate-400">{title}</p>
</div>
<div className="text-right">
<p className="m-0 font-medium text-slate-600 dark:text-slate-300">{duration} Minutes</p>
<p className="m-0 text-sm text-slate-400">{date}</p>
</div>
</div>
</div>
);
}

View File

@@ -0,0 +1,114 @@
import {
CancelSubscriptionIcon,
DogChaserIcon,
FeedbackIcon,
InterviewPromptIcon,
OnboardingIcon,
PMFIcon,
BaseballIcon,
CodeBookIcon,
} from "@formbricks/ui";
import clsx from "clsx";
import Link from "next/link";
export default function BestPracticeNavigation() {
const BestPractices = [
{
name: "Interview Prompt",
href: "/interview-prompt",
status: true,
icon: InterviewPromptIcon,
description: "Ask only power users users to book a time in your calendar. Get those juicy details.",
category: "Understand Users",
},
{
name: "Product-Market Fit Survey",
href: "/measure-product-market-fit",
status: true,
icon: PMFIcon,
description: "Find out how disappointed people would be if they could not use your service any more.",
category: "Understand Users",
},
{
name: "Onboarding Segments",
href: "/onboarding-segmentation",
status: false,
icon: OnboardingIcon,
description:
"Get to know your users right from the start. Ask a few questions early, let us enrich the profile.",
category: "Understand Users",
},
{
name: "Learn from Churn",
href: "/learn-from-churn",
status: true,
icon: CancelSubscriptionIcon,
description: "Churn is hard, but insightful. Learn from users who changed their mind.",
category: "Increase Revenue",
},
{
name: "Improve Trial CR",
href: "/improve-trial-conversion",
status: true,
icon: BaseballIcon,
description: "Take guessing out, convert more trials to paid users with insights.",
category: "Increase Revenue",
},
{
name: "Docs Feedback",
href: "/docs-feedback",
status: true,
icon: CodeBookIcon,
description: "Clear docs lead to more adoption. Understand granularly what's confusing.",
category: "Boost Retention",
},
{
name: "Feature Chaser",
href: "/feature-chaser",
status: true,
icon: DogChaserIcon,
description: "Show a survey about a new feature shown only to people who used it.",
category: "Boost Retention",
},
{
name: "Feedback Box",
href: "/feedback-box",
status: true,
icon: FeedbackIcon,
description: "Give users the chance to share feedback in a single click.",
category: "Boost Retention",
},
];
return (
<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 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
"absolute right-10 rounded-full px-3 py-1",
// different styles depending on type
bestPractice.category === "Boost Retention" &&
"bg-pink-100 text-pink-500 dark:bg-pink-800 dark:text-pink-200",
bestPractice.category === "Increase Revenue" &&
"bg-blue-100 text-blue-500 dark:bg-blue-800 dark:text-blue-200",
bestPractice.category === "Understand Users" &&
"bg-orange-100 text-orange-500 dark:bg-orange-800 dark:text-orange-200"
)}>
{bestPractice.category}
</div>
<div className="h-12 w-12">
<bestPractice.icon className="h-12 w-12 " />
</div>
<h3 className="mb-1 mt-3 text-xl font-bold text-slate-700 dark:text-slate-200">
{bestPractice.name}
</h3>
<p className="text-sm text-slate-600 dark:text-slate-400">{bestPractice.description}</p>
</div>
</Link>
))}
</div>
);
}

View File

@@ -0,0 +1,37 @@
import { Button } from "@formbricks/ui";
import { usePlausible } from "next-plausible";
import { useRouter } from "next/router";
import BestPracticeNavigation from "./BestPracticeNavigation";
export default function InsightOppos() {
const plausible = usePlausible();
const router = useRouter();
return (
<div className="pb-10 pt-12 md:pt-20">
<div className="px-4 py-20 text-center sm:px-6 lg:px-8" id="best-practices">
<h1 className="text-3xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-4xl md:text-5xl">
Get started with{" "}
<span className="from-brand-light to-brand-dark bg-gradient-to-b bg-clip-text text-transparent xl:inline">
Best Practices
</span>
</h1>
<p className="mx-auto mt-3 max-w-md text-base text-slate-500 dark:text-slate-300 sm:text-lg md:mt-5 md:max-w-3xl md:text-xl">
Run battle-tested approaches for qualitative user research in minutes.
</p>
</div>
<BestPracticeNavigation />
<div className="mx-auto mt-4 w-fit px-4 py-2 text-center">
<Button
variant="highlight"
onClick={() => {
router.push("/demo");
plausible("subPractices_CTA_LaunchDemo");
}}>
Launch Live Demo
</Button>
</div>
</div>
);
}

View File

@@ -0,0 +1,62 @@
import { Button } from "@formbricks/ui";
import clsx from "clsx";
import { usePlausible } from "next-plausible";
import { useRouter } from "next/router";
interface Props {
teaser: string;
headline: string;
subheadline: string;
cta: string;
href: string;
inverted?: boolean;
}
export default function BreakerCTA({ inverted = false, teaser, headline, subheadline, cta, href }: Props) {
const router = useRouter();
const plausible = usePlausible();
return (
<div
className={clsx(
inverted
? "from-slate-800 via-slate-800 to-slate-700 dark:from-slate-200 dark:to-slate-300"
: "from-slate-200 to-slate-300 dark:from-slate-800 dark:via-slate-800 dark:to-slate-700",
"xs:mx-auto xs:w-full mx-4 my-4 mt-28 max-w-6xl rounded-xl bg-gradient-to-br md:mb-0 "
)}>
<div className="relative px-4 py-8 sm:px-6 sm:pb-12 sm:pt-8 lg:px-8 lg:pt-12">
<div className="xs:block xs:absolute xs:right-10 hidden md:top-1/2 md:-translate-y-1/2">
<Button
variant="highlight"
onClick={() => {
plausible("Breaker_CTAs");
router.push(`${href}`);
}}>
{cta}
</Button>
</div>
<p className="lg:text-md dark:text-brand-dark text-brand-light text-sm font-semibold uppercase">
{teaser}
</p>
<h2
className={clsx(
inverted ? "text-slate-200 dark:text-slate-800" : "text-slate-800 dark:text-slate-200",
"mt-4 text-2xl font-bold tracking-tight lg:text-3xl "
)}>
{headline}
</h2>
<p
className={clsx(
inverted ? "text-slate-300 dark:text-slate-500" : "text-slate-500 dark:text-slate-300",
"text-md mt-4 max-w-3xl lg:text-lg"
)}>
{subheadline}
</p>
<div className="xs:hidden mt-4">
<Button variant="highlight" target="_blank" onClick={() => router.push(`${href}`)}>
{cta}
</Button>
</div>
</div>
</div>
);
}

View File

@@ -1,4 +1,4 @@
import Button from "@/components/shared/Button";
import { Button } from "@formbricks/ui";
import { useRouter } from "next/router";
import HeadingCentered from "./HeadingCentered";
@@ -6,22 +6,22 @@ export default function CTA() {
const router = useRouter();
return (
<>
<div className="mx-auto px-4 py-16 sm:px-6 lg:px-8 lg:pt-24 lg:pb-40">
<div className="mx-auto px-4 py-16 sm:px-6 lg:px-8 lg:pb-40 lg:pt-24">
<HeadingCentered closer teaser="Get started" heading="Ready for the last form tool you need?" />
<div className="mt-12 grid grid-cols-1 content-center md:grid-cols-2">
<div className="-mb-4 rounded-t-xl bg-gradient-to-br from-slate-300 to-slate-200 px-8 py-24 text-center text-gray-900 dark:from-slate-800 dark:to-slate-900 dark:text-gray-100 md:mb-0 md:ml-2.5 md:-mr-5 md:rounded-l-xl lg:p-24">
<div className="-mb-4 rounded-t-xl bg-gradient-to-br from-slate-300 to-slate-200 px-8 py-24 text-center text-slate-900 dark:from-slate-800 dark:to-slate-900 dark:text-slate-100 md:-mr-5 md:mb-0 md:ml-2.5 md:rounded-l-xl lg:p-24">
<h3 className="text-3xl font-bold">Self-hosted</h3>
<p className="mt-2 mb-4">Run locally e.g. with docker-compose.</p>
<p className="mb-4 mt-2">Run locally e.g. with docker-compose.</p>
<Button variant="secondary" onClick={() => router.push("/docs")} className="mt-3">
Read docs
</Button>
</div>
<div className="rounded-xl bg-gradient-to-br from-slate-400 to-slate-300 py-24 text-center text-gray-800 dark:from-slate-800 dark:to-slate-700 dark:text-gray-100">
<div className="rounded-xl bg-gradient-to-br from-slate-400 to-slate-300 py-24 text-center text-slate-800 dark:from-slate-800 dark:to-slate-700 dark:text-slate-100">
<h3 className="text-3xl font-bold">Cloud</h3>
<p className="mt-2 mb-4">Use our free managed service.</p>
<Button variant="secondary" onClick={() => router.push("/get-started")} className="mt-3">
Get started
<p className="mb-4 mt-2">Use our free managed service.</p>
<Button variant="secondary" onClick={() => router.push("/waitlist")} className="mt-3" disabled>
Coming soon
</Button>
</div>
</div>

View File

@@ -1,10 +1,9 @@
import clsx from "clsx";
import { Icon } from "@/components/shared/Icon";
const styles = {
note: {
container: "bg-slate-50 dark:bg-slate-800/60 dark:ring-1 dark:ring-slate-300/10",
container: "bg-slate-100 dark:bg-slate-800/60 dark:ring-1 dark:ring-slate-300/10",
title: "text-slate-900 dark:text-slate-400",
body: "text-slate-800 [--tw-prose-background:theme(colors.slate.50)] prose-a:text-slate-900 prose-code:text-slate-900 dark:text-slate-300 dark:prose-code:text-slate-300",
},

View File

@@ -0,0 +1,24 @@
// components/ui/CodeBlock.tsx
import Prism from "prismjs";
import "prismjs/themes/prism.css";
import React, { useEffect } from "react";
interface CodeBlockProps {
children: React.ReactNode;
}
const CodeBlock: React.FC<CodeBlockProps> = ({ children }) => {
useEffect(() => {
Prism.highlightAll();
}, [children]);
return (
<div className="group relative mt-4 rounded-md text-sm font-light text-slate-200 sm:text-base">
<pre>
<code className="language-js">{children}</code>
</pre>
</div>
);
};
export default CodeBlock;

View File

@@ -0,0 +1,41 @@
import EarlyBird from "@/images/early bird deal for open source jotform alternative typeform and surveymonkey_v2.svg";
import { Button } from "@formbricks/ui";
import { usePlausible } from "next-plausible";
import Image from "next/image";
export default function EarlyBirdDeal() {
const plausible = usePlausible();
return (
<div className="bg-brand-dark relative mx-4 max-w-7xl overflow-hidden rounded-xl p-6 pb-16 sm:p-8 sm:pb-16 md:px-12 md:py-8 lg:mx-0 lg:flex lg:items-center">
<div className="lg:w-0 lg:flex-1 ">
<h2
className="mb-1 text-2xl font-bold tracking-tight text-white sm:text-2xl"
id="newsletter-headline">
50% off for Early Birds.
</h2>
<h2 className="text-xl font-semibold tracking-tight text-slate-200 sm:text-lg">
Limited deal: Only{" "}
<span className="bg- rounded-sm bg-slate-200/40 px-2 py-0.5 text-slate-100">14</span> left.
</h2>
<div className="mt-6">
<Button
variant="secondary"
className="dark:bg-slate-200 dark:text-slate-700 dark:hover:bg-slate-300"
onClick={() => {
plausible("Pricing_CTA_EarlyBird");
window.open("https://app.formbricks.com/auth/signup", "_blank")?.focus();
}}>
Get Early Bird deal
</Button>
</div>
<p className="mb-24 mt-2 max-w-3xl text-xs tracking-tight text-slate-200 md:mb-0 md:max-w-sm lg:max-w-none">
This saves you $588 every year.
</p>
<div className="absolute -bottom-36 -right-20 mx-auto h-96 w-96 scale-75 sm:-right-10">
<Image src={EarlyBird} fill alt="formbricks favicon open source forms typeform alternative" />
</div>
</div>
</div>
);
}

View File

@@ -1,4 +1,4 @@
import Button from "./Button";
import { Button } from "@formbricks/ui";
import { useRouter } from "next/router";
import clsx from "clsx";

View File

@@ -1,27 +1,13 @@
import Link from "next/link";
import clsx from "clsx";
import { FooterLogo } from "./Logo";
const navigation = {
creation: [
{ name: "React Form Builder", href: "/react-form-library", status: true },
{ name: "No Code Builder", href: "/visual-builder", status: true },
{ name: "Templates", href: "#", status: false },
],
pipelines: [
{ name: "Core API", href: "/core-api", status: true },
{ name: "Webhooks", href: "/webhooks", status: true },
{ name: "Email", href: "/email", status: true },
{ name: "Integrations", href: "#", status: false },
],
insights: [
{ name: "Form HQ", href: "/form-hq", status: true },
{ name: "Reports", href: "#", status: false },
],
other: [
{ name: "Community", href: "/community", status: true },
{ name: "Docs", href: "/docs", 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 },
],
social: [
{
@@ -52,121 +38,33 @@ const navigation = {
export default function Footer() {
return (
<footer
className="bg-gradient-to-b from-slate-100 to-slate-300 dark:from-slate-900 dark:to-slate-800"
className="mt-32 bg-gradient-to-b from-slate-50 to-slate-200 dark:from-slate-900 dark:to-slate-800"
aria-labelledby="footer-heading">
<h2 id="footer-heading" className="sr-only">
Footer
</h2>
<div className="mx-auto max-w-7xl px-4 py-12 sm:px-6 lg:py-16 lg:px-8">
<div className="xl:grid xl:grid-cols-3 xl:gap-8">
<div className="space-y-8 xl:col-span-1">
<FooterLogo className="h-8 w-auto sm:h-10" />
<p className="text-base text-slate-500 dark:text-slate-400">
The Open Source Forms & Survey Toolbox
</p>
<div className="flex space-x-6">
{navigation.social.map((item) => (
<Link key={item.name} href={item.href} className="text-slate-400 hover:text-gray-500">
<span className="sr-only">{item.name}</span>
<item.icon className="h-6 w-6" aria-hidden="true" />
</Link>
))}
</div>
</div>
<div className="mt-12 grid grid-cols-2 gap-8 xl:col-span-2 xl:mt-0">
<div className="md:grid md:grid-cols-2 md:gap-8">
<div>
<h3 className="text-sm font-bold text-slate-700 dark:text-slate-300">Form Creation</h3>
<ul role="list" className="mt-4 space-y-4">
{navigation.creation.map((item) => (
<li key={item.name}>
<Link
href={item.href}
scroll={item.status}
className={clsx(
item.status
? "cursor-pointer text-slate-600 hover:text-slate-500 dark:text-slate-400 dark:hover:text-slate-300"
: "cursor-default text-slate-400 dark:text-slate-600",
"text-base"
)}>
{item.name}
</Link>
</li>
))}
</ul>
</div>
<div className="mt-12 md:mt-0">
<h3 className="text-sm font-bold text-slate-700 dark:text-slate-300">Data Pipelines</h3>
<ul role="list" className="mt-4 space-y-4">
{navigation.pipelines.map((item) => (
<li key={item.name}>
<Link
href={item.href}
scroll={item.status}
className={clsx(
item.status
? "cursor-pointer text-slate-600 hover:text-slate-500 dark:text-slate-400 dark:hover:text-slate-300"
: "cursor-default text-slate-400 dark:text-slate-600",
"text-base"
)}>
{item.name}
</Link>
</li>
))}
</ul>
</div>
</div>
<div className="md:grid md:grid-cols-2 md:gap-8">
<div>
<h3 className="text-sm font-bold text-slate-700 dark:text-slate-300">Data Insights</h3>
<ul role="list" className="mt-4 space-y-4">
{navigation.insights.map((item) => (
<li key={item.name}>
<Link
href={item.href}
scroll={item.status}
className={clsx(
item.status
? "cursor-pointer text-slate-600 hover:text-slate-500 dark:text-slate-400 dark:hover:text-slate-300"
: "cursor-default text-slate-400 dark:text-slate-600",
"text-base"
)}>
{item.name}
</Link>
</li>
))}
</ul>
</div>
<div className="mt-12 md:mt-0">
<h3 className="text-sm font-bold text-slate-700 dark:text-slate-300">Other</h3>
<ul role="list" className="mt-4 space-y-4">
{navigation.other.map((item) => (
<li key={item.name}>
<Link
href={item.href}
scroll={item.status}
className={clsx(
item.status
? "cursor-pointer text-slate-600 hover:text-slate-500 dark:text-slate-400 dark:hover:text-slate-300"
: "cursor-default text-slate-400 dark:text-slate-600",
"text-base"
)}>
{item.name}
</Link>
</li>
))}
</ul>
</div>
</div>
</div>
</div>
<div className="mt-12 border-gray-500 pt-8">
<p className="text-sm text-slate-400 dark:text-gray-500 xl:text-center">
<div className="mx-auto flex max-w-7xl flex-col space-y-6 px-4 py-12 text-center sm:px-6 lg:px-8 lg:py-16">
<Link href="/">
<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">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="/imprint">Imprint</Link> | <Link href="/privacy">Privacy Policy</Link> |{" "}
<Link href="/terms">Terms</Link> | <Link href="/oss-friends">OSS Friends</Link>
</p>
</div>
<div className="flex justify-center space-x-6">
{navigation.social.map((item) => (
<Link key={item.name} href={item.href} className="text-slate-400 hover:text-slate-500">
<span className="sr-only">{item.name}</span>
<item.icon className="h-6 w-6" aria-hidden="true" />
</Link>
))}
</div>
</div>
</footer>
);

View File

@@ -1,113 +1,115 @@
import { Popover, Transition } from "@headlessui/react";
import { ChevronDownIcon } from "@heroicons/react/20/solid";
import GitHubMarkWhite from "@/images/github-mark-white.svg";
import GitHubMarkDark from "@/images/github-mark.svg";
import {
Bars3Icon,
BoltIcon,
ClipboardDocumentListIcon,
CodeBracketSquareIcon,
CpuChipIcon,
CursorArrowRaysIcon,
CursorArrowRippleIcon,
DocumentChartBarIcon,
EnvelopeIcon,
SquaresPlusIcon,
XMarkIcon,
} from "@heroicons/react/24/outline";
BaseballIcon,
Button,
CancelSubscriptionIcon,
CodeBookIcon,
DogChaserIcon,
FeedbackIcon,
InterviewPromptIcon,
OnboardingIcon,
PMFIcon,
} from "@formbricks/ui";
import { Popover, Transition } from "@headlessui/react";
import { Bars3Icon, ChevronDownIcon, ChevronRightIcon, XMarkIcon } from "@heroicons/react/24/outline";
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 } from "react";
import Button from "./Button";
import { Fragment, useState } from "react";
import { FooterLogo } from "./Logo";
import { ThemeSelector } from "./ThemeSelector";
const creation = [
function GitHubIcon(props: any) {
return (
<svg aria-hidden="true" viewBox="0 0 16 16" {...props}>
<path d="M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z" />
</svg>
);
}
const UnderstandUsers = [
{
name: "React Library",
description: "Build forms with React.js",
href: "/react-form-library",
icon: CodeBracketSquareIcon,
name: "Interview Prompt",
href: "/interview-prompt",
status: true,
icon: InterviewPromptIcon,
description: "Interview invites on auto-pilot",
},
{
name: "No Code Builder",
description: "Notion-like visual builder",
href: "/visual-builder",
icon: CursorArrowRaysIcon,
name: "Measure PMF",
href: "/measure-product-market-fit",
status: true,
icon: PMFIcon,
description: "Improve Product-Market Fit",
},
{
name: "Templates",
description: "CSAT, PMF survey, etc.",
href: "#",
icon: ClipboardDocumentListIcon,
status: false,
name: "Onboarding Segments",
href: "/onboarding-segmentation",
status: true,
icon: OnboardingIcon,
description: "Get it right from the start",
},
];
const pipes = [
const IncreaseRevenue = [
{
name: "Core API",
description: "The OS form engine",
href: "/core-api",
icon: CpuChipIcon,
name: "Learn from Churn",
href: "/learn-from-churn",
status: true,
icon: CancelSubscriptionIcon,
description: "Churn is hard, but insightful",
},
{
name: "Webhooks",
description: "Send JSON anywhere",
href: "/webhooks",
icon: BoltIcon,
name: "Improve Trial CR",
href: "/improve-trial-conversion",
status: true,
},
{
name: "Email",
description: "Send data and notifications",
href: "/email",
icon: EnvelopeIcon,
status: true,
},
{
name: "Integrations",
description: "Connect with 100+ apps",
href: "/integrations",
icon: SquaresPlusIcon,
status: false,
icon: BaseballIcon,
description: "Take guessing out, hit it right",
},
];
const insights = [
const BoostRetention = [
{
name: "Form HQ",
description: "Manage submissions easily",
href: "/form-hq",
icon: CursorArrowRippleIcon,
cat: "insights",
name: "Feedback Box",
href: "/feedback-box",
status: true,
icon: FeedbackIcon,
description: "Always keep an ear open",
},
{
name: "Reports",
description: "Based on Templates",
href: "#",
icon: DocumentChartBarIcon,
cat: "insights",
status: false,
name: "Docs Feedback",
href: "/docs-feedback",
status: true,
icon: CodeBookIcon,
description: "Clear docs, more adoption",
},
{
name: "Feature Chaser",
href: "/feature-chaser",
status: true,
icon: DogChaserIcon,
description: "Follow up, improve",
},
];
export default function Header() {
const [mobileSubOpen, setMobileSubOpen] = useState(false);
const plausible = usePlausible();
const router = useRouter();
return (
<Popover className="relative" as="header">
<div className="flex items-center justify-between px-4 py-6 sm:px-6 md:justify-start md:space-x-10">
<div className="flex justify-start lg:w-0 lg:flex-1">
<div className="flex items-center justify-between px-4 py-6 sm:px-6 md:justify-start ">
<div className="flex w-0 flex-1 justify-start">
<Link href="/">
<span className="sr-only">Formbricks</span>
<FooterLogo className="h-8 w-auto sm:h-10" />
</Link>
</div>
<div className="-my-2 -mr-2 md:hidden">
<Popover.Button className="inline-flex items-center justify-center rounded-md bg-gray-100 p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-teal-500 dark:bg-slate-700 dark:text-slate-200">
<Popover.Button className="inline-flex items-center justify-center rounded-md bg-slate-100 p-2 text-slate-400 hover:bg-slate-100 hover:text-slate-500 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-teal-500 dark:bg-slate-700 dark:text-slate-200">
<span className="sr-only">Open menu</span>
<Bars3Icon className="h-6 w-6" aria-hidden="true" />
</Popover.Button>
@@ -118,11 +120,19 @@ export default function Header() {
<>
<Popover.Button
className={clsx(
open ? "text-slate-700" : "text-slate-400",
"group inline-flex items-center rounded-md text-base font-medium hover:text-slate-700 focus:outline-none focus:ring-2 focus:ring-teal-500 focus:ring-offset-2 dark:hover:text-slate-300"
open
? "text-slate-600 dark:text-slate-400 "
: "text-slate-400 hover:text-slate-900 dark:hover:text-slate-100",
"group inline-flex items-center rounded-md text-base font-medium hover:text-slate-300 focus:outline-none focus:ring-2 focus:ring-teal-500 focus:ring-offset-2 dark:hover:text-slate-50"
)}>
<span>Bricks</span>
<ChevronDownIcon className="ml-2 h-5 w-5 " aria-hidden="true" />
<span>Best Practices</span>
<ChevronDownIcon
className={clsx(
open ? "text-slate-600" : "text-slate-400",
"ml-2 h-5 w-5 group-hover:text-slate-500"
)}
aria-hidden="true"
/>
</Popover.Button>
<Transition
@@ -133,113 +143,95 @@ export default function Header() {
leave="transition ease-in duration-150"
leaveFrom="opacity-100 translate-y-0"
leaveTo="opacity-0 translate-y-1">
<Popover.Panel className="absolute z-10 mt-3 -ml-4 w-screen max-w-lg transform lg:left-1/2 lg:ml-0 lg:max-w-4xl lg:-translate-x-1/2">
<Popover.Panel className="absolute z-10 -ml-4 mt-3 w-screen max-w-lg transform lg:left-1/2 lg:ml-0 lg:max-w-4xl lg:-translate-x-1/2">
<div className="overflow-hidden rounded-lg shadow-lg ring-1 ring-black ring-opacity-5">
<div className="relative grid gap-6 bg-slate-50 px-5 py-6 dark:bg-slate-700 sm:gap-6 sm:p-8 lg:grid-cols-3">
<div className="relative grid gap-6 bg-white px-5 py-6 dark:bg-slate-700 sm:gap-6 sm:p-8 lg:grid-cols-3">
<div>
<h4 className="mb-6 ml-16 text-sm text-slate-400">Form Creation</h4>
{creation.map((brick) => (
<h4 className="mb-6 ml-16 text-sm text-slate-400 dark:text-slate-300">
Understand Users
</h4>
{UnderstandUsers.map((brick) => (
<Link
key={brick.name}
href={brick.href}
className={clsx(
brick.status
? "cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-600 dark:hover:bg-opacity-50"
? "cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-600"
: "cursor-default",
"-m-3 flex items-start rounded-lg p-3 py-4"
)}>
<div
className={clsx(
brick.status ? "text-brand-dark dark:text-brand-light" : "text-slate-500",
"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md sm:h-12 sm:w-12"
)}>
<div className="flex h-10 w-10 flex-shrink-0 items-center justify-center text-teal-500 sm:h-12 sm:w-12">
<brick.icon className="h-6 w-6" aria-hidden="true" />
</div>
<div className="ml-4">
<p
className={clsx(
brick.status
? "text-slate-800 dark:text-slate-50"
: "text-slate-500 dark:text-slate-400",
"text-lg font-semibold"
brick.status ? "text-slate-900 dark:text-slate-100" : "text-slate-400",
"font-semibold"
)}>
{brick.name}
</p>
<p className="text-sm text-slate-400 dark:text-slate-500">
{brick.description}
</p>
<p className="mt-0.5 text-xs text-slate-400">{brick.description}</p>
</div>
</Link>
))}
</div>
<div>
<h4 className="mb-6 ml-16 text-sm text-slate-400">Data Pipelines</h4>
{pipes.map((brick) => (
<h4 className="mb-6 ml-16 text-sm text-slate-400 dark:text-slate-300">
Increase Revenue
</h4>
{IncreaseRevenue.map((brick) => (
<Link
key={brick.name}
href={brick.href}
className={clsx(
brick.status
? "cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-600 dark:hover:bg-opacity-50"
? "cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-600"
: "cursor-default",
"-m-3 flex items-start rounded-lg p-3 py-4"
)}>
<div
className={clsx(
brick.status ? "text-brand-dark dark:text-brand-light" : "text-slate-500",
"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md sm:h-12 sm:w-12"
)}>
<div className="flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md text-teal-500 sm:h-12 sm:w-12">
<brick.icon className="h-6 w-6" aria-hidden="true" />
</div>
<div className="ml-4">
<p
className={clsx(
brick.status
? "text-slate-800 dark:text-slate-50"
: "text-slate-500 dark:text-slate-400",
"text-lg font-semibold"
brick.status ? "text-slate-900 dark:text-slate-100" : "text-slate-400",
" font-semibold"
)}>
{brick.name}
</p>
<p className="text-sm text-slate-400 dark:text-slate-500">
{brick.description}
</p>
<p className="mt-0.5 text-xs text-slate-400">{brick.description}</p>
</div>
</Link>
))}
</div>
<div>
<h4 className="mb-6 ml-16 text-sm text-slate-400">Data Insights</h4>
{insights.map((brick) => (
<h4 className="mb-6 ml-16 text-sm text-slate-400 dark:text-slate-300">
Boost Retention
</h4>
{BoostRetention.map((brick) => (
<Link
key={brick.name}
href={brick.href}
className={clsx(
brick.status
? "cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-600 dark:hover:bg-opacity-50"
? "cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-600"
: "cursor-default",
"-m-3 flex items-start rounded-lg p-3 py-4"
)}>
<div
className={clsx(
brick.status ? "text-brand-dark dark:text-brand-light" : "text-slate-500",
"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md sm:h-12 sm:w-12"
)}>
<div className="flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md text-teal-500 sm:h-12 sm:w-12">
<brick.icon className="h-6 w-6" aria-hidden="true" />
</div>
<div className="ml-4">
<p
className={clsx(
brick.status
? "text-slate-800 dark:text-slate-50"
: "text-slate-500 dark:text-slate-400",
"text-lg font-semibold"
brick.status ? "text-slate-900 dark:text-slate-100" : "text-slate-400",
" font-semibold"
)}>
{brick.name}
</p>
<p className="text-sm text-slate-400 dark:text-slate-500">
{brick.description}
</p>
<p className="mt-0.5 text-xs text-slate-400">{brick.description}</p>
</div>
</Link>
))}
@@ -251,34 +243,72 @@ export default function Header() {
</>
)}
</Popover>
<Link
{/* <Link
href="/community"
className="text-base font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300">
Community
</Link>
*/}
<Link
href="/blog"
href="https://formbricks.com/#pricing"
className="text-base font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300">
Blog
Pricing
</Link>
<Link
href="/docs"
className="text-base font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300">
Docs
</Link>
<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> */}
</Link>
{/* <Link
href="/careers"
className="text-base font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300">
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 items-center justify-end md:flex md:flex-1 lg:w-0">
<div className="hidden flex-1 items-center justify-end md:flex">
<ThemeSelector className="relative z-10 mr-5" />
<Button
variant="secondary"
EndIcon={GitHubIcon}
endIconClassName="fill-slate-800 dark:fill-slate-200"
onClick={() => router.push("https://github.com/formbricks/formbricks")}>
View on Github
className="group px-2"
href="https://formbricks.com/github"
target="_blank">
<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="highlight" className="ml-2" onClick={() => router.push("/get-started")}>
Get started
{/* <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="highlight"
className="ml-2"
onClick={() => {
router.push("https://app.formbricks.com");
plausible("NavBar_CTA_Login");
}}>
Go to app
</Button>
</div>
</div>
@@ -294,151 +324,66 @@ export default function Header() {
<Popover.Panel
focus
className="absolute inset-x-0 top-0 z-20 origin-top-right transform p-2 transition md:hidden">
<div className="dark:divide-slate divide-y-2 divide-gray-50 rounded-lg bg-gray-100 shadow-lg ring-1 ring-black ring-opacity-5 dark:bg-slate-900">
<div className="px-5 pt-5 pb-6">
<div className="dark:divide-slate divide-y-2 divide-slate-100 rounded-lg bg-slate-200 shadow-lg ring-1 ring-black ring-opacity-5 dark:divide-slate-700 dark:bg-slate-800">
<div className="px-5 pb-6 pt-5">
<div className="flex items-center justify-between">
<div>
<FooterLogo className="h-8 w-auto" />
</div>
<div className="-mr-2">
<Popover.Button className="inline-flex items-center justify-center rounded-md bg-white p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-teal-500 dark:bg-slate-700 dark:text-slate-200">
<Popover.Button className="inline-flex items-center justify-center rounded-md bg-white p-2 text-slate-400 hover:bg-slate-100 hover:text-slate-500 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-teal-500 dark:bg-slate-700 dark:text-slate-200">
<span className="sr-only">Close menu</span>
<XMarkIcon className="h-6 w-6" aria-hidden="true" />
</Popover.Button>
</div>
</div>
<nav className="relative bg-gray-100 px-5 py-6 dark:bg-slate-900">
<div>
<h4 className="mb-3 text-sm text-gray-900 dark:text-gray-300">Form Creation</h4>
{creation.map((brick) => (
<Link
key={brick.name}
href={brick.href}
className={clsx(
brick.status ? "cursor-pointer" : "cursor-default",
"-m-3 flex items-start rounded-lg p-3 py-3"
)}>
<div className="text-brand-dark dark:text-brand-light flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md sm:h-12 sm:w-12">
<brick.icon className="h-6 w-6" aria-hidden="true" />
</div>
<div className="ml-4">
<p
className={clsx(
brick.status
? "text-gray-900 dark:text-gray-200"
: "text-gray-400 dark:text-gray-500",
"text-lg font-semibold"
)}>
{brick.name}
</p>
<p
className={clsx(
brick.status
? "text-gray-900 dark:text-gray-300"
: "text-gray-400 dark:text-gray-600",
"text-sm"
)}>
{brick.description}
</p>
</div>
</Link>
))}
</div>
<div>
<h4 className="mt-8 mb-3 text-sm text-gray-900 dark:text-gray-300">Data Pipelines</h4>
{pipes.map((brick) => (
<Link
key={brick.name}
href={brick.href}
className={clsx(
brick.status ? "cursor-pointer" : "cursor-default",
"-m-3 flex items-start rounded-lg p-3 py-3"
)}>
<div className="text-brand-dark dark:text-brand-light flex h-10 w-10 flex-shrink-0 items-center justify-center sm:h-12 sm:w-12">
<brick.icon className="h-6 w-6" aria-hidden="true" />
</div>
<div className="ml-4">
<p
className={clsx(
brick.status
? "text-gray-900 dark:text-gray-200"
: "text-gray-400 dark:text-gray-500",
"text-lg font-semibold"
)}>
{brick.name}
</p>
<p
className={clsx(
brick.status
? "text-gray-900 dark:text-gray-300"
: "text-gray-400 dark:text-gray-600",
"text-sm"
)}>
{brick.description}
</p>
</div>
</Link>
))}
</div>
<div>
<h4 className="mt-8 mb-3 text-sm text-gray-900 dark:text-gray-300">Data Insights</h4>
{insights.map((brick) => (
<Link
key={brick.name}
href={brick.href}
className={clsx(
brick.status ? "cursor-pointer" : "cursor-default",
"-m-3 flex items-start rounded-lg p-3 py-3"
)}>
<div className="text-brand-dark dark:text-brand-light flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md sm:h-12 sm:w-12">
<brick.icon className="h-6 w-6" aria-hidden="true" />
</div>
<div className="ml-4">
<p
className={clsx(
brick.status
? "text-gray-900 dark:text-gray-200"
: "text-gray-400 dark:text-gray-500",
"text-lg font-semibold"
)}>
{brick.name}
</p>
<p
className={clsx(
brick.status
? "text-gray-900 dark:text-gray-300"
: "text-gray-400 dark:text-gray-600",
"text-sm"
)}>
{brick.description}
</p>
</div>
</Link>
))}
</div>
</nav>
</div>
<div className="px-5 py-6">
<div className="grid grid-cols-3 text-center text-sm font-medium text-gray-900 hover:text-gray-700 dark:text-slate-200 sm:text-base">
<Link href="/community">Community</Link>
<div className="flex flex-col space-y-5 text-center text-sm dark:text-slate-300">
<div>
{mobileSubOpen ? (
<ChevronDownIcon className="mr-2 inline h-4 w-4" />
) : (
<ChevronRightIcon className="mr-2 inline h-4 w-4" />
)}
<button onClick={() => setMobileSubOpen(!mobileSubOpen)}>Best Practices</button>
</div>
{mobileSubOpen && (
<div className="flex flex-col space-y-5 text-center text-sm dark:text-slate-300">
{UnderstandUsers.map((brick) => (
<Link href={brick.href} key={brick.name} className="font-semibold">
{brick.name}
</Link>
))}
{IncreaseRevenue.map((brick) => (
<Link href={brick.href} key={brick.name} className="font-semibold">
{brick.name}
</Link>
))}
{BoostRetention.map((brick) => (
<Link href={brick.href} key={brick.name} className="font-semibold">
{brick.name}
</Link>
))}
<hr className="mx-20 my-6 opacity-25" />
</div>
)}
<Link href="/concierge">Concierge</Link>
<Link href="#pricing">Pricing</Link>
<Link href="/docs">Docs</Link>
<Link href="/blog">Blog</Link>
<Link href="/docs">Documentation</Link>
</div>
<div className="mt-6">
{/* <Link href="/careers">Careers</Link> */}
<Button
variant="secondary"
EndIcon={GitHubIcon}
onClick={() => router.push("https://github.com/formbricks/formbricks")}
className="flex w-full justify-center">
className="flex w-full justify-center fill-slate-800 dark:fill-slate-200">
View on Github
</Button>
<Button
variant="primary"
onClick={() => router.push("https://app.formbricks.com")}
className="mt-3 flex w-full justify-center">
onClick={() => router.push("https://app.formbricks.com/auth/signup")}
className="flex w-full justify-center">
Get started
</Button>
</div>
@@ -449,11 +394,3 @@ export default function Header() {
</Popover>
);
}
function GitHubIcon(props: any) {
return (
<svg aria-hidden="true" viewBox="0 0 16 16" {...props}>
<path d="M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z" />
</svg>
);
}

View File

@@ -0,0 +1,43 @@
import { Button } from "@formbricks/ui";
import { Popover } from "@headlessui/react";
import { usePlausible } from "next-plausible";
import Link from "next/link";
import { useRouter } from "next/router";
import { FooterLogo } from "./Logo";
export default function HeaderLight() {
const plausible = usePlausible();
const router = useRouter();
return (
<Popover className="relative" as="header">
<div className="mx-auto flex items-center justify-between py-6 sm:px-2 md:justify-start lg:px-8 xl:px-12 ">
<div className="flex w-0 flex-1 justify-start">
<Link href="/">
<span className="sr-only">Formbricks</span>
<FooterLogo className="ml-7 h-8 w-auto sm:h-10" />
</Link>
</div>
<div className="hidden flex-1 items-center justify-end md:flex">
<Button
variant="secondary"
onClick={() => {
router.push("https://cal.com/johannes/onboarding");
plausible("Demo_CTA_TalkToUs");
}}>
Talk to us
</Button>
<Button
variant="highlight"
className="ml-2"
onClick={() => {
router.push("https://app.formbricks.com/auth/signup");
plausible("Demo_CTA_TryForFree");
}}>
Start for free
</Button>
</div>
</div>
</Popover>
);
}

View File

@@ -1,153 +0,0 @@
import { Fragment } from "react";
import Image from "next/image";
import clsx from "clsx";
import Highlight, { defaultProps } from "prism-react-renderer";
import { Button } from "@/components/shared/Button";
import { HeroBackground } from "@/components/shared/HeroBackground";
import blurCyanImage from "@/images/blur-cyan.png";
import blurIndigoImage from "@/images/blur-indigo.png";
const codeLanguage = "javascript";
const code = `export default {
strategy: 'predictive',
engine: {
cpus: 12,
backups: ['./storage/cache.wtf'],
},
}`;
const tabs = [
{ name: "cache-advance.config.js", isActive: true },
{ name: "package.json", isActive: false },
];
function TrafficLightsIcon(props) {
return (
<svg aria-hidden="true" viewBox="0 0 42 10" fill="none" {...props}>
<circle cx="5" cy="5" r="4.5" />
<circle cx="21" cy="5" r="4.5" />
<circle cx="37" cy="5" r="4.5" />
</svg>
);
}
export function Hero() {
return (
<div className="overflow-hidden bg-slate-900 dark:-mb-32 dark:mt-[-4.5rem] dark:pb-32 dark:pt-[4.5rem] dark:lg:mt-[-4.75rem] dark:lg:pt-[4.75rem]">
<div className="py-16 sm:px-2 lg:relative lg:py-20 lg:px-0">
<div className="mx-auto grid max-w-2xl grid-cols-1 items-center gap-y-16 gap-x-8 px-4 lg:max-w-8xl lg:grid-cols-2 lg:px-8 xl:gap-x-16 xl:px-12">
<div className="relative z-10 md:text-center lg:text-left">
<Image
className="absolute bottom-full right-full -mr-72 -mb-56 opacity-50"
src={blurCyanImage}
alt=""
width={530}
height={530}
unoptimized
priority
/>
<div className="relative">
<p className="inline bg-gradient-to-r from-indigo-200 via-slate-400 to-indigo-200 bg-clip-text font-display text-5xl tracking-tight text-transparent">
Never miss the cache again.
</p>
<p className="mt-3 text-2xl tracking-tight text-slate-400">
Cache every single thing your app could ever do ahead of time, so your code never even has to
run at all.
</p>
<div className="mt-8 flex gap-4 md:justify-center lg:justify-start">
<Button href="/">Get started</Button>
<Button href="/" variant="secondary">
View on GitHub
</Button>
</div>
</div>
</div>
<div className="relative lg:static xl:pl-10">
<div className="absolute inset-x-[-50vw] -top-32 -bottom-48 [mask-image:linear-gradient(transparent,white,white)] dark:[mask-image:linear-gradient(transparent,white,transparent)] lg:left-[calc(50%+14rem)] lg:right-0 lg:-top-32 lg:-bottom-32 lg:[mask-image:none] lg:dark:[mask-image:linear-gradient(white,white,transparent)]">
<HeroBackground className="absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2 lg:left-0 lg:translate-x-0 lg:translate-y-[-60%]" />
</div>
<div className="relative">
<Image
className="absolute -top-64 -right-64"
src={blurCyanImage}
alt=""
width={530}
height={530}
unoptimized
priority
/>
<Image
className="absolute -bottom-40 -right-44"
src={blurIndigoImage}
alt=""
width={567}
height={567}
unoptimized
priority
/>
<div className="absolute inset-0 rounded-2xl bg-gradient-to-tr from-slate-300 via-slate-300/70 to-slate-300 opacity-10 blur-lg" />
<div className="absolute inset-0 rounded-2xl bg-gradient-to-tr from-slate-300 via-slate-300/70 to-slate-300 opacity-10" />
<div className="relative rounded-2xl bg-[#0A101F]/80 ring-1 ring-white/10 backdrop-blur">
<div className="absolute -top-px left-20 right-11 h-px bg-gradient-to-r from-slate-300/0 via-slate-300/70 to-slate-300/0" />
<div className="absolute -bottom-px left-11 right-20 h-px bg-gradient-to-r from-slate-400/0 via-slate-400 to-slate-400/0" />
<div className="pl-4 pt-4">
<TrafficLightsIcon className="h-2.5 w-auto stroke-slate-500/30" />
<div className="mt-4 flex space-x-2 text-xs">
{tabs.map((tab) => (
<div
key={tab.name}
className={clsx(
"flex h-6 rounded-full",
tab.isActive
? "bg-gradient-to-r from-slate-400/30 via-slate-400 to-slate-400/30 p-px font-medium text-slate-300"
: "text-slate-500"
)}>
<div
className={clsx(
"flex items-center rounded-full px-2.5",
tab.isActive && "bg-slate-800"
)}>
{tab.name}
</div>
</div>
))}
</div>
<div className="mt-6 flex items-start px-1 text-sm">
<div
aria-hidden="true"
className="select-none border-r border-slate-300/5 pr-4 font-mono text-slate-600">
{Array.from({
length: code.split("\n").length,
}).map((_, index) => (
<Fragment key={index}>
{(index + 1).toString().padStart(2, "0")}
<br />
</Fragment>
))}
</div>
<Highlight {...defaultProps} code={code} language={codeLanguage} theme={undefined}>
{({ className, style, tokens, getLineProps, getTokenProps }) => (
<pre className={clsx(className, "flex overflow-x-auto pb-6")} style={style}>
<code className="px-4">
{tokens.map((line, lineIndex) => (
<div key={lineIndex} {...getLineProps({ line })}>
{line.map((token, tokenIndex) => (
<span key={tokenIndex} {...getTokenProps({ token })} />
))}
</div>
))}
</code>
</pre>
)}
</Highlight>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
);
}

View File

@@ -17,7 +17,7 @@ export default function HeroAnimation(props: any) {
loop: true,
autoplay: true,
// path to your animation file, place it inside public folder
path: "/animations/hero-v2.json",
path: "/animations/xm-hero-v1.json",
});
return () => animation.destroy();

View File

@@ -1,188 +0,0 @@
import { useId } from 'react'
export function HeroBackground(props) {
let id = useId()
return (
<svg
aria-hidden="true"
viewBox="0 0 668 1069"
width={668}
height={1069}
fill="none"
{...props}
>
<defs>
<clipPath id={`${id}-clip-path`}>
<path
fill="#fff"
transform="rotate(-180 334 534.4)"
d="M0 0h668v1068.8H0z"
/>
</clipPath>
</defs>
<g opacity=".4" clipPath={`url(#${id}-clip-path)`} strokeWidth={4}>
<path
opacity=".3"
d="M584.5 770.4v-474M484.5 770.4v-474M384.5 770.4v-474M283.5 769.4v-474M183.5 768.4v-474M83.5 767.4v-474"
stroke="#334155"
/>
<path
d="M83.5 221.275v6.587a50.1 50.1 0 0 0 22.309 41.686l55.581 37.054a50.102 50.102 0 0 1 22.309 41.686v6.587M83.5 716.012v6.588a50.099 50.099 0 0 0 22.309 41.685l55.581 37.054a50.102 50.102 0 0 1 22.309 41.686v6.587M183.7 584.5v6.587a50.1 50.1 0 0 0 22.31 41.686l55.581 37.054a50.097 50.097 0 0 1 22.309 41.685v6.588M384.101 277.637v6.588a50.1 50.1 0 0 0 22.309 41.685l55.581 37.054a50.1 50.1 0 0 1 22.31 41.686v6.587M384.1 770.288v6.587a50.1 50.1 0 0 1-22.309 41.686l-55.581 37.054A50.099 50.099 0 0 0 283.9 897.3v6.588"
stroke="#334155"
/>
<path
d="M384.1 770.288v6.587a50.1 50.1 0 0 1-22.309 41.686l-55.581 37.054A50.099 50.099 0 0 0 283.9 897.3v6.588M484.3 594.937v6.587a50.1 50.1 0 0 1-22.31 41.686l-55.581 37.054A50.1 50.1 0 0 0 384.1 721.95v6.587M484.3 872.575v6.587a50.1 50.1 0 0 1-22.31 41.686l-55.581 37.054a50.098 50.098 0 0 0-22.309 41.686v6.582M584.501 663.824v39.988a50.099 50.099 0 0 1-22.31 41.685l-55.581 37.054a50.102 50.102 0 0 0-22.309 41.686v6.587M283.899 945.637v6.588a50.1 50.1 0 0 1-22.309 41.685l-55.581 37.05a50.12 50.12 0 0 0-22.31 41.69v6.59M384.1 277.637c0 19.946 12.763 37.655 31.686 43.962l137.028 45.676c18.923 6.308 31.686 24.016 31.686 43.962M183.7 463.425v30.69c0 21.564 13.799 40.709 34.257 47.529l134.457 44.819c18.922 6.307 31.686 24.016 31.686 43.962M83.5 102.288c0 19.515 13.554 36.412 32.604 40.645l235.391 52.309c19.05 4.234 32.605 21.13 32.605 40.646M83.5 463.425v-58.45M183.699 542.75V396.625M283.9 1068.8V945.637M83.5 363.225v-141.95M83.5 179.524v-77.237M83.5 60.537V0M384.1 630.425V277.637M484.301 830.824V594.937M584.5 1068.8V663.825M484.301 555.275V452.988M584.5 622.075V452.988M384.1 728.537v-56.362M384.1 1068.8v-20.88M384.1 1006.17V770.287M283.9 903.888V759.85M183.699 1066.71V891.362M83.5 1068.8V716.012M83.5 674.263V505.175"
stroke="#334155"
/>
<circle
cx="83.5"
cy="384.1"
r="10.438"
transform="rotate(-180 83.5 384.1)"
fill="#1E293B"
stroke="#334155"
/>
<circle
cx="83.5"
cy="200.399"
r="10.438"
transform="rotate(-180 83.5 200.399)"
stroke="#334155"
/>
<circle
cx="83.5"
cy="81.412"
r="10.438"
transform="rotate(-180 83.5 81.412)"
stroke="#334155"
/>
<circle
cx="183.699"
cy="375.75"
r="10.438"
transform="rotate(-180 183.699 375.75)"
fill="#1E293B"
stroke="#334155"
/>
<circle
cx="183.699"
cy="563.625"
r="10.438"
transform="rotate(-180 183.699 563.625)"
fill="#1E293B"
stroke="#334155"
/>
<circle
cx="384.1"
cy="651.3"
r="10.438"
transform="rotate(-180 384.1 651.3)"
fill="#1E293B"
stroke="#334155"
/>
<circle
cx="484.301"
cy="574.062"
r="10.438"
transform="rotate(-180 484.301 574.062)"
fill="#0EA5E9"
fillOpacity=".42"
stroke="#0EA5E9"
/>
<circle
cx="384.1"
cy="749.412"
r="10.438"
transform="rotate(-180 384.1 749.412)"
fill="#1E293B"
stroke="#334155"
/>
<circle
cx="384.1"
cy="1027.05"
r="10.438"
transform="rotate(-180 384.1 1027.05)"
stroke="#334155"
/>
<circle
cx="283.9"
cy="924.763"
r="10.438"
transform="rotate(-180 283.9 924.763)"
stroke="#334155"
/>
<circle
cx="183.699"
cy="870.487"
r="10.438"
transform="rotate(-180 183.699 870.487)"
stroke="#334155"
/>
<circle
cx="283.9"
cy="738.975"
r="10.438"
transform="rotate(-180 283.9 738.975)"
fill="#1E293B"
stroke="#334155"
/>
<circle
cx="83.5"
cy="695.138"
r="10.438"
transform="rotate(-180 83.5 695.138)"
fill="#1E293B"
stroke="#334155"
/>
<circle
cx="83.5"
cy="484.3"
r="10.438"
transform="rotate(-180 83.5 484.3)"
fill="#0EA5E9"
fillOpacity=".42"
stroke="#0EA5E9"
/>
<circle
cx="484.301"
cy="432.112"
r="10.438"
transform="rotate(-180 484.301 432.112)"
fill="#1E293B"
stroke="#334155"
/>
<circle
cx="584.5"
cy="432.112"
r="10.438"
transform="rotate(-180 584.5 432.112)"
fill="#1E293B"
stroke="#334155"
/>
<circle
cx="584.5"
cy="642.95"
r="10.438"
transform="rotate(-180 584.5 642.95)"
fill="#1E293B"
stroke="#334155"
/>
<circle
cx="484.301"
cy="851.699"
r="10.438"
transform="rotate(-180 484.301 851.699)"
stroke="#334155"
/>
<circle
cx="384.1"
cy="256.763"
r="10.438"
transform="rotate(-180 384.1 256.763)"
stroke="#334155"
/>
</g>
</svg>
)
}

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