Compare commits

...

489 Commits
v0.2.0 ... v0.8

Author SHA1 Message Date
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
github-actions[bot]
1abd4352ce Version Packages (#147)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-16 11:01:40 +01:00
Matthias Nannt
98a79127d9 update lock file 2022-11-16 11:00:25 +01:00
Matthias Nannt
933be017df add simple validation and minLength & maxLength to react lib 2022-11-16 10:57:57 +01:00
Matti Nannt
329ea10de8 Update content (#145)
* part 1

* updated colors & darkmode pt2

* update SEO pages & animation

Co-authored-by: knugget <johannes@knugget.de>
2022-11-15 20:25:29 +01:00
Matthias Nannt
b124fc01e0 merge changes 2022-11-15 20:22:44 +01:00
Matthias Nannt
1e4b69d7f9 add simple validation to react lib, minLength, maxLength 2022-11-15 20:17:17 +01:00
Matthias Nannt
48575afd4c add new react package version 2022-11-15 16:38:37 +01:00
github-actions[bot]
46bf6810c4 Version Packages (#143)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-15 16:15:46 +01:00
Matthias Nannt
c132b5532e Merge branch 'main' of github.com:snoopForms/snoopforms 2022-11-15 16:13:40 +01:00
Matthias Nannt
0e946c7692 publish npm package via changeset 2022-11-15 16:13:31 +01:00
Matti Nannt
28c2bdedf3 Logo color revamp (#142)
* update formbricks logo
* update colors

Co-authored-by: knugget <johannes@knugget.de>
2022-11-15 16:08:57 +01:00
github-actions[bot]
2a05dcbde2 Version Packages (#141)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-15 16:04:46 +01:00
Matthias Nannt
dce1f49c78 add basic react lib 2022-11-15 16:02:51 +01:00
Matthias Nannt
5a34b05bdf fix sitemap formbricks-com 2022-11-15 11:51:31 +01:00
Matthias Nannt
05a34df068 fix routes in formbricks-com 2022-11-15 11:48:49 +01:00
Matthias Nannt
abf459eb6d add sitemap & robots.txt 2022-11-14 11:11:41 +01:00
Johannes
a4d4ff3b1a React Hook Form & Formspree comparison pages (#140)
* update blog article

* vs react hook form subpage

* vs formspree

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2022-11-14 09:39:46 +01:00
Johannes
d0868523ed Responsiveness tweaks (#138)
* responsiveness tweaks

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2022-11-10 11:48:06 +01:00
Johannes
fe04fe5c7f Seo tweaks (#137)
* responsiveness tweaks

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2022-11-10 11:36:45 +01:00
Johannes
b7123d6fbd update blog article (#139) 2022-11-10 11:22:52 +01:00
Johannes
beea4f6c9d Update README.md 2022-11-10 03:38:08 -06:00
Matthias Nannt
551932b478 add missing packages 2022-11-10 09:43:45 +01:00
Matthias Nannt
beb00d6dbd remove old snoopForms code, change license to MIT, remove unused code configs 2022-11-10 09:40:15 +01:00
Matthias Nannt
8ae2ec5b62 use youtube nocookie, fix fullscreen in videos - formbricks-com 2022-11-08 14:57:57 +01:00
Matthias Nannt
c00fa8c5f9 fix responsiveness bug - formbricks-com 2022-11-08 14:40:23 +01:00
Matthias Nannt
7dfe5b6203 fix responsiveness bugs formbricks-com 2022-11-08 13:54:31 +01:00
yujin Jeong
a30d2b7969 Fix Typo in Email Notification Pipeline Settings (#134) 2022-11-08 09:28:02 +01:00
Johannes
e2426af9df Snoopforms becomes Formbricks article (#133)
* 3rd blog article
2022-11-08 09:20:14 +01:00
Matthias Nannt
2e996b7158 add privacy policy and imprint formbricks-com 2022-11-07 14:37:19 +01:00
Matthias Nannt
ab13707090 update meta information 2022-11-04 16:34:15 +01:00
Matthias Nannt
61d469c25c fix dead-links in formbricks-com 2022-11-04 16:17:55 +01:00
knugget
ef38602a94 visual builder link update 2022-11-04 16:33:34 +02:00
knugget
3b4adbc498 visual builder page pt 2 2022-11-04 16:30:14 +02:00
knugget
dd48abffa1 visual builder page 2022-11-04 16:30:04 +02:00
Matti Nannt
f6806dd953 Add Formbricks Website (#130)
* add formbricks website with blog and docs

Co-authored-by: knugget <johannes@knugget.de>
2022-11-04 14:49:38 +01:00
Matthias Nannt
e19c7d9c3f bugfix #128 2022-11-02 11:36:15 +01:00
Matthias Nannt
bd4019539f Merge branch 'main' of github.com:snoopForms/snoopforms 2022-10-31 11:34:43 +01:00
Matthias Nannt
0f4a84b7e5 update Readme with formbricks rebuild disclaimer 2022-10-31 11:34:35 +01:00
Matti Nannt
7844447718 Feature/debug notification mails (#124)
* fix email and posthog issues by outsourcing event handling in own api function
2022-10-28 16:44:24 +02:00
Matthias Nannt
5937a70084 remove .env symlink to fix build issues 2022-10-28 16:06:39 +02:00
Matthias Nannt
9099cc8c04 resolve merge conflict 2022-10-28 15:31:23 +02:00
Matti Nannt
a850c1ec26 Feature/nextjs 13 (#122)
* upgrade nextjs to 13

* update docker compose, fix env bug

* update github actions check workflow to lint on ubuntu image
2022-10-28 14:50:45 +02:00
Matthias Nannt
d18f2c16c4 support vercel audience analytics 2022-10-25 21:18:18 +02:00
Midka
2238a3e225 fix: name in flake.nix 2022-10-25 17:18:55 +03:00
Midka
d45f446963 fix: onChange event on PhoneQuestionComponent 2022-10-25 17:10:08 +03:00
Francois Disubi
eee3ea5ed3 Feat/email notification after submission (#89)
* feat: Email notifications for each submission

* feat: add email notification pipeline

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2022-10-25 15:44:59 +02:00
Kiran K
4590654ace Refactor TextQuestion Component (#119) 2022-10-25 13:32:04 +02:00
Midka
9f50027d53 fix: make * show only when required 2022-10-20 15:00:27 +03:00
Midka
ef70561e22 refactor: phone question 2022-10-20 15:00:13 +03:00
Midka
b627bcb138 refactor: WebsiteQuestion 2022-10-20 14:45:52 +03:00
Midka
7ecbc5da88 fix: remove commented out code 2022-10-20 14:37:55 +03:00
Midka
adc248a922 refactor: NumberQuestion 2022-10-20 14:33:42 +03:00
Midka
5f31ceb087 add: nixos development stuff 2022-10-20 14:33:13 +03:00
Matthias Nannt
7681f02d1f update react lib path in readme 2022-10-19 10:00:51 +02:00
Kiran K
d45e01ca41 Fix conflict leftover (#118)
* Refactor EmailQuestion Component

* Fix the README and .env
2022-10-18 16:29:13 +02:00
Matthias Nannt
f282f3d081 limit matrix check to ubuntu 2022-10-18 14:19:13 +02:00
Matthias Nannt
3e63e536e0 apply prettier in react lib, make packages private 2022-10-18 13:41:48 +02:00
Matthias Nannt
d5b5fd8dd9 make config packages public 2022-10-18 13:31:22 +02:00
Matthias Nannt
3dafcb6d32 update package names, update config imports 2022-10-18 13:26:05 +02:00
Matthias Nannt
eea8f678bd ignore web package in changeset 2022-10-18 12:34:41 +02:00
github-actions[bot]
4e5b03e62d Version Packages (#116)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-18 12:33:50 +02:00
Matti Nannt
28b6410dbb Feature/add react lib to monorepo #107 (#115)
* add changesets

* add react-app to monorepo
2022-10-18 12:24:17 +02:00
Kiran K
5a7492536a Refactor EmailQuestion Component (#109) 2022-10-18 10:57:53 +02:00
Matti Nannt
8b0347ab8a Create .dockerignore 2022-10-18 10:51:10 +02:00
Matthias Nannt
baf57883b0 add NEXTAUTH_URL_INTERNAL to .env.docker 2022-10-18 10:24:13 +02:00
Matthias Nannt
d6775a5cda fix user signup disabled env could be set to anything to disable signup 2022-10-18 10:23:41 +02:00
Chetan Sarva
38366c5336 build: add NEXTAUTH_URL_INTERNAL to example env (#108)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2022-10-18 10:21:15 +02:00
Matti Nannt
a4c571ffd3 add NEXT_PUBLIC_SIGNUP_DISABLED env variable (#114) 2022-10-18 10:11:21 +02:00
Matthias Nannt
35bda9d1de update .env.example file 2022-10-16 17:17:38 +02:00
Matthias Nannt
619bcb3a1f use config redirect for /forms/:id to avoid serverless function 2022-10-16 11:30:22 +02:00
Matti Nannt
6cd3878700 make all env variables required at build time #110 (#111)
* make all env variables required at build time

* update env files

* add .env.docker file with basic docker configuration

* update Readme with new instructions
2022-10-16 11:10:20 +02:00
Matthias Nannt
e910a97d32 update dockerfile to env file 2022-10-15 16:53:23 +02:00
Matthias Nannt
a0ba4ef9d3 add docker env example 2022-10-15 12:41:02 +02:00
Matthias Nannt
b6e24c207a Merge branch 'main' of github.com:snoopForms/snoopforms 2022-10-14 09:58:18 +02:00
Matthias Nannt
35ba2a1936 update dev instructions in README 2022-10-14 09:57:54 +02:00
Matti Nannt
56e9c04659 fix Github Workflow for Dockerfile (#106)
* fix location of Dockerfile
2022-10-13 12:02:07 +02:00
Matti Nannt
5c378bc8ce Feature/monorepo #95 (#105)
Move repository into a monorepo with turborepo and pnpm.
This is a big change in the way the code is organized, used and deployed.
2022-10-13 09:46:43 +02:00
Matthias Nannt
2d63249f63 bugfix links in nocode paragraph not working in app (#94) 2022-10-10 10:57:51 +02:00
Matthias Nannt
0a8eefbd63 Create CONTRIBUTING.md 2022-09-30 13:43:01 +02:00
Matthias Nannt
b48dc100f4 Rename LICENCE to LICENSE 2022-09-29 14:40:57 +02:00
Matthias Nannt
f67365f6dd Add product hunt & discord online users to Readme 2022-09-23 16:20:28 +02:00
Matthias Nannt
6ae4566baf fix Multi choice question: Option labels cut off #84 2022-09-23 12:59:10 +02:00
Matthias Nannt
0345247e9d add formType to posthog pageSubmission 2022-09-21 17:38:25 +02:00
Matthias Nannt
dbdfdedf20 update links in readme 2022-09-21 14:33:20 +02:00
Matthias Nannt
13cc2af59a fix error while loading responses #81 2022-09-20 22:37:29 +02:00
Matthias Nannt
c5450bd6ee Merge branch 'main' of github.com:snoopForms/snoopforms 2022-09-20 10:09:08 +02:00
Matthias Nannt
de8173bc84 update react library version with fixed radio buttons #85 2022-09-20 10:08:38 +02:00
npaulsen
67638bb70a Feature/devcontainer (#79)
* fixes committed conflict in README

* adds a devcontainer based on compose

includes mailhog and postgres containers

* adds launch.json for nextjs vscode quick actions

* mentions devcontainer in the readme

* auto prisma migration after creating devcontainer

* remote containers as recommended vscode extension

* adds nextauth url env to dev container

- to show correct links in mails when testing locally

Co-authored-by: Niklas Paulsen <npau@informatik.uni-kiel.de>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2022-09-20 09:20:59 +02:00
Matthias Nannt
36bf9cc997 Merge branch 'main' of github.com:snoopForms/snoopforms 2022-09-19 19:39:48 +02:00
Matthias Nannt
349fe3cb6c add long text question type 2022-09-19 19:39:38 +02:00
Manuel
9c6d08e762 Remove Merge conflict remainder in Readme.md (#83)
* Remove Merge conflict remainder in Readme.md

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2022-09-19 13:12:03 +02:00
Matthias Nannt
08278c8b0f remove truncation in summary display 2022-09-15 13:37:09 +02:00
Matthias Nannt
3148d91fc9 fix: error hashing ownerId in posthog capture method 2022-09-15 13:29:57 +02:00
Timothy
64d84b69db #21: Add helperText to all question types (#61)
* #21: Add help texts to all question types

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2022-09-02 16:19:24 +02:00
Matthias Nannt
db01eafb24 remove user fingerprinting 2022-09-02 16:18:26 +02:00
Matthias Nannt
68ee24189c add formType to posthog form created event 2022-09-02 14:25:21 +02:00
Matthias Nannt
5be849b553 add imports to react quickstart #70 2022-08-31 09:07:33 +02:00
Matthias Nannt
3311cc4ab6 fix posthog capture spelling issue, rename pageSubmission events 2022-08-31 08:33:14 +02:00
Matthias Nannt
e2bbb6e5a9 Feature/webhook (#75)
* Add webhook functionality #24
2022-08-31 08:22:31 +02:00
Matthias Nannt
c674d58c69 Fix Posthog Tracking (#71)
* Use simple API calls for Posthog Tracking to increase compatibility
2022-08-25 18:59:41 +02:00
Matthias Nannt
f26e14df12 clean up unused code 2022-08-25 16:09:28 +02:00
Tim Lange
8a875922b3 Added forgot password ability (#63)
* NEW: Added forgot password ability

* FIX: Added password reset disabled flag & jwt verify

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2022-08-25 16:01:36 +02:00
Matthias Nannt
a0ed5b7c0c bugfix smtp secure variable, simplify telemetry 2022-08-24 21:31:27 +02:00
Matthias Nannt
246698ca02 fix posthog issue, introduce telemetry for self-hosted version 2022-08-24 20:46:25 +02:00
Matthias Nannt
ce02d2906a fix scrolling not working in nocode editor 2022-08-22 16:40:15 +02:00
Matthias Nannt
9c85190e7c add imprint & privacy policy to public form frontend 2022-08-22 16:20:53 +02:00
Matthias Nannt
cede0a83bf Merge changes 2022-08-18 08:13:37 +02:00
Matthias Nannt
1a64baf83e bugfix not showing loading indicator when loading form frontend 2022-08-17 23:13:35 +02:00
Matthias Nannt
f4f248860b disable posthog autotracking, send specific events via backend (#62) 2022-08-17 22:57:53 +02:00
Matthias Nannt
b48018b2f8 bugfix delete submission, let prisma only print warning and errors 2022-08-17 20:24:05 +02:00
Timothy
844c590d7c Feature/#41 unpublish forms (#59)
* #41: Display message for unpublished forms

* #41: Add publish/unpublish GUI

* #41: Revamp UI and add 'closed' parameter

* change indigo color of access-switch to red

* update live-form on republish, show error message to user in frontend  when form unpublished

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2022-08-17 16:41:22 +02:00
Matthias Nannt
2b41caaf1e add issue template 2022-08-17 14:43:49 +02:00
Matthias Nannt
f807ccf6cc update readme and setup instructions 2022-08-17 09:20:54 +02:00
Matthias Nannt
6bf178fd85 update version number 2022-08-16 14:17:04 +02:00
Matthias Nannt
c2d4a48fe3 update github actions to add tags to docker images, only support node 16 2022-08-16 14:01:22 +02:00
Matthias Nannt
973f999756 fix responsiveness in responses 2022-08-16 13:46:07 +02:00
Matthias Nannt
aa6c254872 Truncate formname fixes #56 (#60)
* truncate in formlist

* truncate in breadcrumbs
2022-08-16 12:01:36 +02:00
Timothy
5bb739f547 Implement single submission deletion (#57)
* implement single submission deletion

* modify delete submission button and add confirm

Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2022-08-14 12:32:26 +02:00
Timothy
10e3db34a9 Add default flow if SMTP data not provided (#54)
* Add default flow if SMTP data not provided

* use explicit env var for disabling email verification

* #26: Check for strict equality
2022-08-14 11:11:23 +02:00
Timothy
f1bede5816 #49: Update 404 page (#58)
* #49: Update 404 page

* #49: Fix typos
2022-08-14 11:01:43 +02:00
Matthias Nannt
419e12777a update date-fns package to fix pipeline issues 2022-08-11 12:01:22 +02:00
Matthias Nannt
954adfa815 bugfix error in submissions on altered form #55 2022-08-11 11:47:54 +02:00
Johannes
19b29188dd fix:fix z-index on form list, unify context menus (#16) 2022-08-10 22:57:41 +09:00
825 changed files with 54345 additions and 10931 deletions

8
.changeset/README.md Normal file
View File

@@ -0,0 +1,8 @@
# Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

11
.changeset/config.json Normal file
View File

@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.2.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@formbricks/formbricks-com"]
}

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],
// 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,41 @@
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.)
volumes:
postgres-data: null

66
.env.docker Normal file
View File

@@ -0,0 +1,66 @@
########################################################################
# ------------ MANDATORY (CHANGE ACCORDING TO YOUR SETUP) ------------#
########################################################################
############
# Basics #
############
NEXTAUTH_SECRET=RANDOM_STRING
NEXTAUTH_URL=http://localhost:3000
# This should always be localhost:3000 (or whatever port your app is running on)
NEXTAUTH_URL_INTERNAL=http://localhost:3000
DATABASE_URL='postgresql://postgres:postgres@postgres:5432/postgres?schema=public'
################
# 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
# 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
##########
# Other #
##########
# 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=

View File

@@ -1,18 +1,79 @@
# Modify this variables according to your setup and needs
########################################################################
# ------------ MANDATORY (CHANGE ACCORDING TO YOUR SETUP) ------------#
########################################################################
############
# Basics #
############
NEXTAUTH_SECRET=RANDOM_STRING
DATABASE_URL='postgresql://user@localhost:5432/snoopforms?schema=public'
# Set this to your public-facing URL, e.g., https://example.com
NEXTAUTH_URL=http://localhost:3000
# This should always be localhost:3000 (or whatever port your app is running on)
NEXTAUTH_URL_INTERNAL=http://localhost:3000
DATABASE_URL='postgresql://postgres:postgres@localhost:5432/postgres?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=
################
# 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=smtp.example.com
SMTP_PORT=587
SMTP_HOST=localhost
SMTP_PORT=1025
SMTP_SECURE_ENABLED=0 # Enable for TLS (port 465)
SMTP_USER=smtpUser
SMTP_PASSWORD=smtpPassword
NEXT_TELEMETRY_DISABLED=1
TERMS_URL=www.example.com/terms
PRIVACY_URL=www.example.com/privacy
########################################################################
# ------------------------------ OPTIONAL -----------------------------#
########################################################################
# For Docker Compose Setup use this Database URL:
# DATABASE_URL='postgresql://postgres:postgres@postgres:5432/snoopforms?schema=public'
# 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
##########
# Other #
##########
# 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=
# Stripe Billing Variables
NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID=
NEXT_PUBLIC_STRIPE_PUBLIC_KEY=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=

10
.eslintrc.js Normal file
View File

@@ -0,0 +1,10 @@
module.exports = {
root: true,
// This tells ESLint to load the config from the package `eslint-config-formbricks`
extends: ["formbricks"],
settings: {
next: {
rootDir: ["apps/*/"],
},
},
};

View File

@@ -1,3 +0,0 @@
{
"extends": "next/core-web-vitals"
}

44
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,44 @@
---
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
- [ ] Formbricks Cloud (app.formbricks.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.)

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

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

View File

@@ -0,0 +1,41 @@
---
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

@@ -3,27 +3,26 @@ on: [push]
jobs:
build:
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ["14.x", "16.x"]
os: [ubuntu-latest, windows-latest, macOS-latest]
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
- name: Setup Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
node-version: 16.x
- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
- name: Install pnpm
uses: pnpm/action-setup@v2.2.2
- name: Install dependencies
run: pnpm install
- name: Lint
run: yarn lint
- name: Build
run: yarn build
run: pnpm lint

View File

@@ -1,59 +0,0 @@
name: Docker Build & Publish
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
push:
branches: [main]
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- id: imageName
uses: ASzc/change-string-case-action@v2
with:
string: ${{ github.repository }}
- name: Checkout repository
uses: actions/checkout@v3
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ steps.imageName.outputs.lowercase }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.REGISTRY }}/${{ steps.imageName.outputs.lowercase }}:latest
labels: ${{ steps.meta.outputs.labels }}

40
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setup Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Install pnpm
uses: pnpm/action-setup@v2.2.2
- name: Install Dependencies
run: pnpm install
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

27
.gitignore vendored
View File

@@ -1,30 +1,30 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
node_modules
.pnp
.pnp.js
.pnpm-store/
# testing
/coverage
coverage
# next.js
/.next/
/out/
.next/
out/
build
# production
/build
# node
dist/
# misc
.DS_Store
*.pem
.idea/
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
.env
@@ -32,9 +32,10 @@ yarn-error.log*
.env.development.local
.env.test.local
.env.production.local
!packages/database/.env
# vercel
.vercel
# turbo
.turbo
# typescript
*.tsbuildinfo
# nixos stuff
.direnv

6
.npmrc Normal file
View File

@@ -0,0 +1,6 @@
auto-install-peers=true
link-workspace-packages = true
shamefully-hoist = true
shared-workspace-shrinkwrap = true
access = public
enable-pre-post-scripts = true

1
.prettierrc.js Normal file
View File

@@ -0,0 +1 @@
module.exports = require("./packages/prettier-config/prettier-preset");

11
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,11 @@
{
"recommendations": [
"ban.spellright", // Spell check for docs
"bradlc.vscode-tailwindcss", // hinting / autocompletion for tailwind
"DavidAnson.vscode-markdownlint", // markdown linting
"dbaeumer.vscode-eslint", // eslint plugin
"esbenp.prettier-vscode", // prettier plugin
"Prisma.prisma", // syntax|format|completion for prisma
"yzhang.markdown-all-in-one" // nicer markdown support
]
}

View File

@@ -1,2 +0,0 @@
{
}

29
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,29 @@
We are so happy that you are interested in contributing to Formbricks 🤗
There are many ways to contribute to Formbricks with writing Issues, fixing bugs, building new features or updating the docs.
# Issues
Spotted a bug? Has deployment gone wrong? Do you have user feedback? [Raise an issue](https://github.com/formbricks/formbricks/issues/new/choose) for the fastest response.
... or pick up and fix an issue if you want to do a Pull Request.
# Feature requests
Raise an issue for these and tag it as an Enhancement. We love every idea. Please give us as much context on the why as possible.
# Creating a PR
Please fork the repository, make your changes and create a new pull request if you want to make an update.
If you want to speak to us before doing lots of work, please join our [Discord server](https://formbricks.com/discord) and tell us what you would like to work on - we're very responsive and friendly!
For QA of your Pull-Request, you can also get in touch with Matti on Discord. But we will also get to your PR without you taking additional action ;-)
# Features
We are currently working on having a clear [Roadmap](https://github.com/orgs/formbricks/projects/1) for the next steps ahead.
But you can also pick a feature that is not already on the roadmap if you think it creates a positive impact for Formbricks.
If you are at all unsure, just raise it as an enhancement issue first and tell us that you like to work on it, and we'll very quickly respond.

View File

@@ -1,39 +0,0 @@
# Install dependencies only when needed
FROM node:16-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
# Rebuild the source code only when needed
FROM node:16-alpine AS builder
WORKDIR /app
COPY . .
COPY --from=deps /app/node_modules ./node_modules
RUN yarn prisma generate
RUN yarn build && yarn install --production --ignore-scripts --prefer-offline
# Production image, copy all the files and run next
FROM node:16-alpine AS runner
WORKDIR /app
ENV NODE_ENV production
RUN addgroup -g 1001 -S nodejs
RUN adduser -S nextjs -u 1001
COPY --from=builder /app/next.config.js ./
COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/prisma ./prisma
USER nextjs
EXPOSE 3000
ENV NEXT_TELEMETRY_DISABLED 1
CMD ["yarn", "start"]

View File

@@ -1,3 +1,12 @@
Copyright (c) 2023 Matthias Nannt, Johannes Dancker
Portions of this software are licensed as follows:
- All content that resides under the "packages/ee/" directory of this repository, if that directory exists, is licensed under the license defined in "packages/ee/LICENSE".
- All content that resides under the "packages/js/" directory of this repository, if that directory exists, is licensed under the "MIT" license as defined in "packages/js/LICENSE".
- All 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.
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007

139
README.md
View File

@@ -1,45 +1,37 @@
<p align="center">
<a href="https://github.com/snoopForms/snoopforms">
<img src="https://user-images.githubusercontent.com/72809645/172191504-808da997-025b-4b1f-90c0-b8ef658af2dd.svg" alt="Logo" width="500">
<a href="https://github.com/formbricks/formbricks">
<img src="https://user-images.githubusercontent.com/675065/203262290-3c2bc5b8-839c-468a-b675-e26a369c7fe2.png" alt="Logo" width="500">
</a>
<h3 align="center">snoopForms</h3>
<h3 align="center">Formbricks</h3>
<p align="center">
Finally, good open-source forms!
The Open Source Experience Management solution for fast growing companies
<br />
<a href="https://snoopforms.com/">Website & Hosted version</a> | <a href="https://discord.gg/3YFcABF2Ts">Join Discord community</a>
<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/snoopForms/snoopforms/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-AGPLv3-purple" alt="License"></a> <a href="https://discord.gg/3YFcABF2Ts"><img src="https://img.shields.io/badge/Discord-SnoopForms-%234A154B" alt="Join snoopForms Discord"></a>
<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://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>
</p>
<br/>
> :warning: **Note**: This repository is still in an early stage of development. We love the open source community and want to show what we are working on early. We will update this readme with more information once it is safe to use. Until then, feel free to share your thoughts, contact us, and contribute if you'd like.
> :octocat: Are you looking for snoopForms - the Open Source Typeform Alternative? We're building the next stage of the snoopForms evolution here with Formbricks - focused on experience management for fast growing companies. 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).
<br/>
> :warning: Repository still in progress `#buildinpublic`
## About snoopForms
## About Formbricks
<img width="937" alt="snoopForms-architecture" src="https://user-images.githubusercontent.com/675065/182550268-09794c9e-1187-470e-b795-697ceb2a93b8.svg">
<img width="1527" alt="formbricks-sneak" src="https://user-images.githubusercontent.com/675065/227726212-6ebf930e-6a20-4ffa-b966-56cd41bdf363.png">
Spin up forms in minutes. Pipe your data exactly where you need it. Maximize your results with juicy analytics.
Formbricks productizes best practices for qualitative in-app user discovery. Use micro-surveys to target the right users at the right time without making surveys annoying.
## What is snoopHub?
### Mission: Base your decisions on qualitative data.
The snoopHub is the heart of snoopForms. In it, all form submissions are processed, analyzed, forwarded and you can even build your own forms with the help of the no-code editor.
If you prefer to build your forms completely customizable and send the submissions directly to snoopHub, check out our [React library](https://github.com/snoopForms/snoopforms-react).
### Features
- React Lib & No Code Builder to build & integrate forms rapidly.
- 100% compliant with all privacy regulations (self-hosted).
- (next) Put your data to work with integrations.
- (next) Juicy analytics out of the box.
- (always) smooth Developer Experience comes first.
Formbricks helps you apply best practices from data-driven work and experience management to make better business decisions. Use Formbricks to collect and manage insights from your users; run a product market fit survey to know which audience to focus on and whether your value proposition is being recognized.
### Built With
@@ -49,102 +41,9 @@ If you prefer to build your forms completely customizable and send the submissio
- [TailwindCSS](https://tailwindcss.com/)
- [Prisma](https://prisma.io/)
## Getting started
## Cloud vs. self-hosted
To get the project running locally on your machine you need to have the following development tools installed:
Formbricks is available Open-Source under AGPLv3 license. You can host Formbricks on your own servers without a subscription. Check out our [docs](https://formbricks.com/docs/formbricks-hq/self-hosting) to see how to self-host Formbricks.
We will soon offer a cloud version of Formbricks which saves you the hassle of maintaining your own servers. We will update this Readme once the cloud version is available.
- Node.JS (we recommend v16)
- Yarn
- PostgreSQL
1. Clone the project:
```
git clone https://github.com/snoopForms/snoopforms.git && cd snoopforms
```
2. Install Node.JS packages via yarn. Don't have yarn? Use `npm install --global yarn`.
```
yarn install
```
3. Make sure you have a running database instance, e.g. by using docker. A quick and dirty instance can be spun up via:
```
docker run --name snoopformsDB -p 5432:5432 -e POSTGRES_USER=snoopforms -e POSTGRES_PASSWORD=password -e POSTGRES_DB=snoopforms -d postgres
```
4. Create a `.env` file based on `.env.example` and change it according to your setup. Make sure the `DATABASE_URL` variable is set correctly according to your local database. For the signup process, an email server with valid SMTP data is necessary.
```
cp .env.example .env
```
For the example above, use the following:
```
DATABASE_URL='postgresql://snoopforms:password@localhost:5432/snoopforms?schema=public'
```
5. Use the code editor of your choice to edit the .env file. You need to change all fields according to your setup. The SMTP-credentials are essential for verification emails to work during user signup.
6. Make sure your PostgreSQL Database Server is running. Then let prisma set up the database for you:
```
yarn prisma migrate dev
```
6. Start the development server:
```
yarn dev
```
**You can now access the app on [https://localhost:3000](https://localhost:3000)**. You will be automatically redirected to the login. To use your local installation of snoopForms, create a new account.
## Deployment
The easiest way to deploy the snoopHub on your own machine is using Docker. This requires Docker and the docker compose plugin on your system to work.
Clone the repository:
```
git clone https://github.com/snoopForms/snoopforms.git && cd snoopforms
```
Create a `.env` file based on `.env.example` and change all fields according to your setup. The SMTP-credentials are essential for verification emails to work during user signup.
```
cp .env.example .env && nano .env
```
Start the docker compose process to build and spin up the snoopForms container as well as the postgres database.
```
docker compose up -d
```
You can now access the app on [https://localhost:3000](https://localhost:3000). You will be automatically redirected to the login. To use your local installation of snoopForms, create a new account.
## Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
1. Fork the project
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Make your changes
4. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
5. Push to the branch (`git push origin feature/AmazingFeature`)
6. Open a pull request
## License
Distributed under the AGPLv3 License. See `LICENSE` for more information.
(In the future we may develop additional features that aren't in the free Open-Source version)

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

38
apps/demo/README.md Normal file
View File

@@ -0,0 +1,38 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
## Getting Started
First, run the development server:
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
## Learn More
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

View File

@@ -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 pt-5 pb-4">
<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(" ");
}

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: "/signin",
permanent: false,
},
];
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "tailwindui.com",
},
{
protocol: "https",
hostname: "images.unsplash.com",
},
],
},
};
module.exports = nextConfig;

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

@@ -0,0 +1,30 @@
{
"name": "@formbricks/demo",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev -p 3002",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@formbricks/js": "workspace:*",
"@heroicons/react": "^2.0.16",
"@types/node": "18.15.10",
"@types/react": "18.0.29",
"@types/react-dom": "18.0.11",
"eslint": "8.36.0",
"eslint-config-formbricks": "workspace:*",
"next": "13.2.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "5.0.2"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.3",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.21",
"tailwindcss": "^3.2.7"
}
}

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

@@ -0,0 +1,31 @@
import type { AppProps } from "next/app";
import formbricks from "@formbricks/js";
import { useEffect } from "react";
import { useRouter } from "next/router";
import "../styles/globals.css";
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,
logLevel: "debug",
});
}
}
export default function App({ Component, pageProps }: AppProps) {
const router = useRouter();
useEffect(() => {
// Connect next.js router to Formbricks
const handleRouteChange = formbricks?.registerRouteChange;
router.events.on("routeChangeComplete", handleRouteChange);
return () => {
router.events.off("routeChangeComplete", handleRouteChange);
};
}, []);
return <Component {...pageProps} />;
}

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,346 @@
import LayoutApp from "@/components/LayoutApp";
import { classNames } from "@/lib/utils";
import { Bars3CenterLeftIcon, BellIcon, ScaleIcon } from "@heroicons/react/24/outline";
import {
BanknotesIcon,
BuildingOfficeIcon,
CheckCircleIcon,
ChevronDownIcon,
ChevronRightIcon,
MagnifyingGlassIcon,
} from "@heroicons/react/24/solid";
import Image from "next/image";
const cards = [{ name: "Account balance", href: "#", icon: ScaleIcon, amount: "$30,659.45" }];
const transactions = [
{
id: 1,
name: "Payment to Molly Sanders",
href: "#",
amount: "$20,000",
currency: "USD",
status: "success",
date: "July 11, 2020",
datetime: "2020-07-11",
},
];
const statusStyles: any = {
success: "bg-green-100 text-green-800",
processing: "bg-yellow-100 text-yellow-800",
failed: "bg-slate-100 text-slate-800",
};
export default function AppPage({}) {
return (
<LayoutApp>
<div className="flex h-16 flex-shrink-0 border-b border-slate-200 bg-white lg:border-none">
<button
type="button"
className="border-r border-slate-200 px-4 text-slate-400 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-cyan-500 lg:hidden">
<span className="sr-only">Open sidebar</span>
<Bars3CenterLeftIcon className="h-6 w-6" aria-hidden="true" />
</button>
{/* Search bar */}
<div className="flex flex-1 justify-between px-4 sm:px-6 lg:mx-auto lg:max-w-6xl lg:px-8">
<div className="flex flex-1">
<form className="flex w-full md:ml-0" action="#" method="GET">
<label htmlFor="search-field" className="sr-only">
Search
</label>
<div className="relative w-full text-slate-400 focus-within:text-slate-600">
<div
className="pointer-events-none absolute inset-y-0 left-0 flex items-center"
aria-hidden="true">
<MagnifyingGlassIcon className="h-5 w-5" aria-hidden="true" />
</div>
<input
id="search-field"
name="search-field"
className="block h-full w-full border-transparent py-2 pl-8 pr-3 text-slate-900 placeholder-slate-500 focus:border-transparent focus:outline-none focus:ring-0 sm:text-sm"
placeholder="Search transactions"
type="search"
/>
</div>
</form>
</div>
<div className="ml-4 flex items-center md:ml-6">
<button className="mr-2 flex max-w-xs items-center rounded-full bg-white text-sm font-medium text-slate-700 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2 lg:rounded-md lg:p-2 lg:hover:bg-slate-50">
Feedback
</button>
<button
type="button"
className="rounded-full bg-white p-1 text-slate-400 hover:text-slate-500 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2">
<span className="sr-only">View notifications</span>
<BellIcon className="h-6 w-6" aria-hidden="true" />
</button>
{/* Profile dropdown */}
<div className="relative ml-3">
<div>
<button className="flex max-w-xs items-center rounded-full bg-white text-sm focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2 lg:rounded-md lg:p-2 lg:hover:bg-slate-50">
<Image
className="h-8 w-8 rounded-full"
src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80"
width={32}
height={32}
alt=""
/>
<span className="ml-3 hidden text-sm font-medium text-slate-700 lg:block">
<span className="sr-only">Open user menu for </span>Emilia Birch
</span>
<ChevronDownIcon
className="ml-1 hidden h-5 w-5 flex-shrink-0 text-slate-400 lg:block"
aria-hidden="true"
/>
</button>
</div>
</div>
</div>
</div>
</div>
<main className="flex-1 pb-8">
{/* Page header */}
<div className="bg-white shadow">
<div className="px-4 sm:px-6 lg:mx-auto lg:max-w-6xl lg:px-8">
<div className="py-6 md:flex md:items-center md:justify-between lg:border-t lg:border-slate-200">
<div className="min-w-0 flex-1">
{/* Profile */}
<div className="flex items-center">
<Image
className="hidden h-16 w-16 rounded-full sm:block"
src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2.6&w=256&h=256&q=80"
alt=""
width={32}
height={32}
/>
<div>
<div className="flex items-center">
<Image
className="h-16 w-16 rounded-full sm:hidden"
src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2.6&w=256&h=256&q=80"
alt=""
width={32}
height={32}
/>
<h1 className="ml-3 text-2xl font-bold leading-7 text-slate-900 sm:truncate sm:leading-9">
Good morning, Emilia Birch
</h1>
</div>
<dl className="mt-6 flex flex-col sm:ml-3 sm:mt-1 sm:flex-row sm:flex-wrap">
<dt className="sr-only">Company</dt>
<dd className="flex items-center text-sm font-medium capitalize text-slate-500 sm:mr-6">
<BuildingOfficeIcon
className="mr-1.5 h-5 w-5 flex-shrink-0 text-slate-400"
aria-hidden="true"
/>
Duke street studio
</dd>
<dt className="sr-only">Account status</dt>
<dd className="mt-3 flex items-center text-sm font-medium capitalize text-slate-500 sm:mr-6 sm:mt-0">
<CheckCircleIcon
className="mr-1.5 h-5 w-5 flex-shrink-0 text-green-400"
aria-hidden="true"
/>
Verified account
</dd>
</dl>
</div>
</div>
</div>
<div className="mt-6 flex space-x-3 md:mt-0 md:ml-4">
<button
type="button"
className="inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 shadow-sm hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2">
Add money
</button>
<button
type="button"
className="inline-flex items-center rounded-md border border-transparent bg-cyan-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-cyan-700 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2">
Send money
</button>
</div>
</div>
</div>
</div>
<div className="mt-8">
<div className="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8">
<h2 className="text-lg font-medium leading-6 text-slate-900">Overview</h2>
<div className="mt-2 grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3">
{/* Card */}
{cards.map((card) => (
<div key={card.name} className="overflow-hidden rounded-lg bg-white shadow">
<div className="p-5">
<div className="flex items-center">
<div className="flex-shrink-0">
<card.icon className="h-6 w-6 text-slate-400" aria-hidden="true" />
</div>
<div className="ml-5 w-0 flex-1">
<dl>
<dt className="truncate text-sm font-medium text-slate-500">{card.name}</dt>
<dd>
<div className="text-lg font-medium text-slate-900">{card.amount}</div>
</dd>
</dl>
</div>
</div>
</div>
<div className="bg-slate-50 px-5 py-3">
<div className="text-sm">
<a href={card.href} className="font-medium text-cyan-700 hover:text-cyan-900">
View all
</a>
</div>
</div>
</div>
))}
</div>
</div>
<h2 className="mx-auto mt-8 max-w-6xl px-4 text-lg font-medium leading-6 text-slate-900 sm:px-6 lg:px-8">
Recent activity
</h2>
{/* Activity list (smallest breakpoint only) */}
<div className="shadow sm:hidden">
<ul role="list" className="mt-2 divide-y divide-slate-200 overflow-hidden shadow sm:hidden">
{transactions.map((transaction) => (
<li key={transaction.id}>
<a href={transaction.href} className="block bg-white px-4 py-4 hover:bg-slate-50">
<span className="flex items-center space-x-4">
<span className="flex flex-1 space-x-2 truncate">
<BanknotesIcon className="h-5 w-5 flex-shrink-0 text-slate-400" aria-hidden="true" />
<span className="flex flex-col truncate text-sm text-slate-500">
<span className="truncate">{transaction.name}</span>
<span>
<span className="font-medium text-slate-900">{transaction.amount}</span>{" "}
{transaction.currency}
</span>
<time dateTime={transaction.datetime}>{transaction.date}</time>
</span>
</span>
<ChevronRightIcon className="h-5 w-5 flex-shrink-0 text-slate-400" aria-hidden="true" />
</span>
</a>
</li>
))}
</ul>
<nav
className="flex items-center justify-between border-t border-slate-200 bg-white px-4 py-3"
aria-label="Pagination">
<div className="flex flex-1 justify-between">
<a
href="#"
className="relative inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:text-slate-500">
Previous
</a>
<a
href="#"
className="relative ml-3 inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:text-slate-500">
Next
</a>
</div>
</nav>
</div>
{/* Activity table (small breakpoint and up) */}
<div className="hidden sm:block">
<div className="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8">
<div className="mt-2 flex flex-col">
<div className="min-w-full overflow-hidden overflow-x-auto align-middle shadow sm:rounded-lg">
<table className="min-w-full divide-y divide-slate-200">
<thead>
<tr>
<th
className="bg-slate-50 px-6 py-3 text-left text-sm font-semibold text-slate-900"
scope="col">
Transaction
</th>
<th
className="bg-slate-50 px-6 py-3 text-right text-sm font-semibold text-slate-900"
scope="col">
Amount
</th>
<th
className="hidden bg-slate-50 px-6 py-3 text-left text-sm font-semibold text-slate-900 md:block"
scope="col">
Status
</th>
<th
className="bg-slate-50 px-6 py-3 text-right text-sm font-semibold text-slate-900"
scope="col">
Date
</th>
</tr>
</thead>
<tbody className="divide-y divide-slate-200 bg-white">
{transactions.map((transaction) => (
<tr key={transaction.id} className="bg-white">
<td className="w-full max-w-0 whitespace-nowrap px-6 py-4 text-sm text-slate-900">
<div className="flex">
<a
href={transaction.href}
className="group inline-flex space-x-2 truncate text-sm">
<BanknotesIcon
className="h-5 w-5 flex-shrink-0 text-slate-400 group-hover:text-slate-500"
aria-hidden="true"
/>
<p className="truncate text-slate-500 group-hover:text-slate-900">
{transaction.name}
</p>
</a>
</div>
</td>
<td className="whitespace-nowrap px-6 py-4 text-right text-sm text-slate-500">
<span className="font-medium text-slate-900">{transaction.amount}</span>
{transaction.currency}
</td>
<td className="hidden whitespace-nowrap px-6 py-4 text-sm text-slate-500 md:block">
<span
className={classNames(
statusStyles[transaction.status],
"inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize"
)}>
{transaction.status}
</span>
</td>
<td className="whitespace-nowrap px-6 py-4 text-right text-sm text-slate-500">
<time dateTime={transaction.datetime}>{transaction.date}</time>
</td>
</tr>
))}
</tbody>
</table>
{/* Pagination */}
<nav
className="flex items-center justify-between border-t border-slate-200 bg-white px-4 py-3 sm:px-6"
aria-label="Pagination">
<div className="hidden sm:block">
<p className="text-sm text-slate-700">
Showing <span className="font-medium">1</span> to{" "}
<span className="font-medium">10</span> of <span className="font-medium">20</span>{" "}
results
</p>
</div>
<div className="flex flex-1 justify-between sm:justify-end">
<a
href="#"
className="relative inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">
Previous
</a>
<a
href="#"
className="relative ml-3 inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">
Next
</a>
</div>
</nav>
</div>
</div>
</div>
</div>
</div>
</main>
</LayoutApp>
);
}

View File

@@ -0,0 +1,150 @@
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();
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 py-8 px-4 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 py-2 px-3 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 py-2 px-4 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 py-2 px-4 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 py-2 px-4 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>
);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 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,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

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")],
};

View File

@@ -1,11 +1,10 @@
{
"compilerOptions": {
"target": "es5",
"downlevelIteration": true,
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
@@ -15,14 +14,10 @@
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"noUnusedLocals": true,
"noUnusedParameters": true
},
"exclude": ["node_modules"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"ts-node": {
"compilerOptions": {
"module": "commonjs"
"paths": {
"@/*": ["./*"]
}
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}

View File

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

40
apps/formbricks-com/.gitignore vendored Normal file
View File

@@ -0,0 +1,40 @@
# 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
.vscode
public/sitemap*.xml

View File

@@ -0,0 +1,21 @@
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

@@ -0,0 +1,34 @@
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,82 @@
import clsx from "clsx";
import { usePlausible } from "next-plausible";
import Script from "next/script";
import { useEffect, useRef, useState } from "react";
declare global {
interface Window {
formbricks: any;
}
}
export default function FeedbackButton() {
const plausible = usePlausible();
const [isOpen, setIsOpen] = useState(false);
const feedbackRef = useRef<HTMLInputElement>(null);
useEffect(() => {
// Close the feedback form if the user clicks outside of it
function handleClickOutside(event: any) {
if (feedbackRef.current && !feedbackRef.current.contains(event.target)) {
if (isOpen) setIsOpen(false);
}
}
// Bind the event listener
document.addEventListener("mousedown", handleClickOutside);
return () => {
// Unbind the event listener on clean up
document.removeEventListener("mousedown", handleClickOutside);
};
}, [feedbackRef, isOpen]);
return (
<>
<Script src="https://cdn.jsdelivr.net/npm/@formbricks/feedback@0.3/dist/index.umd.js" defer />
<Script id="feedback-setup">{`
window.formbricks = {
...window.formbricks,
config: {
formbricksUrl: "https://app.formbricks.com",
formId: "cle2pg7no0000nu0hjefwy3w7",
containerId: "formbricks-feedback-wrapper",
contact: {
name: "Matti",
position: "Co-Founder",
imgUrl: "https://avatars.githubusercontent.com/u/675065?s=128&v=4",
},
},
};`}</Script>
<div
className={clsx(
"xs:flex-row xs:w-[18rem] xs:-translate-y-1/2 z-50 h-fit w-full transition-all duration-500 ease-in-out",
isOpen ? "xs:-translate-x-0 translate-y-0" : "xs:translate-x-full xs:-mr-1 translate-y-full"
)}>
<div
className="xs:flex-row flex h-full flex-col"
onClick={(e) => {
e.stopPropagation();
}}
ref={feedbackRef}>
<button
className="xs:-rotate-90 xs:top-1/2 xs:-left-[5.75rem] xs:-translate-y-1/2 xs:-translate-x-0 xs:w-32 xs:p-4 bg-brand-dark absolute left-1/2 w-28 -translate-x-1/2 -translate-y-full rounded-t-lg p-3 font-medium text-white"
onClick={() => {
if (!isOpen) {
plausible("openFeedback");
if (window) {
window.formbricks.render();
window.formbricks.resetForm();
}
}
setIsOpen(!isOpen);
}}>
{isOpen ? "Close" : "Feedback"}
</button>
<div
className="xs:rounded-bl-lg xs:rounded-tr-none h-full w-full overflow-hidden rounded-bl-none rounded-tr-lg rounded-tl-lg bg-slate-50 shadow-lg"
id="formbricks-feedback-wrapper"></div>
</div>
</div>
</>
);
}

View File

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

View File

@@ -0,0 +1,171 @@
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 { 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 "@formbricks/ui";
import MetaInformation from "../shared/MetaInformation";
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>
);
}
function Header({ navigation }: any) {
const router = useRouter();
let [isScrolled, setIsScrolled] = useState(false);
useEffect(() => {
function onScroll() {
setIsScrolled(window.scrollY > 0);
}
onScroll();
window.addEventListener("scroll", onScroll, { passive: true });
return () => {
window.removeEventListener("scroll", onScroll);
};
}, []);
return (
<header
className={clsx(
"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
? "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">
<MobileNavigation navigation={navigation} />
</div>
<div className="relative flex flex-grow basis-0 items-center">
<Link href="/" aria-label="Home page">
<FooterLogo className="h-8 w-auto sm:h-10" />
</Link>
</div>
<div className="-my-5 mr-6 sm:mr-8 md:mr-0">
<Search />
</div>
<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"
onClick={() => router.push("https://github.com/formbricks/formbricks")}>
View on Github
</Button>
{/* <Button variant="highlight" className="ml-2" onClick={() => router.push("/waitlist")}>
Get started
</Button> */}
</div>
</header>
);
}
interface LayoutProps {
children: React.ReactNode;
meta: {
title: string;
};
}
export function Layout({ children, meta }: LayoutProps) {
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));
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."
/>
<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>
</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">
<article>
{(meta.title || section) && (
<header className="mb-9 space-y-1">
{section && (
<p className="font-display text-brand-light dark:text-brand-dark text-sm font-medium">
{section.title}
</p>
)}
{meta.title && (
<h1 className="font-display text-3xl tracking-tight text-slate-800 dark:text-slate-100">
{meta.title}
</h1>
)}
</header>
)}
<Prose className="">{children}</Prose>
</article>
<dl className="mt-12 flex border-t border-slate-200 pt-6 dark:border-slate-800">
{previousPage && (
<div>
<dt className="font-display text-brand-dark dark:text-brand-light text-sm font-medium">
Previous
</dt>
<dd className="mt-1">
<Link
href={previousPage.href}
className="text-base font-semibold text-slate-500 hover:text-slate-600 dark:text-slate-400 dark:hover:text-slate-300">
<span aria-hidden="true">&larr;</span> {previousPage.title}
</Link>
</dd>
</div>
)}
{nextPage && (
<div className="ml-auto text-right">
<dt className="font-display text-brand-dark dark:text-brand-light text-sm font-medium">
Next
</dt>
<dd className="mt-1">
<Link
href={nextPage.href}
className="text-base font-semibold text-slate-500 hover:text-slate-600 dark:text-slate-400 dark:hover:text-slate-300">
{nextPage.title} <span aria-hidden="true">&rarr;</span>
</Link>
</dd>
</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,69 @@
import { useEffect, useState } from "react";
import Link from "next/link";
import { useRouter } from "next/router";
import { Dialog } from "@headlessui/react";
import { Logomark } from "@/components/shared/Logo";
import { Navigation } from "@/components/shared/Navigation";
function MenuIcon(props) {
return (
<svg aria-hidden="true" viewBox="0 0 24 24" fill="none" strokeWidth="2" strokeLinecap="round" {...props}>
<path d="M4 7h16M4 12h16M4 17h16" />
</svg>
);
}
function CloseIcon(props) {
return (
<svg aria-hidden="true" viewBox="0 0 24 24" fill="none" strokeWidth="2" strokeLinecap="round" {...props}>
<path d="M5 5l14 14M19 5l-14 14" />
</svg>
);
}
export function MobileNavigation({ navigation }) {
let router = useRouter();
let [isOpen, setIsOpen] = useState(false);
useEffect(() => {
if (!isOpen) return;
function onRouteChange() {
setIsOpen(false);
}
router.events.on("routeChangeComplete", onRouteChange);
router.events.on("routeChangeError", onRouteChange);
return () => {
router.events.off("routeChangeComplete", onRouteChange);
router.events.off("routeChangeError", onRouteChange);
};
}, [router, isOpen]);
return (
<>
<button type="button" onClick={() => setIsOpen(true)} className="relative" aria-label="Open navigation">
<MenuIcon className="h-6 w-6 stroke-slate-500" />
</button>
<Dialog
open={isOpen}
onClose={setIsOpen}
className="fixed inset-0 z-50 flex items-start overflow-y-auto bg-slate-900/50 pr-10 backdrop-blur lg:hidden"
aria-label="Navigation">
<Dialog.Panel className="min-h-full w-full max-w-xs bg-white px-4 pt-5 pb-12 dark:bg-slate-900 sm:px-6">
<div className="flex items-center">
<button type="button" onClick={() => setIsOpen(false)} aria-label="Close navigation">
<CloseIcon className="h-6 w-6 stroke-slate-500" />
</button>
<Link href="/" className="ml-6" aria-label="Home page">
<Logomark className="h-9 w-9" />
</Link>
</div>
<Navigation navigation={navigation} className="mt-5 px-1" />
</Dialog.Panel>
</Dialog>
</>
);
}

View File

@@ -0,0 +1,75 @@
import { Button } from "@formbricks/ui";
import { PlusIcon, TrashIcon } from "@heroicons/react/24/solid";
import { useState } from "react";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@formbricks/ui";
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="py-1 px-0.5 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,125 @@
import Modal from "../shared/Modal";
import { Button } from "@formbricks/ui";
import { Input } from "@formbricks/ui";
import { Label } from "@formbricks/ui";
import { RadioGroup, RadioGroupItem } from "@formbricks/ui";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@formbricks/ui";
import { CursorArrowRaysIcon } from "@heroicons/react/24/solid";
interface EventDetailModalProps {
open: boolean;
setOpen: (v: boolean) => void;
}
export default function AddNoCodeEventModalDummy({ open, setOpen }: EventDetailModalProps) {
return (
<Modal open={open} setOpen={setOpen} noPadding closeOnOutsideClick={false}>
<div className="flex h-full flex-col rounded-lg">
<div className="rounded-t-lg bg-slate-100">
<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">Add No-Code Event</div>
<div className="text-sm text-slate-500">
Create a new no-code event to filter your user base with.
</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">
<RadioGroupItem value="pageUrl" id="pageUrl" className="bg-slate-50" />
<Label htmlFor="pageUrl" className="cursor-pointer">
Page URL
</Label>
</div>
<div className="flex items-center space-x-2 rounded-lg bg-slate-50 p-3">
<RadioGroupItem disabled value="innerHtml" id="innerHtml" className="bg-slate-50" />
<Label
htmlFor="innerHtml"
className="flex cursor-not-allowed items-center text-slate-500">
Inner Text
</Label>
</div>
<div className="hidden items-center space-x-2 rounded-lg bg-slate-50 p-3 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] 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">
<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>
);
}

View File

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

View File

@@ -0,0 +1,23 @@
import clsx from "clsx";
import { ReactNode, useEffect, useState } from "react";
export default function Modal({ children, isOpen }: { children: ReactNode; isOpen: boolean }) {
const [show, setShow] = useState(false);
useEffect(() => {
setShow(isOpen);
}, [isOpen]);
return (
<div aria-live="assertive" className="pointer-events-none 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 dark:bg-slate-700 sm:p-6"
)}>
{children}
</div>
</div>
</div>
);
}

View File

@@ -0,0 +1,84 @@
import clsx from "clsx";
import type { MultipleChoiceSingleQuestion } from "./questionTypes";
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,
};
console.log(data);
e.currentTarget[question.id].value = "";
onSubmit(data);
// 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">Choices</legend>
<div className="relative space-y-2 rounded-md">
{question.choices &&
question.choices.map((choice) => (
<label
key={choice.id}
className={clsx(
selectedChoice === choice.label
? "z-10 border-slate-400 bg-slate-50 dark:border-slate-600 dark:bg-slate-600"
: "border-gray-200 dark:border-slate-500",
"relative flex cursor-pointer flex-col rounded-md border p-4 hover:bg-slate-50 focus:outline-none dark:hover:bg-slate-600"
)}>
<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-gray-300 focus:ring-0 focus:ring-offset-0 dark:bg-slate-500"
aria-labelledby={`${choice.id}-label`}
onChange={(e) => {
setSelectedChoice(e.currentTarget.value);
}}
style={{ borderColor: brandColor, color: brandColor }}
/>
<span
id={`${choice.id}-label`}
className="ml-3 font-medium text-slate-800 dark:text-slate-300">
{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,48 @@
import type { OpenTextQuestion } from "./questionTypes";
import Headline from "./Headline";
import Subheader from "./Subheader";
interface OpenTextQuestionProps {
question: OpenTextQuestion;
onSubmit: (id: string) => void;
lastQuestion: boolean;
brandColor: string;
}
export default function OpenTextQuestion({
question,
onSubmit,
lastQuestion,
brandColor,
}: OpenTextQuestionProps) {
return (
<form
onSubmit={(e) => {
e.preventDefault();
const data = "Pupsi";
onSubmit(data);
// reset form
}}>
<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}
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:bg-slate-500 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,25 @@
import clsx from "clsx";
import { ReactNode, useEffect, useState } from "react";
export default function Modal({ children, isOpen }: { children: ReactNode; isOpen: boolean }) {
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>
);
}

View File

@@ -0,0 +1,76 @@
import { useEffect, useState } from "react";
import Modal from "./Modal";
import type { Question } from "./questionTypes";
import MultipleChoiceSingleQuestion from "./MultipleChoiceSingleQuestion";
import OpenTextQuestion from "./OpenTextQuestion";
interface PreviewSurveyProps {
activeQuestionId?: string | null;
questions: Question[];
brandColor: string;
}
export default function PreviewSurvey({ activeQuestionId, questions, brandColor }: PreviewSurveyProps) {
const [isModalOpen, setIsModalOpen] = useState(true);
const [currentQuestion, setCurrentQuestion] = useState<Question | null>(null);
useEffect(() => {
if (activeQuestionId) {
if (currentQuestion && currentQuestion.id === activeQuestionId) {
setCurrentQuestion(questions.find((q) => q.id === activeQuestionId) || null);
return;
}
setIsModalOpen(false);
setTimeout(() => {
setCurrentQuestion(questions.find((q) => q.id === activeQuestionId) || null);
setIsModalOpen(true);
}, 300);
} else {
if (questions && questions.length > 0) {
setCurrentQuestion(questions[0]);
}
}
}, [activeQuestionId, questions]);
const gotoNextQuestion = () => {
if (currentQuestion) {
const currentIndex = questions.findIndex((q) => q.id === currentQuestion.id);
if (currentIndex < questions.length - 1) {
setCurrentQuestion(questions[currentIndex + 1]);
} else {
// start over
setIsModalOpen(false);
setTimeout(() => {
setCurrentQuestion(questions[0]);
setIsModalOpen(true);
}, 500);
}
}
};
if (!currentQuestion) {
return null;
}
const lastQuestion = currentQuestion.id === questions[questions.length - 1].id;
return (
<Modal isOpen={isModalOpen}>
{currentQuestion.type === "openText" ? (
<OpenTextQuestion
question={currentQuestion}
onSubmit={() => gotoNextQuestion()}
lastQuestion={lastQuestion}
brandColor={brandColor}
/>
) : currentQuestion.type === "multipleChoiceSingle" ? (
<MultipleChoiceSingleQuestion
question={currentQuestion}
onSubmit={() => gotoNextQuestion()}
lastQuestion={lastQuestion}
brandColor={brandColor}
/>
) : null}
</Modal>
);
}

View File

@@ -0,0 +1,9 @@
export default function Progress({ progress, brandColor }: { progress: number; brandColor: string }) {
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>
);
}

View File

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

View File

@@ -0,0 +1,209 @@
import { OnboardingIcon } from "@formbricks/ui";
import { PlusCircleIcon } from "@heroicons/react/24/outline";
import { createId } from "@paralleldrive/cuid2";
import clsx from "clsx";
import { useState } from "react";
import PreviewSurvey from "./PreviewSurvey";
import { templates } from "./templates";
import type { Template } from "./templateTypes";
export default function TemplateList() {
const onboardingSegmentation: Template = {
name: "Onboarding Segmentation",
icon: OnboardingIcon,
category: "Product Management",
description: "Learn more about who signed up to your product and why.",
preset: {
name: "Onboarding Segmentation",
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
headline: "What is your role?",
subheader: "Please select one of the following options:",
required: true,
choices: [
{
id: createId(),
label: "Founder",
},
{
id: createId(),
label: "Executive",
},
{
id: createId(),
label: "Product Manager",
},
{
id: createId(),
label: "Product Owner",
},
{
id: createId(),
label: "Software Engineer",
},
],
},
{
id: createId(),
type: "multipleChoiceSingle",
headline: "What's your company size?",
subheader: "Please select one of the following options:",
required: true,
choices: [
{
id: createId(),
label: "only me",
},
{
id: createId(),
label: "1-5 employees",
},
{
id: createId(),
label: "6-10 employees",
},
{
id: createId(),
label: "11-100 employees",
},
{
id: createId(),
label: "over 100 employees",
},
],
},
{
id: createId(),
type: "multipleChoiceSingle",
headline: "How did you hear about us first?",
subheader: "Please select one of the following options:",
required: true,
choices: [
{
id: createId(),
label: "Recommendation",
},
{
id: createId(),
label: "Social Media",
},
{
id: createId(),
label: "Ads",
},
{
id: createId(),
label: "Google Search",
},
{
id: createId(),
label: "in a Podcast",
},
],
},
],
},
};
const [activeTemplate, setActiveTemplate] = useState<Template | null>(onboardingSegmentation);
const [selectedFilter, setSelectedFilter] = useState("All");
const categories = [
"All",
...(Array.from(new Set(templates.map((template) => template.category))) as string[]),
];
const customSurvey: Template = {
name: "Custom Survey",
description: "Create your survey from scratch.",
icon: null,
preset: {
name: "New Survey",
questions: [
{
id: createId(),
type: "openText",
headline: "What's poppin?",
subheader: "This can help us improve your experience.",
placeholder: "Type your answer here...",
required: true,
},
],
},
};
return (
<div className="hidden h-full flex-col lg:flex">
<div className="relative z-0 flex flex-1 overflow-hidden">
<main className="relative z-0 max-h-[90vh] flex-1 overflow-y-auto rounded-l-lg bg-slate-100 py-6 px-6 focus:outline-none dark:bg-slate-700">
<div className="mb-6 flex space-x-2">
{categories.map((category) => (
<button
key={category}
type="button"
onClick={() => setSelectedFilter(category)}
className={clsx(
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-400",
"rounded border bg-slate-50 px-3 py-1 text-xs transition-all duration-150 dark:bg-slate-800 "
)}>
{category}
</button>
))}
</div>
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
{templates
.filter((template) => selectedFilter === "All" || template.category === selectedFilter)
.map((template: Template) => (
<button
type="button"
onClick={() => setActiveTemplate(template)}
key={template.name}
className={clsx(
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-600"
)}>
<div className="absolute top-6 right-6 rounded border border-slate-300 bg-slate-50 px-1.5 py-0.5 text-xs text-slate-500 dark:border-slate-500 dark:bg-slate-700 dark:text-slate-300">
{template.category}
</div>
<template.icon className="h-8 w-8" />
<h3 className="text-md mt-3 mb-1 text-left font-bold text-slate-700 dark:text-slate-200">
{template.name}
</h3>
<p className="text-left text-xs text-slate-600 dark:text-slate-400">
{template.description}
</p>
</button>
))}
<button
type="button"
onClick={() => setActiveTemplate(customSurvey)}
className={clsx(
activeTemplate?.name === customSurvey.name && "ring-brand ring-2",
"duration-120 hover:border-brand-dark group relative rounded-lg border-2 border-dashed border-slate-300 bg-transparent p-8 transition-colors duration-150"
)}>
<PlusCircleIcon className="text-brand-dark h-8 w-8 transition-all duration-150 group-hover:scale-110" />
<h3 className="text-md mt-3 mb-1 text-left font-bold text-slate-700 dark:text-slate-200">
{customSurvey.name}
</h3>
<p className="text-left text-xs text-slate-600 dark:text-slate-400">
{customSurvey.description}
</p>
</button>
</div>
</main>
<aside className="group relative hidden max-h-[90vh] flex-1 flex-shrink-0 overflow-hidden rounded-r-lg border-l border-slate-200 bg-slate-200 shadow-inner dark:border-slate-700 dark:bg-slate-800 md:flex md:flex-col">
{activeTemplate && (
<PreviewSurvey
activeQuestionId={null}
questions={activeTemplate.preset.questions}
brandColor="#00C4B8"
/>
)}
</aside>
</div>
</div>
);
}

View File

@@ -0,0 +1,26 @@
export type Question = OpenTextQuestion | MultipleChoiceSingleQuestion;
export interface OpenTextQuestion {
id: string;
type: "openText";
headline: string;
subheader?: string;
placeholder?: string;
buttonLabel?: string;
required: boolean;
}
export interface MultipleChoiceSingleQuestion {
id: string;
type: "multipleChoiceSingle";
headline: string;
subheader?: string;
required: boolean;
buttonLabel?: string;
choices: Choice[];
}
export interface Choice {
id: string;
label: string;
}

View File

@@ -0,0 +1,12 @@
import { Question } from "./questionTypes";
export interface Template {
name: string;
icon: any;
description: string;
category?: "Product Management" | "Growth Marketing" | "Increase Revenue";
preset: {
name: string;
questions: Question[];
};
}

View File

@@ -0,0 +1,704 @@
import {
AppPieChartIcon,
CancelSubscriptionIcon,
CashCalculatorIcon,
DashboardIcon,
DogChaserIcon,
DoorIcon,
FeedbackIcon,
OnboardingIcon,
PMFIcon,
TaskListSearchIcon,
BaseballIcon,
CheckMarkIcon,
ArrowRightCircleIcon,
} from "@formbricks/ui";
import type { Template } from "./templateTypes";
import { createId } from "@paralleldrive/cuid2";
export const templates: Template[] = [
{
name: "Onboarding Segmentation",
icon: OnboardingIcon,
category: "Product Management",
description: "Learn more about who signed up to your product and why.",
preset: {
name: "Onboarding Segmentation",
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
headline: "What is your role?",
subheader: "Please select one of the following options:",
required: true,
choices: [
{
id: createId(),
label: "Founder",
},
{
id: createId(),
label: "Executive",
},
{
id: createId(),
label: "Product Manager",
},
{
id: createId(),
label: "Product Owner",
},
{
id: createId(),
label: "Software Engineer",
},
],
},
{
id: createId(),
type: "multipleChoiceSingle",
headline: "What's your company size?",
subheader: "Please select one of the following options:",
required: true,
choices: [
{
id: createId(),
label: "only me",
},
{
id: createId(),
label: "1-5 employees",
},
{
id: createId(),
label: "6-10 employees",
},
{
id: createId(),
label: "11-100 employees",
},
{
id: createId(),
label: "over 100 employees",
},
],
},
{
id: createId(),
type: "multipleChoiceSingle",
headline: "How did you hear about us first?",
subheader: "Please select one of the following options:",
required: true,
choices: [
{
id: createId(),
label: "Recommendation",
},
{
id: createId(),
label: "Social Media",
},
{
id: createId(),
label: "Ads",
},
{
id: createId(),
label: "Google Search",
},
{
id: createId(),
label: "in a Podcast",
},
],
},
],
},
},
{
name: "Product Market Fit Survey",
icon: PMFIcon,
category: "Product Management",
description: "Measure PMF by assessing how disappointed users would be if your product disappeared.",
preset: {
name: "Product Market Fit Survey",
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
headline: "How disappointed would you be if you could no longer use Formbricks?",
subheader: "Please select one of the following options:",
required: true,
choices: [
{
id: createId(),
label: "Not at all disappointed",
},
{
id: createId(),
label: "Somewhat disappointed",
},
{
id: createId(),
label: "Very disappointed",
},
],
},
{
id: createId(),
type: "multipleChoiceSingle",
headline: "What is your role?",
subheader: "Please select one of the following options:",
required: true,
choices: [
{
id: createId(),
label: "Founder",
},
{
id: createId(),
label: "Executive",
},
{
id: createId(),
label: "Product Manager",
},
{
id: createId(),
label: "Product Owner",
},
{
id: createId(),
label: "Software Engineer",
},
],
},
{
id: createId(),
type: "openText",
headline: "How can we improve our service for you?",
subheader: "Please be as specific as possible.",
required: true,
},
],
},
},
{
name: "Pre-Churn Survey",
icon: CancelSubscriptionIcon,
category: "Increase Revenue",
description: "Find out why people cancel you. These insights are pure gold!",
preset: {
name: "Churn Survey",
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
headline: "Why do you cancel your subscription?",
subheader: "We're sorry to see you leave. Please help us do better:",
required: true,
choices: [
{
id: createId(),
label: "I don't get much value out of it",
},
{
id: createId(),
label: "It's too expensive",
},
{
id: createId(),
label: "I am missing a feature",
},
{
id: createId(),
label: "Poor customer service",
},
{
id: createId(),
label: "I just don't need you anymore",
},
],
},
{
id: createId(),
type: "openText",
headline: "Is there something we can do to win you back?",
subheader: "Feel free to speak your mind, we do too.",
required: false,
},
],
},
},
{
name: "Feature Chaser",
icon: DogChaserIcon,
category: "Product Management",
description: "Follow up with users who just used a specific feature.",
preset: {
name: "Feature Chaser",
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
headline: "How easy was it to achieve your goal?",
required: true,
choices: [
{
id: createId(),
label: "Extremely difficult",
},
{
id: createId(),
label: "It took a while, but I got it",
},
{
id: createId(),
label: "It was alright",
},
{
id: createId(),
label: "Quite easy",
},
{
id: createId(),
label: "Very easy, love it!",
},
],
},
{
id: createId(),
type: "openText",
headline: "Wanna add something?",
subheader: "This really helps us do better!",
required: false,
},
],
},
},
{
name: "Feedback Box",
icon: FeedbackIcon,
category: "Product Management",
description: "Give your users the chance to seamlessly share what's on their minds.",
preset: {
name: "Feedback Box",
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
headline: "What's on your mind, boss?",
subheader: "Thanks for sharing feedback. We'll get back to you asap.",
required: true,
choices: [
{
id: createId(),
label: "Bug report 🐞",
},
{
id: createId(),
label: "Feature Request 💡",
},
{
id: createId(),
label: "Share some love 🤍",
},
],
},
{
id: createId(),
type: "openText",
headline: "Give us the juicy details:",
required: true,
},
],
},
},
{
name: "Uncover Strengths & Weaknesses",
icon: TaskListSearchIcon,
category: "Growth Marketing",
description: "Find out what users like and don't like about your product or offering.",
preset: {
name: "Uncover Strengths & Weaknesses",
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
headline: "What do you value most about our service?",
subheader: "Please select one of the following options:",
required: true,
choices: [
{
id: createId(),
label: "Ease of use",
},
{
id: createId(),
label: "Good value for money",
},
{
id: createId(),
label: "It's open-source",
},
{
id: createId(),
label: "The founders are pretty",
},
],
},
{
id: createId(),
type: "multipleChoiceSingle",
headline: "What should we improve on?",
subheader: "Please select one of the following options:",
required: true,
choices: [
{
id: createId(),
label: "Documentation",
},
{
id: createId(),
label: "Customizability",
},
{
id: createId(),
label: "Pricing",
},
{
id: createId(),
label: "Humbleness of founders",
},
],
},
{
id: createId(),
type: "openText",
headline: "Would you like to add something?",
subheader: "Feel free to speak your mind, we do too.",
required: false,
},
],
},
},
{
name: "Marketing Attribution",
icon: AppPieChartIcon,
category: "Growth Marketing",
description: "How did you first hear about us?",
preset: {
name: "Marketing Attribution",
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
headline: "How did you hear about us first?",
subheader: "Please select one of the following options:",
required: true,
choices: [
{
id: createId(),
label: "Recommendation",
},
{
id: createId(),
label: "Social Media",
},
{
id: createId(),
label: "Ads",
},
{
id: createId(),
label: "Google Search",
},
{
id: createId(),
label: "in a Podcast",
},
],
},
],
},
},
{
name: "Missed Trial Conversion",
icon: BaseballIcon,
category: "Increase Revenue",
description: "Find out why people stopped their trial. These insights help you improve your funnel.",
preset: {
name: "Missed Trial Conversion",
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
headline: "Why did you stop your trial?",
subheader: "Help us understand you better. Choose one option:",
required: true,
choices: [
{
id: createId(),
label: "I didn't get much value out of it",
},
{
id: createId(),
label: "I expected something else",
},
{
id: createId(),
label: "It's too expensive for what it does",
},
{
id: createId(),
label: "I am missing a feature",
},
{
id: createId(),
label: "I was just looking around",
},
],
},
{
id: createId(),
type: "openText",
headline: "Did you find a better alternative? Please name it:",
required: false,
},
],
},
},
{
name: "Changing subscription experience",
icon: CashCalculatorIcon,
category: "Increase Revenue",
description: "Find out what goes through peoples minds when changing their subscriptions.",
preset: {
name: "Changing subscription experience",
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
headline: "How easy was it to change your plan?",
required: true,
choices: [
{
id: createId(),
label: "Extremely difficult",
},
{
id: createId(),
label: "It took a while, but I got it",
},
{
id: createId(),
label: "It was alright",
},
{
id: createId(),
label: "Quite easy",
},
{
id: createId(),
label: "Very easy, love it!",
},
],
},
{
id: createId(),
type: "multipleChoiceSingle",
headline: "Is the pricing information easy to understand?",
required: true,
choices: [
{
id: createId(),
label: "Yes, very clear.",
},
{
id: createId(),
label: "I was confused at first, but found what I needed.",
},
{
id: createId(),
label: "Quite complicated.",
},
],
},
],
},
},
{
name: "Measure Task Accomplishment",
icon: CheckMarkIcon,
category: "Product Management",
description: "See if people get their 'Job To Be Done' done. Successful people are better customers.",
preset: {
name: "Measure Task Accomplishment",
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
headline: "Were you able to 'accomplish what you came here to do today'?",
required: true,
choices: [
{
id: createId(),
label: "Yes",
},
{
id: createId(),
label: "Working on it, boss",
},
{
id: createId(),
label: "No",
},
],
},
{
id: createId(),
type: "openText",
headline: "What did you come here to do today?",
required: false,
},
],
},
},
{
name: "Identify Customer Goals",
icon: ArrowRightCircleIcon,
category: "Product Management",
description:
"Better understand if your messaging creates the right expectations of the value your product provides.",
preset: {
name: "Identify Customer Goals",
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
headline: "What's your primary goal for using Formbricks?",
required: true,
choices: [
{
id: createId(),
label: "Understand my user base deeply",
},
{
id: createId(),
label: "Identify upselling opportunities",
},
{
id: createId(),
label: "Build the best possible product",
},
{
id: createId(),
label: "Rule the world to make everyone breakfast brussels sprouts.",
},
],
},
],
},
},
{
name: "Fake Door Follow-Up",
icon: DoorIcon,
category: "Product Management",
description: "Follow up with users who ran into one of your Fake Door experiments.",
preset: {
name: "Fake Door Follow-Up",
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
headline: "How important is this feature for you?",
required: true,
choices: [
{
id: createId(),
label: "Very important",
},
{
id: createId(),
label: "Not so important",
},
{
id: createId(),
label: "I was just looking around",
},
],
},
],
},
},
{
name: "Integration usage survey",
icon: DashboardIcon,
category: "Product Management",
description: "Evaluate how easily users can add integrations to your product. Find blind spots.",
preset: {
name: "Integration Usage Survey",
questions: [
{
id: createId(),
type: "multipleChoiceSingle",
headline: "How easy was it to set this integration up?",
required: true,
choices: [
{
id: createId(),
label: "Extremely difficult",
},
{
id: createId(),
label: "It took a while, but I got it",
},
{
id: createId(),
label: "It was alright",
},
{
id: createId(),
label: "Quite easy",
},
{
id: createId(),
label: "Very easy, love it!",
},
],
},
{
id: createId(),
type: "openText",
headline: "Which product would you like to integrate next?",
subheader: "We keep building integrations. Yours can be next:",
required: false,
},
],
},
},
/* {
name: "In-app Interview Prompt",
icon: OnboardingIcon,
description: "Invite a specific subset of your users to schedule an interview with your product team.",
preset: {
name: "In-app Interview Prompt",
questions: [
{
id: createId(),
type: "prompt",
headline: "Wanna do a short 15m interview with Charly?",
subheader: "That would really help us",
buttonLabel: "Book slot",
buttonUrl: "https://cal.com/formbricks",
},
],
},s
}, */
];

View File

@@ -0,0 +1,60 @@
import { EyeIcon, HandPuzzleIcon, CodeFileIcon } from "@formbricks/ui";
import HeadingCentered from "../shared/HeadingCentered";
const features = [
{
id: "customizable",
name: "Fully Customizable",
description: "Full customizability and extendability. Integrate with your stack easily.",
icon: HandPuzzleIcon,
},
{
id: "compliance",
name: "Smoothly Compliant",
description: "Self-host the entire product and fly through privacy compliance reviews.",
icon: EyeIcon,
},
{
id: "independent",
name: "Stay independent",
description: "The code is open-source. Do with it what your organization needs.",
icon: CodeFileIcon,
},
];
export default function Features() {
return (
<div className="relative px-4 pt-16 pb-20 sm:px-6 lg:px-8 lg:pt-24 lg:pb-28">
<div className="relative mx-auto max-w-7xl">
<HeadingCentered
closer
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-4 pt-8 sm:grid-cols-2 md:grid-cols-3 lg:gap-10">
{features.map((feature) => (
<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">
<feature.icon className="text-brand-dark dark:text-brand-light mx-auto h-10 w-10 flex-shrink-0" />
</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-slate-600 dark:text-slate-400">{feature.description}</dd>
</dl>
</div>
</li>
))}
</ul>
</div>
</div>
);
}

View File

@@ -0,0 +1,56 @@
import TemplateList from "../dummyUI/TemplateList";
import { Button } from "@formbricks/ui";
import { useState } from "react";
import { useRouter } from "next/router";
import VideoWalkThrough from "./VideoWalkThrough";
import { PlayCircleIcon } from "@heroicons/react/24/solid";
interface Props {}
export default function Hero({}: Props) {
const router = useRouter();
const [videoModal, setVideoModal] = useState(false);
return (
<div className="relative">
<div className="px-4 py-20 text-center sm:px-6 lg:px-8 lg:py-28">
<h1 className="text-3xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-4xl md:text-5xl">
<span className="xl:inline">Better experience data.</span>{" "}
<span className="from-brand-light to-brand-dark bg-gradient-to-b bg-clip-text text-transparent xl:inline">
Better business
</span>
<span className="inline ">.</span>
</h1>
<p className="xs:max-w-none mx-auto mt-3 max-w-xs text-base text-slate-500 dark:text-slate-300 sm:text-lg md:mt-5 md:text-xl">
Survey specific customer segments at any point in the user journey.
<br />
<span className="hidden md:block">
Continuously measure what your customers think and feel. All open-source.
</span>
</p>
<div className="mx-auto mt-5 max-w-md sm:flex sm:justify-center md:mt-8">
<Button
variant="highlight"
className="mr-3 px-6"
onClick={() => setVideoModal(true)}
EndIcon={PlayCircleIcon}
endIconClassName=" ml-2">
Watch video
</Button>
</div>
</div>
<TemplateList />
<VideoWalkThrough open={videoModal} setOpen={() => setVideoModal(false)} />
</div>
);
}
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,66 @@
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";
export default function Highlights({}) {
return (
<>
<div className="mx-auto mt-8 mb-12 max-w-lg md:mt-32 md:mb-0 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 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-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 3x
higher conversion rate.
</p>
</div>
<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="mx-auto mt-8 mb-12 max-w-lg md:mt-32 md:mb-0 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 tracking-tight text-slate-800 dark:text-slate-100 sm:text-3xl">
Spray and pray never worked.
<br />
<span className="font-light">Segment users, granularly.</span>
</h2>
<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>
</div>
</div>
</div>
</>
);
}

View File

@@ -0,0 +1,69 @@
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 function TabBar({ tabs, activeId, setActiveId }: SecondNavbarProps) {
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 default function SetupInstructions({}) {
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>
);
}

View File

@@ -0,0 +1,208 @@
import DashboardMockupDark from "@/images/dashboard-mockup-dark.png";
import DashboardMockup from "@/images/dashboard-mockup.png";
import PreviewSurvey from "../dummyUI/PreviewSurvey";
import { Button } from "@formbricks/ui";
import { CursorArrowRaysIcon } from "@heroicons/react/24/solid";
import Image from "next/image";
import { useState } from "react";
import AddNoCodeEventModalDummy from "../dummyUI/AddNoCodeEventModalDummy";
import HeadingCentered from "../shared/HeadingCentered";
import SetupTabs from "./SetupTabs";
import type { Question } from "../dummyUI/questionTypes";
import AddEventDummy from "../dummyUI/AddEventDummy";
const questions: Question[] = [
{
id: "1",
type: "multipleChoiceSingle",
headline: "How disappointed would you be if you could no longer use Formbricks?",
subheader: "Please select one of the following options:",
required: true,
choices: [
{
id: "2",
label: "Not at all disappointed",
},
{
id: "3",
label: "Somewhat disappointed",
},
{
id: "4",
label: "Very disappointed",
},
],
},
{
id: "5",
type: "multipleChoiceSingle",
headline: "What is your role?",
subheader: "Please select one of the following options:",
required: true,
choices: [
{
id: "6",
label: "Founder",
},
{
id: "7",
label: "Executive",
},
{
id: "8",
label: "Product Manager",
},
{
id: "9",
label: "Product Owner",
},
{
id: "10",
label: "Software Engineer",
},
],
},
{
id: "11",
type: "openText",
headline: "How can we improve Formbricks for you?",
subheader: "Please be as specific as possible.",
required: true,
},
];
export default function Steps() {
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:mt-8 md:mb-0 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 mt-8 mb-12 max-w-lg md:mt-32 md:mb-0 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="animate-bounce transition-all duration-150 hover:scale-105"
onClick={() => {
setAddEventModalOpen(true);
}}>
<CursorArrowRaysIcon className="mr-2 h-5 w-5 text-white" />
Add No-Code Event
</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">
Setup No-Code events
</h2>
<p className="text-md mt-6 max-w-lg leading-7 text-slate-500 dark:text-slate-400">
Set up an event 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 mt-8 mb-12 max-w-lg md:mt-32 md:mb-0 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 bg-slate-100 p-1 dark:bg-slate-800 sm:p-8">
<PreviewSurvey questions={questions} brandColor="#00C4B8" />
</div>
</div>
</div>
</div>
<div className="mx-auto mt-8 mb-12 max-w-lg md:mt-32 md:mb-0 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 events to only survey the
people who have answers. Trigger your survey on any event in your application. Context
matters.
</p>
</div>
</div>
</div>
</div>
<div className="mx-auto mt-8 mb-12 max-w-lg md:mt-32 md:mb-0 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} />
</>
);
}

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 default function VideoWalkThrough({ open, setOpen }: VideoWalkThroughProps) {
return (
<Modal open={open} setOpen={setOpen}>
<div className="mt-5">
<ResponsiveVideo src="/videos/walkthrough-v1.mp4" />
</div>
</Modal>
);
}

View File

@@ -0,0 +1,203 @@
import { useState, ChangeEvent } from "react";
import { ChevronDownIcon, ChevronRightIcon, ChevronLeftIcon } from "@heroicons/react/24/solid";
import clsx from "clsx";
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 ">
http://localhost:300
<span className="font-bold text-black dark:text-slate-300">{url}</span>
</div>
<div className="mt-4 ml-8 font-bold dark:text-slate-400">{description}</div>
<div>
<div className={clsx(switchState ? "block" : "hidden", "ml-8")}>
<p className="mt-6 mb-2 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>
)}
<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 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 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,62 @@
import { Button } from "@formbricks/ui";
import { useRouter } from "next/router";
import clsx from "clsx";
import { usePlausible } from "next-plausible";
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 max-w-6xl rounded-xl bg-gradient-to-br md:mb-0 "
)}>
<div className="relative px-4 py-8 sm:px-6 sm:pt-8 sm:pb-12 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("openDemo");
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

@@ -0,0 +1,31 @@
import { Button } from "@formbricks/ui";
import { useRouter } from "next/router";
import HeadingCentered from "./HeadingCentered";
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">
<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-slate-900 dark:from-slate-800 dark:to-slate-900 dark:text-slate-100 md:mb-0 md:ml-2.5 md:-mr-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>
<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-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("/waitlist")} className="mt-3" disabled>
Coming soon
</Button>
</div>
</div>
</div>
</>
);
}

View File

@@ -0,0 +1,41 @@
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",
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",
},
warning: {
container: "bg-amber-50 dark:bg-slate-800/60 dark:ring-1 dark:ring-slate-300/10",
title: "text-amber-900 dark:text-amber-500",
body: "text-amber-800 [--tw-prose-underline:theme(colors.amber.400)] [--tw-prose-background:theme(colors.amber.50)] prose-a:text-amber-900 prose-code:text-amber-900 dark:text-slate-300 dark:[--tw-prose-underline:theme(colors.slate.700)] dark:prose-code:text-slate-300",
},
};
const icons = {
note: (props: any) => <Icon icon="lightbulb" {...props} />,
warning: (props: any) => <Icon icon="warning" color="amber" {...props} />,
};
interface CalloutProps {
type: "note" | "warning";
title: string;
children: React.ReactNode;
}
export function Callout({ type = "note", title, children }: CalloutProps) {
let IconComponent = icons[type];
return (
<div className={clsx("my-8 flex rounded-3xl p-6", styles[type].container)}>
<IconComponent className="h-8 w-8 flex-none" />
<div className="ml-4 flex-auto">
<p className={clsx("font-display m-0 text-xl", styles[type].title)}>{title}</p>
<div className={clsx("prose mt-2.5", styles[type].body)}>{children}</div>
</div>
</div>
);
}

View File

@@ -0,0 +1,76 @@
import Link from "next/link";
import clsx from "clsx";
function ChevronRightIcon(props) {
return (
<svg viewBox="0 0 16 16" fill="none" aria-hidden="true" {...props}>
<path d="M6.75 5.75 9.25 8l-2.5 2.25" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
</svg>
);
}
export function Card({ as: Component = "div", className, children }) {
return (
<Component className={clsx(className, "group relative flex flex-col items-start")}>{children}</Component>
);
}
Card.Link = function CardLink({ children, ...props }) {
return (
<>
<div className="absolute -inset-y-6 -inset-x-4 scale-95 bg-slate-50 opacity-0 transition group-hover:scale-100 group-hover:opacity-100 dark:bg-slate-800 sm:-inset-x-6 sm:rounded-2xl" />
<Link {...props}>
<span className="absolute -inset-y-6 -inset-x-4 sm:-inset-x-6 sm:rounded-2xl" />
<span className="relative">{children}</span>
</Link>
</>
);
};
Card.Title = function CardTitle({ as: Component = "h2", href, children }) {
return (
<Component className="text-base font-semibold tracking-tight text-slate-800 dark:text-slate-100">
{href ? <Card.Link href={href}>{children}</Card.Link> : children}
</Component>
);
};
Card.Description = function CardDescription({ children }) {
return <p className="relative mt-2 text-sm text-slate-600 dark:text-slate-400">{children}</p>;
};
Card.Cta = function CardCta({ children }) {
return (
<div
aria-hidden="true"
className="relative mt-4 flex items-center text-sm font-medium text-brand-dark dark:text-brand-light">
{children}
<ChevronRightIcon className="ml-1 h-4 w-4 stroke-current" />
</div>
);
};
Card.Eyebrow = function CardEyebrow({
as: Component = "p",
decorate = false,
className,
children,
...props
}) {
return (
<Component
className={clsx(
className,
"relative order-first mb-3 flex items-center text-sm text-slate-400 dark:text-slate-500",
decorate && "pl-3.5"
)}
{...props}>
{decorate && (
<span className="absolute inset-y-0 left-0 flex items-center" aria-hidden="true">
<span className="h-4 w-0.5 rounded-full bg-slate-200 dark:bg-slate-500" />
</span>
)}
{children}
</Component>
);
};

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,42 @@
import { useRouter } from "next/router";
import { Button } from "@formbricks/ui";
import Image from "next/image";
import EarlyBird from "@/images/early bird deal for open source jotform alternative typeform and surveymonkey_v2.svg";
import { usePlausible } from "next-plausible";
export default function EarlyBirdDeal() {
const router = useRouter();
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:py-8 md:px-12 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 Early Bird deal. Only{" "}
<span className="bg- rounded-sm bg-slate-200/40 px-2 py-0.5 text-slate-100">17</span> left.
</h2>
<div className="mt-6">
<Button
variant="secondary"
onClick={() => {
plausible("openEarlyBird");
window.open("https://app.formbricks.com/auth/signup", "_blank")?.focus();
}}>
Get Early Bird Deal
</Button>
</div>
<p className="mt-2 mb-24 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 -right-20 -bottom-36 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

@@ -0,0 +1,55 @@
import { Button } from "@formbricks/ui";
import { useRouter } from "next/router";
import clsx from "clsx";
interface Props {
featureTitle: string;
text: string;
img: React.ReactNode;
isImgLeft?: boolean;
cta?: string;
href?: string;
disabled?: boolean;
}
export default function FeatureHighlights({
featureTitle,
text,
img,
isImgLeft,
cta,
href,
disabled,
}: Props) {
const router = useRouter();
return (
<div className="my-12">
<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="md:grid-cols-2 lg:grid lg:items-center lg:gap-24">
<div className={clsx(isImgLeft ? "order-last" : "")}>
<h2 className="text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-3xl">
{featureTitle}
</h2>
<div className="text-md mt-6 whitespace-pre-line leading-7 text-slate-500 dark:text-slate-400">
{text}
</div>
<div className="mt-6">
{cta && href && (
<Button
disabled={disabled}
variant="minimal"
size="sm"
className="mb-8"
onClick={() => router.push(href)}>
{cta}
</Button>
)}
</div>
</div>
{img}
</div>
</div>
</div>
);
}

View File

@@ -0,0 +1,30 @@
import { Fragment } from 'react'
import Highlight, { defaultProps } from 'prism-react-renderer'
export function Fence({ children, language }) {
return (
<Highlight
{...defaultProps}
code={children.trimEnd()}
language={language}
theme={undefined}
>
{({ className, style, tokens, getTokenProps }) => (
<pre className={className} style={style}>
<code>
{tokens.map((line, lineIndex) => (
<Fragment key={lineIndex}>
{line
.filter((token) => !token.empty)
.map((token, tokenIndex) => (
<span key={tokenIndex} {...getTokenProps({ token })} />
))}
{'\n'}
</Fragment>
))}
</code>
</pre>
)}
</Highlight>
)
}

View File

@@ -0,0 +1,86 @@
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: false },
{ 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: "Formbricks HQ", href: "/formbricks-hq", status: true },
{ name: "Reports", href: "#", status: false },
], */
other: [
{ name: "Community", href: "/community", status: true },
{ name: "Blog", href: "/blog", status: true },
{ name: "GDPR FAQ", href: "/gdpr", status: true },
{ name: "GDPR Guide", href: "/gdpr-guide", status: true },
],
social: [
{
name: "Twitter",
href: "https://twitter.com/formbricks",
icon: (props: any) => (
<svg fill="currentColor" viewBox="0 0 24 24" {...props}>
<path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.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.072 4.072 0 012.8 9.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 012 18.407a11.616 11.616 0 006.29 1.84" />
</svg>
),
},
{
name: "GitHub",
href: "https://github.com/formbricks/formbricks",
icon: (props: any) => (
<svg fill="currentColor" viewBox="0 0 24 24" {...props}>
<path
fillRule="evenodd"
d="M12 2C6.477 2 2 6.484 2 12.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 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 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.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"
clipRule="evenodd"
/>
</svg>
),
},
],
};
export default function Footer() {
return (
<footer
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 flex max-w-7xl flex-col space-y-6 px-4 py-12 text-center sm:px-6 lg:py-16 lg:px-8">
<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">Experience Management for B2B SaaS</p>
<div className="border-slate-500">
<p className="text-sm text-slate-400 dark:text-slate-500">
&copy; 2022. All rights reserved.
<br />
<Link href="/imprint">Imprint</Link> | <Link href="/privacy">Privacy Policy</Link> |{" "}
<Link href="/terms">Terms</Link>
</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

@@ -0,0 +1,117 @@
import { Popover, Transition } from "@headlessui/react";
import { Bars3Icon, XMarkIcon } from "@heroicons/react/24/outline";
import Link from "next/link";
import { useRouter } from "next/router";
import { Fragment } from "react";
import { Button } from "@formbricks/ui";
import { FooterLogo } from "./Logo";
import { ThemeSelector } from "./ThemeSelector";
export default function Header() {
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 ">
<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-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>
</div>
<Popover.Group as="nav" className="hidden space-x-10 md:flex">
<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"
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="/docs"
className="text-base font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300">
Docs
</Link>
</Popover.Group>
<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 ml-2 dark:fill-slate-200"
href="https://github.com/formbricks/formbricks"
target="_blank">
View on Github
</Button>
{/* <Button variant="highlight" className="ml-2" onClick={() => router.push("/waitlist")}>
Get Access
</Button> */}
</div>
</div>
<Transition
as={Fragment}
enter="duration-200 ease-out"
enterFrom="opacity-0 scale-95"
enterTo="opacity-100 scale-100"
leave="duration-100 ease-in"
leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95">
<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-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 pt-5 pb-6">
<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-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>
</div>
<div className="px-5 py-6">
<div className="flex flex-col space-y-5 text-center text-sm dark:text-slate-300">
<Link href="/community">Community</Link>
<Link href="/blog">Blog</Link>
<Button
variant="secondary"
EndIcon={GitHubIcon}
onClick={() => router.push("https://github.com/formbricks/formbricks")}
className="flex w-full justify-center fill-slate-800 dark:fill-slate-200">
View on Github
</Button>
{/* <Button
variant="primary"
onClick={() => router.push("/waitlist")}
className="flex w-full justify-center">
Get access
</Button> */}
</div>
</div>
</div>
</Popover.Panel>
</Transition>
</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,128 @@
import { Popover, Transition } from "@headlessui/react";
import { Bars3Icon, XMarkIcon } from "@heroicons/react/24/outline";
import Link from "next/link";
import { useRouter } from "next/router";
import { Fragment } from "react";
import { Button } from "@formbricks/ui";
import { FooterLogo } from "./Logo";
import { ThemeSelector } from "./ThemeSelector";
import { usePlausible } from "next-plausible";
export default function Header() {
const router = useRouter();
const plausible = usePlausible();
return (
<Popover className="relative" as="header">
<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-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>
</div>
<Popover.Group as="nav" className="hidden space-x-10 md:flex">
<Link
href="#howitworks"
className="text-base font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300">
How it works
</Link>
<Link
href="#pricing"
className="text-base font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300">
Pricing <p className="bg-brand inline rounded-full px-2 text-xs text-white">50%</p>
</Link>
<Link
href="/docs"
className="text-base font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300">
Docs
</Link>
</Popover.Group>
<div className="hidden flex-1 items-center justify-end md:flex">
<ThemeSelector className="relative z-10 mr-5" />
<Button
variant="secondary"
className="ml-2"
onClick={() => {
plausible("openDemo");
window.open("https://app.formbricks.com/demo", "_blank")?.focus();
}}>
Try Demo
</Button>
<Button
variant="highlight"
className="ml-2"
onClick={() => {
plausible("openSignUp");
window.open("https://app.formbricks.com/auth/signup", "_blank")?.focus();
}}>
Sign Up
</Button>
</div>
</div>
<Transition
as={Fragment}
enter="duration-200 ease-out"
enterFrom="opacity-0 scale-95"
enterTo="opacity-100 scale-100"
leave="duration-100 ease-in"
leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95">
<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-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 pt-5 pb-6">
<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-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>
</div>
<div className="px-5 py-6">
<div className="flex flex-col space-y-5 text-center text-sm dark:text-slate-300">
<Link href="#howitworks">How it works</Link>
<Link href="#pricing">Pricing</Link>
<Link href="/docs">Docs</Link>
<Button
variant="secondary"
target="_blank"
onClick={() => router.push("https://app.formbricks.com/demo")}
className="flex w-full justify-center fill-slate-800 dark:fill-slate-200">
Try Demo
</Button>
<Button
variant="primary"
target="_blank"
onClick={() => router.push("https://app.formbricks.com/auth/signup")}
className="flex w-full justify-center">
Sign Up
</Button>
</div>
</div>
</div>
</Popover.Panel>
</Transition>
</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,471 @@
import { Popover, Transition } from "@headlessui/react";
import { ChevronDownIcon } from "@heroicons/react/24/solid";
import {
Bars3Icon,
BoltIcon,
ClipboardDocumentListIcon,
CodeBracketSquareIcon,
CpuChipIcon,
CursorArrowRaysIcon,
CursorArrowRippleIcon,
DocumentChartBarIcon,
EnvelopeIcon,
SquaresPlusIcon,
XMarkIcon,
} from "@heroicons/react/24/outline";
import clsx from "clsx";
import Link from "next/link";
import { useRouter } from "next/router";
import { Fragment } from "react";
import { Button } from "@formbricks/ui";
import { FooterLogo } from "./Logo";
import { ThemeSelector } from "./ThemeSelector";
const creation = [
{
name: "React Library",
description: "Build surveys with React.js",
href: "/react-form-library",
icon: CodeBracketSquareIcon,
status: true,
},
{
name: "No-Code Builder",
description: "Notion-like visual builder",
href: "/visual-builder",
icon: CursorArrowRaysIcon,
status: false,
},
{
name: "Templates",
description: "CSAT, PMF survey, etc.",
href: "#",
icon: ClipboardDocumentListIcon,
status: false,
},
];
const pipes = [
{
name: "Core API",
description: "The OS survey engine",
href: "/core-api",
icon: CpuChipIcon,
status: true,
},
{
name: "Webhooks",
description: "Send JSON anywhere",
href: "/webhooks",
icon: BoltIcon,
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,
},
];
const insights = [
{
name: "Formbricks HQ",
description: "Manage submissions easily",
href: "/formbricks-hq",
icon: CursorArrowRippleIcon,
cat: "insights",
status: true,
},
{
name: "Reports",
description: "Based on Templates",
href: "#",
icon: DocumentChartBarIcon,
cat: "insights",
status: false,
},
];
export default function Header() {
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">
<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-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>
</div>
<Popover.Group as="nav" className="hidden space-x-10 md:flex">
<Popover className="relative">
{({ open }) => (
<>
<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"
)}>
<span>Bricks</span>
<ChevronDownIcon className="ml-2 h-5 w-5" aria-hidden="true" />
</Popover.Button>
<Transition
as={Fragment}
enter="transition ease-out duration-200"
enterFrom="opacity-0 translate-y-1"
enterTo="opacity-100 translate-y-0"
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">
<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>
<h4 className="mb-6 ml-16 text-sm text-slate-400">Survey Creation</h4>
{creation.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-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"
)}>
<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.name}
</p>
<p className="text-sm text-slate-400 dark:text-slate-500">
{brick.description}
</p>
</div>
</Link>
))}
</div>
<div>
<h4 className="mb-6 ml-16 text-sm text-slate-400">Data Pipelines</h4>
{pipes.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-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"
)}>
<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.name}
</p>
<p className="text-sm text-slate-400 dark:text-slate-500">
{brick.description}
</p>
</div>
</Link>
))}
</div>
<div>
<h4 className="mb-6 ml-16 text-sm text-slate-400">Data Insights</h4>
{insights.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-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"
)}>
<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.name}
</p>
<p className="text-sm text-slate-400 dark:text-slate-500">
{brick.description}
</p>
</div>
</Link>
))}
</div>
</div>
</div>
</Popover.Panel>
</Transition>
</>
)}
</Popover>
<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"
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="/docs"
className="text-base font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300">
Docs
</Link>
</Popover.Group>
<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"
onClick={() => router.push("https://github.com/formbricks/formbricks")}>
View on Github
</Button>
<Button variant="highlight" className="ml-2" onClick={() => router.push("/get-started")}>
Get started
</Button>
</div>
</div>
<Transition
as={Fragment}
enter="duration-200 ease-out"
enterFrom="opacity-0 scale-95"
enterTo="opacity-100 scale-100"
leave="duration-100 ease-in"
leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95">
<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-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 pt-5 pb-6">
<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-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-slate-200 px-5 py-6 dark:bg-slate-800">
<div>
<h4 className="mb-3 text-sm text-slate-900 dark:text-slate-300">Survey 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={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"
)}>
<brick.icon className="h-6 w-6" aria-hidden="true" />
</div>
<div className="ml-4">
<p
className={clsx(
brick.status
? "text-slate-900 dark:text-slate-200"
: "text-slate-400 dark:text-slate-500",
"text-lg font-semibold"
)}>
{brick.name}
</p>
<p
className={clsx(
brick.status
? "text-slate-900 dark:text-slate-400"
: "text-slate-400 dark:text-slate-600",
"text-sm"
)}>
{brick.description}
</p>
</div>
</Link>
))}
</div>
<div>
<h4 className="mt-8 mb-3 text-sm text-slate-900 dark:text-slate-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={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"
)}>
<brick.icon className="h-6 w-6" aria-hidden="true" />
</div>
<div className="ml-4">
<p
className={clsx(
brick.status
? "text-slate-900 dark:text-slate-200"
: "text-slate-400 dark:text-slate-500",
"text-lg font-semibold"
)}>
{brick.name}
</p>
<p
className={clsx(
brick.status
? "text-slate-900 dark:text-slate-400"
: "text-slate-400 dark:text-slate-600",
"text-sm"
)}>
{brick.description}
</p>
</div>
</Link>
))}
</div>
<div>
<h4 className="mt-8 mb-3 text-sm text-slate-900 dark:text-slate-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={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"
)}>
<brick.icon className="h-6 w-6" aria-hidden="true" />
</div>
<div className="ml-4">
<p
className={clsx(
brick.status
? "text-slate-900 dark:text-slate-200"
: "text-slate-400 dark:text-slate-500",
"text-lg font-semibold"
)}>
{brick.name}
</p>
<p
className={clsx(
brick.status
? "text-slate-900 dark:text-slate-400"
: "text-slate-400 dark:text-slate-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-slate-900 hover:text-slate-700 dark:text-slate-200 sm:text-base">
<Link href="/community">Community</Link>
<Link href="/blog">Blog</Link>
<Link href="/docs">Documentation</Link>
</div>
<div className="mt-6">
<Button
variant="secondary"
EndIcon={GitHubIcon}
onClick={() => router.push("https://github.com/formbricks/formbricks")}
className="flex w-full justify-center fill-slate-800 dark:fill-slate-200">
View on Github
</Button>
<Button
variant="primary"
onClick={() => router.push("/get-started")}
className="mt-3 flex w-full justify-center">
Get started
</Button>
</div>
</div>
</div>
</Popover.Panel>
</Transition>
</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,24 @@
import clsx from "clsx";
interface Props {
teaser?: string;
heading: string;
subheading?: string;
closer?: boolean;
}
export default function HeadingCentered({ teaser, heading, subheading, closer }: Props) {
return (
<div className={clsx(closer ? "pt-16 lg:pt-24" : "pt-24 lg:pt-40", "px-2 pb-4 text-center md:pb-12")}>
<p className="text-md text-brand-dark dark:text-brand-light mx-auto mb-3 max-w-2xl font-semibold uppercase sm:mt-4">
{teaser}
</p>
<h2 className="text-3xl font-bold tracking-tight text-slate-800 dark:text-slate-100 sm:text-4xl">
{heading}
</h2>
<p className="mx-auto mt-3 max-w-3xl text-xl text-slate-500 dark:text-slate-300 sm:mt-4">
{subheading}
</p>
</div>
);
}

View File

@@ -0,0 +1,153 @@
import { Fragment } from "react";
import Image from "next/image";
import clsx from "clsx";
import Highlight, { defaultProps } from "prism-react-renderer";
import { Button } from "@formbricks/ui";
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

@@ -0,0 +1,28 @@
import { useEffect, useRef, useState } from "react";
import type { LottiePlayer } from "lottie-web";
export default function HeroAnimation(props: any) {
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/xm-hero-v1.json",
});
return () => animation.destroy();
}
}, [lottie]);
return <div ref={ref} {...props} />;
}

View File

@@ -0,0 +1,188 @@
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>
)
}

View File

@@ -0,0 +1,25 @@
interface Props {
headingPt1: string;
headingTeal?: string;
headingPt2?: string;
subheading?: string;
children?: React.ReactNode;
}
export default function HeroTitle({ headingPt1, headingTeal, headingPt2, subheading, children }: Props) {
return (
<div className="px-4 py-20 text-center sm:px-6 lg:px-8 lg:py-28">
<h1 className="text-3xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-4xl md:text-5xl">
<span className="xl:inline">{headingPt1}</span>{" "}
<span className="from-brand-light to-brand-dark bg-gradient-to-b bg-clip-text text-transparent xl:inline">
{headingTeal}
</span>{" "}
<span className="inline ">{headingPt2}</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-2xl md:text-xl">
{subheading}
</p>
<div className="mx-auto mt-5 max-w-md sm:flex sm:justify-center md:mt-8">{children}</div>
</div>
);
}

View File

@@ -0,0 +1,69 @@
import { useId } from "react";
import clsx from "clsx";
import { InstallationIcon } from "@/components/shared/icons/InstallationIcon";
import { LightbulbIcon } from "@/components/shared/icons/LightbulbIcon";
import { PluginsIcon } from "@/components/shared/icons/PluginsIcon";
import { PresetsIcon } from "@/components/shared/icons/PresetsIcon";
import { ThemingIcon } from "@/components/shared/icons/ThemingIcon";
import { WarningIcon } from "@/components/shared/icons/WarningIcon";
const icons = {
installation: InstallationIcon,
presets: PresetsIcon,
plugins: PluginsIcon,
theming: ThemingIcon,
lightbulb: LightbulbIcon,
warning: WarningIcon,
};
const iconStyles = {
slate: "[--icon-foreground:theme(colors.slate.900)] [--icon-background:theme(colors.white)]",
amber: "[--icon-foreground:theme(colors.amber.900)] [--icon-background:theme(colors.amber.100)]",
};
export function Icon({ color = "slate", icon, className, ...props }) {
let id = useId();
let IconComponent = icons[icon];
return (
<svg
aria-hidden="true"
viewBox="0 0 32 32"
fill="none"
className={clsx(className, iconStyles[color])}
{...props}>
<IconComponent id={id} color={color} />
</svg>
);
}
const gradients = {
slate: [
{ stopColor: "#0EA5E9" },
{ stopColor: "#22D3EE", offset: ".527" },
{ stopColor: "#818CF8", offset: 1 },
],
amber: [
{ stopColor: "#FDE68A", offset: ".08" },
{ stopColor: "#F59E0B", offset: ".837" },
],
};
export function Gradient({ color = "slate", ...props }) {
return (
<radialGradient cx={0} cy={0} r={1} gradientUnits="userSpaceOnUse" {...props}>
{gradients[color].map((stop, stopIndex) => (
<stop key={stopIndex} {...stop} />
))}
</radialGradient>
);
}
export function LightMode({ className, ...props }) {
return <g className={clsx("dark:hidden", className)} {...props} />;
}
export function DarkMode({ className, ...props }) {
return <g className={clsx("hidden dark:inline", className)} {...props} />;
}

View File

@@ -0,0 +1,116 @@
import clsx from "clsx";
import {
OnboardingIcon,
PMFIcon,
DogChaserIcon,
CancelSubscriptionIcon,
InterviewPromptIcon,
DoorIcon,
FeedbackIcon,
BugBlueIcon,
AngryBirdRageIcon,
FeatureRequestIcon,
} from "@formbricks/ui";
const BestPractices = [
{
title: "Onboarding Segmentation",
description:
"Get to know your users right from the start. Ask a few questions early, let us enrich the profile.",
category: "Boost Retention",
icon: OnboardingIcon,
},
{
title: "Product-Market Fit Survey",
description: "Find out how disappointed people would be if they could not use your service any more.",
category: "Boost Retention",
icon: PMFIcon,
href: "/pmf",
},
{
title: "Feature Chaser",
description: "Show a survey about a new feature shown only to people who used it.",
category: "Boost Retention",
icon: DogChaserIcon,
},
{
title: "Cancel Subscription Flow",
description: "Request users going through a cancel subscription flow before cancelling.",
category: "Boost Retention",
icon: CancelSubscriptionIcon,
},
{
title: "Interview Prompt",
description: "Ask high-interest users to book a time in your calendar to get all the juicy details.",
category: "Exploration",
icon: InterviewPromptIcon,
},
{
title: "Fake Door Follow-Up",
description: "Running a fake door experiment? Catch users right when they are full of expectations.",
category: "Exploration",
icon: DoorIcon,
},
{
title: "Feedback Box",
description: "Give users the chance to share feedback in a single click.",
category: "Retain Users",
icon: FeedbackIcon,
},
{
title: "Rage Click Survey",
description: "Sometimes things dont work. Trigger this rage click survey to catch users in rage.",
category: "Retain Users",
icon: AngryBirdRageIcon,
},
];
export default function InsightOppos() {
return (
<div className="pt-12 pb-10 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>
<div>
<div className=" mx-auto grid max-w-5xl grid-cols-1 gap-6 px-2 sm:grid-cols-2">
{BestPractices.map((bestPractice) => (
<div
key={bestPractice.title}
className="drop-shadow-card duration-120 relative cursor-pointer rounded-lg bg-slate-100 p-8 transition-all ease-in-out hover:scale-105 dark:bg-slate-800">
<div
className={clsx(
// base styles independent what type of button it is
"absolute right-10 rounded-full py-1 px-3",
// 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 === "Exploration" &&
"bg-blue-100 text-blue-500 dark:bg-blue-800 dark:text-blue-200",
bestPractice.category === "Retain 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="mt-3 mb-1 text-xl font-bold text-slate-700 dark:text-slate-200">
{bestPractice.title}
</h3>
<p className="text-sm text-slate-600 dark:text-slate-400">{bestPractice.description}</p>
</div>
))}
</div>
</div>
</div>
);
}

View File

@@ -0,0 +1,24 @@
import Footer from "./Footer";
import Header from "./Header";
import MetaInformation from "./MetaInformation";
interface LayoutProps {
children: React.ReactNode;
title: string;
description: string;
}
export default function Layout({ title, description, children }: LayoutProps) {
return (
<div className="flex h-screen flex-col justify-between">
<MetaInformation title={title} description={description} />
<Header />
{
<main className="max-w-8xl relative mx-auto mb-auto flex w-full flex-col justify-center sm:px-2 lg:px-8 xl:px-12">
{children}
</main>
}
<Footer />
</div>
);
}

View File

@@ -0,0 +1,36 @@
import Footer from "./Footer";
import Header from "./Header";
import MetaInformation from "./MetaInformation";
import { Prose } from "./Prose";
interface Props {
meta: {
title: string;
description: string;
};
children: JSX.Element;
}
export default function LayoutMdx({ meta, children }: Props) {
return (
<div className="flex h-screen flex-col justify-between">
<MetaInformation title={meta.title} description={meta.description} />
<Header />
<main className="min-w-0 max-w-2xl flex-auto px-4 lg:max-w-none lg:pr-0 lg:pl-8 xl:px-16">
<article className="mx-auto my-16 max-w-3xl px-2">
{meta.title && (
<header className="mb-9 space-y-1">
{meta.title && (
<h1 className="font-display text-3xl tracking-tight text-slate-800 dark:text-slate-100">
{meta.title}
</h1>
)}
</header>
)}
<Prose className="">{children}</Prose>
</article>
</main>
<Footer />
</div>
);
}

View File

@@ -0,0 +1,24 @@
import Footer from "./Footer";
import HeaderPMF from "./HeaderPMF";
import MetaInformation from "./MetaInformation";
interface LayoutProps {
children: React.ReactNode;
title: string;
description: string;
}
export default function Layout({ title, description, children }: LayoutProps) {
return (
<div className="flex h-screen flex-col justify-between">
<MetaInformation title={title} description={description} />
<HeaderPMF />
{
<main className="max-w-8xl relative mx-auto mb-auto flex w-full flex-col justify-center sm:px-2 lg:px-8 xl:px-12">
{children}
</main>
}
<Footer />
</div>
);
}

View File

@@ -0,0 +1,22 @@
import Footer from "./Footer";
import MetaInformation from "./MetaInformation";
interface LayoutProps {
children: React.ReactNode;
title: string;
description: string;
}
export default function Layout({ title, description, children }: LayoutProps) {
return (
<div className="flex h-screen flex-col justify-between">
<MetaInformation title={title} description={description} />
{
<main className="max-w-8xl relative mx-auto mb-auto flex w-full flex-col justify-center sm:px-2 lg:px-8 xl:px-12">
{children}
</main>
}
<Footer />
</div>
);
}

View File

@@ -0,0 +1,36 @@
import Image from "next/image";
import logomark from "@/images/logo/logomark.svg";
import logo from "@/images/logo/logo.svg";
import logoDark from "@/images/logo/logo_dark.svg";
import footerLogo from "@/images/logo/footerlogo.svg";
import footerLogoDark from "@/images/logo/footerlogo-dark.svg";
export function Logomark(props: any) {
return <Image src={logomark} {...props} alt="Formbricks Open source Forms & Surveys Logomark" />;
}
export function Logo(props: any) {
return (
<div>
<div className="block dark:hidden">
<Image src={logo} {...props} alt="Formbricks Open source Forms & Surveys Logo" />
</div>
<div className="hidden dark:block">
<Image src={logoDark} {...props} alt="Formbricks Open source Forms & Surveys Logo" />
</div>
</div>
);
}
export function FooterLogo(props: any) {
return (
<div>
<div className="block dark:hidden">
<Image src={footerLogo} {...props} alt="Formbricks Open source Forms & Surveys Logo" />
</div>
<div className="hidden dark:block">
<Image src={footerLogoDark} {...props} alt="Formbricks Open source Forms & Surveys Logo" />
</div>
</div>
);
}

View File

@@ -0,0 +1,35 @@
import { Button } from "@formbricks/ui";
import { useRouter } from "next/router";
import HeadingCentered from "./HeadingCentered";
export default function CTA() {
const router = useRouter();
return (
<>
<div className="mx-auto py-16 lg:pt-24 lg:pb-40">
<p className="text-md text-brand-dark dark:text-brand-light font-semibold uppercase">
It&apos;s free & open-source
</p>
<p className="my-0 text-4xl font-semibold tracking-tight text-slate-800 dark:text-slate-100">
Try Formbricks right now!
</p>
<div className="mt-12 grid grid-cols-1 content-center md:grid-cols-2">
<div className="-mb-2 rounded-t-xl bg-gradient-to-br from-slate-300 to-slate-200 text-center text-slate-900 dark:from-slate-800 dark:to-slate-900 dark:text-slate-200 md:mb-0 md:ml-2.5 md:-mr-5 md:rounded-l-xl">
<h3 className="text-3xl font-bold">Self-hosted</h3>
<p className="mt-2 mb-4 dark:text-slate-400">Run locally with docker-compose.</p>
<Button variant="secondary" onClick={() => router.push("/docs")} className="mt-3 mb-8 md:mb-0">
Read docs
</Button>
</div>
<div className="rounded-xl bg-gradient-to-br from-slate-400 to-slate-300 pb-10 text-center text-slate-800 dark:from-slate-800 dark:to-slate-700 dark:text-slate-200">
<h3 className="text-3xl font-bold">Cloud</h3>
<p className="mt-2 mb-4 dark:text-slate-400">Use our free managed service.</p>
<Button variant="secondary" onClick={() => router.push("/waitlist")} className="mt-3">
Get started
</Button>
</div>
</div>
</div>
</>
);
}

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