Compare commits
387 Commits
v0.12
...
@formbrick
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc0feda5e9 | ||
|
|
3d0d633bc8 | ||
|
|
d707e2e49e | ||
|
|
288fc79366 | ||
|
|
000fcf8b02 | ||
|
|
730f0ba1e9 | ||
|
|
38d3de2165 | ||
|
|
5d380a4986 | ||
|
|
e32e47e272 | ||
|
|
e864829a79 | ||
|
|
b62a344e54 | ||
|
|
469590c2f6 | ||
|
|
a165143c2a | ||
|
|
6b3f977d83 | ||
|
|
f743fb18fb | ||
|
|
e5d06de68e | ||
|
|
49f61e2eeb | ||
|
|
4763cf3217 | ||
|
|
b6a0d0fe5d | ||
|
|
9be053d8a6 | ||
|
|
3a17c6b085 | ||
|
|
16b7e0d82a | ||
|
|
ae7075c746 | ||
|
|
78ed48adeb | ||
|
|
03ba9ecb58 | ||
|
|
d360c1f741 | ||
|
|
cf953db18f | ||
|
|
7475df147d | ||
|
|
06d620dbc8 | ||
|
|
feadefa90d | ||
|
|
754832f097 | ||
|
|
dad8ebe8da | ||
|
|
df27b4703f | ||
|
|
e385638c14 | ||
|
|
8cacb2ccee | ||
|
|
98a62949d5 | ||
|
|
dd6ac2e4cd | ||
|
|
c52df00d39 | ||
|
|
0c7c3c9ad2 | ||
|
|
5612fbfa22 | ||
|
|
186a4269a3 | ||
|
|
503e7649e2 | ||
|
|
e3b4ec4a9e | ||
|
|
e23f26f48c | ||
|
|
9e9fe5c09d | ||
|
|
3bb4a34e4c | ||
|
|
9fcc0a360c | ||
|
|
3824d95151 | ||
|
|
5bfaad9484 | ||
|
|
a5c8c1aa85 | ||
|
|
c92011b069 | ||
|
|
856247763c | ||
|
|
2199a4b102 | ||
|
|
cd49d687ad | ||
|
|
2852bf617a | ||
|
|
30623d5fd2 | ||
|
|
b673044890 | ||
|
|
bf9189c1af | ||
|
|
e262006f7e | ||
|
|
d44ea1f32d | ||
|
|
e24f6cd017 | ||
|
|
c6a4b7731f | ||
|
|
62d2c1af18 | ||
|
|
2ea3d42ff6 | ||
|
|
e275553425 | ||
|
|
1a83373099 | ||
|
|
94c11193e5 | ||
|
|
21529da799 | ||
|
|
701a7d9786 | ||
|
|
4410b14d0c | ||
|
|
cddbbc2be2 | ||
|
|
4fefa09ee8 | ||
|
|
09106188ba | ||
|
|
62c001cbee | ||
|
|
adef4c8762 | ||
|
|
5d66a8b8f4 | ||
|
|
ec80543a95 | ||
|
|
1d5fab3665 | ||
|
|
e21c2a45e0 | ||
|
|
8ae8afec0d | ||
|
|
dceb8842d3 | ||
|
|
dc6ae088bf | ||
|
|
257287cefc | ||
|
|
a4a771ba70 | ||
|
|
8ea6016cf5 | ||
|
|
cfedd0f4b8 | ||
|
|
dc25856b46 | ||
|
|
d4fe92ab07 | ||
|
|
194809758b | ||
|
|
a1a4972db3 | ||
|
|
5084fb6063 | ||
|
|
8821fa2167 | ||
|
|
64bbff56f7 | ||
|
|
ec3a20b183 | ||
|
|
170ed85712 | ||
|
|
1c58474dc2 | ||
|
|
3f2ef3e776 | ||
|
|
83b94de977 | ||
|
|
3a1a385b41 | ||
|
|
c99da3165b | ||
|
|
b1f7e03995 | ||
|
|
69809bafa4 | ||
|
|
c1b1fa61b6 | ||
|
|
f1a297f5e8 | ||
|
|
bcf11a37fa | ||
|
|
7333bb604d | ||
|
|
1101d1f268 | ||
|
|
7dd67e4633 | ||
|
|
57a64d7940 | ||
|
|
269a504780 | ||
|
|
c8c84d0148 | ||
|
|
af1b29f8bc | ||
|
|
4908bc77bd | ||
|
|
20ec66481b | ||
|
|
c912ebd42a | ||
|
|
1b0327edd4 | ||
|
|
ce8a8df091 | ||
|
|
7be6879afb | ||
|
|
04ec0a6827 | ||
|
|
62ed0a7945 | ||
|
|
fc0dfec151 | ||
|
|
fe55a152ea | ||
|
|
31ccb9d43f | ||
|
|
f4237e3121 | ||
|
|
bd9b77cd9d | ||
|
|
70c809586c | ||
|
|
60f723d3cc | ||
|
|
95eeaecafc | ||
|
|
484da80e4c | ||
|
|
25f6ccc0a0 | ||
|
|
4017a5c4f9 | ||
|
|
ffb9fd659f | ||
|
|
40dfea070c | ||
|
|
ec1f940d48 | ||
|
|
749fdd684a | ||
|
|
60c96fe3f9 | ||
|
|
81ea563dbc | ||
|
|
4cc085cecf | ||
|
|
561afcc8fb | ||
|
|
9e9db7103e | ||
|
|
896e91a38b | ||
|
|
8283a7d2ed | ||
|
|
08fe6b0ad8 | ||
|
|
8eae9fc846 | ||
|
|
5ae6130e89 | ||
|
|
47b9867f28 | ||
|
|
8585cb8c7c | ||
|
|
82bcc0ae7e | ||
|
|
33811f9349 | ||
|
|
4e1d905c9e | ||
|
|
e840816567 | ||
|
|
dbec5426b2 | ||
|
|
5162a84246 | ||
|
|
419b9d0b90 | ||
|
|
183ce34cad | ||
|
|
a9f4d4e28b | ||
|
|
751d729242 | ||
|
|
c8c6d922c3 | ||
|
|
dbe9a9aa02 | ||
|
|
175736bb4b | ||
|
|
d3724fa9fc | ||
|
|
db0b673965 | ||
|
|
fadd56102b | ||
|
|
f38c897e2a | ||
|
|
70ac575fcf | ||
|
|
c1815007d1 | ||
|
|
8188b85335 | ||
|
|
00a4919b5a | ||
|
|
81b4624649 | ||
|
|
69c332a435 | ||
|
|
73a2b077e5 | ||
|
|
f4349d348a | ||
|
|
95f588d5d1 | ||
|
|
fb909938f9 | ||
|
|
46b7183161 | ||
|
|
4610a46b5b | ||
|
|
f7aea59f80 | ||
|
|
31e4965355 | ||
|
|
b86f837e78 | ||
|
|
1d76365f04 | ||
|
|
aa80eb5d96 | ||
|
|
d67858e2ea | ||
|
|
888d10434a | ||
|
|
5dc9dfdb3d | ||
|
|
06817aa8bc | ||
|
|
2205d98aeb | ||
|
|
fa785fcafb | ||
|
|
1892b6df40 | ||
|
|
ef0c621e5e | ||
|
|
4f12886bfc | ||
|
|
8c838bc25c | ||
|
|
5bb1a0678a | ||
|
|
e1f81636a3 | ||
|
|
9cc836a775 | ||
|
|
9d1d0576a2 | ||
|
|
454cc01629 | ||
|
|
a296caa3c0 | ||
|
|
f0eb8289c1 | ||
|
|
f93e2b9ace | ||
|
|
0187b0e61e | ||
|
|
252859298b | ||
|
|
daf030b183 | ||
|
|
87a0eb0a04 | ||
|
|
a2a47f433c | ||
|
|
59481a7f5b | ||
|
|
ff001e7ea1 | ||
|
|
38021d2026 | ||
|
|
f1cc434e49 | ||
|
|
8a7b16effc | ||
|
|
55c1e354fc | ||
|
|
c853f8db2c | ||
|
|
8486e516b6 | ||
|
|
2e662f98b9 | ||
|
|
7ed24c9f49 | ||
|
|
c224e7995d | ||
|
|
a1bbe5c5fb | ||
|
|
5b34304cfc | ||
|
|
e15309a080 | ||
|
|
25b84102a7 | ||
|
|
6922b3ed3f | ||
|
|
08717cd396 | ||
|
|
8cfc1878fb | ||
|
|
7ef7c39c31 | ||
|
|
db697a485e | ||
|
|
455e0779a5 | ||
|
|
51e4221f33 | ||
|
|
8f1b7ae83a | ||
|
|
27023eacf8 | ||
|
|
4348c905f0 | ||
|
|
aa52808bd2 | ||
|
|
033d4cb54a | ||
|
|
8f55b73c08 | ||
|
|
495b53e98f | ||
|
|
e64d2b9ac1 | ||
|
|
ce5410a3f9 | ||
|
|
51c39116d0 | ||
|
|
117823a6f7 | ||
|
|
e6f6e2296f | ||
|
|
2f65c8d011 | ||
|
|
9393cab76f | ||
|
|
b1fa0fefe9 | ||
|
|
cfacd1a63e | ||
|
|
306bf622c6 | ||
|
|
fc66e16653 | ||
|
|
6ff3371ed1 | ||
|
|
427406e9eb | ||
|
|
00acdf58f1 | ||
|
|
f4bb54c79c | ||
|
|
66891318a1 | ||
|
|
478a981996 | ||
|
|
f713591083 | ||
|
|
1334e7a3f9 | ||
|
|
a5e426109b | ||
|
|
7554ab4d97 | ||
|
|
1ef49f6fae | ||
|
|
b7f72fe111 | ||
|
|
bbec1c9066 | ||
|
|
0feaadcbc9 | ||
|
|
a6f3bb8f87 | ||
|
|
a4274da003 | ||
|
|
eb1f4b0f0d | ||
|
|
c5be453563 | ||
|
|
c16708d12a | ||
|
|
46fadf9df0 | ||
|
|
7c53fa34f4 | ||
|
|
52a8d7beef | ||
|
|
842cb34942 | ||
|
|
08038f292b | ||
|
|
424a2f1a69 | ||
|
|
c1b1f6cacb | ||
|
|
97263a66cc | ||
|
|
85c3069155 | ||
|
|
b6e99274fe | ||
|
|
2278fc1477 | ||
|
|
26e2be43bc | ||
|
|
583dc7af2b | ||
|
|
c6702cecb8 | ||
|
|
995de207fb | ||
|
|
d970c121a5 | ||
|
|
369379e539 | ||
|
|
62e47507cd | ||
|
|
8c87957911 | ||
|
|
51621dcaff | ||
|
|
03e83caeb7 | ||
|
|
f312783670 | ||
|
|
ef70e7363f | ||
|
|
b3ab0ad12e | ||
|
|
1e3204e063 | ||
|
|
855fd87dba | ||
|
|
7b6b1b9edb | ||
|
|
a53e67ac7d | ||
|
|
e54d8f42fb | ||
|
|
ba1a17578f | ||
|
|
ac83286b27 | ||
|
|
1243017718 | ||
|
|
93c66c0caf | ||
|
|
5180fa8608 | ||
|
|
92787722f0 | ||
|
|
9d3117b9c1 | ||
|
|
3218bbdf6a | ||
|
|
4bfaf68de2 | ||
|
|
d2aa9b5f04 | ||
|
|
91d4b09453 | ||
|
|
fc6534fa19 | ||
|
|
b7e6ef5bd6 | ||
|
|
f0d321b073 | ||
|
|
ab8e42f018 | ||
|
|
ddbcf77e59 | ||
|
|
944c861b18 | ||
|
|
8a2beab5d1 | ||
|
|
d7fb29607a | ||
|
|
e2ebad0735 | ||
|
|
bd31d87046 | ||
|
|
7040755b40 | ||
|
|
c4e70fbfaa | ||
|
|
7fa2a260e8 | ||
|
|
dbe7f138b6 | ||
|
|
35fc7b2d25 | ||
|
|
37a0914c5a | ||
|
|
8e43939206 | ||
|
|
c4dd7ae4a2 | ||
|
|
0f6210c559 | ||
|
|
965ae44344 | ||
|
|
0e94900e2c | ||
|
|
99bb6932c9 | ||
|
|
a2e428f3c9 | ||
|
|
78f7b4d03e | ||
|
|
38f1803188 | ||
|
|
66c747d1ca | ||
|
|
0b24f1fe09 | ||
|
|
9631776552 | ||
|
|
726b734b1a | ||
|
|
7ba1cc5055 | ||
|
|
94a10b2870 | ||
|
|
f71cc87b3d | ||
|
|
b70b0008c1 | ||
|
|
5601f046d7 | ||
|
|
a6c703620c | ||
|
|
8b56225b6e | ||
|
|
e07a30c12d | ||
|
|
92ee5529d8 | ||
|
|
cda8513410 | ||
|
|
2912b8bd8d | ||
|
|
1db79ffa6b | ||
|
|
fe4d6a8ce8 | ||
|
|
7238b28fb5 | ||
|
|
ed0135733a | ||
|
|
e7e772e155 | ||
|
|
2fbaeae9c0 | ||
|
|
37f26fa7c6 | ||
|
|
fec3741ef4 | ||
|
|
3618310116 | ||
|
|
0a1680229d | ||
|
|
d0f8f8d57d | ||
|
|
e7a0821901 | ||
|
|
8e98003ea2 | ||
|
|
6ea6bddc5e | ||
|
|
59cb636b6e | ||
|
|
5469ffb8d2 | ||
|
|
852cfacf4b | ||
|
|
ba871726a5 | ||
|
|
33cbbd07de | ||
|
|
1edd69408a | ||
|
|
b553080443 | ||
|
|
4636ac9806 | ||
|
|
9b187a4975 | ||
|
|
96344d6123 | ||
|
|
69c05a3133 | ||
|
|
79a86050c3 | ||
|
|
d07616d4a0 | ||
|
|
8ce705e08c | ||
|
|
41c61cd94a | ||
|
|
204837b844 | ||
|
|
d8f4ee598d | ||
|
|
c6aabc77b4 | ||
|
|
b9cdf329e3 | ||
|
|
953f04b42a | ||
|
|
41443267c9 | ||
|
|
b76289c9d8 | ||
|
|
c352c9ff5d | ||
|
|
eea8500501 | ||
|
|
48f53a2120 | ||
|
|
26b4fd9b3e | ||
|
|
80ae43646f | ||
|
|
14ae404b0e | ||
|
|
a652f0df9a | ||
|
|
b5928e71e5 |
@@ -4,8 +4,8 @@
|
||||
"commit": false,
|
||||
"fixed": [],
|
||||
"linked": [],
|
||||
"access": "restricted",
|
||||
"access": "public",
|
||||
"baseBranch": "main",
|
||||
"updateInternalDependencies": "patch",
|
||||
"ignore": ["@formbricks/formbricks-com"]
|
||||
"ignore": ["@formbricks/formbricks-com", "@formbricks/demo"]
|
||||
}
|
||||
|
||||
14
.env.docker
@@ -46,6 +46,7 @@ NEXTAUTH_URL=http://localhost:3000
|
||||
# MAIL_FROM=noreply@example.com
|
||||
# SMTP_HOST=localhost
|
||||
# SMTP_PORT=1025
|
||||
# Enable SMTP_SECURE_ENABLED for TLS (port 465)
|
||||
# SMTP_SECURE_ENABLED=0 # Enable for TLS (port 465)
|
||||
# SMTP_USER=smtpUser
|
||||
# SMTP_PASSWORD=smtpPassword
|
||||
@@ -70,6 +71,9 @@ NEXT_PUBLIC_PASSWORD_RESET_DISABLED=1
|
||||
# Signup. Disable the ability for new users to create an account.
|
||||
# NEXT_PUBLIC_SIGNUP_DISABLED=1
|
||||
|
||||
# Team Invite. Disable the ability for invited users to create an account.
|
||||
# NEXT_PUBLIC_INVITE_DISABLED=1
|
||||
|
||||
##########
|
||||
# Other #
|
||||
##########
|
||||
@@ -88,4 +92,12 @@ NEXT_PUBLIC_SENTRY_DSN=
|
||||
# Configure Github Login
|
||||
NEXT_PUBLIC_GITHUB_AUTH_ENABLED=0
|
||||
GITHUB_ID=
|
||||
GITHUB_SECRET=
|
||||
GITHUB_SECRET=
|
||||
|
||||
# Configure Google Login
|
||||
NEXT_PUBLIC_GOOGLE_AUTH_ENABLED=0
|
||||
GOOGLE_CLIENT_ID=
|
||||
GOOGLE_CLIENT_SECRET=
|
||||
|
||||
# Cron Secret
|
||||
CRON_SECRET=
|
||||
29
.env.example
@@ -46,7 +46,8 @@ NEXTAUTH_URL=http://localhost:3000
|
||||
MAIL_FROM=noreply@example.com
|
||||
SMTP_HOST=localhost
|
||||
SMTP_PORT=1025
|
||||
SMTP_SECURE_ENABLED=0 # Enable for TLS (port 465)
|
||||
# Enable SMTP_SECURE_ENABLED for TLS (port 465)
|
||||
SMTP_SECURE_ENABLED=0
|
||||
SMTP_USER=smtpUser
|
||||
SMTP_PASSWORD=smtpPassword
|
||||
|
||||
@@ -70,6 +71,9 @@ SMTP_PASSWORD=smtpPassword
|
||||
# Signup. Disable the ability for new users to create an account.
|
||||
# NEXT_PUBLIC_SIGNUP_DISABLED=1
|
||||
|
||||
# Team Invite. Disable the ability for invited users to create an account.
|
||||
# NEXT_PUBLIC_INVITE_DISABLED=1
|
||||
|
||||
##########
|
||||
# Other #
|
||||
##########
|
||||
@@ -79,19 +83,26 @@ NEXT_PUBLIC_PRIVACY_URL=
|
||||
NEXT_PUBLIC_TERMS_URL=
|
||||
NEXT_PUBLIC_IMPRINT_URL=
|
||||
|
||||
# Disable Sentry warning
|
||||
SENTRY_IGNORE_API_RESOLUTION_ERROR=1
|
||||
|
||||
# Enable Sentry Error Tracking
|
||||
NEXT_PUBLIC_SENTRY_DSN=
|
||||
|
||||
# Configure Github Login
|
||||
NEXT_PUBLIC_GITHUB_AUTH_ENABLED=0
|
||||
GITHUB_ID=
|
||||
GITHUB_SECRET=
|
||||
|
||||
# Configure Google Login
|
||||
NEXT_PUBLIC_GOOGLE_AUTH_ENABLED=0
|
||||
GOOGLE_CLIENT_ID=
|
||||
GOOGLE_CLIENT_SECRET=
|
||||
|
||||
|
||||
# Stripe Billing Variables
|
||||
NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID=
|
||||
NEXT_PUBLIC_STRIPE_PUBLIC_KEY=
|
||||
STRIPE_SECRET_KEY=
|
||||
STRIPE_WEBHOOK_SECRET=
|
||||
STRIPE_WEBHOOK_SECRET=
|
||||
|
||||
# Configure Formbricks usage within Formbricks
|
||||
NEXT_PUBLIC_FORMBRICKS_API_HOST=
|
||||
NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID=
|
||||
NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID=
|
||||
|
||||
# Cron Secret
|
||||
CRON_SECRET=
|
||||
|
||||
51
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,51 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: "Found a bug? Please fill out the sections below. \U0001F44D"
|
||||
title: "[BUG]"
|
||||
labels: bug
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
### Issue Summary
|
||||
|
||||
<!--
|
||||
A summary of the issue. This needs to be a clear detailed-rich summary.
|
||||
-->
|
||||
|
||||
(Write your answer here.)
|
||||
|
||||
### Steps to Reproduce
|
||||
|
||||
1. (for example) Went to ...
|
||||
2. Clicked on...
|
||||
3. ...
|
||||
|
||||
### Expected behavior
|
||||
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
### Other information
|
||||
|
||||
#### Screenshots
|
||||
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
#### Environment
|
||||
|
||||
- [ ] Formbricks Cloud (app.formbricks.com)
|
||||
- [ ] self-hosted Formbricks, version/commit: [please provide]
|
||||
|
||||
#### Desktop (please complete the following information):
|
||||
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
#### Node.JS version
|
||||
|
||||
[e.g. v18.15.0]
|
||||
|
||||
#### Anything else?
|
||||
|
||||
- Screen recording, console logs, network requests: You can make a recording with [Loom](https://www.loom.com).
|
||||
- Anything else that you think could be an issue?
|
||||
81
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
name: Bug report
|
||||
description: "Found a bug? Please fill out the sections below. \U0001F44D"
|
||||
title: "[BUG]"
|
||||
labels: bug
|
||||
assignees: []
|
||||
body:
|
||||
- type: textarea
|
||||
id: issue-summary
|
||||
attributes:
|
||||
label: Issue Summary
|
||||
description: A summary of the issue. This needs to be a clear detailed-rich summary.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: steps-to-reproduce
|
||||
attributes:
|
||||
label: Steps to Reproduce
|
||||
value: |
|
||||
1. (for example) Went to ...
|
||||
2. Clicked on...
|
||||
3. ...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected-behavior
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: A clear and concise description of what you expected to happen.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: other-information
|
||||
attributes:
|
||||
label: Other information
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: screenshots
|
||||
attributes:
|
||||
label: Screenshots
|
||||
description: If applicable, add screenshots to help explain your problem.
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
id: environment
|
||||
attributes:
|
||||
label: Environment
|
||||
options:
|
||||
- label: Formbricks Cloud (app.formbricks.com)
|
||||
- label: Self-hosted Formbricks
|
||||
- type: textarea
|
||||
id: desktop-version
|
||||
attributes:
|
||||
label: Desktop (please complete the following information)
|
||||
description: |
|
||||
examples:
|
||||
- **OS**: [e.g. iOS]
|
||||
- **Browser**: [e.g. chrome, safari]
|
||||
- **Version**: [e.g. 22]
|
||||
value: |
|
||||
- OS:
|
||||
- Node:
|
||||
- npm:
|
||||
render: markdown
|
||||
validations:
|
||||
required: true
|
||||
- type: markdown
|
||||
id: nodejs-version
|
||||
attributes:
|
||||
value: |
|
||||
#### Node.JS version
|
||||
|
||||
[e.g. v18.15.0]
|
||||
- type: markdown
|
||||
id: anything-else
|
||||
attributes:
|
||||
value: |
|
||||
#### Anything else?
|
||||
|
||||
- Screen recording, console logs, network requests: You can make a recording with [Loom](https://www.loom.com).
|
||||
- Anything else that you think could be an issue?
|
||||
19
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,19 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: "Suggest an idea for this project \U0001F680"
|
||||
title: "[FEATURE]"
|
||||
labels: enhancement
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
45
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
name: Feature request
|
||||
description: "Suggest an idea for this project \U0001F680"
|
||||
title: "[FEATURE]"
|
||||
labels: enhancement
|
||||
assignees: []
|
||||
body:
|
||||
- type: textarea
|
||||
id: problem-description
|
||||
attributes:
|
||||
label: Is your feature request related to a problem? Please describe.
|
||||
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: solution-description
|
||||
attributes:
|
||||
label: Describe the solution you'd like
|
||||
description: A clear and concise description of what you want to happen.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: alternate-solution-description
|
||||
attributes:
|
||||
label: Describe alternatives you've considered
|
||||
description: A clear and concise description of any alternative solutions or features you've considered.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: additional-context
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Add any other context or screenshots about the feature request here.
|
||||
validations:
|
||||
required: false
|
||||
- type: markdown
|
||||
id: formbricks-info
|
||||
attributes:
|
||||
value: |
|
||||
### How we code at Formbricks 🤓
|
||||
|
||||
- Everything is type-safe
|
||||
- All UI components are in the package `formbricks/ui`
|
||||
- Run `pnpm dev` to find a demo app to test in-app surveys at `localhost:3002`
|
||||
- We use **chatGPT** to help refactor code. Use our [Formbricks ✨ megaprompt ✨](https://github.com/formbricks/formbricks/blob/main/megaprompt.md) to create the right
|
||||
context before you write your prompt.
|
||||
44
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
## What does this PR do?
|
||||
|
||||
<!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. -->
|
||||
|
||||
Fixes # (issue)
|
||||
|
||||
<!-- Please provide a screenshots or a loom video for visual changes to speed up reviews
|
||||
Loom Video: https://www.loom.com/
|
||||
-->
|
||||
|
||||
## Type of change
|
||||
|
||||
<!-- Please mark the relevant points by using [x] -->
|
||||
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] Chore (refactoring code, technical debt, workflow improvements)
|
||||
- [ ] Enhancement (small improvements)
|
||||
- [ ] New feature (non-breaking change which adds functionality)
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||
- [ ] This change adds a new database migration
|
||||
- [ ] This change requires a documentation update
|
||||
|
||||
## How should this be tested?
|
||||
|
||||
<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration -->
|
||||
|
||||
- Test A
|
||||
- Test B
|
||||
|
||||
## Checklist
|
||||
|
||||
<!-- We're starting to get more and more contributions. Please help us making this efficient for all of us and go through this checklist. Please tick off what you did -->
|
||||
|
||||
- [ ] Added a screen recording or screenshots to this PR
|
||||
- [ ] Filled out the "How to test" section in this PR
|
||||
- [ ] Read the [contributing guide](https://github.com/formbricks/formbricks/blob/main/CONTRIBUTING.md)
|
||||
- [ ] Self-reviewed my own code
|
||||
- [ ] Commented on my code in hard-to-understand bits
|
||||
- [ ] Ran `pnpm build`
|
||||
- [ ] Checked for warnings, there are none
|
||||
- [ ] Removed all `console.logs`
|
||||
- [ ] Merged the latest changes from main onto my branch with `git pull origin main`
|
||||
- [ ] My changes don't cause any responsiveness issues
|
||||
- [ ] Updated the Formbricks Docs if changes were necessary
|
||||
9
.github/workflows/checks.yml
vendored
@@ -24,5 +24,14 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: pnpm install --config.platform=linux --config.architecture=x64
|
||||
|
||||
- name: Build formbricks-js dependencies
|
||||
run: pnpm build --filter=js
|
||||
|
||||
- name: create .env
|
||||
run: cp .env.example .env
|
||||
|
||||
- name: Lint
|
||||
run: pnpm lint
|
||||
|
||||
#- name: Test
|
||||
# run: pnpm test
|
||||
|
||||
23
.github/workflows/cron-closeOnDate.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Cron - weeklySummary
|
||||
|
||||
on:
|
||||
# "Scheduled workflows run on the latest commit on the default or base branch."
|
||||
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
|
||||
schedule:
|
||||
# Runs “At 00:00.” (see https://crontab.guru)
|
||||
- cron: "0 0 * * *"
|
||||
jobs:
|
||||
cron-weeklySummary:
|
||||
env:
|
||||
APP_URL: ${{ secrets.APP_URL }}
|
||||
CRON_API_KEY: ${{ secrets.CRON_SECRET }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: cURL request
|
||||
if: ${{ env.APP_URL && env.CRON_SECRET }}
|
||||
run: |
|
||||
curl ${{ secrets.APP_URL }}/api/cron/close_surveys \
|
||||
-X POST \
|
||||
-H 'content-type: application/json' \
|
||||
-H 'authorization: ${{ secrets.CRON_SECRET }}' \
|
||||
--fail
|
||||
23
.github/workflows/cron-weeklySummary.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Cron - weeklySummary
|
||||
|
||||
on:
|
||||
# "Scheduled workflows run on the latest commit on the default or base branch."
|
||||
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
|
||||
schedule:
|
||||
# Runs “At 08:00 on Monday.” (see https://crontab.guru)
|
||||
- cron: "0 8 * * 1"
|
||||
jobs:
|
||||
cron-weeklySummary:
|
||||
env:
|
||||
APP_URL: ${{ secrets.APP_URL }}
|
||||
CRON_SECRET: ${{ secrets.CRON_SECRET }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: cURL request
|
||||
if: ${{ env.APP_URL && env.CRON_SECRET }}
|
||||
run: |
|
||||
curl ${{ env.APP_URL }}/api/cron/weekly_summary \
|
||||
-X POST \
|
||||
-H 'content-type: application/json' \
|
||||
-H 'x-api-key: ${{ env.CRON_SECRET }}' \
|
||||
--fail
|
||||
40
.github/workflows/release-on-dockerhub.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Release Formbricks Image on Dockerhub
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
release-image-on-dockerhub:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Get Release Tag
|
||||
id: extract_release_tag
|
||||
run: |
|
||||
TAG=${{ github.ref }}
|
||||
TAG=${TAG#refs/tags/v}
|
||||
echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./apps/web/Dockerfile
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKER_USERNAME }}/formbricks:${{ env.RELEASE_TAG }}
|
||||
${{ secrets.DOCKER_USERNAME }}/formbricks:latest
|
||||
2
.github/workflows/release.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
node-version: 18.x
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v2.2.2
|
||||
uses: pnpm/action-setup@v2.2.4
|
||||
|
||||
- name: Install Dependencies
|
||||
run: pnpm install --config.platform=linux --config.architecture=x64
|
||||
|
||||
4
.gitignore
vendored
@@ -33,6 +33,10 @@ yarn-error.log*
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
!packages/database/.env
|
||||
!apps/web/.env
|
||||
|
||||
# Prisma generated files
|
||||
packages/database/zod
|
||||
|
||||
# turbo
|
||||
.turbo
|
||||
|
||||
1
.vercelignore
Normal file
@@ -0,0 +1 @@
|
||||
apps/web/.env
|
||||
6
LICENSE
@@ -1,9 +1,9 @@
|
||||
Copyright (c) 2023 Matthias Nannt, Johannes Dancker
|
||||
Copyright (c) 2023 Formbricks GmbH
|
||||
|
||||
Portions of this software are licensed as follows:
|
||||
|
||||
- All content that resides under the "packages/ee/" directory of this repository, if that directory exists, is licensed under the license defined in "packages/ee/LICENSE".
|
||||
- All content that resides under the "packages/js/" directory of this repository, if that directory exists, is licensed under the "MIT" license as defined in "packages/js/LICENSE".
|
||||
- All content that resides under the "packages/js/", "packages/errors/" and "packages/api/" directories of this repository, if that directories exist, is licensed under the "MIT" license as defined in the "LICENSE" files of these packages.
|
||||
- All third party components incorporated into the Formbricks Software are licensed under the original license provided by the owner of the applicable component.
|
||||
- Content outside of the above mentioned directories or restrictions above is available under the "AGPLv3" license as defined below.
|
||||
|
||||
@@ -67,7 +67,7 @@ modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
1. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
|
||||
94
README.md
@@ -12,67 +12,89 @@
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/formbricks/formbricks/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-AGPL-purple" alt="License"></a> <a href="https://formbricks.com/discord"><img src="https://img.shields.io/discord/979077669410979880?label=Discord&logo=discord&logoColor=%23fff" alt="Join Formbricks Discord"></a> <a href="https://github.com/formbricks/formbricks/stargazers"><img src="https://img.shields.io/github/stars/formbricks/formbricks?logo=github" alt="Github Stars"></a>
|
||||
<a href="https://github.com/formbricks/formbricks/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-AGPL-purple" alt="License"></a> <a href="https://formbricks.com/discord"><img src="https://img.shields.io/discord/979077669410979880?label=Discord&logo=discord&logoColor=%23fff" alt="Join Formbricks Discord"></a> <a href="https://github.com/formbricks/formbricks/stargazers"><img src="https://img.shields.io/github/stars/formbricks/formbricks?logo=github" alt="Github Stars"></a>
|
||||
<a href="https://news.ycombinator.com/item?id=32303986"><img src="https://img.shields.io/badge/Hacker%20News-122-%23FF6600" alt="Hacker News"></a>
|
||||
<a href="https://www.producthunt.com/products/snoopforms"><img src="https://img.shields.io/badge/Product%20Hunt-%232%20Product%20of%20the%20Day-orange?logo=producthunt&logoColor=%23fff" alt="Product Hunt"></a>
|
||||
<a href="https://github.blog/2023-04-12-github-accelerator-our-first-cohort-and-whats-next/"><img src="https://img.shields.io/badge/2023-blue?logo=github&label=Github%20Accelerator" alt="Github Accelerator"></a>
|
||||
<a href="https://github.com/formbricks/formbricks/issues?q=is:issue+is:open+label:%22%F0%9F%99%8B%F0%9F%8F%BB%E2%80%8D%E2%99%82%EF%B8%8Fhelp+wanted%22"><img src="https://img.shields.io/badge/Help%20Wanted-Contribute-blue"></a>
|
||||
</p>
|
||||
|
||||
<br/>
|
||||
|
||||
## About Formbricks
|
||||
<p align="center">
|
||||
<i>Trusted by</i>
|
||||
<a href="https://github.com/calcom/cal.com/"><img src="https://github.com/formbricks/formbricks/assets/675065/1a8763cf-f47e-4960-90f6-334f6dc12a17#gh-light-mode-only" height="20px"></a><a href="https://github.com/calcom/cal.com/"><img src="https://github.com/formbricks/formbricks/assets/72809645/9a031e8d-538f-4fdc-9338-b77e9a57d6ac#gh-dark-mode-only" height="20px"></a>
|
||||
<a href="https://github.com/CrowdDotDev/crowd.dev"><img src="https://github.com/formbricks/formbricks/assets/675065/59b1a4d4-25e4-4ef3-b0bf-4426446fbfd0#gh-light-mode-only" height="20px"></a><a href="https://github.com/CrowdDotDev/crowd.dev"><img src="https://github.com/formbricks/formbricks/assets/72809645/4bb4caf7-4b64-44c8-94bd-850606d181c1#gh-dark-mode-only" height="20px"></a>
|
||||
<a href="https://clovyr.io/"><img src="https://github.com/formbricks/formbricks/assets/675065/9291c8df-9aac-423a-a430-a9a581240075" height="20px"></a>
|
||||
<a href="https://neverinstall.com/"><img src="https://github.com/formbricks/formbricks/assets/675065/72e5e37b-8ef7-4340-b06e-f1d12a05330f#gh-light-mode-only" height="20px"></a><a href="https://neverinstall.com/"><img src="https://github.com/formbricks/formbricks/assets/72809645/9d9711dc-75e5-4084-b7fa-bbaf621064a8#gh-dark-mode-only" height="20px">
|
||||
</p>
|
||||
|
||||
<img width="1527" alt="formbricks-sneak" src="https://user-images.githubusercontent.com/675065/227726212-6ebf930e-6a20-4ffa-b966-56cd41bdf363.png">
|
||||
## ✨ About Formbricks
|
||||
|
||||
Formbricks productizes best practices for qualitative in-app user discovery. Use micro-surveys to target the right users at the right time without making surveys annoying.
|
||||
<img width="1527" alt="formbricks-sneak" src="https://github-production-user-asset-6210df.s3.amazonaws.com/675065/249441967-ccb89ea3-82b4-4bf2-8d2c-528721ec313b.png">
|
||||
|
||||
Formbricks is your go-to solution for in-product micro-surveys that will supercharge your product experience. Use micro-surveys to target the right users at the right time without making surveys annoying.
|
||||
|
||||
**Try it out in the cloud at [formbricks.com](https://formbricks.com)**
|
||||
|
||||
### Mission: Base your decisions on qualitative data.
|
||||
## 💪 Mission: Make customer-centric decisions based on data.
|
||||
|
||||
Formbricks helps you apply best practices from data-driven work and experience management to make better business decisions. Use Formbricks to collect and manage insights from your users; run a product market fit survey to know which audience to focus on and whether your value proposition is being recognized.
|
||||
Formbricks helps you apply best practices from data-driven work and experience management to make better business decisions. Ask users as they experience your product - and leverage a significantly higher conversion rate. Gather all insights you can - including partial submissions and build conviction for the next product decision. Better data, better business.
|
||||
|
||||
### Features
|
||||
|
||||
- 📲 Create in-product surveys with our no code editor with multiple question types
|
||||
- 📚 Choose from a variety of best-practice templates
|
||||
- 👩🏻 Launch and target your surveys to specific user groups without changing your application code
|
||||
- 🔗 Create shareable link surveys
|
||||
- 👨👩👦 Invite your team members to collaborate on your surveys
|
||||
- 🔌 Integrate Formbricks with Slack, Posthog, Zapier and more
|
||||
- 🔒 All open source, transparent and self-hostable
|
||||
- 📲 Create **in-product surveys** with our no code editor with multiple question types
|
||||
- 📚 Choose from a variety of best-practice **templates**
|
||||
- 👩🏻 Launch and **target your surveys to specific user groups** without changing your application code
|
||||
- 🔗 Create shareable **link surveys**
|
||||
- 👨👩👦 Invite your team members to **collaborate** on your surveys
|
||||
- 🔌 Integrate Formbricks with **Slack, Posthog, Zapier and more**
|
||||
- 🔒 All **open source**, transparent and self-hostable
|
||||
|
||||
### Built With
|
||||
### Built on Open Source
|
||||
|
||||
- [Typescript](https://www.typescriptlang.org/)
|
||||
- [Next.js](https://nextjs.org/)
|
||||
- [React](https://reactjs.org/)
|
||||
- [TailwindCSS](https://tailwindcss.com/)
|
||||
- [Prisma](https://prisma.io/)
|
||||
- 💻 [Typescript](https://www.typescriptlang.org/)
|
||||
- 🚀 [Next.js](https://nextjs.org/)
|
||||
- ⚛️ [React](https://reactjs.org/)
|
||||
- 🎨 [TailwindCSS](https://tailwindcss.com/)
|
||||
- 📚 [Prisma](https://prisma.io/)
|
||||
- 🔒 [Auth.js](https://authjs.dev/)
|
||||
- 🧘♂️ [Zod](https://zod.dev/)
|
||||
|
||||
### Upcoming Features
|
||||
## 🚀 Getting started
|
||||
|
||||
| | Feature |
|
||||
| --- | --------------------------------------------- |
|
||||
| 👷 | Rating Scale (Numbers + Emojis) Question Type |
|
||||
| 👷 | Zapier, Slack & Posthog Integration |
|
||||
| 👷 | Filter Audience by Attributes |
|
||||
| 🗒️ | Multi-Language Functionality |
|
||||
| 🗒️ | Auto-complete Surveys after at x responses |
|
||||
| 🗒️ | Pre-Fill Link-Surveys |
|
||||
| 🗒️ | E-Mail Surveys |
|
||||
### ☁️ Cloud Version
|
||||
|
||||
_👷 In Progress | 🗒️ Up Next_
|
||||
Formbricks has a hosted cloud offering with a generous free plan to get you up and running as quickly as possible. To get started, please visit [formbricks.com](https://formbricks.com)
|
||||
|
||||
## Cloud vs. self-hosted
|
||||
### 🐳 Self-hosted version
|
||||
|
||||
Formbricks is available Open-Source under AGPLv3 license. You can host Formbricks on your own servers without a subscription. Check out our [docs](https://formbricks.com/docs/self-hosting/deployment) to see how to self-host Formbricks.
|
||||
|
||||
We also have a hosted cloud offering with a generous free plan to get you up and running as quickly as possible. For more information, please visit [formbricks.com](https://formbricks.com)
|
||||
Formbricks is available Open-Source under AGPLv3 license. You can host Formbricks on your own servers using Docker without a subscription. To get started with self-hosting, take a look at our [self-hosting docs](https://formbricks.com/docs/self-hosting/deployment).
|
||||
|
||||
(In the future we may develop additional features that aren't in the free Open-Source version)
|
||||
|
||||
## Contributing
|
||||
## ✍️ Contribution
|
||||
|
||||
We are very happy if you are interested in contributing to Formbricks 🤗
|
||||
|
||||
There are many ways to contribute to Formbricks with writing Issues, fixing bugs, building new features or updating the docs. Please check out [our contribution guide](https://formbricks.com/docs/contributing/introduction) for more information.
|
||||
Here are a few options:
|
||||
|
||||
- Star this repo
|
||||
- Create issues every time you feel something is missing or goes wrong
|
||||
- Upvote issues with 👍 reaction so we know what's the demand for particular issue to prioritize it within roadmap
|
||||
|
||||
Please check out [our contribution guide](https://formbricks.com/docs/contributing/introduction) and our [list of open issues](https://github.com/formbricks/formbricks/issues) for more information.
|
||||
|
||||
## 📆 Contact us
|
||||
|
||||
Let's have a chat about your survey needs and get you started.
|
||||
|
||||
<a href="https://cal.com/johannes/onboarding?utm_source=banner&utm_campaign=oss"><img alt="Book us with Cal.com" src="https://cal.com/book-with-cal-dark.svg" /></a>
|
||||
|
||||
## ⚖️ License
|
||||
|
||||
Distributed under the AGPLv3 License. See `LICENSE` for more information.
|
||||
|
||||
## 🔒 Security
|
||||
|
||||
We take security very seriously. If you come across any security vulnerabilities, please disclose them by sending an email to security@formbricks.com. We appreciate your help in making our platform as secure as possible and are committed to working with you to resolve any issues quickly and efficiently. See `SECURITY.md` for more information.
|
||||
|
||||
39
SECURITY.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# Security
|
||||
|
||||
Contact: security@formbricks.com
|
||||
|
||||
Based on [https://supabase.com/.well-known/security.txt](https://supabase.com/.well-known/security.txt)
|
||||
|
||||
At Formbricks, we consider the security of our systems a top priority. But no matter how much effort we put into system security, there can still be vulnerabilities present.
|
||||
|
||||
If you discover a vulnerability, we would like to know about it so we can take steps to address it as quickly as possible. We would like to ask you to help us better protect our clients and our systems.
|
||||
|
||||
## Out of scope vulnerabilities:
|
||||
|
||||
- Clickjacking on pages with no sensitive actions.
|
||||
- Unauthenticated/logout/login CSRF.
|
||||
- Attacks requiring MITM or physical access to a user's device.
|
||||
- Any activity that could lead to the disruption of our service (DoS).
|
||||
- Content spoofing and text injection issues without showing an attack vector/without being able to modify HTML/CSS.
|
||||
- Email spoofing
|
||||
- Missing DNSSEC, CAA, CSP headers
|
||||
- Lack of Secure or HTTP only flag on non-sensitive cookies
|
||||
- Deadlinks
|
||||
|
||||
## Please do the following:
|
||||
|
||||
- E-mail your findings to [security@formbricks.com](mailto:security@formbricks.com).
|
||||
- Do not run automated scanners on our infrastructure or dashboard. If you wish to do this, contact us and we will set up a sandbox for you.
|
||||
- Do not take advantage of the vulnerability or problem you have discovered, for example by downloading more data than necessary to demonstrate the vulnerability or deleting or modifying other people's data,
|
||||
- Do not reveal the problem to others until it has been resolved,
|
||||
- Do not use attacks on physical security, social engineering, distributed denial of service, spam or applications of third parties,
|
||||
- Do provide sufficient information to reproduce the problem, so we will be able to resolve it as quickly as possible. Usually, the IP address or the URL of the affected system and a description of the vulnerability will be sufficient, but complex vulnerabilities may require further explanation.
|
||||
|
||||
## What we promise:
|
||||
|
||||
- We will respond to your report within 3 business days with our evaluation of the report and an expected resolution date,
|
||||
- If you have followed the instructions above, we will not take any legal action against you in regard to the report,
|
||||
- We will handle your report with strict confidentiality, and not pass on your personal details to third parties without your permission,
|
||||
- We will keep you informed of the progress towards resolving the problem,
|
||||
- In the public information concerning the problem reported, we will give your name as the discoverer of the problem (unless you desire otherwise), and
|
||||
- We strive to resolve all problems as quickly as possible, and we would like to play an active role in the ultimate publication on the problem after it is resolved.
|
||||
@@ -1,38 +0,0 @@
|
||||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
||||
|
||||
## Getting Started
|
||||
|
||||
First, run the development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
# or
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
|
||||
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
|
||||
|
||||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
|
||||
|
||||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
|
||||
|
||||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
|
||||
|
||||
## Learn More
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
|
||||
|
||||
## Deploy on Vercel
|
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
|
||||
@@ -5,7 +5,7 @@ const nextConfig = {
|
||||
return [
|
||||
{
|
||||
source: "/",
|
||||
destination: "/signin",
|
||||
destination: "/app",
|
||||
permanent: false,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -4,29 +4,20 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"clean": "rimraf .turbo node_modules .next",
|
||||
"dev": "next dev -p 3002",
|
||||
"dev": "next dev -p 3002 --turbo",
|
||||
"go": "next dev -p 3002 --turbo",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@formbricks/js": "workspace:*",
|
||||
"@heroicons/react": "^2.0.17",
|
||||
"@types/node": "18.15.11",
|
||||
"@types/react": "18.0.33",
|
||||
"@types/react-dom": "18.0.11",
|
||||
"eslint": "8.37.0",
|
||||
"eslint-config-formbricks": "workspace:*",
|
||||
"next": "13.2.4",
|
||||
"@heroicons/react": "^2.0.18",
|
||||
"next": "13.4.12",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"typescript": "5.0.3"
|
||||
"react-dom": "18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/forms": "^0.5.3",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"postcss": "^8.4.21",
|
||||
"rimraf": "^5.0.0",
|
||||
"tailwindcss": "^3.3.1"
|
||||
"eslint-config-formbricks": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import formbricks from "@formbricks/js";
|
||||
import type { AppProps } from "next/app";
|
||||
import Head from "next/head";
|
||||
import { useRouter } from "next/router";
|
||||
import { useEffect } from "react";
|
||||
import "../styles/globals.css";
|
||||
@@ -11,7 +12,7 @@ if (typeof window !== "undefined") {
|
||||
formbricks.init({
|
||||
environmentId: process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID,
|
||||
apiHost: process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST,
|
||||
logLevel: "debug",
|
||||
debug: true,
|
||||
});
|
||||
window.formbricks = formbricks;
|
||||
}
|
||||
@@ -34,10 +35,13 @@ export default function App({ Component, pageProps }: AppProps) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Demo App</title>
|
||||
</Head>
|
||||
{(!process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID ||
|
||||
!process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST) && (
|
||||
<div className="w-full bg-red-500 p-3 text-center text-sm text-white">
|
||||
Please set Formbricks environment variables
|
||||
Please set Formbricks environment variables in apps/demo/.env
|
||||
</div>
|
||||
)}
|
||||
<Component {...pageProps} />
|
||||
|
||||
@@ -1,369 +1,191 @@
|
||||
import LayoutApp from "@/components/LayoutApp";
|
||||
import { classNames } from "@/lib/utils";
|
||||
import { Bars3CenterLeftIcon, BellIcon, ScaleIcon } from "@heroicons/react/24/outline";
|
||||
import {
|
||||
BanknotesIcon,
|
||||
BuildingOfficeIcon,
|
||||
CheckCircleIcon,
|
||||
ChevronDownIcon,
|
||||
ChevronRightIcon,
|
||||
MagnifyingGlassIcon,
|
||||
} from "@heroicons/react/24/solid";
|
||||
import Image from "next/image";
|
||||
import fbsetup from "../../public/fb-setup.png";
|
||||
import formbricks from "@formbricks/js";
|
||||
|
||||
const cards = [{ name: "Account balance", href: "#", icon: ScaleIcon, amount: "$30,659.45" }];
|
||||
const transactions = [
|
||||
{
|
||||
id: 1,
|
||||
name: "Payment to Molly Sanders",
|
||||
href: "#",
|
||||
amount: "$20,000",
|
||||
currency: "USD",
|
||||
status: "success",
|
||||
date: "July 11, 2020",
|
||||
datetime: "2020-07-11",
|
||||
},
|
||||
];
|
||||
const statusStyles: any = {
|
||||
success: "bg-green-100 text-green-800",
|
||||
processing: "bg-yellow-100 text-yellow-800",
|
||||
failed: "bg-slate-100 text-slate-800",
|
||||
};
|
||||
import Image from "next/image";
|
||||
|
||||
export default function AppPage({}) {
|
||||
return (
|
||||
<LayoutApp>
|
||||
<div className="flex h-16 flex-shrink-0 border-b border-slate-200 bg-white lg:border-none">
|
||||
<button
|
||||
type="button"
|
||||
className="border-r border-slate-200 px-4 text-slate-400 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-cyan-500 lg:hidden">
|
||||
<span className="sr-only">Open sidebar</span>
|
||||
<Bars3CenterLeftIcon className="h-6 w-6" aria-hidden="true" />
|
||||
</button>
|
||||
{/* Search bar */}
|
||||
<div className="flex flex-1 justify-between px-4 sm:px-6 lg:mx-auto lg:max-w-6xl lg:px-8">
|
||||
<div className="flex flex-1">
|
||||
<form className="flex w-full md:ml-0" action="#" method="GET">
|
||||
<label htmlFor="search-field" className="sr-only">
|
||||
Search
|
||||
</label>
|
||||
<div className="relative w-full text-slate-400 focus-within:text-slate-600">
|
||||
<div
|
||||
className="pointer-events-none absolute inset-y-0 left-0 flex items-center"
|
||||
aria-hidden="true">
|
||||
<MagnifyingGlassIcon className="h-5 w-5" aria-hidden="true" />
|
||||
</div>
|
||||
<input
|
||||
id="search-field"
|
||||
name="search-field"
|
||||
className="block h-full w-full border-transparent py-2 pl-8 pr-3 text-slate-900 placeholder-slate-500 focus:border-transparent focus:outline-none focus:ring-0 sm:text-sm"
|
||||
placeholder="Search transactions"
|
||||
type="search"
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
<div className="px-12 py-6">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold">Formbricks In-product Survey Demo App</h1>
|
||||
<p className="text-slate-700">
|
||||
This app helps you test your in-app surveys. You can create an test user actions, create and update
|
||||
user attributes, etc.
|
||||
</p>
|
||||
</div>
|
||||
<div className="my-4 grid grid-cols-1 gap-6 md:grid-cols-2">
|
||||
<div>
|
||||
<div className="rounded-lg border border-slate-300 bg-slate-100 p-6">
|
||||
<h3 className="text-lg font-semibold">Setup .env</h3>
|
||||
<p className="text-slate-700">
|
||||
Copy the environment ID of your Formbricks app to the env variable in demo/.env
|
||||
</p>
|
||||
<Image src={fbsetup} alt="fb setup" className="mt-4 rounded" priority />
|
||||
</div>
|
||||
<div className="ml-4 flex items-center md:ml-6">
|
||||
<div className="mt-4 rounded-lg border border-slate-300 bg-slate-100 p-6">
|
||||
<h3 className="text-lg font-semibold">Widget Logs</h3>
|
||||
<p className="text-slate-700">
|
||||
Look at the logs to understand how the widget works. <strong>Open your browser console</strong>{" "}
|
||||
to see the logs.
|
||||
</p>
|
||||
{/* <div className="max-h-[40vh] overflow-y-auto py-4">
|
||||
<LogsContainer />
|
||||
</div> */}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="md:grid md:grid-cols-3">
|
||||
<div className="col-span-3 rounded-lg border border-slate-300 bg-slate-100 p-6">
|
||||
<h3 className="text-lg font-semibold">Reset person / pull data from Formbricks app</h3>
|
||||
<p className="text-slate-700">
|
||||
On formbricks.logout() a few things happen: <strong>New person is created</strong> and{" "}
|
||||
<strong>surveys & no-code actions are pulled from Formbricks:</strong>.
|
||||
</p>
|
||||
<button
|
||||
className="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"
|
||||
className="my-4 rounded-lg bg-slate-500 px-6 py-3 text-white hover:bg-slate-700"
|
||||
onClick={() => {
|
||||
formbricks.track("Feedback Button Click");
|
||||
formbricks.logout();
|
||||
}}>
|
||||
Feedback
|
||||
Logout
|
||||
</button>
|
||||
<button className="mr-2 flex max-w-xs items-center rounded-full bg-white text-sm font-medium text-slate-700 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2 lg:rounded-md lg:p-2 lg:hover:bg-slate-50">
|
||||
No Code Feedback Btn Click
|
||||
</button>
|
||||
<button
|
||||
className="mr-2 flex max-w-xs items-center rounded-full bg-white text-sm font-medium text-slate-700 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2 lg:rounded-md lg:p-2 lg:hover:bg-slate-50"
|
||||
onClick={() => {
|
||||
formbricks.setEmail("test@web.com");
|
||||
}}>
|
||||
Set Email
|
||||
</button>
|
||||
<button
|
||||
className="mr-2 flex max-w-xs items-center rounded-full bg-white text-sm font-medium text-slate-700 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2 lg:rounded-md lg:p-2 lg:hover:bg-slate-50"
|
||||
onClick={() => {
|
||||
formbricks.setUserId("ASDASDAAAAAASSSSSSSASDASD");
|
||||
}}>
|
||||
Set Long UserID
|
||||
</button>
|
||||
<button
|
||||
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>
|
||||
<p className="text-xs text-slate-700">
|
||||
If you made a change in Formbricks app and it does not seem to work, hit 'Logout' and
|
||||
try again.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="p-6">
|
||||
<div>
|
||||
<button
|
||||
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700"
|
||||
onClick={() => {
|
||||
formbricks.track("Code Action");
|
||||
}}>
|
||||
Code Action
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-xs text-slate-700">
|
||||
This button sends a{" "}
|
||||
<a href="https://formbricks.com/docs/actions/code" className="underline" target="_blank">
|
||||
Code Action
|
||||
</a>{" "}
|
||||
to the Formbricks API called 'Code Action'. You will find it in the Actions Tab.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="p-6">
|
||||
<div>
|
||||
<button className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700">
|
||||
No-Code Action
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-xs text-slate-700">
|
||||
This button sends a{" "}
|
||||
<a href="https://formbricks.com/docs/actions/no-code" className="underline" target="_blank">
|
||||
No Code Action
|
||||
</a>{" "}
|
||||
as long as you created it beforehand in the Formbricks App.{" "}
|
||||
<a href="https://formbricks.com/docs/actions/no-code" target="_blank" className="underline">
|
||||
Here are instructions on how to do it.
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="p-6">
|
||||
<div>
|
||||
<button
|
||||
onClick={() => {
|
||||
formbricks.setAttribute("Plan", "Free");
|
||||
}}
|
||||
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700">
|
||||
Set Plan to 'Free'
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-xs text-slate-700">
|
||||
This button sets the{" "}
|
||||
<a
|
||||
href="https://formbricks.com/docs/attributes/custom-attributes"
|
||||
target="_blank"
|
||||
className="underline">
|
||||
attribute
|
||||
</a>{" "}
|
||||
'Plan' to 'Free'. If the attribute does not exist, it creates it.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="p-6">
|
||||
<div>
|
||||
<button
|
||||
onClick={() => {
|
||||
formbricks.setAttribute("Plan", "Paid");
|
||||
}}
|
||||
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700">
|
||||
Set Plan to 'Paid'
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-xs text-slate-700">
|
||||
This button sets the{" "}
|
||||
<a
|
||||
href="https://formbricks.com/docs/attributes/custom-attributes"
|
||||
target="_blank"
|
||||
className="underline">
|
||||
attribute
|
||||
</a>{" "}
|
||||
'Plan' to 'Paid'. If the attribute does not exist, it creates it.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="p-6">
|
||||
<div>
|
||||
<button
|
||||
onClick={() => {
|
||||
formbricks.setEmail("test@web.com");
|
||||
}}
|
||||
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700">
|
||||
Set Email
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-xs text-slate-700">
|
||||
This button sets the{" "}
|
||||
<a
|
||||
href="https://formbricks.com/docs/attributes/identify-users"
|
||||
target="_blank"
|
||||
className="underline">
|
||||
user email
|
||||
</a>{" "}
|
||||
'test@web.com'
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="p-6">
|
||||
<div>
|
||||
<button
|
||||
onClick={() => {
|
||||
formbricks.setUserId("THIS-IS-A-VERY-LONG-USER-ID-FOR-TESTING");
|
||||
}}
|
||||
className="mb-4 rounded-lg bg-slate-800 px-6 py-3 text-white hover:bg-slate-700">
|
||||
Set User ID
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-xs text-slate-700">
|
||||
This button sets an external{" "}
|
||||
<a
|
||||
href="https://formbricks.com/docs/attributes/identify-users"
|
||||
target="_blank"
|
||||
className="underline">
|
||||
user ID
|
||||
</a>{" "}
|
||||
to 'THIS-IS-A-VERY-LONG-USER-ID-FOR-TESTING'
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<main className="flex-1 pb-8">
|
||||
{/* Page header */}
|
||||
<div className="bg-white shadow">
|
||||
<div className="px-4 sm:px-6 lg:mx-auto lg:max-w-6xl lg:px-8">
|
||||
<div className="py-6 md:flex md:items-center md:justify-between lg:border-t lg:border-slate-200">
|
||||
<div className="min-w-0 flex-1">
|
||||
{/* Profile */}
|
||||
<div className="flex items-center">
|
||||
<Image
|
||||
className="hidden h-16 w-16 rounded-full sm:block"
|
||||
src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2.6&w=256&h=256&q=80"
|
||||
alt=""
|
||||
width={32}
|
||||
height={32}
|
||||
/>
|
||||
<div>
|
||||
<div className="flex items-center">
|
||||
<Image
|
||||
className="h-16 w-16 rounded-full sm:hidden"
|
||||
src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2.6&w=256&h=256&q=80"
|
||||
alt=""
|
||||
width={32}
|
||||
height={32}
|
||||
/>
|
||||
<h1 className="ml-3 text-2xl font-bold leading-7 text-slate-900 sm:truncate sm:leading-9">
|
||||
Good morning, Emilia Birch
|
||||
</h1>
|
||||
</div>
|
||||
<dl className="mt-6 flex flex-col sm:ml-3 sm:mt-1 sm:flex-row sm:flex-wrap">
|
||||
<dt className="sr-only">Company</dt>
|
||||
<dd className="flex items-center text-sm font-medium capitalize text-slate-500 sm:mr-6">
|
||||
<BuildingOfficeIcon
|
||||
className="mr-1.5 h-5 w-5 flex-shrink-0 text-slate-400"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
Duke street studio
|
||||
</dd>
|
||||
<dt className="sr-only">Account status</dt>
|
||||
<dd className="mt-3 flex items-center text-sm font-medium capitalize text-slate-500 sm:mr-6 sm:mt-0">
|
||||
<CheckCircleIcon
|
||||
className="mr-1.5 h-5 w-5 flex-shrink-0 text-green-400"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
Verified account
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-6 flex space-x-3 md:ml-4 md:mt-0">
|
||||
<button
|
||||
type="button"
|
||||
className="inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 shadow-sm hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2">
|
||||
Add money
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="inline-flex items-center rounded-md border border-transparent bg-cyan-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-cyan-700 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2">
|
||||
Send money
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="mt-8">
|
||||
<div className="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8">
|
||||
<h2 className="text-lg font-medium leading-6 text-slate-900">Overview</h2>
|
||||
<div className="mt-2 grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{/* Card */}
|
||||
{cards.map((card) => (
|
||||
<div key={card.name} className="overflow-hidden rounded-lg bg-white shadow">
|
||||
<div className="p-5">
|
||||
<div className="flex items-center">
|
||||
<div className="flex-shrink-0">
|
||||
<card.icon className="h-6 w-6 text-slate-400" aria-hidden="true" />
|
||||
</div>
|
||||
<div className="ml-5 w-0 flex-1">
|
||||
<dl>
|
||||
<dt className="truncate text-sm font-medium text-slate-500">{card.name}</dt>
|
||||
<dd>
|
||||
<div className="text-lg font-medium text-slate-900">{card.amount}</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="bg-slate-50 px-5 py-3">
|
||||
<div className="text-sm">
|
||||
<a href={card.href} className="font-medium text-cyan-700 hover:text-cyan-900">
|
||||
View all
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 className="mx-auto mt-8 max-w-6xl px-4 text-lg font-medium leading-6 text-slate-900 sm:px-6 lg:px-8">
|
||||
Recent activity
|
||||
</h2>
|
||||
|
||||
{/* Activity list (smallest breakpoint only) */}
|
||||
<div className="shadow sm:hidden">
|
||||
<ul role="list" className="mt-2 divide-y divide-slate-200 overflow-hidden shadow sm:hidden">
|
||||
{transactions.map((transaction) => (
|
||||
<li key={transaction.id}>
|
||||
<a href={transaction.href} className="block bg-white px-4 py-4 hover:bg-slate-50">
|
||||
<span className="flex items-center space-x-4">
|
||||
<span className="flex flex-1 space-x-2 truncate">
|
||||
<BanknotesIcon className="h-5 w-5 flex-shrink-0 text-slate-400" aria-hidden="true" />
|
||||
<span className="flex flex-col truncate text-sm text-slate-500">
|
||||
<span className="truncate">{transaction.name}</span>
|
||||
<span>
|
||||
<span className="font-medium text-slate-900">{transaction.amount}</span>{" "}
|
||||
{transaction.currency}
|
||||
</span>
|
||||
<time dateTime={transaction.datetime}>{transaction.date}</time>
|
||||
</span>
|
||||
</span>
|
||||
<ChevronRightIcon className="h-5 w-5 flex-shrink-0 text-slate-400" aria-hidden="true" />
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
<nav
|
||||
className="flex items-center justify-between border-t border-slate-200 bg-white px-4 py-3"
|
||||
aria-label="Pagination">
|
||||
<div className="flex flex-1 justify-between">
|
||||
<a
|
||||
href="#"
|
||||
className="relative inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:text-slate-500">
|
||||
Previous
|
||||
</a>
|
||||
<a
|
||||
href="#"
|
||||
className="relative ml-3 inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:text-slate-500">
|
||||
Next
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
{/* Activity table (small breakpoint and up) */}
|
||||
<div className="hidden sm:block">
|
||||
<div className="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8">
|
||||
<div className="mt-2 flex flex-col">
|
||||
<div className="min-w-full overflow-hidden overflow-x-auto align-middle shadow sm:rounded-lg">
|
||||
<table className="min-w-full divide-y divide-slate-200">
|
||||
<thead>
|
||||
<tr>
|
||||
<th
|
||||
className="bg-slate-50 px-6 py-3 text-left text-sm font-semibold text-slate-900"
|
||||
scope="col">
|
||||
Transaction
|
||||
</th>
|
||||
<th
|
||||
className="bg-slate-50 px-6 py-3 text-right text-sm font-semibold text-slate-900"
|
||||
scope="col">
|
||||
Amount
|
||||
</th>
|
||||
<th
|
||||
className="hidden bg-slate-50 px-6 py-3 text-left text-sm font-semibold text-slate-900 md:block"
|
||||
scope="col">
|
||||
Status
|
||||
</th>
|
||||
<th
|
||||
className="bg-slate-50 px-6 py-3 text-right text-sm font-semibold text-slate-900"
|
||||
scope="col">
|
||||
Date
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y divide-slate-200 bg-white">
|
||||
{transactions.map((transaction) => (
|
||||
<tr key={transaction.id} className="bg-white">
|
||||
<td className="w-full max-w-0 whitespace-nowrap px-6 py-4 text-sm text-slate-900">
|
||||
<div className="flex">
|
||||
<a
|
||||
href={transaction.href}
|
||||
className="group inline-flex space-x-2 truncate text-sm">
|
||||
<BanknotesIcon
|
||||
className="h-5 w-5 flex-shrink-0 text-slate-400 group-hover:text-slate-500"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<p className="truncate text-slate-500 group-hover:text-slate-900">
|
||||
{transaction.name}
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-6 py-4 text-right text-sm text-slate-500">
|
||||
<span className="font-medium text-slate-900">{transaction.amount}</span>
|
||||
{transaction.currency}
|
||||
</td>
|
||||
<td className="hidden whitespace-nowrap px-6 py-4 text-sm text-slate-500 md:block">
|
||||
<span
|
||||
className={classNames(
|
||||
statusStyles[transaction.status],
|
||||
"inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize"
|
||||
)}>
|
||||
{transaction.status}
|
||||
</span>
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-6 py-4 text-right text-sm text-slate-500">
|
||||
<time dateTime={transaction.datetime}>{transaction.date}</time>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
{/* Pagination */}
|
||||
<nav
|
||||
className="flex items-center justify-between border-t border-slate-200 bg-white px-4 py-3 sm:px-6"
|
||||
aria-label="Pagination">
|
||||
<div className="hidden sm:block">
|
||||
<p className="text-sm text-slate-700">
|
||||
Showing <span className="font-medium">1</span> to{" "}
|
||||
<span className="font-medium">10</span> of <span className="font-medium">20</span>{" "}
|
||||
results
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex flex-1 justify-between sm:justify-end">
|
||||
<a
|
||||
href="#"
|
||||
id="test-css"
|
||||
className="relative inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">
|
||||
CSS ID Test
|
||||
</a>
|
||||
<a
|
||||
href="#"
|
||||
className="relative ml-3 inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">
|
||||
Next
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</LayoutApp>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
BIN
apps/demo/public/fb-setup.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
@@ -1,38 +0,0 @@
|
||||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
||||
|
||||
## Getting Started
|
||||
|
||||
First, run the development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
# or
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
|
||||
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
|
||||
|
||||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
|
||||
|
||||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
|
||||
|
||||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
|
||||
|
||||
## Learn More
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
|
||||
|
||||
## Deploy on Vercel
|
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
|
||||
@@ -22,10 +22,10 @@ export const DocsFeedback: React.FC = () => {
|
||||
return (
|
||||
<div className="mt-6 inline-flex cursor-default items-center rounded-md border border-slate-200 bg-white p-4 text-slate-800 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-300">
|
||||
{!sharedFeedback ? (
|
||||
<div>
|
||||
Was this page helpful?
|
||||
<div className="text-center md:text-left">
|
||||
Is everything on this page clear?
|
||||
<Popover open={isOpen} onOpenChange={setIsOpen}>
|
||||
<div className="ml-4 inline-flex space-x-3">
|
||||
<div className="mt-2 inline-flex space-x-3 md:ml-4 md:mt-0">
|
||||
{["Yes 👍", " No 👎"].map((option) => (
|
||||
<PopoverTrigger
|
||||
key={option}
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Button } from "@formbricks/ui";
|
||||
import clsx from "clsx";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import MetaInformation from "../shared/MetaInformation";
|
||||
import DocsFeedback from "./DocsFeedback";
|
||||
|
||||
@@ -22,7 +22,6 @@ function GitHubIcon(props: any) {
|
||||
}
|
||||
|
||||
function Header({ navigation }: any) {
|
||||
const router = useRouter();
|
||||
let [isScrolled, setIsScrolled] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -62,13 +61,15 @@ function Header({ navigation }: any) {
|
||||
variant="secondary"
|
||||
EndIcon={GitHubIcon}
|
||||
endIconClassName="fill-slate-800 dark:fill-slate-200 ml-2"
|
||||
onClick={() => router.push("https://github.com/formbricks/formbricks")}>
|
||||
View on Github
|
||||
href="https://github.com/formbricks/formbricks"
|
||||
target="_blank">
|
||||
Star us on Github
|
||||
</Button>
|
||||
<Button
|
||||
variant="highlight"
|
||||
className="ml-2"
|
||||
onClick={() => router.push("https://app.formbricks.com/auth/signup")}>
|
||||
href="https://app.formbricks.com/auth/signup"
|
||||
target="_blank">
|
||||
Get started
|
||||
</Button>
|
||||
</div>
|
||||
@@ -92,6 +93,43 @@ export const Layout: React.FC<LayoutProps> = ({ children, meta }) => {
|
||||
let nextPage = allLinks[linkIndex + 1];
|
||||
let section = navigation.find((section) => section.links.find((link) => link.href === router.pathname));
|
||||
|
||||
const linkRef = useRef<HTMLLIElement>(null);
|
||||
const parentRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
const preserveScroll = () => {
|
||||
const scroll = Math.abs(linkRef.current.getBoundingClientRect().top - linkRef.current.offsetTop);
|
||||
sessionStorage.setItem("scrollPosition", (scroll + 89).toString());
|
||||
};
|
||||
|
||||
const useExternalLinks = (selector: string) => {
|
||||
useEffect(() => {
|
||||
const links = document.querySelectorAll(selector);
|
||||
|
||||
links.forEach((link) => {
|
||||
link.setAttribute("target", "_blank");
|
||||
link.setAttribute("rel", "noopener noreferrer");
|
||||
});
|
||||
|
||||
return () => {
|
||||
links.forEach((link) => {
|
||||
link.removeAttribute("target");
|
||||
link.removeAttribute("rel");
|
||||
});
|
||||
};
|
||||
}, [selector]);
|
||||
};
|
||||
|
||||
useExternalLinks(".prose a");
|
||||
|
||||
useEffect(() => {
|
||||
if (parentRef.current) {
|
||||
const scrollPosition = Number.parseInt(sessionStorage.getItem("scrollPosition"), 10);
|
||||
if (scrollPosition) {
|
||||
parentRef.current.scrollTop = scrollPosition;
|
||||
}
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<MetaInformation
|
||||
@@ -107,8 +145,15 @@ export const Layout: React.FC<LayoutProps> = ({ children, meta }) => {
|
||||
<div className="absolute inset-y-0 right-0 w-[50vw] bg-slate-50 dark:hidden" />
|
||||
<div className="absolute bottom-0 right-0 top-16 hidden h-12 w-px bg-gradient-to-t from-slate-800 dark:block" />
|
||||
<div className="absolute bottom-0 right-0 top-28 hidden w-px bg-slate-800 dark:block" />
|
||||
<div className="sticky top-[4.5rem] -ml-0.5 h-[calc(100vh-4.5rem)] overflow-y-auto overflow-x-hidden py-16 pl-0.5">
|
||||
<Navigation navigation={navigation} className="w-64 pr-8 xl:w-72 xl:pr-16" />
|
||||
<div
|
||||
className="sticky top-[4.5rem] -ml-0.5 h-[calc(100vh-4.5rem)] overflow-y-auto overflow-x-hidden py-16 pl-0.5"
|
||||
ref={parentRef}>
|
||||
<Navigation
|
||||
navigation={navigation}
|
||||
preserveScroll={preserveScroll}
|
||||
linkRef={linkRef}
|
||||
className="w-64 pr-8 xl:w-72 xl:pr-16"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16">
|
||||
@@ -161,7 +206,7 @@ export const Layout: React.FC<LayoutProps> = ({ children, meta }) => {
|
||||
)}
|
||||
</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>
|
||||
<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're happy to help where we can!
|
||||
</p>
|
||||
|
||||
45
apps/formbricks-com/components/dummyUI/CTAQuestion.tsx
Normal file
@@ -0,0 +1,45 @@
|
||||
import type { CTAQuestion } from "@formbricks/types/questions";
|
||||
import Headline from "./Headline";
|
||||
import HtmlBody from "./HtmlBody";
|
||||
|
||||
interface CTAQuestionProps {
|
||||
question: CTAQuestion;
|
||||
onSubmit: (data: { [x: string]: any }) => void;
|
||||
lastQuestion: boolean;
|
||||
brandColor: string;
|
||||
}
|
||||
|
||||
export default function CTAQuestion({ question, onSubmit, lastQuestion, brandColor }: CTAQuestionProps) {
|
||||
return (
|
||||
<div>
|
||||
<Headline headline={question.headline} questionId={question.id} />
|
||||
<HtmlBody htmlString={question.html || ""} questionId={question.id} />
|
||||
|
||||
<div className="mt-4 flex w-full justify-end">
|
||||
<div></div>
|
||||
{!question.required && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
onSubmit({ [question.id]: "dismissed" });
|
||||
}}
|
||||
className="mr-4 flex items-center rounded-md px-3 py-3 text-base font-medium leading-4 text-slate-500 hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-slate-500 focus:ring-offset-2 dark:border-slate-400 dark:text-slate-400">
|
||||
{question.dismissButtonLabel || "Skip"}
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
if (question.buttonExternal && question.buttonUrl) {
|
||||
window?.open(question.buttonUrl, "_blank")?.focus();
|
||||
}
|
||||
onSubmit({ [question.id]: "clicked" });
|
||||
}}
|
||||
className="flex items-center rounded-md border border-transparent px-3 py-3 text-base font-medium leading-4 text-white shadow-sm hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-slate-500 focus:ring-offset-2"
|
||||
style={{ backgroundColor: brandColor }}>
|
||||
{question.buttonLabel || (lastQuestion ? "Finish" : "Next")}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
10
apps/formbricks-com/components/dummyUI/ContentWrapper.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import clsx from "clsx";
|
||||
|
||||
interface ContentWrapperProps {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export default function ContentWrapper({ children, className }: ContentWrapperProps) {
|
||||
return <div className={clsx("mx-auto max-w-7xl p-6", className)}>{children}</div>;
|
||||
}
|
||||
44
apps/formbricks-com/components/dummyUI/DemoPreview.tsx
Normal file
@@ -0,0 +1,44 @@
|
||||
// DemoPreview.tsx
|
||||
import React, { useEffect, useState } from "react";
|
||||
import PreviewSurvey from "./PreviewSurvey";
|
||||
import { findTemplateByName } from "./templates";
|
||||
import type { Template } from "@formbricks/types/templates";
|
||||
|
||||
interface DemoPreviewProps {
|
||||
template: string;
|
||||
}
|
||||
|
||||
const DemoPreview: React.FC<DemoPreviewProps> = ({ template }) => {
|
||||
const [activeQuestionId, setActiveQuestionId] = useState<string | null>(null);
|
||||
const selectedTemplate: Template | undefined = findTemplateByName(template);
|
||||
|
||||
useEffect(() => {
|
||||
if (selectedTemplate) {
|
||||
setActiveQuestionId(selectedTemplate.preset.questions[0].id);
|
||||
}
|
||||
}, [selectedTemplate]);
|
||||
|
||||
if (!selectedTemplate) {
|
||||
return <div>Template not found.</div>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="mx-2 flex items-center justify-center rounded-xl border-2 border-slate-300 bg-slate-200 py-6 transition-transform duration-150 dark:border-slate-500 dark:bg-slate-700 md:mx-0">
|
||||
<div className="flex flex-col items-center justify-around">
|
||||
<p className="my-3 text-sm text-slate-500 dark:text-slate-300">Preview</p>
|
||||
<div className="">
|
||||
{selectedTemplate && (
|
||||
<PreviewSurvey
|
||||
activeQuestionId={activeQuestionId}
|
||||
questions={selectedTemplate.preset.questions}
|
||||
brandColor="#94a3b8"
|
||||
setActiveQuestionId={setActiveQuestionId}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default DemoPreview;
|
||||
41
apps/formbricks-com/components/dummyUI/DemoView.tsx
Normal file
@@ -0,0 +1,41 @@
|
||||
import type { Template } from "@formbricks/types/templates";
|
||||
import { useEffect, useState } from "react";
|
||||
import PreviewSurvey from "./PreviewSurvey";
|
||||
import TemplateList from "./TemplateList";
|
||||
import { templates } from "./templates";
|
||||
|
||||
export default function SurveyTemplatesPage({}) {
|
||||
const [activeTemplate, setActiveTemplate] = useState<Template | null>(null);
|
||||
const [activeQuestionId, setActiveQuestionId] = useState<string | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (templates.length > 0) {
|
||||
setActiveTemplate(templates[0]);
|
||||
setActiveQuestionId(templates[0]?.preset.questions[0]?.id || null);
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="flex h-screen flex-col overflow-x-auto">
|
||||
<div className="relative z-0 flex flex-1 overflow-hidden">
|
||||
<TemplateList
|
||||
activeTemplate={activeTemplate}
|
||||
onTemplateClick={(template) => {
|
||||
setActiveQuestionId(template.preset.questions[0].id);
|
||||
setActiveTemplate(template);
|
||||
}}
|
||||
/>
|
||||
<aside className="group relative h-full flex-1 flex-shrink-0 overflow-hidden rounded-r-lg bg-slate-200 shadow-inner dark:bg-slate-700 md:flex md:flex-col">
|
||||
{activeTemplate && (
|
||||
<PreviewSurvey
|
||||
activeQuestionId={activeQuestionId}
|
||||
questions={activeTemplate.preset.questions}
|
||||
brandColor="#94a3b8"
|
||||
setActiveQuestionId={setActiveQuestionId}
|
||||
/>
|
||||
)}
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -2,7 +2,7 @@ export const Headline: React.FC<{ headline: string; questionId: string }> = ({ h
|
||||
return (
|
||||
<label
|
||||
htmlFor={questionId}
|
||||
className="block text-base font-semibold leading-6 text-slate-900 dark:text-slate-100">
|
||||
className="mb-1.5 block text-base font-semibold leading-6 text-slate-900 dark:text-slate-100">
|
||||
{headline}
|
||||
</label>
|
||||
);
|
||||
|
||||
11
apps/formbricks-com/components/dummyUI/HtmlBody.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
/* import { cleanHtml } from "../../lib/cleanHtml"; */
|
||||
import { cleanHtml } from "@formbricks/lib/cleanHtml";
|
||||
|
||||
export default function HtmlBody({ htmlString, questionId }: { htmlString: string; questionId: string }) {
|
||||
return (
|
||||
<label
|
||||
htmlFor={questionId}
|
||||
className="fb-block fb-font-normal fb-leading-6 text-sm text-slate-500 dark:text-slate-300"
|
||||
dangerouslySetInnerHTML={{ __html: cleanHtml(htmlString) }}></label>
|
||||
);
|
||||
}
|
||||
@@ -1,25 +1,31 @@
|
||||
import clsx from "clsx";
|
||||
import { ReactNode, useEffect, useState } from "react";
|
||||
import { cn } from "@formbricks/lib/cn";
|
||||
|
||||
export const Modal: React.FC<{ children: ReactNode; isOpen: boolean }> = ({ children, isOpen }) => {
|
||||
export default function Modal({
|
||||
children,
|
||||
isOpen,
|
||||
}: {
|
||||
children: ReactNode;
|
||||
isOpen: boolean;
|
||||
reset: () => void;
|
||||
}) {
|
||||
const [show, setShow] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setShow(isOpen);
|
||||
}, [isOpen]);
|
||||
|
||||
return (
|
||||
<div aria-live="assertive" className="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 aria-live="assertive" className="flex items-end">
|
||||
<div className="flex w-full flex-col items-center p-4 sm:items-end md:min-w-[390px]">
|
||||
<div
|
||||
className={clsx(
|
||||
className={cn(
|
||||
show ? "translate-x-0 opacity-100" : "translate-x-28 opacity-0",
|
||||
"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg bg-white px-4 py-6 shadow-lg ring-1 ring-black ring-opacity-5 transition-all duration-500 ease-in-out dark:bg-slate-700 sm:p-6"
|
||||
"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg bg-white px-4 py-6 shadow-lg ring-1 ring-black ring-opacity-5 transition-all duration-500 ease-in-out dark:bg-slate-900 sm:p-6"
|
||||
)}>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Modal;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
import { useState, useEffect } from "react";
|
||||
import { cn } from "@formbricks/lib/cn";
|
||||
import type { MultipleChoiceMultiQuestion } from "@formbricks/types/questions";
|
||||
import Headline from "./Headline";
|
||||
import Subheader from "./Subheader";
|
||||
|
||||
interface MultipleChoiceMultiProps {
|
||||
question: MultipleChoiceMultiQuestion;
|
||||
onSubmit: (data: { [x: string]: any }) => void;
|
||||
lastQuestion: boolean;
|
||||
brandColor: string;
|
||||
}
|
||||
|
||||
export default function MultipleChoiceMultiQuestion({
|
||||
question,
|
||||
onSubmit,
|
||||
lastQuestion,
|
||||
brandColor,
|
||||
}: MultipleChoiceMultiProps) {
|
||||
const [selectedChoices, setSelectedChoices] = useState<string[]>([]);
|
||||
const [isAtLeastOneChecked, setIsAtLeastOneChecked] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setIsAtLeastOneChecked(selectedChoices.length > 0);
|
||||
}, [selectedChoices]);
|
||||
|
||||
return (
|
||||
<form
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
|
||||
if (question.required && selectedChoices.length <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const data = {
|
||||
[question.id]: selectedChoices,
|
||||
};
|
||||
onSubmit(data);
|
||||
setSelectedChoices([]); // reset value
|
||||
}}>
|
||||
<Headline headline={question.headline} questionId={question.id} />
|
||||
<Subheader subheader={question.subheader} questionId={question.id} />
|
||||
<div className="mt-4">
|
||||
<fieldset>
|
||||
<legend className="sr-only">Options</legend>
|
||||
<div className="relative space-y-2 rounded-md bg-white dark:bg-slate-900">
|
||||
{question.choices &&
|
||||
question.choices.map((choice) => (
|
||||
<label
|
||||
key={choice.id}
|
||||
className={cn(
|
||||
selectedChoices.includes(choice.label)
|
||||
? "z-10 border-slate-400 bg-slate-50 dark:border-slate-400 dark:bg-slate-600"
|
||||
: "border-slate-200 dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600",
|
||||
"relative flex cursor-pointer flex-col rounded-md border p-4 focus:outline-none"
|
||||
)}>
|
||||
<span className="flex items-center text-sm">
|
||||
<input
|
||||
type="checkbox"
|
||||
id={choice.id}
|
||||
name={question.id}
|
||||
value={choice.label}
|
||||
className="h-4 w-4 border border-slate-300 focus:ring-0 focus:ring-offset-0 dark:border-slate-600 dark:bg-slate-500"
|
||||
aria-labelledby={`${choice.id}-label`}
|
||||
checked={selectedChoices.includes(choice.label)}
|
||||
onChange={(e) => {
|
||||
if (e.currentTarget.checked) {
|
||||
setSelectedChoices([...selectedChoices, e.currentTarget.value]);
|
||||
} else {
|
||||
setSelectedChoices(
|
||||
selectedChoices.filter((label) => label !== e.currentTarget.value)
|
||||
);
|
||||
}
|
||||
}}
|
||||
style={{ borderColor: brandColor, color: brandColor }}
|
||||
/>
|
||||
<span
|
||||
id={`${choice.id}-label`}
|
||||
className="ml-3 font-medium text-slate-900 dark:text-slate-200">
|
||||
{choice.label}
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<input
|
||||
type="text"
|
||||
className="clip-[rect(0,0,0,0)] absolute m-[-1px] h-1 w-1 overflow-hidden whitespace-nowrap border-0 p-0 text-transparent caret-transparent focus:border-transparent focus:ring-0"
|
||||
required={question.required}
|
||||
value={isAtLeastOneChecked ? "checked" : ""}
|
||||
onChange={() => {}}
|
||||
/>
|
||||
<div className="mt-4 flex w-full justify-between">
|
||||
<div></div>
|
||||
<button
|
||||
type="submit"
|
||||
className="flex items-center rounded-md border border-transparent px-3 py-3 text-base font-medium leading-4 text-white shadow-sm hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-slate-500 focus:ring-offset-2"
|
||||
style={{ backgroundColor: brandColor }}>
|
||||
{question.buttonLabel || (lastQuestion ? "Finish" : "Next")}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
@@ -1,22 +1,22 @@
|
||||
import clsx from "clsx";
|
||||
import type { MultipleChoiceSingleQuestion as MultipleChoiceSingleQuestionType } from "./questionTypes";
|
||||
import { cn } from "@formbricks/lib/cn";
|
||||
import type { MultipleChoiceSingleQuestion } from "@formbricks/types/questions";
|
||||
import { useState } from "react";
|
||||
import Headline from "./Headline";
|
||||
import Subheader from "./Subheader";
|
||||
|
||||
interface MultipleChoiceSingleProps {
|
||||
question: MultipleChoiceSingleQuestionType;
|
||||
question: MultipleChoiceSingleQuestion;
|
||||
onSubmit: (data: { [x: string]: any }) => void;
|
||||
lastQuestion: boolean;
|
||||
brandColor: string;
|
||||
}
|
||||
|
||||
export const MultipleChoiceSingleQuestion: React.FC<MultipleChoiceSingleProps> = ({
|
||||
export default function MultipleChoiceSingleQuestion({
|
||||
question,
|
||||
onSubmit,
|
||||
lastQuestion,
|
||||
brandColor,
|
||||
}) => {
|
||||
}: MultipleChoiceSingleProps) {
|
||||
const [selectedChoice, setSelectedChoice] = useState<string | null>(null);
|
||||
return (
|
||||
<form
|
||||
@@ -26,9 +26,8 @@ export const MultipleChoiceSingleQuestion: React.FC<MultipleChoiceSingleProps> =
|
||||
[question.id]: e.currentTarget[question.id].value,
|
||||
};
|
||||
|
||||
e.currentTarget[question.id].value = "";
|
||||
onSubmit(data);
|
||||
// reset form
|
||||
setSelectedChoice(null); // reset form
|
||||
}}>
|
||||
<Headline headline={question.headline} questionId={question.id} />
|
||||
<Subheader subheader={question.subheader} questionId={question.id} />
|
||||
@@ -37,14 +36,14 @@ export const MultipleChoiceSingleQuestion: React.FC<MultipleChoiceSingleProps> =
|
||||
<legend className="sr-only">Options</legend>
|
||||
<div className="relative space-y-2 rounded-md">
|
||||
{question.choices &&
|
||||
question.choices.map((choice) => (
|
||||
question.choices.map((choice, idx) => (
|
||||
<label
|
||||
key={choice.id}
|
||||
className={clsx(
|
||||
className={cn(
|
||||
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"
|
||||
? "z-10 border-slate-400 bg-slate-50 dark:border-slate-400 dark:bg-slate-600"
|
||||
: "border-slate-200 dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600",
|
||||
"relative flex cursor-pointer flex-col rounded-md border p-4 hover:bg-slate-50 focus:outline-none"
|
||||
)}>
|
||||
<span className="flex items-center text-sm">
|
||||
<input
|
||||
@@ -52,16 +51,18 @@ export const MultipleChoiceSingleQuestion: React.FC<MultipleChoiceSingleProps> =
|
||||
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"
|
||||
className="h-4 w-4 border border-slate-300 focus:ring-0 focus:ring-offset-0 dark:border-slate-600 dark:bg-slate-500"
|
||||
aria-labelledby={`${choice.id}-label`}
|
||||
onChange={(e) => {
|
||||
setSelectedChoice(e.currentTarget.value);
|
||||
}}
|
||||
checked={selectedChoice === choice.label}
|
||||
style={{ borderColor: brandColor, color: brandColor }}
|
||||
required={question.required && idx === 0}
|
||||
/>
|
||||
<span
|
||||
id={`${choice.id}-label`}
|
||||
className="ml-3 font-medium text-slate-800 dark:text-slate-300">
|
||||
className="ml-3 font-medium text-slate-900 dark:text-slate-200">
|
||||
{choice.label}
|
||||
</span>
|
||||
</span>
|
||||
@@ -81,6 +82,4 @@ export const MultipleChoiceSingleQuestion: React.FC<MultipleChoiceSingleProps> =
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
};
|
||||
|
||||
export default MultipleChoiceSingleQuestion;
|
||||
}
|
||||
|
||||
84
apps/formbricks-com/components/dummyUI/NPSQuestion.tsx
Normal file
@@ -0,0 +1,84 @@
|
||||
import { useState } from "react";
|
||||
import { cn } from "@formbricks/lib/cn";
|
||||
import type { NPSQuestion } from "@formbricks/types/questions";
|
||||
import Headline from "./Headline";
|
||||
import Subheader from "./Subheader";
|
||||
|
||||
interface NPSQuestionProps {
|
||||
question: NPSQuestion;
|
||||
onSubmit: (data: { [x: string]: any }) => void;
|
||||
lastQuestion: boolean;
|
||||
brandColor: string;
|
||||
}
|
||||
|
||||
export default function NPSQuestion({ question, onSubmit, lastQuestion, brandColor }: NPSQuestionProps) {
|
||||
const [selectedChoice, setSelectedChoice] = useState<number | null>(null);
|
||||
|
||||
const handleSelect = (number: number) => {
|
||||
setSelectedChoice(number);
|
||||
if (question.required) {
|
||||
onSubmit({
|
||||
[question.id]: number,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<form
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
|
||||
const data = {
|
||||
[question.id]: selectedChoice,
|
||||
};
|
||||
|
||||
onSubmit(data);
|
||||
// reset form
|
||||
}}>
|
||||
<Headline headline={question.headline} questionId={question.id} />
|
||||
<Subheader subheader={question.subheader} questionId={question.id} />
|
||||
<div className="my-4">
|
||||
<fieldset>
|
||||
<legend className="sr-only">Options</legend>
|
||||
<div className="flex">
|
||||
{Array.from({ length: 11 }, (_, i) => i).map((number) => (
|
||||
<label
|
||||
key={number}
|
||||
className={cn(
|
||||
selectedChoice === number
|
||||
? "z-10 bg-slate-50 dark:bg-slate-500"
|
||||
: "dark:bg-slate-700 dark:hover:bg-slate-500",
|
||||
"relative h-10 flex-1 cursor-pointer border bg-white text-center text-sm leading-10 text-slate-900 first:rounded-l-md last:rounded-r-md hover:bg-gray-100 focus:outline-none dark:border-slate-600 dark:text-white "
|
||||
)}>
|
||||
<input
|
||||
type="radio"
|
||||
name="nps"
|
||||
value={number}
|
||||
className="absolute h-full w-full cursor-pointer opacity-0"
|
||||
onChange={() => handleSelect(number)}
|
||||
required={question.required}
|
||||
/>
|
||||
{number}
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
<div className="flex justify-between px-1.5 text-xs leading-6 text-slate-500">
|
||||
<p>{question.lowerLabel}</p>
|
||||
<p>{question.upperLabel}</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
{!question.required && (
|
||||
<div className="mt-4 flex w-full justify-between">
|
||||
<div></div>
|
||||
<button
|
||||
type="submit"
|
||||
className="flex items-center rounded-md border border-transparent px-3 py-3 text-base font-medium leading-4 text-white shadow-sm hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-slate-500 focus:ring-offset-2"
|
||||
style={{ backgroundColor: brandColor }}>
|
||||
{question.buttonLabel || (lastQuestion ? "Finish" : "Next")}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</form>
|
||||
);
|
||||
}
|
||||
@@ -1,27 +1,33 @@
|
||||
import type { OpenTextQuestion as OpenTextQuestionType } from "./questionTypes";
|
||||
import type { OpenTextQuestion } from "@formbricks/types/questions";
|
||||
import { useState } from "react";
|
||||
import Headline from "./Headline";
|
||||
import Subheader from "./Subheader";
|
||||
|
||||
interface OpenTextQuestionProps {
|
||||
question: OpenTextQuestionType;
|
||||
onSubmit: (id: string) => void;
|
||||
question: OpenTextQuestion;
|
||||
onSubmit: (data: { [x: string]: any }) => void;
|
||||
lastQuestion: boolean;
|
||||
brandColor: string;
|
||||
}
|
||||
|
||||
export const OpenTextQuestion: React.FC<OpenTextQuestionProps> = ({
|
||||
export default function OpenTextQuestion({
|
||||
question,
|
||||
onSubmit,
|
||||
lastQuestion,
|
||||
brandColor,
|
||||
}) => {
|
||||
}: OpenTextQuestionProps) {
|
||||
const [value, setValue] = useState<string>("");
|
||||
|
||||
return (
|
||||
<form
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
const data = "Pupsi";
|
||||
|
||||
const data = {
|
||||
[question.id]: value,
|
||||
};
|
||||
setValue(""); // reset value
|
||||
onSubmit(data);
|
||||
// reset form
|
||||
}}>
|
||||
<Headline headline={question.headline} questionId={question.id} />
|
||||
<Subheader subheader={question.subheader} questionId={question.id} />
|
||||
@@ -30,9 +36,11 @@ export const OpenTextQuestion: React.FC<OpenTextQuestionProps> = ({
|
||||
rows={3}
|
||||
name={question.id}
|
||||
id={question.id}
|
||||
value={value}
|
||||
onChange={(e) => setValue(e.target.value)}
|
||||
placeholder={question.placeholder}
|
||||
required={question.required}
|
||||
className="block w-full rounded-md border border-slate-100 bg-slate-50 p-2 shadow-sm focus:border-slate-500 focus:ring-0 dark:bg-slate-500 dark:text-white sm:text-sm"></textarea>
|
||||
className="block w-full rounded-md border border-slate-100 bg-slate-50 p-2 shadow-sm focus:border-slate-500 focus:ring-0 dark:border-slate-500 dark:bg-slate-700 dark:text-white sm:text-sm"></textarea>
|
||||
</div>
|
||||
<div className="mt-4 flex w-full justify-between">
|
||||
<div></div>
|
||||
@@ -45,6 +53,4 @@ export const OpenTextQuestion: React.FC<OpenTextQuestionProps> = ({
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
};
|
||||
|
||||
export default OpenTextQuestion;
|
||||
}
|
||||
|
||||
@@ -1,78 +1,89 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { useState } from "react";
|
||||
import Modal from "./Modal";
|
||||
import type { Question } from "./questionTypes";
|
||||
import MultipleChoiceSingleQuestion from "./MultipleChoiceSingleQuestion";
|
||||
import OpenTextQuestion from "./OpenTextQuestion";
|
||||
import QuestionConditional from "./QuestionConditional";
|
||||
import type { Question } from "@formbricks/types/questions";
|
||||
import { Survey } from "@formbricks/types/surveys";
|
||||
import ThankYouCard from "./ThankYouCard";
|
||||
|
||||
interface PreviewSurveyProps {
|
||||
localSurvey?: Survey;
|
||||
setActiveQuestionId: (id: string | null) => void;
|
||||
activeQuestionId?: string | null;
|
||||
questions: Question[];
|
||||
brandColor: string;
|
||||
}
|
||||
|
||||
export const PreviewSurvey: React.FC<PreviewSurveyProps> = ({ activeQuestionId, questions, brandColor }) => {
|
||||
export default function PreviewSurvey({
|
||||
localSurvey,
|
||||
setActiveQuestionId,
|
||||
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]);
|
||||
const currentIndex = questions.findIndex((q) => q.id === activeQuestionId);
|
||||
if (currentIndex < questions.length - 1) {
|
||||
setActiveQuestionId(questions[currentIndex + 1].id);
|
||||
} else {
|
||||
if (localSurvey?.thankYouCard?.enabled) {
|
||||
setActiveQuestionId("thank-you-card");
|
||||
} else {
|
||||
// start over
|
||||
setIsModalOpen(false);
|
||||
setTimeout(() => {
|
||||
setCurrentQuestion(questions[0]);
|
||||
setActiveQuestionId(questions[0].id);
|
||||
setIsModalOpen(true);
|
||||
}, 500);
|
||||
if (localSurvey?.thankYouCard?.enabled) {
|
||||
setActiveQuestionId("thank-you-card");
|
||||
} else {
|
||||
setIsModalOpen(false);
|
||||
setTimeout(() => {
|
||||
setActiveQuestionId(questions[0].id);
|
||||
setIsModalOpen(true);
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (!currentQuestion) {
|
||||
const resetPreview = () => {
|
||||
setIsModalOpen(false);
|
||||
setTimeout(() => {
|
||||
setActiveQuestionId(questions[0].id);
|
||||
setIsModalOpen(true);
|
||||
}, 500);
|
||||
};
|
||||
|
||||
if (!activeQuestionId) {
|
||||
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>
|
||||
<>
|
||||
<Modal isOpen={isModalOpen} reset={resetPreview}>
|
||||
{activeQuestionId == "thank-you-card" ? (
|
||||
<ThankYouCard
|
||||
brandColor={brandColor}
|
||||
headline={localSurvey?.thankYouCard?.headline || ""}
|
||||
subheader={localSurvey?.thankYouCard?.subheader || ""}
|
||||
/>
|
||||
) : (
|
||||
questions.map(
|
||||
(question, idx) =>
|
||||
activeQuestionId === question.id && (
|
||||
<QuestionConditional
|
||||
key={question.id}
|
||||
question={question}
|
||||
brandColor={brandColor}
|
||||
lastQuestion={idx === questions.length - 1}
|
||||
onSubmit={gotoNextQuestion}
|
||||
/>
|
||||
)
|
||||
)
|
||||
)}
|
||||
</Modal>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default PreviewSurvey;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
import { QuestionType, type Question } from "@formbricks/types/questions";
|
||||
import OpenTextQuestion from "./OpenTextQuestion";
|
||||
import MultipleChoiceSingleQuestion from "./MultipleChoiceSingleQuestion";
|
||||
import MultipleChoiceMultiQuestion from "./MultipleChoiceMultiQuestion";
|
||||
import NPSQuestion from "./NPSQuestion";
|
||||
import CTAQuestion from "./CTAQuestion";
|
||||
import RatingQuestion from "./RatingQuestion";
|
||||
|
||||
interface QuestionConditionalProps {
|
||||
question: Question;
|
||||
onSubmit: (data: { [x: string]: any }) => void;
|
||||
lastQuestion: boolean;
|
||||
brandColor: string;
|
||||
}
|
||||
|
||||
export default function QuestionConditional({
|
||||
question,
|
||||
onSubmit,
|
||||
lastQuestion,
|
||||
brandColor,
|
||||
}: QuestionConditionalProps) {
|
||||
return question.type === QuestionType.OpenText ? (
|
||||
<OpenTextQuestion
|
||||
question={question}
|
||||
onSubmit={onSubmit}
|
||||
lastQuestion={lastQuestion}
|
||||
brandColor={brandColor}
|
||||
/>
|
||||
) : question.type === QuestionType.MultipleChoiceSingle ? (
|
||||
<MultipleChoiceSingleQuestion
|
||||
question={question}
|
||||
onSubmit={onSubmit}
|
||||
lastQuestion={lastQuestion}
|
||||
brandColor={brandColor}
|
||||
/>
|
||||
) : question.type === QuestionType.MultipleChoiceMulti ? (
|
||||
<MultipleChoiceMultiQuestion
|
||||
question={question}
|
||||
onSubmit={onSubmit}
|
||||
lastQuestion={lastQuestion}
|
||||
brandColor={brandColor}
|
||||
/>
|
||||
) : question.type === QuestionType.NPS ? (
|
||||
<NPSQuestion
|
||||
question={question}
|
||||
onSubmit={onSubmit}
|
||||
lastQuestion={lastQuestion}
|
||||
brandColor={brandColor}
|
||||
/>
|
||||
) : question.type === QuestionType.CTA ? (
|
||||
<CTAQuestion
|
||||
question={question}
|
||||
onSubmit={onSubmit}
|
||||
lastQuestion={lastQuestion}
|
||||
brandColor={brandColor}
|
||||
/>
|
||||
) : question.type === QuestionType.Rating ? (
|
||||
<RatingQuestion
|
||||
question={question}
|
||||
onSubmit={onSubmit}
|
||||
lastQuestion={lastQuestion}
|
||||
brandColor={brandColor}
|
||||
/>
|
||||
) : null;
|
||||
}
|
||||
91
apps/formbricks-com/components/dummyUI/RatingQuestion.tsx
Normal file
@@ -0,0 +1,91 @@
|
||||
import type { RatingQuestion } from "@formbricks/types/questions";
|
||||
import { useState } from "react";
|
||||
import { cn } from "@formbricks/lib/cn";
|
||||
import Headline from "./Headline";
|
||||
import Subheader from "./Subheader";
|
||||
|
||||
interface RatingQuestionProps {
|
||||
question: RatingQuestion;
|
||||
onSubmit: (data: { [x: string]: any }) => void;
|
||||
lastQuestion: boolean;
|
||||
brandColor: string;
|
||||
}
|
||||
|
||||
export default function RatingQuestion({
|
||||
question,
|
||||
onSubmit,
|
||||
lastQuestion,
|
||||
brandColor,
|
||||
}: RatingQuestionProps) {
|
||||
const [selectedChoice, setSelectedChoice] = useState<number | null>(null);
|
||||
|
||||
const handleSelect = (number: number) => {
|
||||
setSelectedChoice(number);
|
||||
if (question.required) {
|
||||
onSubmit({
|
||||
[question.id]: number,
|
||||
});
|
||||
setSelectedChoice(null); // reset choice
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<form
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
|
||||
const data = {
|
||||
[question.id]: selectedChoice,
|
||||
};
|
||||
|
||||
setSelectedChoice(null); // reset choice
|
||||
|
||||
onSubmit(data);
|
||||
}}>
|
||||
<Headline headline={question.headline} questionId={question.id} />
|
||||
<Subheader subheader={question.subheader} questionId={question.id} />
|
||||
<div className="my-4">
|
||||
<fieldset>
|
||||
<legend className="sr-only">Options</legend>
|
||||
<div className="flex">
|
||||
{Array.from({ length: question.range }, (_, i) => i + 1).map((number) => (
|
||||
<label
|
||||
key={number}
|
||||
className={cn(
|
||||
selectedChoice === number
|
||||
? "z-10 border-slate-400 bg-slate-50"
|
||||
: "bg-white hover:bg-gray-100 dark:bg-slate-700 dark:hover:bg-slate-500",
|
||||
"relative h-10 flex-1 cursor-pointer border border-slate-100 text-center text-sm leading-10 text-slate-800 first:rounded-l-md last:rounded-r-md focus:outline-none dark:border-slate-500 dark:text-slate-200 "
|
||||
)}>
|
||||
<input
|
||||
type="radio"
|
||||
name="rating"
|
||||
value={number}
|
||||
className="absolute h-full w-full cursor-pointer opacity-0"
|
||||
onChange={() => handleSelect(number)}
|
||||
required={question.required}
|
||||
/>
|
||||
{number}
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
<div className="flex justify-between px-1.5 text-xs leading-6 text-slate-500">
|
||||
<p>{question.lowerLabel}</p>
|
||||
<p>{question.upperLabel}</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
{!question.required && (
|
||||
<div className="mt-4 flex w-full justify-between">
|
||||
<div></div>
|
||||
<button
|
||||
type="submit"
|
||||
className="flex items-center rounded-md border border-transparent px-3 py-3 text-base font-medium leading-4 text-white shadow-sm hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-slate-500 focus:ring-offset-2"
|
||||
style={{ backgroundColor: brandColor }}>
|
||||
{question.buttonLabel || (lastQuestion ? "Finish" : "Next")}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</form>
|
||||
);
|
||||
}
|
||||
@@ -1,218 +1,77 @@
|
||||
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 type { Template } from "./templateTypes";
|
||||
import type { Template } from "@formbricks/types/templates";
|
||||
import { useEffect, useState } from "react";
|
||||
import { cn } from "@formbricks/lib/cn";
|
||||
import { templates } from "./templates";
|
||||
|
||||
export const TemplateList: React.FC = () => {
|
||||
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 categories = [
|
||||
"All",
|
||||
...(Array.from(new Set(templates.map((template) => template.category))) as string[]),
|
||||
];
|
||||
|
||||
const [selectedFilter, setSelectedFilter] = useState(categories[0]);
|
||||
|
||||
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>
|
||||
<div className="mt-6 hidden flex-col md:flex">
|
||||
<div className="z-0 flex min-h-[90vh] overflow-hidden">
|
||||
<main className="relative z-0 max-h-[90vh] flex-1 overflow-y-auto px-6 pb-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 lg: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 right-6 top-6 rounded border border-slate-300 bg-slate-50 px-1.5 py-0.5 text-xs text-slate-500 dark:border-slate-500 dark:bg-slate-700 dark:text-slate-300">
|
||||
{template.category}
|
||||
</div>
|
||||
<template.icon className="h-8 w-8" />
|
||||
<h3 className="text-md mb-1 mt-3 text-left font-bold text-slate-700 dark:text-slate-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 mb-1 mt-3 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>
|
||||
<div className="flex items-center justify-center pt-36 text-slate-600 md:hidden">
|
||||
This demo is not yet optimized for smartphones.
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
type TemplateList = {
|
||||
onTemplateClick: (template: Template) => void;
|
||||
activeTemplate: Template | null;
|
||||
};
|
||||
|
||||
export default TemplateList;
|
||||
const ALL_CATEGORY_NAME = "All";
|
||||
|
||||
export default function TemplateList({ onTemplateClick, activeTemplate }: TemplateList) {
|
||||
const [selectedFilter, setSelectedFilter] = useState(ALL_CATEGORY_NAME);
|
||||
|
||||
const [categories, setCategories] = useState<Array<string>>([]);
|
||||
|
||||
useEffect(() => {
|
||||
const defaultCategories = [
|
||||
/* ALL_CATEGORY_NAME, */
|
||||
...(Array.from(new Set(templates.map((template) => template.category))) as string[]),
|
||||
];
|
||||
|
||||
const fullCategories = [ALL_CATEGORY_NAME, ...defaultCategories];
|
||||
|
||||
setCategories(fullCategories);
|
||||
|
||||
const activeFilter = ALL_CATEGORY_NAME;
|
||||
setSelectedFilter(activeFilter);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<main className="relative z-0 flex-1 overflow-y-auto rounded-l-lg bg-slate-100 px-8 py-6 focus:outline-none dark:bg-slate-800">
|
||||
<div className="mb-6 flex flex-wrap space-x-1">
|
||||
{categories.map((category) => (
|
||||
<button
|
||||
key={category}
|
||||
type="button"
|
||||
onClick={() => setSelectedFilter(category)}
|
||||
className={cn(
|
||||
selectedFilter === category
|
||||
? "text-brand-dark border-brand-dark font-semibold"
|
||||
: "border-slate-300 text-slate-700 hover:bg-slate-100 dark:border-slate-600 dark:text-slate-300",
|
||||
"mt-2 rounded border bg-slate-50 px-3 py-1 text-xs transition-all duration-150 dark:bg-slate-600 dark:hover:bg-slate-500"
|
||||
)}>
|
||||
{category}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
|
||||
{templates
|
||||
.filter((template) => selectedFilter === ALL_CATEGORY_NAME || template.category === selectedFilter)
|
||||
.map((template: Template) => (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
onTemplateClick(template); // Pass the 'template' object instead of 'activeTemplate'
|
||||
}}
|
||||
key={template.name}
|
||||
className={cn(
|
||||
activeTemplate?.name === template.name && "ring-brand ring-2",
|
||||
"duration-120 group relative rounded-lg bg-white p-6 shadow transition-all duration-150 hover:scale-105 dark:bg-slate-700"
|
||||
)}>
|
||||
<div className="absolute right-6 top-6 rounded border border-slate-300 bg-slate-50 px-1.5 py-0.5 text-xs text-slate-500 dark:border-slate-400 dark:bg-slate-800 dark:text-slate-400">
|
||||
{template.category}
|
||||
</div>
|
||||
<template.icon className="h-8 w-8" />
|
||||
<h3 className="text-md mb-1 mt-3 text-left font-bold text-slate-700 dark:text-slate-300">
|
||||
{template.name}
|
||||
</h3>
|
||||
<p className="text-left text-xs text-slate-600 dark:text-slate-400">{template.description}</p>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
52
apps/formbricks-com/components/dummyUI/ThankYouCard.tsx
Normal file
@@ -0,0 +1,52 @@
|
||||
import Headline from "./Headline";
|
||||
import Subheader from "./Subheader";
|
||||
|
||||
interface ThankYouCardProps {
|
||||
headline: string;
|
||||
subheader: string;
|
||||
brandColor: string;
|
||||
}
|
||||
|
||||
export default function ThankYouCard({ headline, subheader, brandColor }: ThankYouCardProps) {
|
||||
return (
|
||||
<div className="text-center">
|
||||
<div className="flex items-center justify-center" style={{ color: brandColor }}>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
strokeWidth="1.5"
|
||||
stroke="currentColor"
|
||||
className="h-24 w-24">
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<span className="mb-[10px] inline-block h-1 w-16 rounded-[100%] bg-slate-300"></span>
|
||||
|
||||
<div>
|
||||
<Headline headline={headline} questionId="thankYouCard" />
|
||||
<Subheader subheader={subheader} questionId="thankYouCard" />
|
||||
</div>
|
||||
|
||||
{/* <span
|
||||
className="mb-[10px] mt-[35px] inline-block h-[2px] w-4/5 rounded-full opacity-25"
|
||||
style={{ backgroundColor: brandColor }}></span>
|
||||
|
||||
<div>
|
||||
<p className="text-xs text-slate-500">
|
||||
Powered by{" "}
|
||||
<b>
|
||||
<a href="https://formbricks.com" target="_blank" className="hover:text-slate-700">
|
||||
Formbricks
|
||||
</a>
|
||||
</b>
|
||||
</p>
|
||||
</div> */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
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;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
import { Question } from "./questionTypes";
|
||||
|
||||
export interface Template {
|
||||
name: string;
|
||||
icon: any;
|
||||
description: string;
|
||||
category?: "All" | "Product Management" | "Growth Marketing" | "Increase Revenue";
|
||||
preset: {
|
||||
name: string;
|
||||
questions: Question[];
|
||||
};
|
||||
}
|
||||
@@ -5,7 +5,10 @@ import Link from "next/link";
|
||||
|
||||
export const GitHubSponsorship: React.FC = () => {
|
||||
return (
|
||||
<div className="xs:mx-auto xs:w-full relative mx-auto my-4 mb-12 mt-12 rounded-xl bg-gradient-to-br from-slate-100 to-slate-200 px-4 py-8 dark:from-slate-800 dark:via-slate-800 dark:to-slate-700 sm:px-6 sm:pb-12 sm:pt-8 md:max-w-none lg:mt-6 lg:px-8 lg:pt-8 ">
|
||||
<div className="mx-4 my-4 mb-12 mt-12 rounded-xl bg-gradient-to-br from-slate-100 to-slate-200 px-4 py-8 dark:from-slate-800 dark:via-slate-800 dark:to-slate-700 sm:px-6 sm:pb-12 sm:pt-8 md:max-w-none lg:mt-6 lg:px-8 lg:pt-8">
|
||||
<style jsx>{`
|
||||
@media (min-width: 426px);
|
||||
`}</style>
|
||||
<div className="right-10 lg:absolute">
|
||||
<Image
|
||||
src={GitHubMarkDark}
|
||||
@@ -23,10 +26,10 @@ export const GitHubSponsorship: React.FC = () => {
|
||||
/>
|
||||
</div>
|
||||
<h2 className="mt-4 text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-200 lg:text-2xl">
|
||||
Sponsored by GitHub
|
||||
Proudly Open-Source 🤍
|
||||
</h2>
|
||||
<p className="lg:text-md mt-4 max-w-3xl text-slate-500 dark:text-slate-400">
|
||||
We're proud to join the first accelerator program by GitHub!{" "}
|
||||
We're proud to to be supported by GitHubs Open-Source Program!{" "}
|
||||
<span>
|
||||
<Link
|
||||
href="/blog/inaugural-batch-github-accelerator"
|
||||
|
||||
@@ -5,10 +5,9 @@ import CrowdLogoDark from "@/images/clients/crowd-logo-dark.svg";
|
||||
import CrowdLogoLight from "@/images/clients/crowd-logo-light.svg";
|
||||
import NILogoDark from "@/images/clients/niLogoDark.svg";
|
||||
import NILogoLight from "@/images/clients/niLogoWhite.svg";
|
||||
import StackOceanLogoDark from "@/images/clients/stack-ocean-dark.png";
|
||||
import StackOceanLogoLight from "@/images/clients/stack-ocean-light.png";
|
||||
import AnimationFallback from "@/public/animations/fallback-image-open-source-feedback-software.jpg";
|
||||
import AnimationFallback from "@/public/animations/opensource-xm-platform-formbricks-fallback.png";
|
||||
import { Button } from "@formbricks/ui";
|
||||
import { ChevronRightIcon } from "@heroicons/react/24/outline";
|
||||
import { usePlausible } from "next-plausible";
|
||||
import Image from "next/image";
|
||||
import { useRouter } from "next/router";
|
||||
@@ -19,82 +18,72 @@ export const Hero: React.FC = ({}) => {
|
||||
const router = useRouter();
|
||||
return (
|
||||
<div className="relative">
|
||||
<div className="px-4 py-20 text-center sm:px-6 lg:px-8 lg:py-28">
|
||||
<h1 className="text-3xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-4xl md:text-5xl">
|
||||
<span className="xl:inline">Survey any segment.</span>{" "}
|
||||
<span
|
||||
className="font-extralight" /* className="from-brand-light to-brand-dark bg-gradient-to-b bg-clip-text text-transparent xl:inline" */
|
||||
>
|
||||
No coding required.
|
||||
</span>
|
||||
<div className="px-4 pb-20 pt-16 text-center sm:px-6 lg:px-8 lg:pb-32 lg:pt-20">
|
||||
<a
|
||||
href="https://github.com/formbricks/formbricks"
|
||||
target="_blank"
|
||||
className="border-brand-dark rounded-full border px-4 py-1.5 text-sm text-slate-500 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800">
|
||||
We're Open-Source | Star us on GitHub{" "}
|
||||
<ChevronRightIcon className="inline h-5 w-5 text-slate-300" />
|
||||
</a>
|
||||
<h1 className="mt-10 text-3xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-4xl md:text-5xl">
|
||||
<span className="xl:inline">Open-source Experience Management</span>
|
||||
</h1>
|
||||
|
||||
<p className="xs:max-w-none mx-auto mt-3 max-w-xs text-base text-slate-500 dark:text-slate-400 sm:text-lg md:mt-5 md:text-xl">
|
||||
Survey granular user segments at any point in the user journey.
|
||||
Understand what customers think & feel about your product.
|
||||
<br />
|
||||
<span className="hidden md:block">
|
||||
Gather up to 6x more insights with targeted micro-surveys.{" "}
|
||||
<span className="decoration-brand-dark underline underline-offset-4">All open-source.</span>
|
||||
Natively integrate user research with minimal dev attention,{" "}
|
||||
<span className="decoration-brand-dark underline underline-offset-4">privacy-first.</span>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<div className="mx-auto mt-5 max-w-3xl items-center space-x-8 sm:flex sm:justify-center md:mt-8">
|
||||
<div className="mx-auto mt-5 max-w-3xl items-center px-4 sm:flex sm:justify-center md:mt-8 md:space-x-8 md:px-0">
|
||||
<p className="hidden whitespace-nowrap pt-3 text-xs text-slate-400 dark:text-slate-500 md:block">
|
||||
Trusted by
|
||||
</p>
|
||||
<div className="grid grid-cols-5 items-center gap-8 pt-2">
|
||||
<div className="grid grid-cols-4 items-center gap-5 pt-2 md:gap-8">
|
||||
<Image
|
||||
src={CalLogoLight}
|
||||
alt="Cal Logo"
|
||||
className="block rounded-lg opacity-50 hover:opacity-100 dark:hidden"
|
||||
className="block rounded-lg hover:opacity-100 dark:hidden md:opacity-50"
|
||||
width={170}
|
||||
/>
|
||||
<Image
|
||||
src={CalLogoDark}
|
||||
alt="Cal Logo"
|
||||
className="hidden rounded-lg opacity-50 hover:opacity-100 dark:block"
|
||||
className="hidden rounded-lg hover:opacity-100 dark:block md:opacity-50"
|
||||
width={170}
|
||||
/>
|
||||
<Image
|
||||
src={CrowdLogoLight}
|
||||
alt="Crowd.dev Logo"
|
||||
className="block rounded-lg pb-1 opacity-50 hover:opacity-100 dark:hidden"
|
||||
className="block rounded-lg pb-1 hover:opacity-100 dark:hidden md:opacity-50"
|
||||
width={200}
|
||||
/>
|
||||
<Image
|
||||
src={CrowdLogoDark}
|
||||
alt="Crowd.dev Logo"
|
||||
className="hidden rounded-lg pb-1 opacity-50 hover:opacity-100 dark:block"
|
||||
className="hidden rounded-lg pb-1 hover:opacity-100 dark:block md:opacity-50"
|
||||
width={200}
|
||||
/>
|
||||
<Image
|
||||
src={ClovyrLogo}
|
||||
alt="Clovyr Logo"
|
||||
className="rounded-lg pb-1 opacity-50 hover:opacity-100"
|
||||
className="rounded-lg pb-1 hover:opacity-100 md:opacity-50"
|
||||
width={200}
|
||||
/>
|
||||
<Image
|
||||
src={NILogoDark}
|
||||
alt="Neverinstall Logo"
|
||||
className="block pb-1 opacity-50 hover:opacity-100 dark:hidden"
|
||||
className="block pb-1 hover:opacity-100 dark:hidden md:opacity-50"
|
||||
width={200}
|
||||
/>
|
||||
<Image
|
||||
src={NILogoLight}
|
||||
alt="Neverinstall Logo"
|
||||
className="hidden pb-1 opacity-50 hover:opacity-100 dark:block"
|
||||
width={200}
|
||||
/>
|
||||
<Image
|
||||
src={StackOceanLogoLight}
|
||||
alt="StackOcean Logo"
|
||||
className="block pb-1 opacity-50 hover:opacity-100 dark:hidden"
|
||||
width={200}
|
||||
/>
|
||||
<Image
|
||||
src={StackOceanLogoDark}
|
||||
alt="StakcOcean Logo"
|
||||
className="hidden pb-1 opacity-50 hover:opacity-100 dark:block"
|
||||
className="hidden pb-1 hover:opacity-100 dark:block md:opacity-50"
|
||||
width={200}
|
||||
/>
|
||||
</div>
|
||||
@@ -120,7 +109,7 @@ export const Hero: React.FC = ({}) => {
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="relative">
|
||||
<div className="relative px-2 md:px-0">
|
||||
<HeroAnimation fallbackImage={AnimationFallback} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,7 +19,7 @@ export const HeroAnimation: React.FC<any> = ({ fallbackImage, ...props }) => {
|
||||
loop: true,
|
||||
autoplay: true,
|
||||
// path to your animation file, place it inside public folder
|
||||
path: "/animations/formbricks-open-source-survey-software-hero-animation-v1.json",
|
||||
path: "/animations/opensource-xm-platform-formbricks.json",
|
||||
});
|
||||
|
||||
animation.addEventListener("DOMLoaded", () => {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import DemoPreview from "@/components/dummyUI/DemoPreview";
|
||||
import DashboardMockupDark from "@/images/dashboard-mockup-dark.png";
|
||||
import DashboardMockup from "@/images/dashboard-mockup.png";
|
||||
import { Button } from "@formbricks/ui";
|
||||
@@ -6,71 +7,9 @@ import Image from "next/image";
|
||||
import { useState } from "react";
|
||||
import AddEventDummy from "../dummyUI/AddEventDummy";
|
||||
import AddNoCodeEventModalDummy from "../dummyUI/AddNoCodeEventModalDummy";
|
||||
import PreviewSurvey from "../dummyUI/PreviewSurvey";
|
||||
import type { Question } from "../dummyUI/questionTypes";
|
||||
import HeadingCentered from "../shared/HeadingCentered";
|
||||
import SetupTabs from "./SetupTabs";
|
||||
|
||||
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 const Steps: React.FC = () => {
|
||||
const [isAddEventModalOpen, setAddEventModalOpen] = useState(false);
|
||||
|
||||
@@ -108,7 +47,7 @@ export const Steps: React.FC = () => {
|
||||
<div className="flex h-40 items-center justify-center">
|
||||
<Button
|
||||
variant="primary"
|
||||
className="animate-bounce transition-all duration-150 hover:scale-105"
|
||||
className=""
|
||||
onClick={() => {
|
||||
setAddEventModalOpen(true);
|
||||
}}>
|
||||
@@ -143,8 +82,8 @@ export const Steps: React.FC = () => {
|
||||
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 className="relative w-full rounded-lg p-1 dark:bg-slate-800 sm:p-8">
|
||||
<DemoPreview template="Product Market Fit Survey (short)" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -56,7 +56,7 @@ export function APILayout({ method, url, description, headers, bodies, responses
|
||||
{method}
|
||||
</div>
|
||||
<div className="inline text-sm text-slate-500 ">
|
||||
http://localhost:300
|
||||
https://app.formbricks.com
|
||||
<span className="font-bold text-black dark:text-slate-300">{url}</span>
|
||||
</div>
|
||||
<div className="ml-8 mt-4 font-bold dark:text-slate-400">{description}</div>
|
||||
@@ -75,30 +75,34 @@ export function APILayout({ method, url, description, headers, bodies, responses
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="mt-4 text-base">
|
||||
<p className="not-prose -mb-1 pt-2 font-bold">Body</p>
|
||||
<div>
|
||||
{}
|
||||
{bodies.map((b) => (
|
||||
<Parameter
|
||||
key={b.label}
|
||||
label={b.label}
|
||||
type={b.type}
|
||||
description={b.description}
|
||||
required={b.required}
|
||||
/>
|
||||
))}
|
||||
{example && (
|
||||
<div>
|
||||
<p className="not-prose mb-2 pt-2 font-bold">Body Example</p>
|
||||
{bodies && (
|
||||
<div className="mt-4 text-base">
|
||||
<p className="not-prose -mb-1 pt-2 font-bold">Body</p>
|
||||
<div>
|
||||
{}
|
||||
{bodies?.map((b) => (
|
||||
<Parameter
|
||||
key={b.label}
|
||||
label={b.label}
|
||||
type={b.type}
|
||||
description={b.description}
|
||||
required={b.required}
|
||||
/>
|
||||
))}
|
||||
{example && (
|
||||
<div>
|
||||
<pre>
|
||||
<code>{example}</code>
|
||||
</pre>
|
||||
<p className="not-prose mb-2 pt-2 font-bold">Body Example</p>
|
||||
<div>
|
||||
<pre>
|
||||
<code>{example}</code>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<div>
|
||||
<div className="mt-4 text-base">
|
||||
<p className="not-prose -mb-1 pt-2 font-bold">Responses</p>
|
||||
<div>
|
||||
@@ -194,7 +198,7 @@ function Response({ color, statusCode, description, example }: RespProps) {
|
||||
</div>
|
||||
</div>
|
||||
{example && toggleExample && (
|
||||
<div className="col-span-2 my-3 rounded-lg bg-slate-300 p-2 font-mono dark:bg-slate-600 dark:text-slate-300">
|
||||
<div className="col-span-2 my-3 whitespace-pre-wrap rounded-lg bg-slate-300 p-2 font-mono dark:bg-slate-600 dark:text-slate-300">
|
||||
{example}
|
||||
</div>
|
||||
)}
|
||||
|
||||
36
apps/formbricks-com/components/shared/AuthorBox.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
import Image from "next/image";
|
||||
import AuthorJohannes from "@/images/blog/johannes-co-founder-formbricks-small.jpg";
|
||||
|
||||
interface AuthorBoxProps {
|
||||
name: string;
|
||||
title: string;
|
||||
date: string;
|
||||
duration: string;
|
||||
}
|
||||
|
||||
export default function AuthorBox({ name, title, date, duration }: AuthorBoxProps) {
|
||||
return (
|
||||
<div className="mb-8 flex items-center space-x-4 rounded-lg border border-slate-200 bg-slate-100 px-6 py-3 dark:border-slate-700 dark:bg-slate-800">
|
||||
<Image
|
||||
className="m-0 rounded-full"
|
||||
src={AuthorJohannes}
|
||||
alt={name}
|
||||
width={45}
|
||||
height={45}
|
||||
quality={100}
|
||||
placeholder="blur"
|
||||
style={{ objectFit: "contain" }}
|
||||
/>
|
||||
<div className="flex w-full items-end justify-between">
|
||||
<div>
|
||||
<p className="m-0 font-medium text-slate-600 dark:text-slate-300">{name}</p>
|
||||
<p className="m-0 text-sm text-slate-400">{title}</p>
|
||||
</div>
|
||||
<div className="text-right">
|
||||
<p className="m-0 font-medium text-slate-600 dark:text-slate-300">{duration} Minutes</p>
|
||||
<p className="m-0 text-sm text-slate-400">{date}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
114
apps/formbricks-com/components/shared/BestPracticeNavigation.tsx
Normal file
@@ -0,0 +1,114 @@
|
||||
import {
|
||||
CancelSubscriptionIcon,
|
||||
DogChaserIcon,
|
||||
FeedbackIcon,
|
||||
InterviewPromptIcon,
|
||||
OnboardingIcon,
|
||||
PMFIcon,
|
||||
BaseballIcon,
|
||||
CodeBookIcon,
|
||||
} from "@formbricks/ui";
|
||||
import clsx from "clsx";
|
||||
import Link from "next/link";
|
||||
|
||||
export default function BestPracticeNavigation() {
|
||||
const BestPractices = [
|
||||
{
|
||||
name: "Interview Prompt",
|
||||
href: "/interview-prompt",
|
||||
status: true,
|
||||
icon: InterviewPromptIcon,
|
||||
description: "Ask only power users users to book a time in your calendar. Get those juicy details.",
|
||||
category: "Understand Users",
|
||||
},
|
||||
{
|
||||
name: "Product-Market Fit Survey",
|
||||
href: "/measure-product-market-fit",
|
||||
status: true,
|
||||
icon: PMFIcon,
|
||||
description: "Find out how disappointed people would be if they could not use your service any more.",
|
||||
category: "Understand Users",
|
||||
},
|
||||
{
|
||||
name: "Onboarding Segments",
|
||||
href: "/onboarding-segmentation",
|
||||
status: false,
|
||||
icon: OnboardingIcon,
|
||||
description:
|
||||
"Get to know your users right from the start. Ask a few questions early, let us enrich the profile.",
|
||||
category: "Understand Users",
|
||||
},
|
||||
{
|
||||
name: "Learn from Churn",
|
||||
href: "/learn-from-churn",
|
||||
status: true,
|
||||
icon: CancelSubscriptionIcon,
|
||||
description: "Churn is hard, but insightful. Learn from users who changed their mind.",
|
||||
category: "Increase Revenue",
|
||||
},
|
||||
{
|
||||
name: "Improve Trial CR",
|
||||
href: "/improve-trial-conversion",
|
||||
status: true,
|
||||
icon: BaseballIcon,
|
||||
description: "Take guessing out, convert more trials to paid users with insights.",
|
||||
category: "Increase Revenue",
|
||||
},
|
||||
{
|
||||
name: "Docs Feedback",
|
||||
href: "/docs-feedback",
|
||||
status: true,
|
||||
icon: CodeBookIcon,
|
||||
description: "Clear docs lead to more adoption. Understand granularly what's confusing.",
|
||||
category: "Boost Retention",
|
||||
},
|
||||
{
|
||||
name: "Feature Chaser",
|
||||
href: "/feature-chaser",
|
||||
status: true,
|
||||
icon: DogChaserIcon,
|
||||
description: "Show a survey about a new feature shown only to people who used it.",
|
||||
category: "Boost Retention",
|
||||
},
|
||||
{
|
||||
name: "Feedback Box",
|
||||
href: "/feedback-box",
|
||||
status: true,
|
||||
icon: FeedbackIcon,
|
||||
description: "Give users the chance to share feedback in a single click.",
|
||||
category: "Boost Retention",
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div className=" mx-auto grid grid-cols-1 gap-6 px-2 sm:grid-cols-3">
|
||||
{BestPractices.map((bestPractice) => (
|
||||
<Link href={bestPractice.href} key={bestPractice.name}>
|
||||
<div className="drop-shadow-card duration-120 hover:border-brand-dark relative rounded-lg border border-slate-100 bg-slate-100 p-8 transition-all ease-in-out hover:scale-105 hover:cursor-pointer dark:bg-slate-800">
|
||||
<div
|
||||
className={clsx(
|
||||
// base styles independent what type of button it is
|
||||
"absolute right-10 rounded-full px-3 py-1",
|
||||
// different styles depending on type
|
||||
bestPractice.category === "Boost Retention" &&
|
||||
"bg-pink-100 text-pink-500 dark:bg-pink-800 dark:text-pink-200",
|
||||
bestPractice.category === "Increase Revenue" &&
|
||||
"bg-blue-100 text-blue-500 dark:bg-blue-800 dark:text-blue-200",
|
||||
bestPractice.category === "Understand Users" &&
|
||||
"bg-orange-100 text-orange-500 dark:bg-orange-800 dark:text-orange-200"
|
||||
)}>
|
||||
{bestPractice.category}
|
||||
</div>
|
||||
<div className="h-12 w-12">
|
||||
<bestPractice.icon className="h-12 w-12 " />
|
||||
</div>
|
||||
<h3 className="mb-1 mt-3 text-xl font-bold text-slate-700 dark:text-slate-200">
|
||||
{bestPractice.name}
|
||||
</h3>
|
||||
<p className="text-sm text-slate-600 dark:text-slate-400">{bestPractice.description}</p>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,71 +1,7 @@
|
||||
import { Button } from "@formbricks/ui";
|
||||
import {
|
||||
AngryBirdRageIcon,
|
||||
CancelSubscriptionIcon,
|
||||
DogChaserIcon,
|
||||
DoorIcon,
|
||||
FeedbackIcon,
|
||||
InterviewPromptIcon,
|
||||
OnboardingIcon,
|
||||
PMFIcon,
|
||||
} from "@formbricks/ui";
|
||||
import clsx from "clsx";
|
||||
import { usePlausible } from "next-plausible";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
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 don’t work. Trigger this rage click survey to catch users in rage.",
|
||||
category: "Retain Users",
|
||||
icon: AngryBirdRageIcon,
|
||||
},
|
||||
];
|
||||
import BestPracticeNavigation from "./BestPracticeNavigation";
|
||||
|
||||
export default function InsightOppos() {
|
||||
const plausible = usePlausible();
|
||||
@@ -83,40 +19,9 @@ export default function InsightOppos() {
|
||||
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) => {
|
||||
const IconComponent: React.ElementType = bestPractice.icon;
|
||||
return (
|
||||
<div
|
||||
key={bestPractice.title}
|
||||
className="drop-shadow-card duration-120 relative 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 px-3 py-1",
|
||||
// different styles depending on type
|
||||
bestPractice.category === "Boost Retention" &&
|
||||
"bg-pink-100 text-pink-500 dark:bg-pink-800 dark:text-pink-200",
|
||||
bestPractice.category === "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">
|
||||
<IconComponent className="h-12 w-12 " />
|
||||
</div>
|
||||
<h3 className="mb-1 mt-3 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>
|
||||
|
||||
<BestPracticeNavigation />
|
||||
|
||||
<div className="mx-auto mt-4 w-fit px-4 py-2 text-center">
|
||||
<Button
|
||||
variant="highlight"
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import clsx from "clsx";
|
||||
|
||||
import { Icon } from "@/components/shared/Icon";
|
||||
|
||||
const styles = {
|
||||
note: {
|
||||
container: "bg-slate-50 dark:bg-slate-800/60 dark:ring-1 dark:ring-slate-300/10",
|
||||
container: "bg-slate-100 dark:bg-slate-800/60 dark:ring-1 dark:ring-slate-300/10",
|
||||
title: "text-slate-900 dark:text-slate-400",
|
||||
body: "text-slate-800 [--tw-prose-background:theme(colors.slate.50)] prose-a:text-slate-900 prose-code:text-slate-900 dark:text-slate-300 dark:prose-code:text-slate-300",
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@ export default function EarlyBirdDeal() {
|
||||
</h2>
|
||||
<h2 className="text-xl font-semibold tracking-tight text-slate-200 sm:text-lg">
|
||||
Limited deal: Only{" "}
|
||||
<span className="bg- rounded-sm bg-slate-200/40 px-2 py-0.5 text-slate-100">17</span> left.
|
||||
<span className="bg- rounded-sm bg-slate-200/40 px-2 py-0.5 text-slate-100">14</span> left.
|
||||
</h2>
|
||||
|
||||
<div className="mt-6">
|
||||
|
||||
@@ -5,6 +5,7 @@ const navigation = {
|
||||
other: [
|
||||
{ name: "Community", href: "/community", status: true },
|
||||
{ name: "Blog", href: "/blog", status: true },
|
||||
{ name: "OSS Friends", href: "/oss-friends", status: true },
|
||||
{ name: "GDPR FAQ", href: "/gdpr", status: true },
|
||||
{ name: "GDPR Guide", href: "/gdpr-guide", status: true },
|
||||
],
|
||||
@@ -47,13 +48,13 @@ export default function Footer() {
|
||||
<span className="sr-only">Formbricks</span>
|
||||
<FooterLogo className="mx-auto h-8 w-auto sm:h-10" />
|
||||
</Link>
|
||||
<p className="text-base text-slate-500 dark:text-slate-400">Experience Management for B2B SaaS</p>
|
||||
<p className="text-base text-slate-500 dark:text-slate-400">Privacy-first Experience Management</p>
|
||||
<div className="border-slate-500">
|
||||
<p className="text-sm text-slate-400 dark:text-slate-500">
|
||||
© 2022. All rights reserved.
|
||||
<br />
|
||||
<Link href="/imprint">Imprint</Link> | <Link href="/privacy">Privacy Policy</Link> |{" "}
|
||||
<Link href="/terms">Terms</Link>
|
||||
<Link href="/terms">Terms</Link> | <Link href="/oss-friends">OSS Friends</Link>
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex justify-center space-x-6">
|
||||
|
||||
@@ -1,17 +1,102 @@
|
||||
import { Button } from "@formbricks/ui";
|
||||
import GitHubMarkWhite from "@/images/github-mark-white.svg";
|
||||
import GitHubMarkDark from "@/images/github-mark.svg";
|
||||
import {
|
||||
BaseballIcon,
|
||||
Button,
|
||||
CancelSubscriptionIcon,
|
||||
CodeBookIcon,
|
||||
DogChaserIcon,
|
||||
FeedbackIcon,
|
||||
InterviewPromptIcon,
|
||||
OnboardingIcon,
|
||||
PMFIcon,
|
||||
} from "@formbricks/ui";
|
||||
import { Popover, Transition } from "@headlessui/react";
|
||||
import { Bars3Icon, XMarkIcon } from "@heroicons/react/24/outline";
|
||||
import { StarIcon } from "@heroicons/react/24/solid";
|
||||
import { Bars3Icon, ChevronDownIcon, ChevronRightIcon, XMarkIcon } from "@heroicons/react/24/outline";
|
||||
import clsx from "clsx";
|
||||
import { usePlausible } from "next-plausible";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import { Fragment } from "react";
|
||||
import { Fragment, useState } from "react";
|
||||
import { FooterLogo } from "./Logo";
|
||||
import { ThemeSelector } from "./ThemeSelector";
|
||||
|
||||
function GitHubIcon(props: any) {
|
||||
return (
|
||||
<svg aria-hidden="true" viewBox="0 0 16 16" {...props}>
|
||||
<path d="M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
const UnderstandUsers = [
|
||||
{
|
||||
name: "Interview Prompt",
|
||||
href: "/interview-prompt",
|
||||
status: true,
|
||||
icon: InterviewPromptIcon,
|
||||
description: "Interview invites on auto-pilot",
|
||||
},
|
||||
{
|
||||
name: "Measure PMF",
|
||||
href: "/measure-product-market-fit",
|
||||
status: true,
|
||||
icon: PMFIcon,
|
||||
description: "Improve Product-Market Fit",
|
||||
},
|
||||
{
|
||||
name: "Onboarding Segments",
|
||||
href: "/onboarding-segmentation",
|
||||
status: true,
|
||||
icon: OnboardingIcon,
|
||||
description: "Get it right from the start",
|
||||
},
|
||||
];
|
||||
|
||||
const IncreaseRevenue = [
|
||||
{
|
||||
name: "Learn from Churn",
|
||||
href: "/learn-from-churn",
|
||||
status: true,
|
||||
icon: CancelSubscriptionIcon,
|
||||
description: "Churn is hard, but insightful",
|
||||
},
|
||||
{
|
||||
name: "Improve Trial CR",
|
||||
href: "/improve-trial-conversion",
|
||||
status: true,
|
||||
icon: BaseballIcon,
|
||||
description: "Take guessing out, hit it right",
|
||||
},
|
||||
];
|
||||
|
||||
const BoostRetention = [
|
||||
{
|
||||
name: "Feedback Box",
|
||||
href: "/feedback-box",
|
||||
status: true,
|
||||
icon: FeedbackIcon,
|
||||
description: "Always keep an ear open",
|
||||
},
|
||||
{
|
||||
name: "Docs Feedback",
|
||||
href: "/docs-feedback",
|
||||
status: true,
|
||||
icon: CodeBookIcon,
|
||||
description: "Clear docs, more adoption",
|
||||
},
|
||||
{
|
||||
name: "Feature Chaser",
|
||||
href: "/feature-chaser",
|
||||
status: true,
|
||||
icon: DogChaserIcon,
|
||||
description: "Follow up, improve",
|
||||
},
|
||||
];
|
||||
|
||||
export default function Header() {
|
||||
/*
|
||||
const [videoModal, setVideoModal] = useState(false); */
|
||||
const [mobileSubOpen, setMobileSubOpen] = useState(false);
|
||||
const plausible = usePlausible();
|
||||
const router = useRouter();
|
||||
return (
|
||||
@@ -30,12 +115,140 @@ export default function Header() {
|
||||
</Popover.Button>
|
||||
</div>
|
||||
<Popover.Group as="nav" className="hidden space-x-10 md:flex">
|
||||
<Link
|
||||
<Popover className="relative">
|
||||
{({ open }) => (
|
||||
<>
|
||||
<Popover.Button
|
||||
className={clsx(
|
||||
open
|
||||
? "text-slate-600 dark:text-slate-400 "
|
||||
: "text-slate-400 hover:text-slate-900 dark:hover:text-slate-100",
|
||||
"group inline-flex items-center rounded-md text-base font-medium hover:text-slate-300 focus:outline-none focus:ring-2 focus:ring-teal-500 focus:ring-offset-2 dark:hover:text-slate-50"
|
||||
)}>
|
||||
<span>Best Practices</span>
|
||||
<ChevronDownIcon
|
||||
className={clsx(
|
||||
open ? "text-slate-600" : "text-slate-400",
|
||||
"ml-2 h-5 w-5 group-hover:text-slate-500"
|
||||
)}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</Popover.Button>
|
||||
|
||||
<Transition
|
||||
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 -ml-4 mt-3 w-screen max-w-lg transform lg:left-1/2 lg:ml-0 lg:max-w-4xl lg:-translate-x-1/2">
|
||||
<div className="overflow-hidden rounded-lg shadow-lg ring-1 ring-black ring-opacity-5">
|
||||
<div className="relative grid gap-6 bg-white px-5 py-6 dark:bg-slate-700 sm:gap-6 sm:p-8 lg:grid-cols-3">
|
||||
<div>
|
||||
<h4 className="mb-6 ml-16 text-sm text-slate-400 dark:text-slate-300">
|
||||
Understand Users
|
||||
</h4>
|
||||
{UnderstandUsers.map((brick) => (
|
||||
<Link
|
||||
key={brick.name}
|
||||
href={brick.href}
|
||||
className={clsx(
|
||||
brick.status
|
||||
? "cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-600"
|
||||
: "cursor-default",
|
||||
"-m-3 flex items-start rounded-lg p-3 py-4"
|
||||
)}>
|
||||
<div className="flex h-10 w-10 flex-shrink-0 items-center justify-center text-teal-500 sm:h-12 sm:w-12">
|
||||
<brick.icon className="h-6 w-6" aria-hidden="true" />
|
||||
</div>
|
||||
<div className="ml-4">
|
||||
<p
|
||||
className={clsx(
|
||||
brick.status ? "text-slate-900 dark:text-slate-100" : "text-slate-400",
|
||||
"font-semibold"
|
||||
)}>
|
||||
{brick.name}
|
||||
</p>
|
||||
<p className="mt-0.5 text-xs text-slate-400">{brick.description}</p>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
<div>
|
||||
<h4 className="mb-6 ml-16 text-sm text-slate-400 dark:text-slate-300">
|
||||
Increase Revenue
|
||||
</h4>
|
||||
{IncreaseRevenue.map((brick) => (
|
||||
<Link
|
||||
key={brick.name}
|
||||
href={brick.href}
|
||||
className={clsx(
|
||||
brick.status
|
||||
? "cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-600"
|
||||
: "cursor-default",
|
||||
"-m-3 flex items-start rounded-lg p-3 py-4"
|
||||
)}>
|
||||
<div className="flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md text-teal-500 sm:h-12 sm:w-12">
|
||||
<brick.icon className="h-6 w-6" aria-hidden="true" />
|
||||
</div>
|
||||
<div className="ml-4">
|
||||
<p
|
||||
className={clsx(
|
||||
brick.status ? "text-slate-900 dark:text-slate-100" : "text-slate-400",
|
||||
" font-semibold"
|
||||
)}>
|
||||
{brick.name}
|
||||
</p>
|
||||
<p className="mt-0.5 text-xs text-slate-400">{brick.description}</p>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
<div>
|
||||
<h4 className="mb-6 ml-16 text-sm text-slate-400 dark:text-slate-300">
|
||||
Boost Retention
|
||||
</h4>
|
||||
{BoostRetention.map((brick) => (
|
||||
<Link
|
||||
key={brick.name}
|
||||
href={brick.href}
|
||||
className={clsx(
|
||||
brick.status
|
||||
? "cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-600"
|
||||
: "cursor-default",
|
||||
"-m-3 flex items-start rounded-lg p-3 py-4"
|
||||
)}>
|
||||
<div className="flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md text-teal-500 sm:h-12 sm:w-12">
|
||||
<brick.icon className="h-6 w-6" aria-hidden="true" />
|
||||
</div>
|
||||
<div className="ml-4">
|
||||
<p
|
||||
className={clsx(
|
||||
brick.status ? "text-slate-900 dark:text-slate-100" : "text-slate-400",
|
||||
" font-semibold"
|
||||
)}>
|
||||
{brick.name}
|
||||
</p>
|
||||
<p className="mt-0.5 text-xs text-slate-400">{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="https://formbricks.com/#pricing"
|
||||
className="text-base font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300">
|
||||
@@ -49,7 +262,18 @@ export default function Header() {
|
||||
<Link
|
||||
href="/blog"
|
||||
className="text-base font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300">
|
||||
Blog{/* <p className="bg-brand inline rounded-full px-2 text-xs text-white">1</p> */}
|
||||
Blog {/* <p className="bg-brand inline rounded-full px-2 text-xs text-white">1</p> */}
|
||||
</Link>
|
||||
{/* <Link
|
||||
href="/careers"
|
||||
className="text-base font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300">
|
||||
Careers <p className="bg-brand inline rounded-full px-2 text-xs text-white">2</p>
|
||||
</Link> */}
|
||||
|
||||
<Link
|
||||
href="/concierge"
|
||||
className="text-base font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300">
|
||||
Concierge
|
||||
</Link>
|
||||
</Popover.Group>
|
||||
<div className="hidden flex-1 items-center justify-end md:flex">
|
||||
@@ -59,21 +283,24 @@ export default function Header() {
|
||||
className="group px-2"
|
||||
href="https://formbricks.com/github"
|
||||
target="_blank">
|
||||
<StarIcon className="h-6 w-6 text-amber-500 group-hover:text-amber-400" />
|
||||
<Image
|
||||
src={GitHubMarkDark}
|
||||
alt="GitHub Sponsors Formbricks badge"
|
||||
width={24}
|
||||
className="block dark:hidden"
|
||||
/>
|
||||
<Image
|
||||
src={GitHubMarkWhite}
|
||||
alt="GitHub Sponsors Formbricks badge"
|
||||
width={24}
|
||||
className="hidden dark:block"
|
||||
/>
|
||||
</Button>
|
||||
{/* <Button variant="secondary" className="ml-2 px-2" onClick={() => setVideoModal(true)}>
|
||||
<VideoWalkThrough open={videoModal} setOpen={() => setVideoModal(false)} />
|
||||
<PlayCircleIcon className="h-6 w-6" />
|
||||
</Button> */}
|
||||
|
||||
{/* <Button
|
||||
variant="secondary"
|
||||
EndIcon={GitHubIcon}
|
||||
endIconClassName="fill-slate-800 ml-2 dark:fill-slate-200"
|
||||
href="https://github.com/formbricks/formbricks"
|
||||
target="_blank">
|
||||
View on Github
|
||||
</Button> */}
|
||||
<Button
|
||||
variant="highlight"
|
||||
className="ml-2"
|
||||
@@ -81,7 +308,7 @@ export default function Header() {
|
||||
router.push("https://app.formbricks.com");
|
||||
plausible("NavBar_CTA_Login");
|
||||
}}>
|
||||
Login
|
||||
Go to app
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -113,17 +340,46 @@ export default function Header() {
|
||||
</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>
|
||||
<div>
|
||||
{mobileSubOpen ? (
|
||||
<ChevronDownIcon className="mr-2 inline h-4 w-4" />
|
||||
) : (
|
||||
<ChevronRightIcon className="mr-2 inline h-4 w-4" />
|
||||
)}
|
||||
<button onClick={() => setMobileSubOpen(!mobileSubOpen)}>Best Practices</button>
|
||||
</div>
|
||||
{mobileSubOpen && (
|
||||
<div className="flex flex-col space-y-5 text-center text-sm dark:text-slate-300">
|
||||
{UnderstandUsers.map((brick) => (
|
||||
<Link href={brick.href} key={brick.name} className="font-semibold">
|
||||
{brick.name}
|
||||
</Link>
|
||||
))}
|
||||
{IncreaseRevenue.map((brick) => (
|
||||
<Link href={brick.href} key={brick.name} className="font-semibold">
|
||||
{brick.name}
|
||||
</Link>
|
||||
))}
|
||||
{BoostRetention.map((brick) => (
|
||||
<Link href={brick.href} key={brick.name} className="font-semibold">
|
||||
{brick.name}
|
||||
</Link>
|
||||
))}
|
||||
<hr className="mx-20 my-6 opacity-25" />
|
||||
</div>
|
||||
)}
|
||||
<Link href="/concierge">Concierge</Link>
|
||||
<Link href="#pricing">Pricing</Link>
|
||||
<Link href="/docs">Docs</Link>
|
||||
<Link href="/blog">Blog</Link>
|
||||
{/* <Button
|
||||
{/* <Link href="/careers">Careers</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>
|
||||
<Button
|
||||
variant="primary"
|
||||
onClick={() => router.push("https://app.formbricks.com/auth/signup")}
|
||||
|
||||
@@ -10,7 +10,7 @@ export default function HeaderLight() {
|
||||
const router = useRouter();
|
||||
return (
|
||||
<Popover className="relative" as="header">
|
||||
<div className=" max-w-8xl mx-auto flex items-center justify-between py-6 sm:px-2 md:justify-start lg:px-8 xl:px-12 ">
|
||||
<div className="mx-auto flex items-center justify-between py-6 sm:px-2 md:justify-start lg:px-8 xl:px-12 ">
|
||||
<div className="flex w-0 flex-1 justify-start">
|
||||
<Link href="/">
|
||||
<span className="sr-only">Formbricks</span>
|
||||
@@ -34,7 +34,7 @@ export default function HeaderLight() {
|
||||
router.push("https://app.formbricks.com/auth/signup");
|
||||
plausible("Demo_CTA_TryForFree");
|
||||
}}>
|
||||
Create surveys for free
|
||||
Start for free
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,7 +14,7 @@ export default function Layout({ title, description, children }: LayoutProps) {
|
||||
<MetaInformation title={title} description={description} />
|
||||
<HeaderLight />
|
||||
{
|
||||
<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">
|
||||
<main className="relative mx-auto mb-auto flex w-full flex-col justify-center sm:px-2 lg:px-8 xl:px-12">
|
||||
{children}
|
||||
</main>
|
||||
}
|
||||
|
||||
@@ -11,9 +11,11 @@ interface NavigationProps {
|
||||
}[];
|
||||
}[];
|
||||
className: string;
|
||||
preserveScroll: () => void;
|
||||
linkRef: React.RefObject<HTMLLIElement>;
|
||||
}
|
||||
|
||||
export function Navigation({ navigation, className }: NavigationProps) {
|
||||
export function Navigation({ navigation, className, preserveScroll, linkRef }: NavigationProps) {
|
||||
let router = useRouter();
|
||||
|
||||
return (
|
||||
@@ -26,8 +28,9 @@ export function Navigation({ navigation, className }: NavigationProps) {
|
||||
role="list"
|
||||
className="mt-2 space-y-2 border-l-2 border-slate-100 dark:border-slate-800 lg:mt-4 lg:space-y-4 lg:border-slate-200">
|
||||
{section.links.map((link) => (
|
||||
<li key={link.href} className="relative">
|
||||
<li key={link.href} className="relative" ref={linkRef}>
|
||||
<Link
|
||||
onClick={preserveScroll}
|
||||
href={link.href}
|
||||
className={clsx(
|
||||
"block w-full pl-3.5 before:pointer-events-none before:absolute before:-left-1 before:top-1/2 before:h-1.5 before:w-1.5 before:-translate-y-1/2 before:rounded-full",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Button } from "@formbricks/ui";
|
||||
import clsx from "clsx";
|
||||
import EarlyBirdDeal from "./EarlyBirdDeal";
|
||||
import HeadingCentered from "./HeadingCentered";
|
||||
import { CheckIcon } from "@heroicons/react/24/outline";
|
||||
import { usePlausible } from "next-plausible";
|
||||
@@ -16,7 +15,7 @@ const tiers = [
|
||||
highlight: false,
|
||||
description: "Host Formbricks on your own server.",
|
||||
features: [
|
||||
"All Free feautres",
|
||||
"All Free features",
|
||||
"Easy self-hosting (Docker)",
|
||||
"Unlimited surveys",
|
||||
"Unlimited responses",
|
||||
@@ -38,6 +37,7 @@ const tiers = [
|
||||
features: [
|
||||
"Unlimited surveys",
|
||||
"Unlimited team members",
|
||||
"Remove branding",
|
||||
"Granular targeting",
|
||||
"In-product surveys",
|
||||
"Link surveys",
|
||||
@@ -55,11 +55,11 @@ const tiers = [
|
||||
priceMonthly: "$99",
|
||||
paymentRythm: "/month",
|
||||
button: "secondary",
|
||||
discounted: true,
|
||||
discounted: false,
|
||||
highlight: false,
|
||||
description: "All features included. Unlimited usage.",
|
||||
features: ["All features of Free plan", "Unlimited responses", "Remove branding"],
|
||||
ctaName: "Sign up now",
|
||||
features: ["Unlimited responses per survey"],
|
||||
ctaName: "Start for free",
|
||||
plausibleGoal: "Pricing_CTA_ProPlan",
|
||||
},
|
||||
];
|
||||
@@ -99,8 +99,8 @@ export default function Pricing() {
|
||||
<ul className="mt-4 space-y-4">
|
||||
{tier.features.map((feature, index) => (
|
||||
<li key={index} className="flex items-start">
|
||||
<div className="rounded-full border border-green-300 bg-green-100 p-0.5 dark:bg-green-800">
|
||||
<CheckIcon className="h-5 w-5 p-0.5 text-green-500 dark:text-green-400" />
|
||||
<div className="rounded-full border border-green-300 bg-green-100 p-0.5 dark:border-green-600 dark:bg-green-900">
|
||||
<CheckIcon className="h-5 w-5 p-0.5 text-green-500 dark:text-green-300" />
|
||||
</div>
|
||||
<span className="ml-2 text-sm text-slate-500 dark:text-slate-400">{feature}</span>
|
||||
</li>
|
||||
@@ -146,7 +146,7 @@ export default function Pricing() {
|
||||
{tier.ctaName}
|
||||
</Button>
|
||||
|
||||
{tier.name === "Free" && (
|
||||
{tier.name !== "Self-hosting" && (
|
||||
<p className="mt-1.5 text-center text-xs text-slate-500">No Creditcard required.</p>
|
||||
)}
|
||||
</div>
|
||||
@@ -154,9 +154,6 @@ export default function Pricing() {
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="mx-auto max-w-7xl sm:px-6 lg:px-8">
|
||||
<EarlyBirdDeal />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
29
apps/formbricks-com/components/shared/UseCaseCTA.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { Button } from "@formbricks/ui";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
interface UseCaseCTAProps {
|
||||
href: string;
|
||||
}
|
||||
|
||||
export default function UseCaseHeader({ href }: UseCaseCTAProps) {
|
||||
/* const plausible = usePlausible(); */
|
||||
const router = useRouter();
|
||||
return (
|
||||
<div className="my-8 flex space-x-2 whitespace-nowrap">
|
||||
<Button variant="secondary" href={href}>
|
||||
Step-by-step manual
|
||||
</Button>
|
||||
<div className="space-y-1 text-center">
|
||||
<Button
|
||||
variant="darkCTA"
|
||||
onClick={() => {
|
||||
router.push("https://app.formbricks.com/auth/signup");
|
||||
/* plausible("BestPractice_SubPage_CTA_TryItNow"); */
|
||||
}}>
|
||||
Try it now
|
||||
</Button>
|
||||
<p className="text-xs text-slate-400">It's free</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
26
apps/formbricks-com/components/shared/UseCaseHeader.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
interface UseCaseHeaderProps {
|
||||
title: string;
|
||||
|
||||
difficulty: string;
|
||||
setupMinutes: string;
|
||||
}
|
||||
|
||||
export default function UseCaseHeader({ title, difficulty, setupMinutes }: UseCaseHeaderProps) {
|
||||
return (
|
||||
<div>
|
||||
<div className="mb-4 flex-wrap space-y-2">
|
||||
<h1 className="mb-2 inline whitespace-nowrap pr-4 text-3xl font-semibold text-slate-800 dark:text-slate-200 ">
|
||||
{title}
|
||||
</h1>
|
||||
<div className="inline-flex items-center justify-center whitespace-nowrap ">
|
||||
<div className="rounded-full bg-indigo-200 px-4 py-1 text-sm text-indigo-700 dark:bg-indigo-800 dark:text-indigo-200 ">
|
||||
{difficulty}
|
||||
</div>
|
||||
<div className="ml-2 rounded-full bg-slate-300 px-4 py-1 text-sm text-slate-700 dark:bg-slate-700 dark:text-slate-200 ">
|
||||
{setupMinutes} minutes
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 17 KiB |
79
apps/formbricks-com/lib/cleanHtml.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
/*!
|
||||
* Sanitize an HTML string
|
||||
* (c) 2021 Chris Ferdinandi, MIT License, https://gomakethings.com
|
||||
* @param {String} str The HTML string to sanitize
|
||||
* @return {String} The sanitized string
|
||||
*/
|
||||
export function cleanHtml(str: string): string {
|
||||
/**
|
||||
* Convert the string to an HTML document
|
||||
* @return {Node} An HTML document
|
||||
*/
|
||||
function stringToHTML() {
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString(str, "text/html");
|
||||
return doc.body || document.createElement("body");
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove <script> elements
|
||||
* @param {Node} html The HTML
|
||||
*/
|
||||
function removeScripts(html) {
|
||||
let scripts = html.querySelectorAll("script");
|
||||
for (let script of scripts) {
|
||||
script.remove();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the attribute is potentially dangerous
|
||||
* @param {String} name The attribute name
|
||||
* @param {String} value The attribute value
|
||||
* @return {Boolean} If true, the attribute is potentially dangerous
|
||||
*/
|
||||
function isPossiblyDangerous(name, value) {
|
||||
let val = value.replace(/\s+/g, "").toLowerCase();
|
||||
if (["src", "href", "xlink:href"].includes(name)) {
|
||||
if (val.includes("javascript:") || val.includes("data:")) return true;
|
||||
}
|
||||
if (name.startsWith("on")) return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove potentially dangerous attributes from an element
|
||||
* @param {Node} elem The element
|
||||
*/
|
||||
function removeAttributes(elem) {
|
||||
// Loop through each attribute
|
||||
// If it's dangerous, remove it
|
||||
let atts = elem.attributes;
|
||||
for (let { name, value } of atts) {
|
||||
if (!isPossiblyDangerous(name, value)) continue;
|
||||
elem.removeAttribute(name);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove dangerous stuff from the HTML document's nodes
|
||||
* @param {Node} html The HTML document
|
||||
*/
|
||||
function clean(html) {
|
||||
let nodes = html.children;
|
||||
for (let node of nodes) {
|
||||
removeAttributes(node);
|
||||
clean(node);
|
||||
}
|
||||
}
|
||||
|
||||
// Convert the string to HTML
|
||||
let html = stringToHTML();
|
||||
|
||||
// Sanitize it
|
||||
removeScripts(html);
|
||||
clean(html);
|
||||
|
||||
// If the user wants HTML nodes back, return them
|
||||
// Otherwise, pass a sanitized string back
|
||||
return html.innerHTML;
|
||||
}
|
||||
@@ -11,18 +11,11 @@ const navigation = [
|
||||
title: "Getting Started",
|
||||
links: [
|
||||
{ title: "Quickstart", href: "/docs/getting-started/quickstart" },
|
||||
{ title: "Setup with Next.js", href: "/docs/getting-started/nextjs" },
|
||||
{ title: "Next.js App Dir", href: "/docs/getting-started/nextjs-app" },
|
||||
{ title: "Next.js Pages Dir", href: "/docs/getting-started/nextjs-pages" },
|
||||
{ title: "Setup with Vue.js", href: "/docs/getting-started/vuejs" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Best Practices",
|
||||
links: [
|
||||
/* { title: "Feedback Box", href: "/docs/best-practices/feedback-box" }, */
|
||||
{ title: "Docs Feedback", href: "/docs/best-practices/docs-feedback" },
|
||||
/* { title: "In-app Interview Prompt", href: "/docs/best-practices/interview-prompt" }, */
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Attributes",
|
||||
links: [
|
||||
@@ -39,6 +32,29 @@ const navigation = [
|
||||
{ title: "Code Actions", href: "/docs/actions/code" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Best Practices",
|
||||
links: [
|
||||
{ title: "Learn from Churn", href: "/docs/best-practices/cancel-subscription" },
|
||||
{ title: "Interview Prompt", href: "/docs/best-practices/interview-prompt" },
|
||||
{ title: "Product-Market Fit", href: "/docs/best-practices/pmf-survey" },
|
||||
{ title: "Trial Conversion", href: "/docs/best-practices/improve-trial-cr" },
|
||||
{ title: "Feature Chaser", href: "/docs/best-practices/feature-chaser" },
|
||||
{ title: "Feedback Box", href: "/docs/best-practices/feedback-box" },
|
||||
{ title: "Docs Feedback", href: "/docs/best-practices/docs-feedback" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Integrations",
|
||||
links: [{ title: "Zapier", href: "/docs/integrations/zapier" }],
|
||||
},
|
||||
{
|
||||
title: "Link Surveys",
|
||||
links: [
|
||||
{ title: "Data Prefilling", href: "/docs/link-surveys/data-prefilling" },
|
||||
{ title: "User Identification", href: "/docs/link-surveys/user-identification" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "API",
|
||||
links: [
|
||||
@@ -49,8 +65,20 @@ const navigation = [
|
||||
{
|
||||
title: "Client API",
|
||||
links: [
|
||||
{ title: "Create Response", href: "/docs/api/create-response" },
|
||||
{ title: "Update Response", href: "/docs/api/update-response" },
|
||||
{ title: "Overview", href: "/docs/client-api/overview" },
|
||||
{ title: "Create Response", href: "/docs/client-api/create-response" },
|
||||
{ title: "Update Response", href: "/docs/client-api/update-response" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Webhook API",
|
||||
links: [
|
||||
{ title: "Overview", href: "/docs/webhook-api/overview" },
|
||||
{ title: "List Webhooks", href: "/docs/webhook-api/list-webhooks" },
|
||||
{ title: "Get Webhook", href: "/docs/webhook-api/get-webhook" },
|
||||
{ title: "Create Webhook", href: "/docs/webhook-api/create-webhook" },
|
||||
{ title: "Delete Webhook", href: "/docs/webhook-api/delete-webhook" },
|
||||
{ title: "Webhook Payload", href: "/docs/webhook-api/webhook-payload" },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -62,6 +90,8 @@ const navigation = [
|
||||
links: [
|
||||
{ title: "Introduction", href: "/docs/contributing/introduction" },
|
||||
{ title: "Setup Dev Environment", href: "/docs/contributing/setup" },
|
||||
{ title: "Demo App", href: "/docs/contributing/demo" },
|
||||
{ title: "Troubleshooting", href: "/docs/contributing/troubleshooting" },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -8,7 +8,7 @@ import rehypePrism from "@mapbox/rehype-prism";
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
pageExtensions: ["ts", "tsx", "js", "jsx", "md", "mdx"],
|
||||
transpilePackages: ["@formbricks/ui"],
|
||||
transpilePackages: ["@formbricks/ui", "@formbricks/lib"],
|
||||
async redirects() {
|
||||
return [
|
||||
{
|
||||
@@ -26,6 +26,11 @@ const nextConfig = {
|
||||
destination: "https://github.com/formbricks/formbricks",
|
||||
permanent: true,
|
||||
},
|
||||
{
|
||||
source: "/deal",
|
||||
destination: "/concierge",
|
||||
permanent: false,
|
||||
},
|
||||
{
|
||||
source: "/privacy",
|
||||
destination: "/privacy-policy",
|
||||
@@ -41,6 +46,11 @@ const nextConfig = {
|
||||
destination: "/docs/introduction/what-is-formbricks",
|
||||
permanent: true,
|
||||
},
|
||||
{
|
||||
source: "/docs/getting-started/nextjs",
|
||||
destination: "/docs/getting-started/nextjs-app",
|
||||
permanent: true,
|
||||
},
|
||||
{
|
||||
source: "/docs/formbricks-hq/self-hosting",
|
||||
destination: "/docs",
|
||||
|
||||
@@ -11,42 +11,35 @@
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docsearch/react": "^3.3.3",
|
||||
"@calcom/embed-react": "^1.3.0",
|
||||
"@docsearch/react": "^3.5.1",
|
||||
"@formbricks/lib": "workspace:*",
|
||||
"@formbricks/types": "workspace:*",
|
||||
"@formbricks/ui": "workspace:*",
|
||||
"@headlessui/react": "^1.7.14",
|
||||
"@heroicons/react": "^2.0.17",
|
||||
"@headlessui/react": "^1.7.16",
|
||||
"@heroicons/react": "^2.0.18",
|
||||
"@mapbox/rehype-prism": "^0.8.0",
|
||||
"@mdx-js/loader": "^2.3.0",
|
||||
"@mdx-js/react": "^2.3.0",
|
||||
"@next/mdx": "^13.3.0",
|
||||
"add": "^2.0.6",
|
||||
"clsx": "^1.2.1",
|
||||
"lottie-web": "^5.11.0",
|
||||
"next": "13.3.0",
|
||||
"next-plausible": "^3.7.2",
|
||||
"next-sitemap": "^4.0.7",
|
||||
"prism-react-renderer": "^1.3.5",
|
||||
"@next/mdx": "^13.4.12",
|
||||
"@paralleldrive/cuid2": "^2.2.1",
|
||||
"clsx": "^2.0.0",
|
||||
"lottie-web": "^5.12.2",
|
||||
"next": "13.4.12",
|
||||
"next-plausible": "^3.10.1",
|
||||
"next-sitemap": "^4.1.8",
|
||||
"prism-react-renderer": "^2.0.6",
|
||||
"prismjs": "^1.29.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-hook-form": "^7.43.9",
|
||||
"react-icons": "^4.10.1",
|
||||
"react-responsive-embed": "^2.1.0",
|
||||
"remark-gfm": "^3.0.1",
|
||||
"sharp": "^0.32.0"
|
||||
"sharp": "^0.32.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@formbricks/tsconfig": "workspace:*",
|
||||
"@tailwindcss/forms": "^0.5.3",
|
||||
"@tailwindcss/typography": "^0.5.9",
|
||||
"@types/node": "18.15.11",
|
||||
"@types/prismjs": "^1.26.0",
|
||||
"@types/react": "^18.0.35",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"eslint-config-formbricks": "workspace:*",
|
||||
"postcss": "^8.4.22",
|
||||
"rimraf": "^5.0.0",
|
||||
"tailwindcss": "^3.3.1",
|
||||
"typescript": "^5.0.4"
|
||||
"eslint-config-formbricks": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
||||
14
apps/formbricks-com/pages/api/oss-friends/index.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { OSSFriends } from "@/pages/oss-friends";
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
export default async function handle(req: NextApiRequest, res: NextApiResponse) {
|
||||
// GET
|
||||
if (req.method === "GET") {
|
||||
return res.status(200).json({ data: OSSFriends });
|
||||
}
|
||||
|
||||
// Unknown HTTP Method
|
||||
else {
|
||||
throw new Error(`The HTTP ${req.method} method is not supported by this route.`);
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import LimeSurvey from "./free-survey-tool-limesurvey-open-source-software-opens
|
||||
import OpnForm from "./opnform-free-open-source-form-survey-tools-builder-2023-self-hostign.jpg";
|
||||
import HeaderImage from "./2023-title-best-open-source-survey-software-tools-and-alternatives.png";
|
||||
import SurveyJS from "./surveyjs-free-opensource-form-survey-tool-software-to-make-surveys-2023.png";
|
||||
import AuthorBox from "@/components/shared/AuthorBox";
|
||||
|
||||
export const meta = {
|
||||
title: "Best Open-source Form & Survey Tools (still maintained in 2023)",
|
||||
@@ -14,6 +15,8 @@ export const meta = {
|
||||
date: "2023-04-12",
|
||||
};
|
||||
|
||||
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" />
|
||||
|
||||
_Most open-source projects get abandoned after a while. But these 5 open-source form and survey tools are still alive and kicking in 2023._
|
||||
|
||||
<Image
|
||||
|
||||
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 248 KiB |
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,125 @@
|
||||
import Image from "next/image";
|
||||
import LayoutMdx from "@/components/shared/LayoutMdx";
|
||||
import TitleImage from "./formbricks-sponsored-by-github-accelerator-2023.webp";
|
||||
import Demo from "./our-experience-github-acc-demo-screenshot.png";
|
||||
import Mail from "./github-accelerator-selection-mail.png";
|
||||
import Teams from "./github-accelerator-2022-teams.png";
|
||||
import NewsletterSignup from "@/components/shared/NewsletterSignup";
|
||||
import AuthorBox from "@/components/shared/AuthorBox";
|
||||
|
||||
export const meta = {
|
||||
title: "Our GitHub Accelerator Experience 👀",
|
||||
description:
|
||||
"What we learned during the first GitHub Open-Source Accelerator Programm - our experience and if we would do it again.",
|
||||
date: "2023-04-13",
|
||||
};
|
||||
|
||||
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" />
|
||||
|
||||
_We were among the first 20 teams ever to run through the Open-Source Accelerator by Github. Read about our experience and if we would do it again:_
|
||||
|
||||
<Image
|
||||
src={Demo}
|
||||
alt="GitHub sponsors Formbricks to join their open-source accelerator program"
|
||||
className="rounded-lg"
|
||||
/>
|
||||
|
||||
## Hey there,
|
||||
|
||||
In December of last year, we completed a rather brief questionnaire to apply for the inaugural batch of the GitHub Open-Source Accelerator. With not much information available, we went ahead and applied, hoping for the best. The timing couldn't have been more perfect, as both Matti and I had just wrapped up our freelance gigs to start working full-time on Formbricks.
|
||||
|
||||
As Christmas, New Year's Eve, and my birthday passed, we continued working diligently on Formbricks, iterating to pinpoint the right niche offering. Over the preceding months, we had learned what wouldn't constitute a good venture case ([Typeform open-source](https://formbricks.com/blog/open-source-qualtrics-beats-typeform)), what wasn't technically feasible (building blocks for all form and survey solutions), and what was too narrow to start with ([PMF survey only](https://www.producthunt.com/products/product-market-fit-survey-by-formbricks)).
|
||||
|
||||
January and February came and went. On the 22nd of March, we received an email from the GitHub team:
|
||||
|
||||
<Image
|
||||
src={Mail}
|
||||
alt="GitHub invited us to join the GitHub Accelerator and share our experience"
|
||||
className="rounded-lg"
|
||||
/>
|
||||
|
||||
Needless to say, we were thrilled! We were selected from over 1000 open-source projects, alongside renowned and popular projects like [Nuxt](https://github.com/nuxt/nuxt), [TRPC](https://github.com/trpc/trpc), and [Responsively App](https://github.com/responsively-org/responsively-app). Here is a summary of what we got:
|
||||
|
||||
### What we got on paper
|
||||
|
||||
✅ Ten sessions with **well-known** figures from the open-source community (Wednesdays)
|
||||
|
||||
✅ Ten optional co-working sessions (Fridays)
|
||||
|
||||
✅ 20.000 USD equally divided among core maintainers
|
||||
|
||||
✅ One-on-one session with the GitHub team to align on goals and objectives
|
||||
|
||||
### What we also gained
|
||||
|
||||
👌 Network of builders, maintainers, and founders in the open-source space
|
||||
|
||||
👌 Solid connection with GitHub (including a warm introduction to GitHub's venture arm 😏)
|
||||
|
||||
👌 Enhanced credibility in the open-source community, thanks to association with such a significant supporter of open source
|
||||
|
||||
I mean look at all these happy people:
|
||||
|
||||
<Image
|
||||
src={Teams}
|
||||
alt="GitHub invited us to join the GitHub Accelerator and share our experience"
|
||||
className="rounded-lg"
|
||||
/>
|
||||
|
||||
Here's an overview of the ten sessions and their relevance to us as a venture-focused startup:
|
||||
|
||||
**Week 1: Kick-Off, Licensing 101 and setting up with [Abby](https://twitter.com/abbycabs)**
|
||||
|
||||
Great to meet everyone, Abby is a great host and the licensing session was very useful. We had already decided on our license but it was useful nontheless.
|
||||
|
||||
**Week 2: Finding Sponsors with [Caleb Porzio](https://twitter.com/calebporzio)**
|
||||
|
||||
This was a really fun one! Caleb is a driven entrepreneur with many ideas and loooots of experience monetizing his two main projects [Livewire](https://laravel-livewire.com/) and [Alpine.js](https://alpinejs.dev/). Come up with a way to monetize a popular OS project, Caleb scaled it. Not suuuper relevant for us though.
|
||||
|
||||
**Week 3: Taking Funding: [Brian Douglas](https://twitter.com/bdougieYO)**
|
||||
|
||||
Brian is building [OpenSauced](https://opensauced.pizza/) and shared his journey of raising VC as an OS startup. Lots of great insights, Brian is super approachable 😊
|
||||
|
||||
**Week 4: [Evan You](https://evanyou.me/): Sustainable Open Source**
|
||||
|
||||
Evan You famously created Vue.js (which is on track to pass React in GitHub ⭐) and Vite. Evan had a lot of useful Do’s and Dont’s for us, great session!
|
||||
|
||||
**Week 5:** Didn't happen due to Maintainer Summit.
|
||||
|
||||
**Week 6: [Mike Perham](https://github.com/mperham) - Starting a Software Business**
|
||||
|
||||
Mike is an absolute legend! With [SideKiq](https://sidekiq.org/) he makes over 300k USD per month 🤯 He was very open and down to earth. One of his best advice: If a customer annoys you, stop serving them. He was able to pull this off because he has been blogging about Ruby for years and is well-known in the community. And, obviously, his solution kicks ass!
|
||||
|
||||
**Week 7: Duane O’Brien and Dawn Foster: Working with Enterprises**
|
||||
|
||||
Lots of useful insights around how enterprises handle open-source, barriers for corporate use and how to handle corporate sponsorships and donations. The notes will come in really handy down the line!
|
||||
|
||||
**Week 8: [Marko Saric](https://twitter.com/markosaric): SaaS-side of Open Source**
|
||||
|
||||
Marko is the marketing co-founder of [Plausible](https://plausible.io/). I think everyone in the SaaS space knows Plausible since they hit 1M ARR bootstrapped. Marko also blogged a lot about Plausible which really helped it grow in the first years. Gifted marketeer, great session!
|
||||
|
||||
**Week 9: Governance with [Shauna Gordon-McKeon](https://github.com/shaunagm/)**
|
||||
|
||||
For us this wasn’t super relevant as Formbricks is ruled by a BDFL (Benevolent Dictator For Life) i.e. us but the discussion among the teams was really insightful. Helped us a great deal to understand the challenges of purely community-driven projects.
|
||||
|
||||
**Week 10: VC Funding and the legal Side of OSS with [Erica Brescia](https://twitter.com/ericabrescia) from Redpoint**
|
||||
|
||||
Ericas talk was really impressive and so is she: Founder of Bitnami, COO of GitHub and Board Member of the Linux Foundation all happened before she started as an investor at Redpoint Ventures. Her deep insights from both the founder and the VC perspective are invaluable!
|
||||
|
||||
**GitHub Demo Day:** All teams presented what they achieved during the 10 week programm. It was great fun to present Formbricks, [you can watch it on Youtube.](https://www.youtube.com/live/Gj6Bez2182k?feature=share&t=1448)
|
||||
|
||||
## Would we do it again? And should you?
|
||||
|
||||
Yes, absolutely. The sessions were excellent, we met a handful of inspiring builders, and the 20k USD was a helpful financial boost. The application process might evolve, but since all of your code is open-source anyway, you might as well throw your hat in the ring.
|
||||
|
||||
**Gratitude to Kara, Abby, and the entire GitHub team - we learned a lot! 😊**
|
||||
|
||||
<Image
|
||||
src={TitleImage}
|
||||
alt="GitHub sponsors Formbricks to join their open-source accelerator program"
|
||||
className="rounded-lg"
|
||||
/>
|
||||
|
||||
<NewsletterSignup />
|
||||
|
||||
export default ({ children }) => <LayoutMdx meta={meta}>{children}</LayoutMdx>;
|
||||
|
After Width: | Height: | Size: 113 KiB |
@@ -2,6 +2,7 @@ import Image from "next/image";
|
||||
import LayoutMdx from "@/components/shared/LayoutMdx";
|
||||
import TitleImage from "./formbricks-sponsored-by-github-accelerator-2023.webp";
|
||||
import NewsletterSignup from "@/components/shared/NewsletterSignup";
|
||||
import AuthorBox from "@/components/shared/AuthorBox";
|
||||
|
||||
export const meta = {
|
||||
title: "Formbricks Joins GitHub Accelerator's Inaugural Cohort 💃",
|
||||
@@ -10,6 +11,8 @@ export const meta = {
|
||||
date: "2023-04-13",
|
||||
};
|
||||
|
||||
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" />
|
||||
|
||||
_We're getting ready to take our open-source experience management platform to new heights, thanks to being part of the first-ever GitHub Accelerator program!_
|
||||
|
||||
<Image
|
||||
|
||||
@@ -4,6 +4,7 @@ import RobinHoodMeme from "./robin-hood-meme.png";
|
||||
import WhyWeDoIt from "./why-we-do-it.png";
|
||||
import EverythinEverywhereAllAtOnce from "./everything_everywhere_all_at_once.png";
|
||||
import ResponsiveEmbed from "react-responsive-embed";
|
||||
import AuthorBox from "@/components/shared/AuthorBox";
|
||||
|
||||
export const meta = {
|
||||
title: "Open source forms will save the world.",
|
||||
@@ -11,6 +12,8 @@ export const meta = {
|
||||
date: "2022-08-26",
|
||||
};
|
||||
|
||||
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" />
|
||||
|
||||
<Image src={RobinHoodMeme} alt="Robin Hood Meme" className="rounded-lg" />
|
||||
|
||||
_What motivates us to build open source tech in such a crowded space? What do we see what others might not? And how do we understand the relationship between free open source tech and a commercial complement?_
|
||||
|
||||
@@ -9,6 +9,7 @@ import Wrestling from "./wrestling.jpg";
|
||||
import TypeformValue from "./typeform-value-prop.png";
|
||||
import ResponsiveEmbed from "react-responsive-embed";
|
||||
import { Callout } from "@/components/shared/Callout";
|
||||
import AuthorBox from "@/components/shared/AuthorBox";
|
||||
|
||||
export const meta = {
|
||||
title: "Why Qualtrics beats Typeform, especially Open-Source",
|
||||
@@ -17,6 +18,8 @@ export const meta = {
|
||||
date: "2023-03-24",
|
||||
};
|
||||
|
||||
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" />
|
||||
|
||||
<Image src={Wrestling} alt="Why we do it" className="rounded-lg" />
|
||||
|
||||
_In September, we kicked it off with a Typeform open-source alternative. As we build and learn, our focus is shifting. We talk about how we look at form and survey tools today, why experience management not only matters for enterprise and why the endgame looks a lot more like open-source Qualtrics. Qualtrics? What happened to Typeform?_
|
||||
|
||||
|
After Width: | Height: | Size: 6.5 KiB |
@@ -2,6 +2,7 @@ import Image from "next/image";
|
||||
import LayoutMdx from "@/components/shared/LayoutMdx";
|
||||
import HeaderImage from "./formbricks-logo-header-open-source-form-infrastructure.svg";
|
||||
import HeroAnimation from "../../../components/shared/HeroAnimation.tsx";
|
||||
import AuthorBox from "@/components/shared/AuthorBox";
|
||||
|
||||
export const meta = {
|
||||
title: "snoopForms → Formbricks 🎉",
|
||||
@@ -9,6 +10,8 @@ export const meta = {
|
||||
date: "2022-11-07",
|
||||
};
|
||||
|
||||
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" />
|
||||
|
||||
<Image src={HeaderImage} alt="Formbricks - Open Source Forms and Surveys" className="rounded-lg" />
|
||||
|
||||
_It has been quiet in the past weeks, but we didn't spend our days sitting around. Find out what we were up to and where we are taking Formbricks from here._
|
||||
|
||||
|
After Width: | Height: | Size: 11 KiB |
174
apps/formbricks-com/pages/blog/v1-and-how-we-got-here/index.mdx
Normal file
@@ -0,0 +1,174 @@
|
||||
import Image from "next/image";
|
||||
import LayoutMdx from "@/components/shared/LayoutMdx";
|
||||
import { Callout } from "@/components/shared/Callout";
|
||||
import AuthorBox from "@/components/shared/AuthorBox";
|
||||
|
||||
import TweetPeer from "./peer-tweet-typeform-open-source.png";
|
||||
import SnoopForms from "./snoopforms-open-source-typeform-alternative.png";
|
||||
import TwitterResult from "./twitter-results-PMF-cal.png";
|
||||
import EmailResult from "./email-results-PMF-cal.png";
|
||||
import TitleImage from "../github-accelerator-experience/formbricks-sponsored-by-github-accelerator-2023.webp";
|
||||
import PMFDashboard from "./pmf-survey-dashboard.png";
|
||||
import MattiJojo from "./matti-jojo.jpg";
|
||||
|
||||
export const meta = {
|
||||
title: "Formbricks v1 - How we got here 🤸",
|
||||
description:
|
||||
"A lot has happened since Matti and I had a chat about open-source surveys in May last year. The release of Formbricks v1.0 is a perfect opportunity to look back on how it all started.",
|
||||
date: "2023-07-14",
|
||||
};
|
||||
|
||||
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" />
|
||||
|
||||
_A lot has happened since Matti and I had a chat about open-source surveys in May last year. The release of Formbricks v1.0 is a perfect opportunity to look back on how it all started._
|
||||
|
||||
Funnily enough, it started with a tweet:
|
||||
|
||||
<Image
|
||||
src={TweetPeer}
|
||||
alt="Peer tweets about the best open-source Typeform alternative"
|
||||
className="rounded-lg"
|
||||
/>
|
||||
|
||||
When I read this tweet, I was sitting in a WeWork in Mexico City, feeling a bit guilty for being such a cliché digital nomad. Sipping on my decaffeinated matcha with lactose-free goat milk, I slid into Matti's DMs. I knew he had built an open-source survey tool a few months ago and suggested he comment on the tweet. We started chatting.
|
||||
|
||||
Both Matti and I had been freelancing for several months. While the money was good, we missed working on a project of our own. We met a couple of years ago while working on our startups. I had an app and wanted to be GDPR compliant; Matti offered to help out. We've stayed in contact ever since, giving feedback on projects and ideas.
|
||||
|
||||
So we chatted about the opportunity of building a commercial open-source alternative to Typeform. After reading up on the advantages - and challenges - of open-source, we decided to build a side project together: **[snoopForms: The Open-Source Typeform Alternative](https://snoopforms.com/)** 🦝
|
||||
|
||||
<Image
|
||||
src={SnoopForms}
|
||||
alt="SnoopForms was the OS Typeform alternative with a twist"
|
||||
className="rounded-lg"
|
||||
/>
|
||||
|
||||
### **snoopForms and why OS Typeform isn’t a good business**
|
||||
|
||||
We shipped a first version of the product and the landing page and shared it on ProductHunt and HackerNews. It stirred up quite some interest—1.5k people signed up over a few weeks. During the launch, we sold 10 early bird deals for $179 each. We got excited! Is it really that easy?
|
||||
|
||||
Well no, it is not. Apart from the Early Birds (🤍) we attracted a looooooooot of people who liked Typeform, but didn’t want to pay the high price tag. Generally, it's not the best idea to build a product with high competition (100s of survey tools) for a price-sensitive target group. Even data privacy isn’t a good selling point when Jotform offers self-hosting and Typeform is an EU-based company (GDPR). We’ve written **[in-depth](https://formbricks.com/blog/open-source-qualtrics-beats-typeform)** about why we eventually decided to shift our focus away from open-source Typeform.
|
||||
|
||||
Nonetheless, we were hooked on open-source surveys; we just hadn't found the right application yet.
|
||||
|
||||
### **snoopForms → Formbricks, a detour, and going full-time**
|
||||
|
||||
We decided to wrap up our freelance gigs and go in full-time, to find the right angle quicker. We built a MVP for _Building Bricks for Forms and Surveys_, but while the idea made sense, we struggled to build an easy, opionated solution which can be used for several use cases. To help engineers build form and survey applications faster, it needed to pack form creation, form analytics, graphs, data handling, data storage, analysis, integrations, and ways to act on the insights for a variety of use cases 🤷 There's a reason why successful dev tools focus on one of these aspects and do them well. So we kept looking…
|
||||
|
||||
### **Data Processing vs. Experience Management**
|
||||
|
||||
We had talked to and surveyed a lot of people. Zooming out, we saw that there are two applications for forms: data processing and experience management.
|
||||
|
||||
**Data processing** is essentially getting information out of a human brain into a digital system. The focus here lies on high integrability with (legacy) systems, versatility, and a great developer experience. Libraries like React Hook Forms or the more productized form.io fall into this category. While there certainly is a need here, it was a less inspiring field for us, especially after reading how [tedious](https://medium.com/@jgee/what-i-learned-in-two-years-of-moving-government-forms-online-1edc4c2aa089) it can be to bring [legacy](https://medium.com/san-francisco-digital-services/how-to-make-a-form-d1d1b67d95d7) form systems up to speed.
|
||||
|
||||
**Experience Management** on the other hand is a lot more exciting! Helping teams build better products, services, and organizations is a mission both Matti and I could get behind ❤️
|
||||
|
||||
<Callout title="In a nutshell" type="note">
|
||||
Experience Management, in a nutshell, is enabling teams to gather, analyze, and act on qualitative data
|
||||
collected from their users, customers, and employees.
|
||||
</Callout>
|
||||
|
||||
We researched what was out there and talked to more founders. Initially, we wanted to build a solution for a problem we had ourselves: Gathering qualitative insights along the user journey of early adopters. It’s common sense to never launch without analytics, but why does everyone launch without a system to gather qualitative user insights continuously? Mostly, because there's no easy, cheap and quick way to do it (yet).
|
||||
|
||||
### **The Product-Market Fit Survey Tool**
|
||||
|
||||
Following Paul Graham's advice to start with a **[narrow but deep hole](http://paulgraham.com/startupideas.html)**, we narrowed it down to one specific problem every founder has: Measuring Product-Market Fit. Many know the **[article](https://review.firstround.com/how-superhuman-built-an-engine-to-find-product-market-fit)** on how Superhuman built an engine to measure and optimize PMF. However, to run it correctly within your product, you do have to do quite some custom coding. So we decided to offer a solution which works out of the box.
|
||||
|
||||
<Image
|
||||
src={PMFDashboard}
|
||||
alt="Peer tweets about the best open-source Typeform alternative"
|
||||
className="rounded-lg"
|
||||
/>
|
||||
_We built a custom dashboard just to visualize the PMF survey results_
|
||||
|
||||
We shipped an MVP, launched it, and picked up the conversations with the founders who had tried to measure PMF
|
||||
before. We quickly learned this:
|
||||
|
||||
- Our MVP was scoped so rigidly that we had to do quite some custom coding ourselves to get it implemented. Setting it up and maintaining it stood in no relation to the value it provided because…
|
||||
- The PMF survey is for teams that "kinda" have PMF, not for teams which are just starting out. You need a few hundred recurring users in your app to be able to reach statistical significance and run the survey every 3 months without asking anyone twice. For teams who don’t have that, talking to users 1:1 will remain the best way to go.
|
||||
- Founders were reluctant to add another tool just for one survey and purpose.
|
||||
|
||||
After the rather disappointing launch of the PMF survey tool, we hit a low. The excitement about the initial snoopForm traction had passed. Since November, we had been working full-time for four months iterating on different products in the forms and survey space, and it didn’t feel like we made much progress. But that wasn’t really true.
|
||||
|
||||
### **"The essence of strategy is choosing what not to do.”**
|
||||
|
||||
It was quite a journey since Matti wrote the first line of code in July last year. Even though it didn’t _feel_ like much progress, we had learned a lot. Most importantly, we knew what **not** to build.
|
||||
|
||||
With snoopForms, we learned that there is a latent need for an open-source standalone survey tool, with a Typeform-like feature set: It’s a great opportunity to build a community and **not** a great business opportunity. The PMF survey tool taught us about the needs of early-stage teams and that surveys are **not** the best solution to their problems. However, they do need some form to gather qualitative feedback and a smooth way to work with it 😏
|
||||
|
||||
We took everything we knew and wrote a Masterplan. And then we sat down coded.
|
||||
|
||||
### **Open-source in-product surveys**
|
||||
|
||||
March and the first half of April flew by as we hacked together the MVP of what Formbricks is today: A tool which enables teams to target specific segments of their user base with versatile micro-surveys. Matti solved some tricky technical challenges around the Formbricks Widget and shipped the backend. ChatGPT and I warmed up with next.js and built frontend. Seeing the product come together was fun and felt like progress - exactly what we needed!
|
||||
|
||||
<Image
|
||||
src={TitleImage}
|
||||
alt="GitHub sponsors Formbricks to join their open-source accelerator program"
|
||||
className="rounded-lg"
|
||||
/>
|
||||
|
||||
A welcomed motivator came in the form of an email from GitHub: We we were chosen to take part in the first-ever batch of the GitHub Open-Source Accelerator! It was a really fun programme and we learned a lot! You can read about our experience [here.](https://formbricks.com/blog/github-accelerator-experience)
|
||||
|
||||
### **On the right track 🚆**
|
||||
|
||||
Once we were ready to share our MVP with the world, we knew we were on the right track! The feedback was really good and usage picked up right from the start. One morning we woke up to our analytics dashboard showing thousands of survey displays with 500+ responses in the past couple of hours! This is when we knew we’re onto something 🚀
|
||||
|
||||
A couple of weeks later, Peer from [Cal.com](http://Cal.com) came back to northern Germany to visit his family and friends. We hung out in the co-working space, where he did his first steps as an entrepreneur. As we were chatting about how to separate opinion from experience, Peer decided to shoot an email with a survey to the 12k most active users of Cal.com. A few days before, he asked his Twitter following the PMF question:
|
||||
|
||||
<Image
|
||||
src={TwitterResult}
|
||||
alt="SnoopForms was the OS Typeform alternative with a twist"
|
||||
className="rounded-lg"
|
||||
/>
|
||||
|
||||
We wanted to compare how the publicly asked survey (Twitter) compared to a survey among the community of users. The results were eye-opening:
|
||||
|
||||
<Image
|
||||
src={EmailResult}
|
||||
alt="SnoopForms was the OS Typeform alternative with a twist"
|
||||
className="rounded-lg"
|
||||
/>
|
||||
_Anything above 40% is considered PMF, 60% is 🔥🔥🔥_
|
||||
|
||||
For us, this was not only a good test for our system but it was a great example that Experience Management does not only happen within apps, but on several touch points right from the start. If we want to offer a solution which can comprehensively measure and evaluate experiences, it cannot be confined to in-product surveys for too long.
|
||||
|
||||
### **Typeform sneaking back in?**
|
||||
|
||||
Given our early traction with snoopForms, it’s not a big surprise that community requests for a Typeform-like standalone survey popped up more and more. Since we had all the pieces in place, we shipped standalone surveys in a day. However, it’s not our focus right now, so we hand over most of the feature requests to the community. And the community ships! Just in the past couple of weeks, we got:
|
||||
|
||||
- **Prefill Data in Link Surveys** by Piyush - [Docs](https://formbricks.com/docs/link-surveys/data-prefilling)
|
||||
- **Identify Users Link identification** by Zorig - [Docs](https://formbricks.com/docs/link-surveys/user-identification)
|
||||
- **Close Survey on Date** by Piyush
|
||||
- **Close Survey after x Responses** by Pradumn
|
||||
- **Redirect on Link Survey Completion** by Dhruwang
|
||||
- **Embed Link Survey via iframe** by Ankur
|
||||
- **Set Custom ‘Survey Closed’ Message** by Pradumn
|
||||
- **Randomize Answer Options** by Shubdeep
|
||||
|
||||
We absolutely love the idea of being the platform for a community-developed standalone survey experience! It’s a win-win: The community gets a free, self-hostable standalone survey product and we get a growing upper funnel for our Experience Management solution 🤸
|
||||
|
||||
### **It’s coming together 🔥**
|
||||
|
||||
Looking back at the amount of value Formbricks can deliver after not even 5 months fills us with excitement. Matti and I have been hacking it together for the most part but we wouldn’t be anywhere nearly as close without the support of our community and friends - thank you!
|
||||
|
||||
And we’re only getting started: We were able to hire two engineers from our community of contributors to build up more shipping velocity. We also started working with Kristian who runs our [open-source Design repo](https://github.com/formbricks/design) more closely and are super excited about what we’re cooking up. We’ll make sure Formbricks stays easy-to-use, accessible and simply beautiful as it grows more powerful! We can't tell you how excited we are about what's coming 😁
|
||||
|
||||
If you’re curious to learn about all the things you can do with Formbricks today, we’ve written and keep updating a list of Best Practices incl. survey templates in our [Docs](https://formbricks.com/docs/best-practices/cancel-subscription).
|
||||
|
||||
### Sounds good? **Build with us!**
|
||||
|
||||
- **Eager to contribute?** [Join our Discord](https://formbricks.com/discord) and say Hi! We’re more than happy to find the perfect issue for your level of experience 🙌 😊
|
||||
|
||||
- **Got an experience to measure?** Open-source is the way to go. [Let’s have a chat 🤙](https://cal.com/johannes/15)
|
||||
|
||||
<Image
|
||||
src={MattiJojo}
|
||||
alt="SnoopForms was the OS Typeform alternative with a twist"
|
||||
className="rounded-lg w-1/2"
|
||||
/>
|
||||
|
||||
### All the best!
|
||||
|
||||
Johannes & Matti
|
||||
|
||||
export default ({ children }) => <LayoutMdx meta={meta}>{children}</LayoutMdx>;
|
||||
|
After Width: | Height: | Size: 156 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 976 KiB |
@@ -1,47 +0,0 @@
|
||||
import Image from "next/image";
|
||||
import LayoutMdx from "@/components/shared/LayoutMdx";
|
||||
import FormbricksSneak from "./formbricks-sneak.png";
|
||||
import ResponsiveEmbed from "react-responsive-embed";
|
||||
|
||||
export const meta = {
|
||||
title: "Video: Walk-through of the new Formbricks",
|
||||
description: "The new, powerful Formbricks is almost ready!",
|
||||
date: "2023-03-30",
|
||||
};
|
||||
|
||||
_The new, powerful Formbricks is almost ready!_
|
||||
|
||||
<Image src={FormbricksSneak} alt="Sneakpeek into what the new Formbricks can do" className="rounded-lg" />
|
||||
|
||||
We've been working hard on getting a revamped Formbricks ready - we're almost there!
|
||||
|
||||
What you can do with it:
|
||||
|
||||
1. Design **any survey** you want
|
||||
2. Trigger at any point in your app both **No Code** (page view, element click) and **Code** (hook `formbricks.track` into your event)
|
||||
3. Pass custom user attributes to Formbricks to **segment your user base**
|
||||
|
||||
## Have a look:
|
||||
|
||||
<ResponsiveEmbed
|
||||
src="https://www.tella.tv/video/clfrymq2f00sk0fjqd9r6btf1/embed?b=0&title=0&a=1&loop=0&t=0&muted=0"
|
||||
allowFullScreen
|
||||
className="rounded-lg"
|
||||
/>
|
||||
|
||||
Formbricks is a lot more powerful than ever before! :mechanical_arm:
|
||||
|
||||
You can create:
|
||||
|
||||
- Onboarding surveys,
|
||||
- PMF surveys,
|
||||
- Churn surveys,
|
||||
- Feature chaser,
|
||||
- Feedback box,
|
||||
- Identify customer goals,
|
||||
- Measure task completion,
|
||||
- etc, etc.
|
||||
|
||||
## Stay tuned, Formbricks Cloud goes live soon!
|
||||
|
||||
export default ({ children }) => <LayoutMdx meta={meta}>{children}</LayoutMdx>;
|
||||
@@ -6,6 +6,7 @@ import TitleImage from "./title-image.png";
|
||||
import HeaderImage from "./formbricks-logo.svg";
|
||||
import ProprietaryDependence from "./propietary-dependence.jpeg";
|
||||
import ResponsiveEmbed from "react-responsive-embed";
|
||||
import AuthorBox from "@/components/shared/AuthorBox";
|
||||
|
||||
export const meta = {
|
||||
title: "Why Open-Source + No-Code is the Future of Enterprise & Goverment Software",
|
||||
@@ -14,6 +15,8 @@ export const meta = {
|
||||
date: "2022-06-03",
|
||||
};
|
||||
|
||||
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" />
|
||||
|
||||
<Image src={TitleImage} alt="Title Image" className="rounded-lg" />
|
||||
|
||||
_Open source software (OSS) beats out proprietary software in every regard - except for value capturing. No-Code tools shorten the feedback loop between builders and consumers, kicking productivity through the roof. Here is why a no-code interface is cheatcode for OSS and why particularly large corporations and governments are to benefit the most._
|
||||
|
||||
47
apps/formbricks-com/pages/careers.tsx
Normal file
@@ -0,0 +1,47 @@
|
||||
import HeroTitle from "@/components/shared/HeroTitle";
|
||||
import Layout from "@/components/shared/Layout";
|
||||
|
||||
/* const Roles = [
|
||||
{
|
||||
name: "Full-Stack Engineer",
|
||||
description: "Join early and be a part of our journey from start to IPO 🚀",
|
||||
location: "Worldwide",
|
||||
workplace: "Remote",
|
||||
},
|
||||
{
|
||||
name: "Junior Full-Stack Engineer",
|
||||
description: "All you want is write code and learn? You're exactly right!",
|
||||
location: "Worldwide",
|
||||
workplace: "Remote",
|
||||
},
|
||||
]; */
|
||||
|
||||
export default function CareersPage() {
|
||||
return (
|
||||
<Layout
|
||||
title="Careers"
|
||||
description="Work with us on helping teams make customer-centric decisions - all privacy-focused.">
|
||||
<HeroTitle
|
||||
headingPt1="Help teams make"
|
||||
headingTeal="customer-centric"
|
||||
headingPt2="decisions."
|
||||
subheading="We are currently not hiring. Contributions are always welcome!"
|
||||
/>
|
||||
{/*
|
||||
<div className="mx-auto w-3/4">
|
||||
|
||||
{Roles.map((role) => (
|
||||
<Link
|
||||
href="https://formbricks.notion.site/Work-at-Formbricks-6c3ad218b2c7461ca2714ce2101730e4?pvs=4"
|
||||
target="_blank"
|
||||
key="role.name">
|
||||
<div className="mb-6 rounded-lg border border-slate-300 bg-slate-100 p-6 shadow-sm hover:bg-slate-50">
|
||||
<h4 className="text-xl font-bold text-slate-700">{role.name}</h4>
|
||||
<p className="text-lg text-slate-500">{role.description}</p>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
</div>*/}
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
@@ -7,24 +7,24 @@ import { ChatBubbleOvalLeftEllipsisIcon, EnvelopeIcon } from "@heroicons/react/2
|
||||
|
||||
const topContributors = [
|
||||
{
|
||||
name: "Midka (8 commits)",
|
||||
name: "Midka",
|
||||
href: "https://github.com/kymppi",
|
||||
},
|
||||
{
|
||||
name: "Timothy (6 commits)",
|
||||
name: "Pandeyman",
|
||||
href: "https://github.com/pandeymangg",
|
||||
},
|
||||
{
|
||||
name: "Ashu",
|
||||
href: "https://github.com/Ashutosh-Bhadauriya",
|
||||
},
|
||||
{
|
||||
name: "Timothy",
|
||||
href: "https://github.com/timothyde",
|
||||
},
|
||||
{
|
||||
name: "Kiran (3 commits)",
|
||||
href: "https://github.com/devkiran",
|
||||
},
|
||||
{
|
||||
name: "Francois (1 commit)",
|
||||
href: "https://github.com/fdis111",
|
||||
},
|
||||
{
|
||||
name: "Chetan (1 commit)",
|
||||
href: "https://github.com/chetan",
|
||||
name: "Shubhdeep",
|
||||
href: "https://github.com/Shubhdeep12",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -34,14 +34,14 @@ const CommunityPage = () => {
|
||||
<Layout
|
||||
title="Community | Formbricks Open Source Forms & Surveys"
|
||||
description="You're building open source forms and surveys? So are we! Get support for anything your building - or just say hi!">
|
||||
<HeroTitle headingPt1="Join the" headingTeal="Formbricks" headingPt2="Community" />
|
||||
<HeroTitle headingPt1="Join the" headingTeal="Formbricks" headingPt2="Community 🤍" />
|
||||
<div className="mb-32 grid grid-cols-1 px-4 md:grid-cols-2 md:gap-8 md:px-16">
|
||||
<div className="mb-6 rounded-lg bg-gradient-to-b from-slate-200 to-slate-300 px-10 py-6 dark:from-slate-800 dark:to-slate-700 md:mb-0">
|
||||
<h2 className="mt-7 text-3xl font-bold text-slate-800 dark:text-slate-200 xl:text-4xl">
|
||||
Top Contributors
|
||||
</h2>
|
||||
<p className="mt-2 text-sm text-slate-500 dark:text-slate-400">
|
||||
The leader board of the Formbricks community contributors 🙌
|
||||
Super thankful to have you guys contribute for Formbricks 🙌
|
||||
</p>
|
||||
<ol className="ml-4 mt-10 list-decimal">
|
||||
{topContributors.map((MVP) => (
|
||||
|
||||
112
apps/formbricks-com/pages/concierge.tsx
Normal file
@@ -0,0 +1,112 @@
|
||||
import HeroTitle from "@/components/shared/HeroTitle";
|
||||
import Layout from "@/components/shared/Layout";
|
||||
import Cal, { getCalApi } from "@calcom/embed-react";
|
||||
import { useEffect } from "react";
|
||||
import { CheckBadgeIcon } from "@heroicons/react/24/solid";
|
||||
import { Button } from "@formbricks/ui";
|
||||
|
||||
const XMOffer = [
|
||||
{
|
||||
step: "1",
|
||||
header: "Kick-off call (FREE)",
|
||||
description: "Share with our seasoned PMs which areas of customer experience need improvement.",
|
||||
},
|
||||
{
|
||||
step: "2",
|
||||
header: "In-depth analysis",
|
||||
description: "With a fresh pair of eyes, we analyze your customer experience to uncover potential.",
|
||||
},
|
||||
{
|
||||
step: "3",
|
||||
header: "Research design",
|
||||
description: "We set up systems for continuous discovery. Benefit from an ongoing stream of insights.",
|
||||
},
|
||||
{
|
||||
step: "4",
|
||||
header: "Setup assistance",
|
||||
description: "Our core developers help you get Formbricks up and running in no more than 60 minutes.",
|
||||
},
|
||||
{
|
||||
step: "5",
|
||||
header: "Actionable insights",
|
||||
description:
|
||||
"Once the results are in, we perform a thorough analysis and derive concrete Next Action Steps to retain your customers better.",
|
||||
},
|
||||
];
|
||||
|
||||
const ConciergePage = () => {
|
||||
useEffect(() => {
|
||||
(async function () {
|
||||
const cal = await getCalApi();
|
||||
cal("ui", {
|
||||
theme: "light",
|
||||
styles: { branding: { brandColor: "#000000" } },
|
||||
hideEventTypeDetails: false,
|
||||
});
|
||||
})();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Layout
|
||||
title="Community | Formbricks Open Source Forms & Surveys"
|
||||
description="You're building open source forms and surveys? So are we! Get support for anything your building - or just say hi!">
|
||||
<HeroTitle
|
||||
headingPt1="XM"
|
||||
headingTeal="Concierge"
|
||||
headingPt2="Service"
|
||||
subheading="Let's set up your system for continuous user discovery together."
|
||||
/>
|
||||
<div className="-mt-16 grid grid-cols-1 space-y-4 px-4 md:grid-cols-2 md:gap-8 md:px-16">
|
||||
<div className="rounded-xl bg-slate-100 p-12">
|
||||
{XMOffer.map((offer) => (
|
||||
<div key={offer.step} className="mb-8 flex items-center gap-x-4">
|
||||
<div className=" flex items-center justify-center rounded-full bg-emerald-50 p-4 text-2xl font-bold text-emerald-700">
|
||||
{offer.step}
|
||||
</div>
|
||||
<div>
|
||||
<h4 className="font-semibold text-slate-700">{offer.header}</h4>
|
||||
<p className="text-sm text-slate-800">{offer.description}</p>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
<div className="border-b border-t border-slate-300 p-6 text-4xl font-semibold text-slate-800">
|
||||
<p className="mr-2 font-light">$1.290</p>
|
||||
</div>
|
||||
<div className="p-6 text-sm text-slate-800">
|
||||
<p>
|
||||
<CheckBadgeIcon className="mr-1 inline h-5 w-5 text-slate-800" />
|
||||
100% Risk-free: Pay after the kick-off call, if you liked it.
|
||||
</p>
|
||||
<p>
|
||||
<CheckBadgeIcon className="mr-1 inline h-5 w-5 text-slate-800" />
|
||||
Money-back: If you're not happy, get a full refund.
|
||||
</p>
|
||||
</div>
|
||||
<div className="px-6">
|
||||
<Button
|
||||
variant="darkCTA"
|
||||
className="w-full justify-center"
|
||||
href="https://cal.com/johannes/kick-off"
|
||||
target="_blank">
|
||||
Book free Kick-Off call
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="!mt-0 rounded-xl">
|
||||
<Cal
|
||||
calLink="johannes/kick-off"
|
||||
style={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
overflow: "scroll",
|
||||
borderRadius: "0.5rem",
|
||||
}}
|
||||
config={{ layout: "month_view" }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</Layout>
|
||||
);
|
||||
};
|
||||
|
||||
export default ConciergePage;
|
||||
@@ -1,12 +1,12 @@
|
||||
import LayoutWaitlist from "@/components/shared/LayoutLight";
|
||||
import TemplateList from "@/components/dummyUI/TemplateList";
|
||||
import DemoView from "@/components/dummyUI/DemoView";
|
||||
|
||||
export default function DemoPage() {
|
||||
return (
|
||||
<LayoutWaitlist
|
||||
title="Formbricks Demo"
|
||||
description="Leverage 30+ templates to kick-start your experience management.">
|
||||
<TemplateList />
|
||||
<DemoView />
|
||||
</LayoutWaitlist>
|
||||
);
|
||||
}
|
||||
|
||||
44
apps/formbricks-com/pages/docs-feedback/index.tsx
Normal file
@@ -0,0 +1,44 @@
|
||||
import Layout from "@/components/shared/Layout";
|
||||
import UseCaseHeader from "@/components/shared/UseCaseHeader";
|
||||
import UseCaseCTA from "@/components/shared/UseCaseCTA";
|
||||
import DocsFeedback from "@/components/docs/DocsFeedback";
|
||||
import BestPracticeNavigation from "@/components/shared/BestPracticeNavigation";
|
||||
|
||||
export default function DocsFeedbackPage() {
|
||||
return (
|
||||
<Layout
|
||||
title="Feedback Box"
|
||||
description="The better your docs, the higher your user adoption. Measure granularly how clear your documentation is.">
|
||||
<div className="grid grid-cols-1 items-center md:grid-cols-2 md:gap-12 md:py-20">
|
||||
<div className="p-6 md:p-0">
|
||||
<UseCaseHeader title="Docs Feedback" difficulty="Intermediate" setupMinutes="60" />
|
||||
<h3 className="text-md mb-1.5 mt-6 font-semibold text-slate-800 dark:text-slate-200">
|
||||
Why is it useful?
|
||||
</h3>
|
||||
<p className="text-slate-600 dark:text-slate-400">
|
||||
You want to know if your Developer Docs are clear and concise. When engineers don’t understand
|
||||
your technology or find the answer to their question, they are unlikely to use it. Docs Feedback
|
||||
opens a window into how clear your Docs are. Have a look!
|
||||
</p>
|
||||
<h3 className="text-md mb-1.5 mt-6 font-semibold text-slate-800 dark:text-slate-200">
|
||||
How to get started:
|
||||
</h3>
|
||||
<p className="text-slate-600 dark:text-slate-400">
|
||||
As of now, Docs Feedback uses custom UI in the frontend and Formbricks in the backend. A partial
|
||||
submission is sent when the user answers YES / NO and is enriched when the open text field is
|
||||
filled out and submitted.
|
||||
</p>
|
||||
<UseCaseCTA href="/docs/best-practices/docs-feedback" />
|
||||
</div>
|
||||
<div className="mx-6 my-6 flex flex-col items-center justify-center rounded-xl border-2 border-slate-300 bg-slate-200 p-4 pb-36 transition-transform duration-150 dark:border-slate-500 dark:bg-slate-700 md:mx-0">
|
||||
<p className="my-3 text-sm text-slate-500">Preview</p>
|
||||
<DocsFeedback />
|
||||
</div>
|
||||
</div>
|
||||
<h2 className="mb-6 ml-4 mt-12 text-2xl font-semibold text-slate-700 dark:text-slate-400 md:mt-0">
|
||||
Other Best Practices
|
||||
</h2>
|
||||
<BestPracticeNavigation />
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||