mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-22 06:00:51 -06:00
Compare commits
507 Commits
v0.9
...
@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 | ||
|
|
9b38f9bf9a | ||
|
|
e3f5bba755 | ||
|
|
fbfc80dd4e | ||
|
|
e95407ca44 | ||
|
|
0617157ccf | ||
|
|
1fdfdb585a | ||
|
|
423541e5d5 | ||
|
|
59930ecac5 | ||
|
|
68500de8bf | ||
|
|
c4ba0fe5d2 | ||
|
|
3206637e22 | ||
|
|
106afd12c3 | ||
|
|
56e500397a | ||
|
|
58e5dc6e7b | ||
|
|
60f7103198 | ||
|
|
ef4e5ed17a | ||
|
|
520f282384 | ||
|
|
bc4e2379cf | ||
|
|
650b674e24 | ||
|
|
bfcc62e8ff | ||
|
|
9b42808d6d | ||
|
|
957a5b3e8c | ||
|
|
325eda064e | ||
|
|
eecb10e255 | ||
|
|
8d38031b11 | ||
|
|
d2c837b54f | ||
|
|
ea084c3075 | ||
|
|
bac12eb552 | ||
|
|
035652556d | ||
|
|
f0aeed763a | ||
|
|
b84e54c63c | ||
|
|
730296055b | ||
|
|
7b1edfe654 | ||
|
|
fe1314634a | ||
|
|
04f536b7c6 | ||
|
|
056ddff709 | ||
|
|
d66c417bab | ||
|
|
12bf20fe1f | ||
|
|
510231296e | ||
|
|
0509ac0e51 | ||
|
|
63ce05d35e | ||
|
|
478d4e16f8 | ||
|
|
a0acc945b2 | ||
|
|
3426232b70 | ||
|
|
ae0bf3e90d | ||
|
|
13508f42be | ||
|
|
c20ca5e789 | ||
|
|
3de164623b | ||
|
|
efce2c106a | ||
|
|
bcd4f953ee | ||
|
|
7e9b336954 | ||
|
|
b01d2409de | ||
|
|
8a7f8eb94c | ||
|
|
ddec12740d | ||
|
|
09356bbded | ||
|
|
ad17ea957d | ||
|
|
6ec3878c77 | ||
|
|
6fd11fb54c | ||
|
|
47605493e9 | ||
|
|
5b273cc194 | ||
|
|
c81bfadb66 | ||
|
|
96ac6a2a6f | ||
|
|
97e5398adf | ||
|
|
29064b3bde | ||
|
|
7abe1d877a | ||
|
|
7eefdd336c | ||
|
|
1a9400139c | ||
|
|
501ce56de6 | ||
|
|
9eb3f2e605 | ||
|
|
1b251b8ad0 | ||
|
|
e7e4406e91 | ||
|
|
f6ea9f6375 | ||
|
|
90eaab9c9e | ||
|
|
9a494a3f8a | ||
|
|
5e6ac0a141 | ||
|
|
d889775c56 | ||
|
|
ce0179a2c7 | ||
|
|
d835e78d92 | ||
|
|
8352d05d04 | ||
|
|
fbc1c74046 | ||
|
|
48bac2128e | ||
|
|
d15d062581 | ||
|
|
72c6ea6f39 | ||
|
|
3b5ab29669 | ||
|
|
793aff4585 | ||
|
|
8734127143 | ||
|
|
d2ee0d6a9a | ||
|
|
c9f5f8cd16 | ||
|
|
392bbfd911 | ||
|
|
a7fd1fc754 | ||
|
|
c118fbb0bd | ||
|
|
d6868c3d40 | ||
|
|
8ef8c93f3d | ||
|
|
324a150a90 | ||
|
|
1ec4dcb02d | ||
|
|
d470b6576f | ||
|
|
3778ed80d4 | ||
|
|
87ee687d51 | ||
|
|
a917668b3a | ||
|
|
e6d091d35e | ||
|
|
7ee8cb98e1 | ||
|
|
3a2c697736 | ||
|
|
b28fad2ffa | ||
|
|
6024cad566 | ||
|
|
9e1a17a3ef | ||
|
|
da998d9820 | ||
|
|
1bcdcee799 | ||
|
|
1c58b0c95c | ||
|
|
0bbb9ad3d7 | ||
|
|
5163f36e53 | ||
|
|
529bf4611c | ||
|
|
29cf117fda | ||
|
|
50435413c3 | ||
|
|
e614e4bd00 | ||
|
|
3c31e5fe84 | ||
|
|
6cce82d9bf | ||
|
|
1bb5fcfcb2 | ||
|
|
4ddb09cd39 | ||
|
|
0a6a12cacb | ||
|
|
76a4d49c2d |
@@ -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"]
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// This can be used to network with other containers or with the host.
|
||||
// "forwardPorts": [3000, 5432],
|
||||
"forwardPorts": [3000, 5432, 8025],
|
||||
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
"postCreateCommand": "pnpm install",
|
||||
|
||||
@@ -37,5 +37,16 @@ services:
|
||||
# Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally.
|
||||
# (Adding the "ports" property to this file will not forward from a Codespace.)
|
||||
|
||||
mailhog:
|
||||
image: mailhog/mailhog
|
||||
network_mode: service:app
|
||||
logging:
|
||||
driver: "none" # disable saving logs
|
||||
# ports:
|
||||
# - 8025:8025 # web ui
|
||||
# 1025:1025 # smtp server
|
||||
|
||||
|
||||
|
||||
volumes:
|
||||
postgres-data: null
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
node_modules
|
||||
**/node_modules
|
||||
.pnp
|
||||
.pnp.js
|
||||
.pnpm-store/
|
||||
@@ -10,12 +10,12 @@ node_modules
|
||||
coverage
|
||||
|
||||
# next.js
|
||||
.next/
|
||||
out/
|
||||
build
|
||||
**/.next
|
||||
**/out
|
||||
**/build
|
||||
|
||||
# node
|
||||
dist/
|
||||
**/dist
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
@@ -31,3 +31,7 @@ yarn-error.log*
|
||||
|
||||
# nixos stuff
|
||||
.direnv
|
||||
|
||||
.vscode
|
||||
.github
|
||||
**/.turbo
|
||||
|
||||
47
.env.docker
47
.env.docker
@@ -4,20 +4,40 @@
|
||||
|
||||
|
||||
############
|
||||
# Basics #
|
||||
# BASICS #
|
||||
############
|
||||
|
||||
NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
|
||||
|
||||
##############
|
||||
# DATABASE #
|
||||
##############
|
||||
|
||||
DATABASE_URL='postgresql://postgres:postgres@postgres:5432/formbricks?schema=public'
|
||||
|
||||
# Uncomment to enable a dedicated connection pool for Prisma using Prisma Data Proxy
|
||||
# Cold boots will be faster and you'll be able to scale your DB independently of your app.
|
||||
# @see https://www.prisma.io/docs/data-platform/data-proxy/use-data-proxy
|
||||
# PRISMA_GENERATE_DATAPROXY=true
|
||||
PRISMA_GENERATE_DATAPROXY=
|
||||
|
||||
###############
|
||||
# NEXT AUTH #
|
||||
###############
|
||||
|
||||
# @see: https://next-auth.js.org/configuration/options#nextauth_secret
|
||||
# You can use: `openssl rand -base64 32` to generate one
|
||||
NEXTAUTH_SECRET=RANDOM_STRING
|
||||
|
||||
# Set this to your public-facing URL, e.g., https://example.com
|
||||
# You do not need the NEXTAUTH_URL environment variable in Vercel.
|
||||
NEXTAUTH_URL=http://localhost:3000
|
||||
|
||||
# If you encounter NEXT_AUTH URL problems this should always be localhost:3000 (or whatever port your app is running on)
|
||||
# NEXTAUTH_URL_INTERNAL=http://localhost:3000
|
||||
|
||||
DATABASE_URL='postgresql://postgres:postgres@postgres:5432/postgres?schema=public'
|
||||
|
||||
################
|
||||
# Mail Setup #
|
||||
# MAIL SETUP #
|
||||
################
|
||||
|
||||
# Necessary if email verification and password reset are enabled.
|
||||
@@ -26,6 +46,7 @@ DATABASE_URL='postgresql://postgres:postgres@postgres:5432/postgres?schema=publi
|
||||
# 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
|
||||
@@ -50,10 +71,18 @@ NEXT_PUBLIC_PASSWORD_RESET_DISABLED=1
|
||||
# Signup. Disable the ability for new users to create an account.
|
||||
# NEXT_PUBLIC_SIGNUP_DISABLED=1
|
||||
|
||||
# Team Invite. Disable the ability for invited users to create an account.
|
||||
# NEXT_PUBLIC_INVITE_DISABLED=1
|
||||
|
||||
##########
|
||||
# Other #
|
||||
##########
|
||||
|
||||
# Display privacy policy, imprint and terms of service links in the footer of signup & public pages.
|
||||
NEXT_PUBLIC_PRIVACY_URL=
|
||||
NEXT_PUBLIC_TERMS_URL=
|
||||
NEXT_PUBLIC_IMPRINT_URL=
|
||||
|
||||
# Disable Sentry warning
|
||||
SENTRY_IGNORE_API_RESOLUTION_ERROR=1
|
||||
|
||||
@@ -63,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=
|
||||
63
.env.example
63
.env.example
@@ -4,18 +4,16 @@
|
||||
|
||||
|
||||
############
|
||||
# Basics #
|
||||
# BASICS #
|
||||
############
|
||||
|
||||
NEXTAUTH_SECRET=RANDOM_STRING
|
||||
NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
|
||||
|
||||
# Set this to your public-facing URL, e.g., https://example.com
|
||||
NEXTAUTH_URL=http://localhost:3000
|
||||
##############
|
||||
# DATABASE #
|
||||
##############
|
||||
|
||||
# If you encounter NEXT_AUTH URL problems this should always be localhost:3000 (or whatever port your app is running on)
|
||||
# NEXTAUTH_URL_INTERNAL=http://localhost:3000
|
||||
|
||||
DATABASE_URL='postgresql://postgres:postgres@localhost:5432/postgres?schema=public'
|
||||
DATABASE_URL='postgresql://postgres:postgres@localhost:5432/formbricks?schema=public'
|
||||
|
||||
# Uncomment to enable a dedicated connection pool for Prisma using Prisma Data Proxy
|
||||
# Cold boots will be faster and you'll be able to scale your DB independently of your app.
|
||||
@@ -23,8 +21,23 @@ DATABASE_URL='postgresql://postgres:postgres@localhost:5432/postgres?schema=publ
|
||||
# PRISMA_GENERATE_DATAPROXY=true
|
||||
PRISMA_GENERATE_DATAPROXY=
|
||||
|
||||
###############
|
||||
# NEXT AUTH #
|
||||
###############
|
||||
|
||||
# @see: https://next-auth.js.org/configuration/options#nextauth_secret
|
||||
# You can use: `openssl rand -base64 32` to generate one
|
||||
NEXTAUTH_SECRET=RANDOM_STRING
|
||||
|
||||
# Set this to your public-facing URL, e.g., https://example.com
|
||||
# You do not need the NEXTAUTH_URL environment variable in Vercel.
|
||||
NEXTAUTH_URL=http://localhost:3000
|
||||
|
||||
# If you encounter NEXT_AUTH URL problems this should always be localhost:3000 (or whatever port your app is running on)
|
||||
# NEXTAUTH_URL_INTERNAL=http://localhost:3000
|
||||
|
||||
################
|
||||
# Mail Setup #
|
||||
# MAIL SETUP #
|
||||
################
|
||||
|
||||
# Necessary if email verification and password reset are enabled.
|
||||
@@ -33,7 +46,8 @@ PRISMA_GENERATE_DATAPROXY=
|
||||
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
|
||||
|
||||
@@ -57,23 +71,38 @@ 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 #
|
||||
##########
|
||||
|
||||
# Disable Sentry warning
|
||||
SENTRY_IGNORE_API_RESOLUTION_ERROR=1
|
||||
|
||||
# Enable Sentry Error Tracking
|
||||
NEXT_PUBLIC_SENTRY_DSN=
|
||||
# Display privacy policy, imprint and terms of service links in the footer of signup & public pages.
|
||||
NEXT_PUBLIC_PRIVACY_URL=
|
||||
NEXT_PUBLIC_TERMS_URL=
|
||||
NEXT_PUBLIC_IMPRINT_URL=
|
||||
|
||||
# Configure Github Login
|
||||
NEXT_PUBLIC_GITHUB_AUTH_ENABLED=0
|
||||
GITHUB_ID=
|
||||
GITHUB_SECRET=
|
||||
|
||||
# Configure Google Login
|
||||
NEXT_PUBLIC_GOOGLE_AUTH_ENABLED=0
|
||||
GOOGLE_CLIENT_ID=
|
||||
GOOGLE_CLIENT_SECRET=
|
||||
|
||||
|
||||
# Stripe Billing Variables
|
||||
NEXT_PUBLIC_STRIPE_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=
|
||||
|
||||
44
.github/ISSUE_TEMPLATE/bug_report.md
vendored
44
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,44 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Something not working as expected? Let us look into it
|
||||
title: ""
|
||||
labels: bug
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
Found a bug? Please fill out the sections below. 👍
|
||||
|
||||
### Issue Summary
|
||||
|
||||
<!--
|
||||
A summary of the issue. This needs to be a clear detailed-rich summary.
|
||||
-->
|
||||
|
||||
(Write your answer here.)
|
||||
|
||||
### Steps to Reproduce
|
||||
|
||||
<!--
|
||||
1. (for example) Went to ...
|
||||
2. Clicked on...
|
||||
3. ...
|
||||
|
||||
Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?
|
||||
-->
|
||||
|
||||
(Write your answer here.)
|
||||
|
||||
## Environment
|
||||
|
||||
- [ ] Formbricks Cloud (app.formbricks.com)
|
||||
- [ ] self-hosted snoopForms, version/commit: [please provide]
|
||||
|
||||
### Additional Context
|
||||
|
||||
<!--
|
||||
- Browser version, screen recording, console logs, network requests: You can make a recording with [Bird Eats Bug](https://birdeatsbug.com/).
|
||||
- Node.js version
|
||||
- Anything else that you think could be an issue.
|
||||
-->
|
||||
|
||||
(Write your answer here.)
|
||||
81
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
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?
|
||||
41
.github/ISSUE_TEMPLATE/feature_request.md
vendored
41
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,41 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest a feature or idea
|
||||
title: ""
|
||||
labels: feature
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
### Is your proposal related to a problem?
|
||||
|
||||
<!--
|
||||
Provide a clear and concise description of what the problem is.
|
||||
For example, "I'm always frustrated when..."
|
||||
-->
|
||||
|
||||
(Write your answer here.)
|
||||
|
||||
### Describe the solution you'd like
|
||||
|
||||
<!--
|
||||
Provide a clear and concise description of what you want to happen.
|
||||
-->
|
||||
|
||||
(Describe your proposed solution here.)
|
||||
|
||||
### Describe alternatives you've considered
|
||||
|
||||
<!--
|
||||
Let us know about other solutions you've tried or researched.
|
||||
-->
|
||||
|
||||
(Write your answer here.)
|
||||
|
||||
### Additional context
|
||||
|
||||
<!--
|
||||
Is there anything else you can add about the proposal?
|
||||
You might want to link to related issues here, if you haven't already.
|
||||
-->
|
||||
|
||||
(Write your answer here.)
|
||||
45
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
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
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
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
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
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
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
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
|
||||
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -33,9 +33,15 @@ yarn-error.log*
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
!packages/database/.env
|
||||
!apps/web/.env
|
||||
|
||||
# Prisma generated files
|
||||
packages/database/zod
|
||||
|
||||
# turbo
|
||||
.turbo
|
||||
|
||||
# nixos stuff
|
||||
.direnv
|
||||
|
||||
Zone.Identifier
|
||||
1
.vercelignore
Normal file
1
.vercelignore
Normal file
@@ -0,0 +1 @@
|
||||
apps/web/.env
|
||||
21
.vscode/launch.json
vendored
Normal file
21
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch localhost:3002",
|
||||
"type": "firefox",
|
||||
"request": "launch",
|
||||
"reAttach": true,
|
||||
"url": "http://localhost:3002/",
|
||||
"webRoot": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"name": "Attach",
|
||||
"type": "firefox",
|
||||
"request": "attach"
|
||||
}
|
||||
]
|
||||
}
|
||||
4
.vscode/settings.json
vendored
Normal file
4
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"typescript.preferences.importModuleSpecifier": "non-relative"
|
||||
}
|
||||
6
LICENSE
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.
|
||||
|
||||
|
||||
86
README.md
86
README.md
@@ -5,44 +5,96 @@
|
||||
<h3 align="center">Formbricks</h3>
|
||||
|
||||
<p align="center">
|
||||
The Open Source Experience Management solution for fast growing companies
|
||||
The Open Source Survey & Experience Management solution for fast growing companies
|
||||
<br />
|
||||
<a href="https://formbricks.com/">Website</a> | <a href="https://formbricks.com/discord">Join Discord community</a>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/formbricks/formbricks/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-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/>
|
||||
|
||||
> :octocat: Are you looking for snoopForms - the Open Source Typeform Alternative? We're building the next stage of the snoopForms evolution here with Formbricks - focused on experience management for fast growing companies. If you still are looking for the code of snoopForms you can find it in the [snoopforms branch](https://github.com/formbricks/formbricks/tree/snoopforms).
|
||||
<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>
|
||||
|
||||
## About Formbricks
|
||||
## ✨ About Formbricks
|
||||
|
||||
<img width="1527" alt="formbricks-sneak" src="https://user-images.githubusercontent.com/675065/227726212-6ebf930e-6a20-4ffa-b966-56cd41bdf363.png">
|
||||
<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 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.
|
||||
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.
|
||||
|
||||
### Mission: Base your decisions on qualitative data.
|
||||
**Try it out in the cloud at [formbricks.com](https://formbricks.com)**
|
||||
|
||||
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.
|
||||
## 💪 Mission: Make customer-centric decisions based on data.
|
||||
|
||||
### Built With
|
||||
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.
|
||||
|
||||
- [Typescript](https://www.typescriptlang.org/)
|
||||
- [Next.js](https://nextjs.org/)
|
||||
- [React](https://reactjs.org/)
|
||||
- [TailwindCSS](https://tailwindcss.com/)
|
||||
- [Prisma](https://prisma.io/)
|
||||
### Features
|
||||
|
||||
## Cloud vs. self-hosted
|
||||
- 📲 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
|
||||
|
||||
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.
|
||||
### Built on Open Source
|
||||
|
||||
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)
|
||||
- 💻 [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/)
|
||||
|
||||
## 🚀 Getting started
|
||||
|
||||
### ☁️ Cloud Version
|
||||
|
||||
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)
|
||||
|
||||
### 🐳 Self-hosted version
|
||||
|
||||
Formbricks is available Open-Source under AGPLv3 license. You can host Formbricks on your own servers using Docker without a subscription. To get started with self-hosting, take a look at our [self-hosting docs](https://formbricks.com/docs/self-hosting/deployment).
|
||||
|
||||
(In the future we may develop additional features that aren't in the free Open-Source version)
|
||||
|
||||
## ✍️ Contribution
|
||||
|
||||
We are very happy if you are interested in contributing to Formbricks 🤗
|
||||
|
||||
Here are a few options:
|
||||
|
||||
- Star this repo
|
||||
- Create issues every time you feel something is missing or goes wrong
|
||||
- Upvote issues with 👍 reaction so we know what's the demand for particular issue to prioritize it within roadmap
|
||||
|
||||
Please check out [our contribution guide](https://formbricks.com/docs/contributing/introduction) and our [list of open issues](https://github.com/formbricks/formbricks/issues) for more information.
|
||||
|
||||
## 📆 Contact us
|
||||
|
||||
Let's have a chat about your survey needs and get you started.
|
||||
|
||||
<a href="https://cal.com/johannes/onboarding?utm_source=banner&utm_campaign=oss"><img alt="Book us with Cal.com" src="https://cal.com/book-with-cal-dark.svg" /></a>
|
||||
|
||||
## ⚖️ License
|
||||
|
||||
Distributed under the AGPLv3 License. See `LICENSE` for more information.
|
||||
|
||||
## 🔒 Security
|
||||
|
||||
We take security very seriously. If you come across any security vulnerabilities, please disclose them by sending an email to security@formbricks.com. We appreciate your help in making our platform as secure as possible and are committed to working with you to resolve any issues quickly and efficiently. See `SECURITY.md` for more information.
|
||||
|
||||
39
SECURITY.md
Normal file
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.
|
||||
@@ -27,7 +27,7 @@ const secondaryNavigation = [
|
||||
|
||||
export default function Sidebar({}) {
|
||||
return (
|
||||
<div className="flex flex-grow flex-col overflow-y-auto bg-cyan-700 pt-5 pb-4">
|
||||
<div className="flex flex-grow flex-col overflow-y-auto bg-cyan-700 pb-4 pt-5">
|
||||
<nav
|
||||
className="mt-5 flex flex-1 flex-col divide-y divide-cyan-800 overflow-y-auto"
|
||||
aria-label="Sidebar">
|
||||
|
||||
@@ -5,7 +5,7 @@ const nextConfig = {
|
||||
return [
|
||||
{
|
||||
source: "/",
|
||||
destination: "/signin",
|
||||
destination: "/app",
|
||||
permanent: false,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -3,28 +3,21 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev -p 3002",
|
||||
"clean": "rimraf .turbo node_modules .next",
|
||||
"dev": "next dev -p 3002 --turbo",
|
||||
"go": "next dev -p 3002 --turbo",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@formbricks/js": "workspace:*",
|
||||
"@heroicons/react": "^2.0.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",
|
||||
"tailwindcss": "^3.3.1"
|
||||
"eslint-config-formbricks": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import type { AppProps } from "next/app";
|
||||
import formbricks from "@formbricks/js";
|
||||
import { useEffect } from "react";
|
||||
import type { AppProps } from "next/app";
|
||||
import Head from "next/head";
|
||||
import { useRouter } from "next/router";
|
||||
import { useEffect } from "react";
|
||||
import "../styles/globals.css";
|
||||
|
||||
declare const window: any;
|
||||
@@ -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;
|
||||
}
|
||||
@@ -22,13 +23,28 @@ export default function App({ Component, pageProps }: AppProps) {
|
||||
|
||||
useEffect(() => {
|
||||
// Connect next.js router to Formbricks
|
||||
const handleRouteChange = formbricks?.registerRouteChange;
|
||||
router.events.on("routeChangeComplete", handleRouteChange);
|
||||
if (process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID && process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST) {
|
||||
const handleRouteChange = formbricks?.registerRouteChange;
|
||||
router.events.on("routeChangeComplete", handleRouteChange);
|
||||
|
||||
return () => {
|
||||
router.events.off("routeChangeComplete", handleRouteChange);
|
||||
};
|
||||
return () => {
|
||||
router.events.off("routeChangeComplete", handleRouteChange);
|
||||
};
|
||||
}
|
||||
}, []);
|
||||
|
||||
return <Component {...pageProps} />;
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Demo App</title>
|
||||
</Head>
|
||||
{(!process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID ||
|
||||
!process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST) && (
|
||||
<div className="w-full bg-red-500 p-3 text-center text-sm text-white">
|
||||
Please set Formbricks environment variables in apps/demo/.env
|
||||
</div>
|
||||
)}
|
||||
<Component {...pageProps} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,351 +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
|
||||
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:mt-0 md:ml-4">
|
||||
<button
|
||||
type="button"
|
||||
className="inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 shadow-sm hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2">
|
||||
Add money
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="inline-flex items-center rounded-md border border-transparent bg-cyan-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-cyan-700 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2">
|
||||
Send money
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="mt-8">
|
||||
<div className="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8">
|
||||
<h2 className="text-lg font-medium leading-6 text-slate-900">Overview</h2>
|
||||
<div className="mt-2 grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{/* Card */}
|
||||
{cards.map((card) => (
|
||||
<div key={card.name} className="overflow-hidden rounded-lg bg-white shadow">
|
||||
<div className="p-5">
|
||||
<div className="flex items-center">
|
||||
<div className="flex-shrink-0">
|
||||
<card.icon className="h-6 w-6 text-slate-400" aria-hidden="true" />
|
||||
</div>
|
||||
<div className="ml-5 w-0 flex-1">
|
||||
<dl>
|
||||
<dt className="truncate text-sm font-medium text-slate-500">{card.name}</dt>
|
||||
<dd>
|
||||
<div className="text-lg font-medium text-slate-900">{card.amount}</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="bg-slate-50 px-5 py-3">
|
||||
<div className="text-sm">
|
||||
<a href={card.href} className="font-medium text-cyan-700 hover:text-cyan-900">
|
||||
View all
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 className="mx-auto mt-8 max-w-6xl px-4 text-lg font-medium leading-6 text-slate-900 sm:px-6 lg:px-8">
|
||||
Recent activity
|
||||
</h2>
|
||||
|
||||
{/* Activity list (smallest breakpoint only) */}
|
||||
<div className="shadow sm:hidden">
|
||||
<ul role="list" className="mt-2 divide-y divide-slate-200 overflow-hidden shadow sm:hidden">
|
||||
{transactions.map((transaction) => (
|
||||
<li key={transaction.id}>
|
||||
<a href={transaction.href} className="block bg-white px-4 py-4 hover:bg-slate-50">
|
||||
<span className="flex items-center space-x-4">
|
||||
<span className="flex flex-1 space-x-2 truncate">
|
||||
<BanknotesIcon className="h-5 w-5 flex-shrink-0 text-slate-400" aria-hidden="true" />
|
||||
<span className="flex flex-col truncate text-sm text-slate-500">
|
||||
<span className="truncate">{transaction.name}</span>
|
||||
<span>
|
||||
<span className="font-medium text-slate-900">{transaction.amount}</span>{" "}
|
||||
{transaction.currency}
|
||||
</span>
|
||||
<time dateTime={transaction.datetime}>{transaction.date}</time>
|
||||
</span>
|
||||
</span>
|
||||
<ChevronRightIcon className="h-5 w-5 flex-shrink-0 text-slate-400" aria-hidden="true" />
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
<nav
|
||||
className="flex items-center justify-between border-t border-slate-200 bg-white px-4 py-3"
|
||||
aria-label="Pagination">
|
||||
<div className="flex flex-1 justify-between">
|
||||
<a
|
||||
href="#"
|
||||
className="relative inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:text-slate-500">
|
||||
Previous
|
||||
</a>
|
||||
<a
|
||||
href="#"
|
||||
className="relative ml-3 inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:text-slate-500">
|
||||
Next
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
{/* Activity table (small breakpoint and up) */}
|
||||
<div className="hidden sm:block">
|
||||
<div className="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8">
|
||||
<div className="mt-2 flex flex-col">
|
||||
<div className="min-w-full overflow-hidden overflow-x-auto align-middle shadow sm:rounded-lg">
|
||||
<table className="min-w-full divide-y divide-slate-200">
|
||||
<thead>
|
||||
<tr>
|
||||
<th
|
||||
className="bg-slate-50 px-6 py-3 text-left text-sm font-semibold text-slate-900"
|
||||
scope="col">
|
||||
Transaction
|
||||
</th>
|
||||
<th
|
||||
className="bg-slate-50 px-6 py-3 text-right text-sm font-semibold text-slate-900"
|
||||
scope="col">
|
||||
Amount
|
||||
</th>
|
||||
<th
|
||||
className="hidden bg-slate-50 px-6 py-3 text-left text-sm font-semibold text-slate-900 md:block"
|
||||
scope="col">
|
||||
Status
|
||||
</th>
|
||||
<th
|
||||
className="bg-slate-50 px-6 py-3 text-right text-sm font-semibold text-slate-900"
|
||||
scope="col">
|
||||
Date
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y divide-slate-200 bg-white">
|
||||
{transactions.map((transaction) => (
|
||||
<tr key={transaction.id} className="bg-white">
|
||||
<td className="w-full max-w-0 whitespace-nowrap px-6 py-4 text-sm text-slate-900">
|
||||
<div className="flex">
|
||||
<a
|
||||
href={transaction.href}
|
||||
className="group inline-flex space-x-2 truncate text-sm">
|
||||
<BanknotesIcon
|
||||
className="h-5 w-5 flex-shrink-0 text-slate-400 group-hover:text-slate-500"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<p className="truncate text-slate-500 group-hover:text-slate-900">
|
||||
{transaction.name}
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-6 py-4 text-right text-sm text-slate-500">
|
||||
<span className="font-medium text-slate-900">{transaction.amount}</span>
|
||||
{transaction.currency}
|
||||
</td>
|
||||
<td className="hidden whitespace-nowrap px-6 py-4 text-sm text-slate-500 md:block">
|
||||
<span
|
||||
className={classNames(
|
||||
statusStyles[transaction.status],
|
||||
"inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize"
|
||||
)}>
|
||||
{transaction.status}
|
||||
</span>
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-6 py-4 text-right text-sm text-slate-500">
|
||||
<time dateTime={transaction.datetime}>{transaction.date}</time>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
{/* Pagination */}
|
||||
<nav
|
||||
className="flex items-center justify-between border-t border-slate-200 bg-white px-4 py-3 sm:px-6"
|
||||
aria-label="Pagination">
|
||||
<div className="hidden sm:block">
|
||||
<p className="text-sm text-slate-700">
|
||||
Showing <span className="font-medium">1</span> to{" "}
|
||||
<span className="font-medium">10</span> of <span className="font-medium">20</span>{" "}
|
||||
results
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex flex-1 justify-between sm:justify-end">
|
||||
<a
|
||||
href="#"
|
||||
className="relative inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">
|
||||
Previous
|
||||
</a>
|
||||
<a
|
||||
href="#"
|
||||
className="relative ml-3 inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">
|
||||
Next
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</LayoutApp>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,9 +7,11 @@ export default function SiginPage() {
|
||||
|
||||
const submitAction = (e: FormEvent) => {
|
||||
e.preventDefault();
|
||||
formbricks.setEmail("matti@example.com");
|
||||
formbricks.setUserId("123456");
|
||||
formbricks.setAttribute("Plan", "Premium");
|
||||
if (process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID && process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST) {
|
||||
formbricks.setEmail("matti@example.com");
|
||||
formbricks.setUserId("123456");
|
||||
formbricks.setAttribute("Plan", "Premium");
|
||||
}
|
||||
router.push("/app");
|
||||
};
|
||||
return (
|
||||
@@ -27,7 +29,7 @@ export default function SiginPage() {
|
||||
</div>
|
||||
|
||||
<div className="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
|
||||
<div className="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
|
||||
<div className="bg-white px-4 py-8 shadow sm:rounded-lg sm:px-10">
|
||||
<form className="space-y-6" onSubmit={submitAction}>
|
||||
<div>
|
||||
<label htmlFor="email" className="block text-sm font-medium leading-6 text-gray-900">
|
||||
@@ -84,7 +86,7 @@ export default function SiginPage() {
|
||||
<div>
|
||||
<button
|
||||
type="submit"
|
||||
className="flex w-full justify-center rounded-md bg-indigo-500 py-2 px-3 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">
|
||||
className="flex w-full justify-center rounded-md bg-indigo-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">
|
||||
Sign in
|
||||
</button>
|
||||
</div>
|
||||
@@ -104,7 +106,7 @@ export default function SiginPage() {
|
||||
<div>
|
||||
<a
|
||||
href="#"
|
||||
className="inline-flex w-full justify-center rounded-md bg-white py-2 px-4 text-gray-500 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0">
|
||||
className="inline-flex w-full justify-center rounded-md bg-white px-4 py-2 text-gray-500 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0">
|
||||
<span className="sr-only">Sign in with Facebook</span>
|
||||
<svg className="h-5 w-5" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path
|
||||
@@ -119,7 +121,7 @@ export default function SiginPage() {
|
||||
<div>
|
||||
<a
|
||||
href="#"
|
||||
className="inline-flex w-full justify-center rounded-md bg-white py-2 px-4 text-gray-500 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0">
|
||||
className="inline-flex w-full justify-center rounded-md bg-white px-4 py-2 text-gray-500 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0">
|
||||
<span className="sr-only">Sign in with Twitter</span>
|
||||
<svg className="h-5 w-5" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path d="M6.29 18.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0020 3.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.073 4.073 0 01.8 7.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 010 16.407a11.616 11.616 0 006.29 1.84" />
|
||||
@@ -130,7 +132,7 @@ export default function SiginPage() {
|
||||
<div>
|
||||
<a
|
||||
href="#"
|
||||
className="inline-flex w-full justify-center rounded-md bg-white py-2 px-4 text-gray-500 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0">
|
||||
className="inline-flex w-full justify-center rounded-md bg-white px-4 py-2 text-gray-500 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0">
|
||||
<span className="sr-only">Sign in with GitHub</span>
|
||||
<svg className="h-5 w-5" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path
|
||||
|
||||
BIN
apps/demo/public/fb-setup.png
Normal file
BIN
apps/demo/public/fb-setup.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
3
apps/formbricks-com/.env.example
Normal file
3
apps/formbricks-com/.env.example
Normal file
@@ -0,0 +1,3 @@
|
||||
NEXT_PUBLIC_FORMBRICKS_COM_API_HOST=http://localhost:3000
|
||||
NEXT_PUBLIC_FORMBRICKS_COM_ENVIRONMENT_ID=
|
||||
NEXT_PUBLIC_FORMBRICKS_COM_DOCS_FEEDBACK_SURVEY_ID=
|
||||
5
apps/formbricks-com/.gitignore
vendored
5
apps/formbricks-com/.gitignore
vendored
@@ -23,7 +23,6 @@
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
.pnpm-debug.log*
|
||||
|
||||
# local env files
|
||||
.env*.local
|
||||
@@ -35,6 +34,4 @@ yarn-error.log*
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
|
||||
.vscode
|
||||
|
||||
public/sitemap*.xml
|
||||
public/sitemap*.xml
|
||||
@@ -1,34 +0,0 @@
|
||||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
||||
|
||||
## Getting Started
|
||||
|
||||
First, run the development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
|
||||
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
|
||||
|
||||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
|
||||
|
||||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
|
||||
|
||||
## Learn More
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
|
||||
|
||||
## Deploy on Vercel
|
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
|
||||
74
apps/formbricks-com/components/docs/DocsFeedback.tsx
Normal file
74
apps/formbricks-com/components/docs/DocsFeedback.tsx
Normal file
@@ -0,0 +1,74 @@
|
||||
import { useState } from "react";
|
||||
import { handleFeedbackSubmit, updateFeedback } from "../../lib/handleFeedbackSubmit";
|
||||
import { Popover, PopoverTrigger, PopoverContent } from "@formbricks/ui";
|
||||
import { Button } from "@formbricks/ui";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
export const DocsFeedback: React.FC = () => {
|
||||
const router = useRouter();
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const [sharedFeedback, setSharedFeedback] = useState(false);
|
||||
const [responseId, setResponseId] = useState(null);
|
||||
const [freeText, setFreeText] = useState("");
|
||||
|
||||
if (
|
||||
!process.env.NEXT_PUBLIC_FORMBRICKS_COM_DOCS_FEEDBACK_SURVEY_ID ||
|
||||
!process.env.NEXT_PUBLIC_FORMBRICKS_COM_API_HOST ||
|
||||
!process.env.NEXT_PUBLIC_FORMBRICKS_COM_ENVIRONMENT_ID
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="mt-6 inline-flex cursor-default items-center rounded-md border border-slate-200 bg-white p-4 text-slate-800 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-300">
|
||||
{!sharedFeedback ? (
|
||||
<div className="text-center md:text-left">
|
||||
Is everything on this page clear?
|
||||
<Popover open={isOpen} onOpenChange={setIsOpen}>
|
||||
<div className="mt-2 inline-flex space-x-3 md:ml-4 md:mt-0">
|
||||
{["Yes 👍", " No 👎"].map((option) => (
|
||||
<PopoverTrigger
|
||||
key={option}
|
||||
className="rounded border border-slate-200 bg-slate-50 px-4 py-2 text-slate-900 hover:bg-slate-100 hover:text-slate-600 focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-1 dark:border-slate-700 dark:bg-slate-700 dark:text-slate-300 dark:hover:bg-slate-600 dark:hover:text-slate-300"
|
||||
onClick={async () => {
|
||||
const id = await handleFeedbackSubmit(option, router.asPath);
|
||||
setResponseId(id);
|
||||
}}>
|
||||
{option}
|
||||
</PopoverTrigger>
|
||||
))}
|
||||
</div>
|
||||
<PopoverContent className="border-slate-300 bg-white dark:border-slate-500 dark:bg-slate-700">
|
||||
<form>
|
||||
<textarea
|
||||
value={freeText}
|
||||
onChange={(e) => setFreeText(e.target.value)}
|
||||
placeholder="Please explain why..."
|
||||
className="focus:border-brand-dark focus:ring-brand-dark mb-2 w-full rounded-md bg-white text-sm text-slate-900 dark:bg-slate-600 dark:text-slate-200 dark:placeholder:text-slate-200"
|
||||
/>
|
||||
<div className="text-right">
|
||||
<Button
|
||||
type="submit"
|
||||
variant="primary"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
updateFeedback(freeText, responseId);
|
||||
setIsOpen(false);
|
||||
setFreeText("");
|
||||
setSharedFeedback(true);
|
||||
}}>
|
||||
Send
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
</div>
|
||||
) : (
|
||||
<div>Thanks a lot, boss! 🤝</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default DocsFeedback;
|
||||
@@ -1,82 +0,0 @@
|
||||
import clsx from "clsx";
|
||||
import { usePlausible } from "next-plausible";
|
||||
import Script from "next/script";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
formbricks: any;
|
||||
}
|
||||
}
|
||||
|
||||
export default function FeedbackButton() {
|
||||
const plausible = usePlausible();
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const feedbackRef = useRef<HTMLInputElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
// Close the feedback form if the user clicks outside of it
|
||||
function handleClickOutside(event: any) {
|
||||
if (feedbackRef.current && !feedbackRef.current.contains(event.target)) {
|
||||
if (isOpen) setIsOpen(false);
|
||||
}
|
||||
}
|
||||
// Bind the event listener
|
||||
document.addEventListener("mousedown", handleClickOutside);
|
||||
return () => {
|
||||
// Unbind the event listener on clean up
|
||||
document.removeEventListener("mousedown", handleClickOutside);
|
||||
};
|
||||
}, [feedbackRef, isOpen]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Script src="https://cdn.jsdelivr.net/npm/@formbricks/feedback@0.3/dist/index.umd.js" defer />
|
||||
|
||||
<Script id="feedback-setup">{`
|
||||
window.formbricks = {
|
||||
...window.formbricks,
|
||||
config: {
|
||||
formbricksUrl: "https://app.formbricks.com",
|
||||
formId: "cle2pg7no0000nu0hjefwy3w7",
|
||||
containerId: "formbricks-feedback-wrapper",
|
||||
contact: {
|
||||
name: "Matti",
|
||||
position: "Co-Founder",
|
||||
imgUrl: "https://avatars.githubusercontent.com/u/675065?s=128&v=4",
|
||||
},
|
||||
},
|
||||
};`}</Script>
|
||||
<div
|
||||
className={clsx(
|
||||
"xs:flex-row xs:w-[18rem] xs:-translate-y-1/2 z-50 h-fit w-full transition-all duration-500 ease-in-out",
|
||||
isOpen ? "xs:-translate-x-0 translate-y-0" : "xs:translate-x-full xs:-mr-1 translate-y-full"
|
||||
)}>
|
||||
<div
|
||||
className="xs:flex-row flex h-full flex-col"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
}}
|
||||
ref={feedbackRef}>
|
||||
<button
|
||||
className="xs:-rotate-90 xs:top-1/2 xs:-left-[5.75rem] xs:-translate-y-1/2 xs:-translate-x-0 xs:w-32 xs:p-4 bg-brand-dark absolute left-1/2 w-28 -translate-x-1/2 -translate-y-full rounded-t-lg p-3 font-medium text-white"
|
||||
onClick={() => {
|
||||
if (!isOpen) {
|
||||
plausible("openFeedback");
|
||||
if (window) {
|
||||
window.formbricks.render();
|
||||
window.formbricks.resetForm();
|
||||
}
|
||||
}
|
||||
setIsOpen(!isOpen);
|
||||
}}>
|
||||
{isOpen ? "Close" : "Feedback"}
|
||||
</button>
|
||||
<div
|
||||
className="xs:rounded-bl-lg xs:rounded-tr-none h-full w-full overflow-hidden rounded-bl-none rounded-tr-lg rounded-tl-lg bg-slate-50 shadow-lg"
|
||||
id="formbricks-feedback-wrapper"></div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -6,6 +6,8 @@ declare global {
|
||||
}
|
||||
}
|
||||
|
||||
export function FeedbackButton() {
|
||||
export const FeedbackButton: React.FC = () => {
|
||||
return <Button variant="secondary">Open Feedback</Button>;
|
||||
}
|
||||
};
|
||||
|
||||
export default FeedbackButton;
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import clsx from "clsx";
|
||||
import { FooterLogo, Logomark } from "@/components/shared/Logo";
|
||||
import { FooterLogo } from "@/components/shared/Logo";
|
||||
import { MobileNavigation } from "@/components/shared/MobileNavigation";
|
||||
import { Navigation } from "@/components/shared/Navigation";
|
||||
import { Prose } from "@/components/shared/Prose";
|
||||
@@ -10,7 +6,12 @@ import { Search } from "@/components/shared/Search";
|
||||
import { ThemeSelector } from "@/components/shared/ThemeSelector";
|
||||
import navigation from "@/lib/docsNavigation";
|
||||
import { Button } from "@formbricks/ui";
|
||||
import clsx from "clsx";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import MetaInformation from "../shared/MetaInformation";
|
||||
import DocsFeedback from "./DocsFeedback";
|
||||
|
||||
function GitHubIcon(props: any) {
|
||||
return (
|
||||
@@ -21,7 +22,6 @@ function GitHubIcon(props: any) {
|
||||
}
|
||||
|
||||
function Header({ navigation }: any) {
|
||||
const router = useRouter();
|
||||
let [isScrolled, setIsScrolled] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -56,17 +56,20 @@ function Header({ navigation }: any) {
|
||||
</div>
|
||||
<div className="hidden items-center justify-end md:flex md:flex-1 lg:w-0">
|
||||
<ThemeSelector className="relative z-10 mr-5" />
|
||||
|
||||
<Button
|
||||
variant="secondary"
|
||||
EndIcon={GitHubIcon}
|
||||
endIconClassName="fill-slate-800 dark:fill-slate-200 ml-2"
|
||||
onClick={() => router.push("https://github.com/formbricks/formbricks")}>
|
||||
View on Github
|
||||
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>
|
||||
@@ -78,36 +81,82 @@ interface LayoutProps {
|
||||
children: React.ReactNode;
|
||||
meta: {
|
||||
title: string;
|
||||
description?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export function Layout({ children, meta }: LayoutProps) {
|
||||
export const Layout: React.FC<LayoutProps> = ({ children, meta }) => {
|
||||
let router = useRouter();
|
||||
let isHomePage = router.pathname === "/";
|
||||
let allLinks = navigation.flatMap((section) => section.links);
|
||||
let linkIndex = allLinks.findIndex((link) => link.href === router.pathname);
|
||||
let previousPage = allLinks[linkIndex - 1];
|
||||
let nextPage = allLinks[linkIndex + 1];
|
||||
let section = navigation.find((section) => section.links.find((link) => link.href === router.pathname));
|
||||
|
||||
const linkRef = useRef<HTMLLIElement>(null);
|
||||
const parentRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
const preserveScroll = () => {
|
||||
const scroll = Math.abs(linkRef.current.getBoundingClientRect().top - linkRef.current.offsetTop);
|
||||
sessionStorage.setItem("scrollPosition", (scroll + 89).toString());
|
||||
};
|
||||
|
||||
const useExternalLinks = (selector: string) => {
|
||||
useEffect(() => {
|
||||
const links = document.querySelectorAll(selector);
|
||||
|
||||
links.forEach((link) => {
|
||||
link.setAttribute("target", "_blank");
|
||||
link.setAttribute("rel", "noopener noreferrer");
|
||||
});
|
||||
|
||||
return () => {
|
||||
links.forEach((link) => {
|
||||
link.removeAttribute("target");
|
||||
link.removeAttribute("rel");
|
||||
});
|
||||
};
|
||||
}, [selector]);
|
||||
};
|
||||
|
||||
useExternalLinks(".prose a");
|
||||
|
||||
useEffect(() => {
|
||||
if (parentRef.current) {
|
||||
const scrollPosition = Number.parseInt(sessionStorage.getItem("scrollPosition"), 10);
|
||||
if (scrollPosition) {
|
||||
parentRef.current.scrollTop = scrollPosition;
|
||||
}
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<MetaInformation
|
||||
title="Formbricks Documentation"
|
||||
description="Open-source Experience Management for Digital Products."
|
||||
title={`Formbricks Docs | ${meta.title}`}
|
||||
description={
|
||||
meta.description ? meta.description : "Open-source Experience Management for Digital Products."
|
||||
}
|
||||
/>
|
||||
<Header navigation={navigation} />
|
||||
|
||||
<div className="max-w-8xl relative mx-auto flex justify-center sm:px-2 lg:px-8 xl:px-12">
|
||||
<div className="hidden lg:relative lg:block lg:flex-none">
|
||||
<div className="absolute inset-y-0 right-0 w-[50vw] bg-slate-50 dark:hidden" />
|
||||
<div className="absolute top-16 bottom-0 right-0 hidden h-12 w-px bg-gradient-to-t from-slate-800 dark:block" />
|
||||
<div className="absolute top-28 bottom-0 right-0 hidden w-px bg-slate-800 dark:block" />
|
||||
<div className="sticky top-[4.5rem] -ml-0.5 h-[calc(100vh-4.5rem)] overflow-y-auto overflow-x-hidden py-16 pl-0.5">
|
||||
<Navigation navigation={navigation} className="w-64 pr-8 xl:w-72 xl:pr-16" />
|
||||
<div className="absolute bottom-0 right-0 top-16 hidden h-12 w-px bg-gradient-to-t from-slate-800 dark:block" />
|
||||
<div className="absolute bottom-0 right-0 top-28 hidden w-px bg-slate-800 dark:block" />
|
||||
<div
|
||||
className="sticky top-[4.5rem] -ml-0.5 h-[calc(100vh-4.5rem)] overflow-y-auto overflow-x-hidden py-16 pl-0.5"
|
||||
ref={parentRef}>
|
||||
<Navigation
|
||||
navigation={navigation}
|
||||
preserveScroll={preserveScroll}
|
||||
linkRef={linkRef}
|
||||
className="w-64 pr-8 xl:w-72 xl:pr-16"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pr-0 lg:pl-8 xl:px-16">
|
||||
<div className="min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16">
|
||||
<article>
|
||||
{(meta.title || section) && (
|
||||
<header className="mb-9 space-y-1">
|
||||
@@ -125,6 +174,7 @@ export function Layout({ children, meta }: LayoutProps) {
|
||||
)}
|
||||
<Prose className="">{children}</Prose>
|
||||
</article>
|
||||
<DocsFeedback />
|
||||
<dl className="mt-12 flex border-t border-slate-200 pt-6 dark:border-slate-800">
|
||||
{previousPage && (
|
||||
<div>
|
||||
@@ -156,7 +206,7 @@ export function Layout({ children, meta }: LayoutProps) {
|
||||
)}
|
||||
</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>
|
||||
@@ -168,4 +218,4 @@ export function Layout({ children, meta }: LayoutProps) {
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Button } from "@formbricks/ui";
|
||||
import { Button, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@formbricks/ui";
|
||||
import { PlusIcon, TrashIcon } from "@heroicons/react/24/solid";
|
||||
import { useState } from "react";
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@formbricks/ui";
|
||||
|
||||
const DummyUI: React.FC = () => {
|
||||
const eventClasses = [
|
||||
@@ -44,7 +43,7 @@ const DummyUI: React.FC = () => {
|
||||
{eventClasses.map((eventClass) => (
|
||||
<SelectItem
|
||||
key={eventClass.id}
|
||||
className="py-1 px-0.5 text-slate-800 dark:bg-slate-700 dark:text-slate-300 dark:ring-slate-700"
|
||||
className="px-0.5 py-1 text-slate-800 dark:bg-slate-700 dark:text-slate-300 dark:ring-slate-700"
|
||||
value={eventClass.id}>
|
||||
{eventClass.name}
|
||||
</SelectItem>
|
||||
|
||||
@@ -1,17 +1,24 @@
|
||||
import Modal from "../shared/Modal";
|
||||
import { Button } from "@formbricks/ui";
|
||||
import { Input } from "@formbricks/ui";
|
||||
import { Label } from "@formbricks/ui";
|
||||
import { RadioGroup, RadioGroupItem } from "@formbricks/ui";
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@formbricks/ui";
|
||||
import {
|
||||
Button,
|
||||
Input,
|
||||
Label,
|
||||
RadioGroup,
|
||||
RadioGroupItem,
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@formbricks/ui";
|
||||
import { CursorArrowRaysIcon } from "@heroicons/react/24/solid";
|
||||
import Modal from "../shared/Modal";
|
||||
|
||||
interface EventDetailModalProps {
|
||||
open: boolean;
|
||||
setOpen: (v: boolean) => void;
|
||||
}
|
||||
|
||||
export default function AddNoCodeEventModalDummy({ open, setOpen }: EventDetailModalProps) {
|
||||
export const AddNoCodeEventModalDummy: React.FC<EventDetailModalProps> = ({ open, setOpen }) => {
|
||||
return (
|
||||
<Modal open={open} setOpen={setOpen} noPadding>
|
||||
<div className="flex h-full flex-col rounded-lg bg-slate-50 dark:bg-slate-800">
|
||||
@@ -22,11 +29,9 @@ export default function AddNoCodeEventModalDummy({ open, setOpen }: EventDetailM
|
||||
<CursorArrowRaysIcon />
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-xl font-medium text-slate-700 dark:text-slate-300">
|
||||
Add No-Code Event
|
||||
</div>
|
||||
<div className="text-xl font-medium text-slate-700 dark:text-slate-300">Add Action</div>
|
||||
<div className="text-sm text-slate-500">
|
||||
Create a new no-code event to filter your user base with.
|
||||
Create a new user action to display surveys when it's triggered.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -123,4 +128,6 @@ export default function AddNoCodeEventModalDummy({ open, setOpen }: EventDetailM
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default AddNoCodeEventModalDummy;
|
||||
|
||||
45
apps/formbricks-com/components/dummyUI/CTAQuestion.tsx
Normal file
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
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
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
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>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
export default function Headline({ headline, questionId }: { headline: string; questionId: string }) {
|
||||
export const Headline: React.FC<{ headline: string; questionId: string }> = ({ headline, questionId }) => {
|
||||
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>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default Headline;
|
||||
|
||||
11
apps/formbricks-com/components/dummyUI/HtmlBody.tsx
Normal file
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,19 +1,27 @@
|
||||
import clsx from "clsx";
|
||||
import { ReactNode, useEffect, useState } from "react";
|
||||
import { cn } from "@formbricks/lib/cn";
|
||||
|
||||
export default function Modal({ children, isOpen }: { children: ReactNode; isOpen: boolean }) {
|
||||
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>
|
||||
|
||||
@@ -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,5 +1,5 @@
|
||||
import clsx from "clsx";
|
||||
import type { MultipleChoiceSingleQuestion } 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";
|
||||
@@ -26,25 +26,24 @@ export default function MultipleChoiceSingleQuestion({
|
||||
[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} />
|
||||
<div className="mt-4">
|
||||
<fieldset>
|
||||
<legend className="sr-only">Choices</legend>
|
||||
<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 default function MultipleChoiceSingleQuestion({
|
||||
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>
|
||||
|
||||
84
apps/formbricks-com/components/dummyUI/NPSQuestion.tsx
Normal file
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,10 +1,11 @@
|
||||
import type { OpenTextQuestion } from "./questionTypes";
|
||||
import type { OpenTextQuestion } from "@formbricks/types/questions";
|
||||
import { useState } from "react";
|
||||
import Headline from "./Headline";
|
||||
import Subheader from "./Subheader";
|
||||
|
||||
interface OpenTextQuestionProps {
|
||||
question: OpenTextQuestion;
|
||||
onSubmit: (id: string) => void;
|
||||
onSubmit: (data: { [x: string]: any }) => void;
|
||||
lastQuestion: boolean;
|
||||
brandColor: string;
|
||||
}
|
||||
@@ -15,13 +16,18 @@ export default function OpenTextQuestion({
|
||||
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 default function OpenTextQuestion({
|
||||
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>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import clsx from "clsx";
|
||||
import { ReactNode, useEffect, useState } from "react";
|
||||
|
||||
export default function Modal({ children, isOpen }: { children: ReactNode; isOpen: boolean }) {
|
||||
export const Modal: React.FC<{ children: ReactNode; isOpen: boolean }> = ({ children, isOpen }) => {
|
||||
const [show, setShow] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -22,4 +22,6 @@ export default function Modal({ children, isOpen }: { children: ReactNode; isOpe
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default Modal;
|
||||
|
||||
@@ -1,76 +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 default function PreviewSurvey({ activeQuestionId, questions, brandColor }: PreviewSurveyProps) {
|
||||
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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export default function Progress({ progress, brandColor }: { progress: number; brandColor: string }) {
|
||||
export const Progress: React.FC<{ progress: number; brandColor: string }> = ({ progress, brandColor }) => {
|
||||
return (
|
||||
<div className="h-1 w-full rounded-full bg-slate-200">
|
||||
<div
|
||||
@@ -6,4 +6,6 @@ export default function Progress({ progress, brandColor }: { progress: number; b
|
||||
style={{ backgroundColor: brandColor, width: `${Math.floor(progress * 100)}%` }}></div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default Progress;
|
||||
|
||||
@@ -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
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,4 +1,7 @@
|
||||
export default function Subheader({ subheader, questionId }: { subheader?: string; questionId: string }) {
|
||||
export const Subheader: React.FC<{ subheader?: string; questionId: string }> = ({
|
||||
subheader,
|
||||
questionId,
|
||||
}) => {
|
||||
return (
|
||||
<label
|
||||
htmlFor={questionId}
|
||||
@@ -6,4 +9,6 @@ export default function Subheader({ subheader, questionId }: { subheader?: strin
|
||||
{subheader}
|
||||
</label>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default Subheader;
|
||||
|
||||
@@ -1,208 +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 "@formbricks/types/templates";
|
||||
import { useEffect, useState } from "react";
|
||||
import { cn } from "@formbricks/lib/cn";
|
||||
import { templates } from "./templates";
|
||||
import type { Template } from "./templateTypes";
|
||||
|
||||
export default function TemplateList() {
|
||||
const onboardingSegmentation: Template = {
|
||||
name: "Onboarding Segmentation",
|
||||
icon: OnboardingIcon,
|
||||
category: "Product Management",
|
||||
description: "Learn more about who signed up to your product and why.",
|
||||
preset: {
|
||||
name: "Onboarding Segmentation",
|
||||
questions: [
|
||||
{
|
||||
id: createId(),
|
||||
type: "multipleChoiceSingle",
|
||||
headline: "What is your role?",
|
||||
subheader: "Please select one of the following options:",
|
||||
required: true,
|
||||
choices: [
|
||||
{
|
||||
id: createId(),
|
||||
label: "Founder",
|
||||
},
|
||||
{
|
||||
id: createId(),
|
||||
label: "Executive",
|
||||
},
|
||||
{
|
||||
id: createId(),
|
||||
label: "Product Manager",
|
||||
},
|
||||
{
|
||||
id: createId(),
|
||||
label: "Product Owner",
|
||||
},
|
||||
{
|
||||
id: createId(),
|
||||
label: "Software Engineer",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: createId(),
|
||||
type: "multipleChoiceSingle",
|
||||
headline: "What's your company size?",
|
||||
subheader: "Please select one of the following options:",
|
||||
required: true,
|
||||
choices: [
|
||||
{
|
||||
id: createId(),
|
||||
label: "only me",
|
||||
},
|
||||
{
|
||||
id: createId(),
|
||||
label: "1-5 employees",
|
||||
},
|
||||
{
|
||||
id: createId(),
|
||||
label: "6-10 employees",
|
||||
},
|
||||
{
|
||||
id: createId(),
|
||||
label: "11-100 employees",
|
||||
},
|
||||
{
|
||||
id: createId(),
|
||||
label: "over 100 employees",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: createId(),
|
||||
type: "multipleChoiceSingle",
|
||||
headline: "How did you hear about us first?",
|
||||
subheader: "Please select one of the following options:",
|
||||
required: true,
|
||||
choices: [
|
||||
{
|
||||
id: createId(),
|
||||
label: "Recommendation",
|
||||
},
|
||||
{
|
||||
id: createId(),
|
||||
label: "Social Media",
|
||||
},
|
||||
{
|
||||
id: createId(),
|
||||
label: "Ads",
|
||||
},
|
||||
{
|
||||
id: createId(),
|
||||
label: "Google Search",
|
||||
},
|
||||
{
|
||||
id: createId(),
|
||||
label: "in a Podcast",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
type TemplateList = {
|
||||
onTemplateClick: (template: Template) => void;
|
||||
activeTemplate: Template | null;
|
||||
};
|
||||
|
||||
const [activeTemplate, setActiveTemplate] = useState<Template | null>(onboardingSegmentation);
|
||||
const ALL_CATEGORY_NAME = "All";
|
||||
|
||||
const categories = [...(Array.from(new Set(templates.map((template) => template.category))) as string[])];
|
||||
export default function TemplateList({ onTemplateClick, activeTemplate }: TemplateList) {
|
||||
const [selectedFilter, setSelectedFilter] = useState(ALL_CATEGORY_NAME);
|
||||
|
||||
const [selectedFilter, setSelectedFilter] = useState(categories[0]);
|
||||
const [categories, setCategories] = useState<Array<string>>([]);
|
||||
|
||||
const customSurvey: Template = {
|
||||
name: "Custom Survey",
|
||||
description: "Create your survey from scratch.",
|
||||
icon: null,
|
||||
preset: {
|
||||
name: "New Survey",
|
||||
questions: [
|
||||
{
|
||||
id: createId(),
|
||||
type: "openText",
|
||||
headline: "What's poppin?",
|
||||
subheader: "This can help us improve your experience.",
|
||||
placeholder: "Type your answer here...",
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
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 (
|
||||
<div className="hidden h-full flex-col lg:flex">
|
||||
<div className="z-0 flex min-h-[90vh] overflow-hidden">
|
||||
<main className="relative z-0 max-h-[90vh] flex-1 overflow-y-auto rounded-l-lg bg-slate-100 py-6 px-6 focus:outline-none dark:bg-slate-700">
|
||||
<div className="mb-6 flex space-x-2">
|
||||
{categories.map((category) => (
|
||||
<button
|
||||
key={category}
|
||||
type="button"
|
||||
onClick={() => setSelectedFilter(category)}
|
||||
className={clsx(
|
||||
selectedFilter === category
|
||||
? "text-brand-dark border-brand-dark font-semibold"
|
||||
: "border-slate-300 text-slate-700 hover:bg-slate-100 dark:border-slate-600 dark:text-slate-400",
|
||||
"rounded border bg-slate-50 px-3 py-1 text-xs transition-all duration-150 dark:bg-slate-800 "
|
||||
)}>
|
||||
{category}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
|
||||
{templates
|
||||
.filter((template) => selectedFilter === "All" || template.category === selectedFilter)
|
||||
.map((template: Template) => (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setActiveTemplate(template)}
|
||||
key={template.name}
|
||||
className={clsx(
|
||||
activeTemplate?.name === template.name && "ring-brand ring-2",
|
||||
"duration-120 group relative rounded-lg bg-white p-6 shadow transition-all duration-150 hover:scale-105 dark:bg-slate-600"
|
||||
)}>
|
||||
<div className="absolute top-6 right-6 rounded border border-slate-300 bg-slate-50 px-1.5 py-0.5 text-xs text-slate-500 dark:border-slate-500 dark:bg-slate-700 dark:text-slate-300">
|
||||
{template.category}
|
||||
</div>
|
||||
<template.icon className="h-8 w-8" />
|
||||
<h3 className="text-md mt-3 mb-1 text-left font-bold text-slate-700 dark:text-slate-200">
|
||||
{template.name}
|
||||
</h3>
|
||||
<p className="text-left text-xs text-slate-600 dark:text-slate-400">
|
||||
{template.description}
|
||||
</p>
|
||||
</button>
|
||||
))}
|
||||
<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={() => 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"
|
||||
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"
|
||||
)}>
|
||||
<PlusCircleIcon className="text-brand-dark h-8 w-8 transition-all duration-150 group-hover:scale-110" />
|
||||
<h3 className="text-md mt-3 mb-1 text-left font-bold text-slate-700 dark:text-slate-200">
|
||||
{customSurvey.name}
|
||||
<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">
|
||||
{customSurvey.description}
|
||||
</p>
|
||||
<p className="text-left text-xs text-slate-600 dark:text-slate-400">{template.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>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
52
apps/formbricks-com/components/dummyUI/ThankYouCard.tsx
Normal file
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?: "Popular" | "Product Management" | "Growth Marketing" | "Increase Revenue";
|
||||
preset: {
|
||||
name: string;
|
||||
questions: Question[];
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
import { EyeIcon, HandPuzzleIcon, CodeFileIcon } from "@formbricks/ui";
|
||||
import { CodeFileIcon, EyeIcon, HandPuzzleIcon } from "@formbricks/ui";
|
||||
import HeadingCentered from "../shared/HeadingCentered";
|
||||
|
||||
const features = [
|
||||
@@ -21,9 +21,9 @@ const features = [
|
||||
icon: CodeFileIcon,
|
||||
},
|
||||
];
|
||||
export default function Features() {
|
||||
export const Features: React.FC = () => {
|
||||
return (
|
||||
<div className="relative px-4 pt-16 pb-20 sm:px-6 lg:px-8 lg:pt-24 lg:pb-28">
|
||||
<div className="relative px-4 pb-10 sm:px-6 lg:px-8 lg:pb-14 lg:pt-24">
|
||||
<div className="relative mx-auto max-w-7xl">
|
||||
<HeadingCentered
|
||||
closer
|
||||
@@ -33,28 +33,34 @@ export default function Features() {
|
||||
/>
|
||||
|
||||
<ul role="list" className="grid grid-cols-1 gap-4 pt-8 sm:grid-cols-2 md:grid-cols-3 lg:gap-10">
|
||||
{features.map((feature) => (
|
||||
<li
|
||||
key={feature.id}
|
||||
className="relative col-span-1 mt-16 flex flex-col rounded-xl bg-slate-100 text-center dark:bg-slate-700">
|
||||
<div className="absolute -mt-12 w-full">
|
||||
<div className="mx-auto flex h-20 w-20 items-center justify-center rounded-3xl bg-slate-200 shadow dark:bg-slate-800">
|
||||
<feature.icon className="text-brand-dark dark:text-brand-light mx-auto h-10 w-10 flex-shrink-0" />
|
||||
{features.map((feature) => {
|
||||
const IconComponent: React.ElementType = feature.icon;
|
||||
|
||||
return (
|
||||
<li
|
||||
key={feature.id}
|
||||
className="relative col-span-1 mt-16 flex flex-col rounded-xl bg-slate-100 text-center dark:bg-slate-700">
|
||||
<div className="absolute -mt-12 w-full">
|
||||
<div className="mx-auto flex h-20 w-20 items-center justify-center rounded-3xl bg-slate-200 shadow dark:bg-slate-800">
|
||||
<IconComponent className="text-brand-dark dark:text-brand-light mx-auto h-10 w-10 flex-shrink-0" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-1 flex-col p-10">
|
||||
<h3 className="my-4 text-lg font-medium text-slate-800 dark:text-slate-200">
|
||||
{feature.name}
|
||||
</h3>
|
||||
<dl className="mt-1 flex flex-grow flex-col justify-between">
|
||||
<dt className="sr-only">Description</dt>
|
||||
<dd className="text-sm text-slate-600 dark:text-slate-400">{feature.description}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
<div className="flex flex-1 flex-col p-10">
|
||||
<h3 className="my-4 text-lg font-medium text-slate-800 dark:text-slate-200">
|
||||
{feature.name}
|
||||
</h3>
|
||||
<dl className="mt-1 flex flex-grow flex-col justify-between">
|
||||
<dt className="sr-only">Description</dt>
|
||||
<dd className="text-sm text-slate-600 dark:text-slate-400">{feature.description}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default Features;
|
||||
|
||||
45
apps/formbricks-com/components/home/GitHubSponsorship.tsx
Normal file
45
apps/formbricks-com/components/home/GitHubSponsorship.tsx
Normal file
@@ -0,0 +1,45 @@
|
||||
import GitHubMarkWhite from "@/images/github-mark-white.svg";
|
||||
import GitHubMarkDark from "@/images/github-mark.svg";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
|
||||
export const GitHubSponsorship: React.FC = () => {
|
||||
return (
|
||||
<div className="mx-4 my-4 mb-12 mt-12 rounded-xl bg-gradient-to-br from-slate-100 to-slate-200 px-4 py-8 dark:from-slate-800 dark:via-slate-800 dark:to-slate-700 sm:px-6 sm:pb-12 sm:pt-8 md:max-w-none lg:mt-6 lg:px-8 lg:pt-8">
|
||||
<style jsx>{`
|
||||
@media (min-width: 426px);
|
||||
`}</style>
|
||||
<div className="right-10 lg:absolute">
|
||||
<Image
|
||||
src={GitHubMarkDark}
|
||||
alt="GitHub Sponsors Formbricks badge"
|
||||
width={100}
|
||||
height={100}
|
||||
className="mr-12 block dark:hidden md:mr-4 "
|
||||
/>
|
||||
<Image
|
||||
src={GitHubMarkWhite}
|
||||
alt="GitHub Sponsors Formbricks badge"
|
||||
width={100}
|
||||
height={100}
|
||||
className="mr-12 hidden dark:block md:mr-4 "
|
||||
/>
|
||||
</div>
|
||||
<h2 className="mt-4 text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-200 lg:text-2xl">
|
||||
Proudly Open-Source 🤍
|
||||
</h2>
|
||||
<p className="lg:text-md mt-4 max-w-3xl text-slate-500 dark:text-slate-400">
|
||||
We're proud to to be supported by GitHubs Open-Source Program!{" "}
|
||||
<span>
|
||||
<Link
|
||||
href="/blog/inaugural-batch-github-accelerator"
|
||||
className="decoration-brand-dark underline underline-offset-4">
|
||||
Read more.
|
||||
</Link>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default GitHubSponsorship;
|
||||
@@ -1,99 +1,119 @@
|
||||
import CalLogoDark from "@/images/clients/cal-logo-dark.svg";
|
||||
import CalLogoLight from "@/images/clients/cal-logo-light.svg";
|
||||
import ClovyrLogo from "@/images/clients/clovyr-logo.svg";
|
||||
import CrowdLogoDark from "@/images/clients/crowd-logo-dark.svg";
|
||||
import CrowdLogoLight from "@/images/clients/crowd-logo-light.svg";
|
||||
import StackOceanLogoDark from "@/images/clients/stack-ocean-dark.png";
|
||||
import StackOceanLogoLight from "@/images/clients/stack-ocean-light.png";
|
||||
import NILogoDark from "@/images/clients/niLogoDark.svg";
|
||||
import NILogoLight from "@/images/clients/niLogoWhite.svg";
|
||||
import AnimationFallback from "@/public/animations/opensource-xm-platform-formbricks-fallback.png";
|
||||
import { Button } from "@formbricks/ui";
|
||||
import { ChevronRightIcon } from "@heroicons/react/24/outline";
|
||||
import { usePlausible } from "next-plausible";
|
||||
import Image from "next/image";
|
||||
import { useRouter } from "next/router";
|
||||
import TemplateList from "../dummyUI/TemplateList";
|
||||
import HeroAnimation from "./HeroAnimation";
|
||||
|
||||
interface Props {}
|
||||
|
||||
export default function Hero({}: Props) {
|
||||
export const Hero: React.FC = ({}) => {
|
||||
const plausible = usePlausible();
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<div className="relative">
|
||||
<div className="px-4 py-20 text-center sm:px-6 lg:px-8 lg:py-28">
|
||||
<h1 className="text-3xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-4xl md:text-5xl">
|
||||
<span className="xl:inline">Better experience data.</span>{" "}
|
||||
<span className="from-brand-light to-brand-dark bg-gradient-to-b bg-clip-text text-transparent xl:inline">
|
||||
Better business
|
||||
</span>
|
||||
<span className="inline ">.</span>
|
||||
<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 specific customer segments at any point in the user journey.
|
||||
Understand what customers think & feel about your product.
|
||||
<br />
|
||||
<span className="hidden md:block">
|
||||
Continuously measure what your customers think and feel.{" "}
|
||||
<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-lg items-center space-x-8 sm:flex sm:justify-center md:mt-8">
|
||||
<p className="hidden whitespace-nowrap text-sm text-slate-400 dark:text-slate-500 md:block">
|
||||
<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-3 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="Cal Logo"
|
||||
className="block rounded-lg pb-1 opacity-50 hover:opacity-100 dark:hidden"
|
||||
alt="Crowd.dev Logo"
|
||||
className="block rounded-lg pb-1 hover:opacity-100 dark:hidden md:opacity-50"
|
||||
width={200}
|
||||
/>
|
||||
<Image
|
||||
src={CrowdLogoDark}
|
||||
alt="Cal Logo"
|
||||
className="hidden rounded-lg pb-1 opacity-50 hover:opacity-100 dark:block"
|
||||
alt="Crowd.dev Logo"
|
||||
className="hidden rounded-lg pb-1 hover:opacity-100 dark:block md:opacity-50"
|
||||
width={200}
|
||||
/>
|
||||
<Image
|
||||
src={StackOceanLogoLight}
|
||||
alt="Cal Logo"
|
||||
className="block rounded-lg pb-1 opacity-50 hover:opacity-100 dark:hidden"
|
||||
src={ClovyrLogo}
|
||||
alt="Clovyr Logo"
|
||||
className="rounded-lg pb-1 hover:opacity-100 md:opacity-50"
|
||||
width={200}
|
||||
/>
|
||||
<Image
|
||||
src={StackOceanLogoDark}
|
||||
alt="Cal Logo"
|
||||
className="hidden rounded-lg pb-1 opacity-50 hover:opacity-100 dark:block"
|
||||
src={NILogoDark}
|
||||
alt="Neverinstall Logo"
|
||||
className="block pb-1 hover:opacity-100 dark:hidden md:opacity-50"
|
||||
width={200}
|
||||
/>
|
||||
<Image
|
||||
src={NILogoLight}
|
||||
alt="Neverinstall Logo"
|
||||
className="hidden pb-1 hover:opacity-100 dark:block md:opacity-50"
|
||||
width={200}
|
||||
/>
|
||||
</div>
|
||||
{/* <Button
|
||||
variant="secondary"
|
||||
</div>
|
||||
<div className="hidden pt-10 md:block">
|
||||
<Button
|
||||
variant="highlight"
|
||||
className="mr-3 px-6"
|
||||
onClick={() => setVideoModal(true)}
|
||||
EndIcon={PlayCircleIcon}
|
||||
endIconClassName=" ml-2">
|
||||
Watch video
|
||||
</Button> */}
|
||||
onClick={() => {
|
||||
router.push("https://app.formbricks.com/auth/signup");
|
||||
plausible("Hero_CTA_CreateSurvey");
|
||||
}}>
|
||||
Create survey
|
||||
</Button>
|
||||
<Button
|
||||
variant="secondary"
|
||||
className="px-6"
|
||||
onClick={() => {
|
||||
router.push("/demo");
|
||||
plausible("Hero_CTA_LaunchDemo");
|
||||
}}>
|
||||
Live demo
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<TemplateList />
|
||||
<div className="relative px-2 md:px-0">
|
||||
<HeroAnimation fallbackImage={AnimationFallback} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
function GitHubIcon(props: any) {
|
||||
return (
|
||||
<svg aria-hidden="true" viewBox="0 0 16 16" {...props}>
|
||||
<path d="M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default Hero;
|
||||
|
||||
53
apps/formbricks-com/components/home/HeroAnimation.tsx
Normal file
53
apps/formbricks-com/components/home/HeroAnimation.tsx
Normal file
@@ -0,0 +1,53 @@
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import type { LottiePlayer } from "lottie-web";
|
||||
import Image from "next/image";
|
||||
|
||||
export const HeroAnimation: React.FC<any> = ({ fallbackImage, ...props }) => {
|
||||
const [loaded, setLoaded] = useState(false);
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
const [lottie, setLottie] = useState<LottiePlayer | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
import("lottie-web").then((Lottie) => setLottie(Lottie.default));
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (lottie && ref.current) {
|
||||
const animation = lottie.loadAnimation({
|
||||
container: ref.current,
|
||||
renderer: "svg",
|
||||
loop: true,
|
||||
autoplay: true,
|
||||
// path to your animation file, place it inside public folder
|
||||
path: "/animations/opensource-xm-platform-formbricks.json",
|
||||
});
|
||||
|
||||
animation.addEventListener("DOMLoaded", () => {
|
||||
setLoaded(true);
|
||||
});
|
||||
|
||||
return () => animation.destroy();
|
||||
}
|
||||
}, [lottie]);
|
||||
|
||||
return (
|
||||
<div className="relative" {...props}>
|
||||
<div ref={ref} />
|
||||
{!loaded && (
|
||||
<div className="absolute inset-0">
|
||||
<Image
|
||||
src={fallbackImage}
|
||||
alt="Fallback Image"
|
||||
layout="fill"
|
||||
objectFit="cover"
|
||||
objectPosition="center"
|
||||
className="transition-opacity duration-300"
|
||||
style={{ opacity: loaded ? 0 : 1 }}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default HeroAnimation;
|
||||
@@ -4,21 +4,21 @@ import ImageEventTriggerDark from "@/images/event-trigger-dark.svg";
|
||||
import ImageEventTriggerLight from "@/images/event-trigger-light.svg";
|
||||
import Image from "next/image";
|
||||
|
||||
export default function Highlights({}) {
|
||||
export const Highlights: React.FC = ({}) => {
|
||||
return (
|
||||
<>
|
||||
<div className="mx-auto mt-8 mb-12 max-w-lg md:mt-32 md:mb-0 md:max-w-none">
|
||||
<div className="mx-auto mb-12 mt-8 max-w-lg md:mb-0 md:mt-32 md:max-w-none">
|
||||
<div className="px-4 sm:max-w-4xl sm:px-6 lg:max-w-7xl lg:px-8">
|
||||
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
|
||||
<div className="pb-8 md:pb-0">
|
||||
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-200">
|
||||
<h2 className="xs:text-3xl text-2xl font-bold leading-7 tracking-tight text-slate-800 dark:text-slate-200">
|
||||
Ask at the right moment,
|
||||
<br />
|
||||
<span className="font-light">get the data you need.</span>
|
||||
</h2>
|
||||
<p className="text-md mt-6 max-w-lg leading-7 text-slate-500 dark:text-slate-400">
|
||||
Follow up emails are so 2010. Ask users as they experience your product - and leverage a 3x
|
||||
higher conversion rate.
|
||||
Follow up emails are so 2010. Ask users as they experience your product - and leverage a
|
||||
significantly higher conversion rate.
|
||||
</p>
|
||||
</div>
|
||||
<div className="rounded-lg bg-slate-100 py-6 pr-4 dark:bg-slate-800 sm:py-16 sm:pr-8">
|
||||
@@ -36,7 +36,7 @@ export default function Highlights({}) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mx-auto mt-8 mb-12 max-w-lg md:mt-32 md:mb-0 md:max-w-none">
|
||||
<div className="mx-auto mb-12 mt-8 max-w-lg md:mb-0 md:mt-32 md:max-w-none">
|
||||
<div className="px-4 sm:max-w-4xl sm:px-6 lg:max-w-7xl lg:px-8">
|
||||
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
|
||||
<div className="order-last rounded-lg bg-slate-100 p-4 dark:bg-slate-800 sm:p-8 md:order-first">
|
||||
@@ -48,10 +48,10 @@ export default function Highlights({}) {
|
||||
<Image src={ImageAttributesDark} alt="react library" className="hidden rounded-lg dark:block" />
|
||||
</div>
|
||||
<div className="pb-8 md:pb-0">
|
||||
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-100 sm:text-3xl">
|
||||
‘Spray and pray’ never worked.
|
||||
<h2 className="xs:text-3xl text-2xl font-bold leading-7 tracking-tight text-slate-800 dark:text-slate-100 sm:text-3xl">
|
||||
Dont' ‘Spray and pray’.
|
||||
<br />
|
||||
<span className="font-light">Pre-segment users, granularly.</span>
|
||||
<span className="font-light">Pre-segment granularly.</span>
|
||||
</h2>
|
||||
<p className="text-md mt-6 max-w-md leading-7 text-slate-500 dark:text-slate-400">
|
||||
Pre-segment who sees your survey based on custom attributes. Keep the signal, cancel out the
|
||||
@@ -63,4 +63,6 @@ export default function Highlights({}) {
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default Highlights;
|
||||
|
||||
@@ -9,7 +9,7 @@ interface SecondNavbarProps {
|
||||
setActiveId: (id: string) => void;
|
||||
}
|
||||
|
||||
export function TabBar({ tabs, activeId, setActiveId }: SecondNavbarProps) {
|
||||
export const TabBar: React.FC<SecondNavbarProps> = ({ tabs, activeId, setActiveId }) => {
|
||||
return (
|
||||
<div className="flex h-14 items-center justify-center rounded-lg bg-slate-200 dark:bg-slate-700">
|
||||
<nav className="flex h-full items-center space-x-4" aria-label="Tabs">
|
||||
@@ -31,14 +31,14 @@ export function TabBar({ tabs, activeId, setActiveId }: SecondNavbarProps) {
|
||||
</nav>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const tabs = [
|
||||
{ id: "npm", label: "NPM", icon: <IoLogoNpm /> },
|
||||
{ id: "html", label: "HTML", icon: <IoLogoHtml5 /> },
|
||||
];
|
||||
|
||||
export default function SetupInstructions({}) {
|
||||
export const SetupInstructions: React.FC = ({}) => {
|
||||
const [activeTab, setActiveTab] = useState(tabs[0].id);
|
||||
|
||||
return (
|
||||
@@ -66,4 +66,6 @@ if (typeof window !== "undefined") {
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default SetupInstructions;
|
||||
|
||||
@@ -1,77 +1,16 @@
|
||||
import DemoPreview from "@/components/dummyUI/DemoPreview";
|
||||
import DashboardMockupDark from "@/images/dashboard-mockup-dark.png";
|
||||
import DashboardMockup from "@/images/dashboard-mockup.png";
|
||||
import PreviewSurvey from "../dummyUI/PreviewSurvey";
|
||||
import { Button } from "@formbricks/ui";
|
||||
import { CursorArrowRaysIcon } from "@heroicons/react/24/solid";
|
||||
import Image from "next/image";
|
||||
import { useState } from "react";
|
||||
import AddEventDummy from "../dummyUI/AddEventDummy";
|
||||
import AddNoCodeEventModalDummy from "../dummyUI/AddNoCodeEventModalDummy";
|
||||
import HeadingCentered from "../shared/HeadingCentered";
|
||||
import SetupTabs from "./SetupTabs";
|
||||
import type { Question } from "../dummyUI/questionTypes";
|
||||
import AddEventDummy from "../dummyUI/AddEventDummy";
|
||||
|
||||
const questions: Question[] = [
|
||||
{
|
||||
id: "1",
|
||||
type: "multipleChoiceSingle",
|
||||
headline: "How disappointed would you be if you could no longer use Formbricks?",
|
||||
subheader: "Please select one of the following options:",
|
||||
required: true,
|
||||
choices: [
|
||||
{
|
||||
id: "2",
|
||||
label: "Not at all disappointed",
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
label: "Somewhat disappointed",
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
label: "Very disappointed",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "5",
|
||||
type: "multipleChoiceSingle",
|
||||
headline: "What is your role?",
|
||||
subheader: "Please select one of the following options:",
|
||||
required: true,
|
||||
choices: [
|
||||
{
|
||||
id: "6",
|
||||
label: "Founder",
|
||||
},
|
||||
{
|
||||
id: "7",
|
||||
label: "Executive",
|
||||
},
|
||||
{
|
||||
id: "8",
|
||||
label: "Product Manager",
|
||||
},
|
||||
{
|
||||
id: "9",
|
||||
label: "Product Owner",
|
||||
},
|
||||
{
|
||||
id: "10",
|
||||
label: "Software Engineer",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "11",
|
||||
type: "openText",
|
||||
headline: "How can we improve Formbricks for you?",
|
||||
subheader: "Please be as specific as possible.",
|
||||
required: true,
|
||||
},
|
||||
];
|
||||
|
||||
export default function Steps() {
|
||||
export const Steps: React.FC = () => {
|
||||
const [isAddEventModalOpen, setAddEventModalOpen] = useState(false);
|
||||
|
||||
return (
|
||||
@@ -82,7 +21,7 @@ export default function Steps() {
|
||||
heading="Set Formbricks up in minutes"
|
||||
subheading="Formbricks is designed for as little dev attention as possible. Here’s how:"
|
||||
/>
|
||||
<div id="howitworks" className="mx-auto mb-12 mt-16 max-w-lg md:mt-8 md:mb-0 md:max-w-none">
|
||||
<div id="howitworks" className="mx-auto mb-12 mt-16 max-w-lg md:mb-0 md:mt-8 md:max-w-none">
|
||||
<div className="px-4 sm:max-w-4xl sm:px-6 lg:max-w-7xl lg:px-8">
|
||||
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
|
||||
<div className="pb-8 sm:pl-10 md:pb-0">
|
||||
@@ -101,36 +40,36 @@ export default function Steps() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mx-auto mt-8 mb-12 max-w-lg md:mt-32 md:mb-0 md:max-w-none">
|
||||
<div className="mx-auto mb-12 mt-8 max-w-lg md:mb-0 md:mt-32 md:max-w-none">
|
||||
<div className="px-4 sm:max-w-4xl sm:px-6 lg:max-w-7xl lg:px-8">
|
||||
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
|
||||
<div className="order-last w-full rounded-lg bg-slate-100 p-4 dark:bg-slate-800 sm:py-8 md:order-first">
|
||||
<div className="flex h-40 items-center justify-center">
|
||||
<Button
|
||||
variant="primary"
|
||||
className="animate-bounce transition-all duration-150 hover:scale-105"
|
||||
className=""
|
||||
onClick={() => {
|
||||
setAddEventModalOpen(true);
|
||||
}}>
|
||||
<CursorArrowRaysIcon className="mr-2 h-5 w-5 text-white" />
|
||||
Add No-Code Event
|
||||
Add Action
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="pb-8 md:pb-0">
|
||||
<h4 className="text-brand-dark font-bold">Step 2</h4>
|
||||
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-100 sm:text-3xl">
|
||||
Setup No-Code events
|
||||
No-Code: Track User Actions
|
||||
</h2>
|
||||
<p className="text-md mt-6 max-w-lg leading-7 text-slate-500 dark:text-slate-400">
|
||||
Set up an event which can trigger your survey - without writing a single line of code. Surveys
|
||||
can be triggered on specific pages or after an element is clicked.
|
||||
Set up user actions which can trigger your survey without writing a single line of code.
|
||||
Surveys can be triggered on specific pages or after an element is clicked.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mx-auto mt-8 mb-12 max-w-lg md:mt-32 md:mb-0 md:max-w-none">
|
||||
<div className="mx-auto mb-12 mt-8 max-w-lg md:mb-0 md:mt-32 md:max-w-none">
|
||||
<div className="px-4 sm:max-w-4xl sm:px-6 lg:max-w-7xl lg:px-8">
|
||||
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
|
||||
<div className="pb-8 sm:pl-10 md:pb-0">
|
||||
@@ -143,13 +82,13 @@ export default function Steps() {
|
||||
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>
|
||||
</div>
|
||||
<div className="mx-auto mt-8 mb-12 max-w-lg md:mt-32 md:mb-0 md:max-w-none">
|
||||
<div className="mx-auto mb-12 mt-8 max-w-lg md:mb-0 md:mt-32 md:max-w-none">
|
||||
<div className="px-4 sm:max-w-4xl sm:px-6 lg:max-w-7xl lg:px-8">
|
||||
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
|
||||
<div className="order-last w-full rounded-lg bg-slate-100 p-4 dark:bg-slate-800 sm:py-8 md:order-first">
|
||||
@@ -163,15 +102,14 @@ export default function Steps() {
|
||||
Set segment and trigger
|
||||
</h2>
|
||||
<p className="text-md mt-6 max-w-lg leading-7 text-slate-500 dark:text-slate-400">
|
||||
Create a custom segment for each survey. Use attributes and past events to only survey the
|
||||
people who have answers. Trigger your survey on any event in your application. Context
|
||||
matters.
|
||||
Create a custom segment for each survey. Use attributes and past user actions to only survey
|
||||
the people who have answers. Trigger your survey on any user action in your app.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mx-auto mt-8 mb-12 max-w-lg md:mt-32 md:mb-0 md:max-w-none">
|
||||
<div className="mx-auto mb-12 mt-8 max-w-lg md:mb-0 md:mt-32 md:max-w-none">
|
||||
<div className="px-4 sm:max-w-4xl sm:px-6 lg:max-w-7xl lg:px-8">
|
||||
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
|
||||
<div className="pb-8 sm:pl-10 md:pb-0">
|
||||
@@ -205,4 +143,6 @@ export default function Steps() {
|
||||
<AddNoCodeEventModalDummy open={isAddEventModalOpen} setOpen={setAddEventModalOpen} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default Steps;
|
||||
|
||||
@@ -6,7 +6,7 @@ interface VideoWalkThroughProps {
|
||||
setOpen: (v: boolean) => void;
|
||||
}
|
||||
|
||||
export default function VideoWalkThrough({ open, setOpen }: VideoWalkThroughProps) {
|
||||
export const VideoWalkThrough: React.FC<VideoWalkThroughProps> = ({ open, setOpen }) => {
|
||||
return (
|
||||
<Modal open={open} setOpen={setOpen}>
|
||||
<div className="mt-5">
|
||||
@@ -14,4 +14,4 @@ export default function VideoWalkThrough({ open, setOpen }: VideoWalkThroughProp
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useState, ChangeEvent } from "react";
|
||||
import { ChevronDownIcon, ChevronRightIcon, ChevronLeftIcon } from "@heroicons/react/24/solid";
|
||||
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "@heroicons/react/24/solid";
|
||||
import clsx from "clsx";
|
||||
import { useState } from "react";
|
||||
|
||||
interface APICallProps {
|
||||
method: "GET" | "POST";
|
||||
@@ -56,13 +56,13 @@ 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="mt-4 ml-8 font-bold dark:text-slate-400">{description}</div>
|
||||
<div className="ml-8 mt-4 font-bold dark:text-slate-400">{description}</div>
|
||||
<div>
|
||||
<div className={clsx(switchState ? "block" : "hidden", "ml-8")}>
|
||||
<p className="mt-6 mb-2 text-lg font-semibold">Parameters</p>
|
||||
<p className="mb-2 mt-6 text-lg font-semibold">Parameters</p>
|
||||
<div>
|
||||
{headers.length > 0 && (
|
||||
<div className="text-base">
|
||||
@@ -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
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
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>
|
||||
);
|
||||
}
|
||||
37
apps/formbricks-com/components/shared/BestPractices.tsx
Normal file
37
apps/formbricks-com/components/shared/BestPractices.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
import { Button } from "@formbricks/ui";
|
||||
import { usePlausible } from "next-plausible";
|
||||
import { useRouter } from "next/router";
|
||||
import BestPracticeNavigation from "./BestPracticeNavigation";
|
||||
|
||||
export default function InsightOppos() {
|
||||
const plausible = usePlausible();
|
||||
const router = useRouter();
|
||||
return (
|
||||
<div className="pb-10 pt-12 md:pt-20">
|
||||
<div className="px-4 py-20 text-center sm:px-6 lg:px-8" id="best-practices">
|
||||
<h1 className="text-3xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-4xl md:text-5xl">
|
||||
Get started with{" "}
|
||||
<span className="from-brand-light to-brand-dark bg-gradient-to-b bg-clip-text text-transparent xl:inline">
|
||||
Best Practices
|
||||
</span>
|
||||
</h1>
|
||||
<p className="mx-auto mt-3 max-w-md text-base text-slate-500 dark:text-slate-300 sm:text-lg md:mt-5 md:max-w-3xl md:text-xl">
|
||||
Run battle-tested approaches for qualitative user research in minutes.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<BestPracticeNavigation />
|
||||
|
||||
<div className="mx-auto mt-4 w-fit px-4 py-2 text-center">
|
||||
<Button
|
||||
variant="highlight"
|
||||
onClick={() => {
|
||||
router.push("/demo");
|
||||
plausible("subPractices_CTA_LaunchDemo");
|
||||
}}>
|
||||
Launch Live Demo
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Button } from "@formbricks/ui";
|
||||
import { useRouter } from "next/router";
|
||||
import clsx from "clsx";
|
||||
import { usePlausible } from "next-plausible";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
interface Props {
|
||||
teaser: string;
|
||||
@@ -23,12 +23,12 @@ export default function BreakerCTA({ inverted = false, teaser, headline, subhead
|
||||
: "from-slate-200 to-slate-300 dark:from-slate-800 dark:via-slate-800 dark:to-slate-700",
|
||||
"xs:mx-auto xs:w-full mx-4 my-4 mt-28 max-w-6xl rounded-xl bg-gradient-to-br md:mb-0 "
|
||||
)}>
|
||||
<div className="relative px-4 py-8 sm:px-6 sm:pt-8 sm:pb-12 lg:px-8 lg:pt-12">
|
||||
<div className="relative px-4 py-8 sm:px-6 sm:pb-12 sm:pt-8 lg:px-8 lg:pt-12">
|
||||
<div className="xs:block xs:absolute xs:right-10 hidden md:top-1/2 md:-translate-y-1/2">
|
||||
<Button
|
||||
variant="highlight"
|
||||
onClick={() => {
|
||||
plausible("openDemo");
|
||||
plausible("Breaker_CTAs");
|
||||
router.push(`${href}`);
|
||||
}}>
|
||||
{cta}
|
||||
|
||||
@@ -6,20 +6,20 @@ export default function CTA() {
|
||||
const router = useRouter();
|
||||
return (
|
||||
<>
|
||||
<div className="mx-auto px-4 py-16 sm:px-6 lg:px-8 lg:pt-24 lg:pb-40">
|
||||
<div className="mx-auto px-4 py-16 sm:px-6 lg:px-8 lg:pb-40 lg:pt-24">
|
||||
<HeadingCentered closer teaser="Get started" heading="Ready for the last form tool you need?" />
|
||||
|
||||
<div className="mt-12 grid grid-cols-1 content-center md:grid-cols-2">
|
||||
<div className="-mb-4 rounded-t-xl bg-gradient-to-br from-slate-300 to-slate-200 px-8 py-24 text-center text-slate-900 dark:from-slate-800 dark:to-slate-900 dark:text-slate-100 md:mb-0 md:ml-2.5 md:-mr-5 md:rounded-l-xl lg:p-24">
|
||||
<div className="-mb-4 rounded-t-xl bg-gradient-to-br from-slate-300 to-slate-200 px-8 py-24 text-center text-slate-900 dark:from-slate-800 dark:to-slate-900 dark:text-slate-100 md:-mr-5 md:mb-0 md:ml-2.5 md:rounded-l-xl lg:p-24">
|
||||
<h3 className="text-3xl font-bold">Self-hosted</h3>
|
||||
<p className="mt-2 mb-4">Run locally e.g. with docker-compose.</p>
|
||||
<p className="mb-4 mt-2">Run locally e.g. with docker-compose.</p>
|
||||
<Button variant="secondary" onClick={() => router.push("/docs")} className="mt-3">
|
||||
Read docs
|
||||
</Button>
|
||||
</div>
|
||||
<div className="rounded-xl bg-gradient-to-br from-slate-400 to-slate-300 py-24 text-center text-slate-800 dark:from-slate-800 dark:to-slate-700 dark:text-slate-100">
|
||||
<h3 className="text-3xl font-bold">Cloud</h3>
|
||||
<p className="mt-2 mb-4">Use our free managed service.</p>
|
||||
<p className="mb-4 mt-2">Use our free managed service.</p>
|
||||
<Button variant="secondary" onClick={() => router.push("/waitlist")} className="mt-3" disabled>
|
||||
Coming soon
|
||||
</Button>
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
import { useRouter } from "next/router";
|
||||
import { Button } from "@formbricks/ui";
|
||||
import Image from "next/image";
|
||||
import EarlyBird from "@/images/early bird deal for open source jotform alternative typeform and surveymonkey_v2.svg";
|
||||
import { Button } from "@formbricks/ui";
|
||||
import { usePlausible } from "next-plausible";
|
||||
import Image from "next/image";
|
||||
|
||||
export default function EarlyBirdDeal() {
|
||||
const router = useRouter();
|
||||
const plausible = usePlausible();
|
||||
return (
|
||||
<div className="bg-brand-dark relative mx-4 max-w-7xl overflow-hidden rounded-xl p-6 pb-16 sm:p-8 sm:pb-16 md:py-8 md:px-12 lg:mx-0 lg:flex lg:items-center">
|
||||
<div className="bg-brand-dark relative mx-4 max-w-7xl overflow-hidden rounded-xl p-6 pb-16 sm:p-8 sm:pb-16 md:px-12 md:py-8 lg:mx-0 lg:flex lg:items-center">
|
||||
<div className="lg:w-0 lg:flex-1 ">
|
||||
<h2
|
||||
className="mb-1 text-2xl font-bold tracking-tight text-white sm:text-2xl"
|
||||
@@ -17,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">
|
||||
@@ -25,16 +23,16 @@ export default function EarlyBirdDeal() {
|
||||
variant="secondary"
|
||||
className="dark:bg-slate-200 dark:text-slate-700 dark:hover:bg-slate-300"
|
||||
onClick={() => {
|
||||
plausible("openEarlyBird");
|
||||
plausible("Pricing_CTA_EarlyBird");
|
||||
window.open("https://app.formbricks.com/auth/signup", "_blank")?.focus();
|
||||
}}>
|
||||
Get Early Bird Deal
|
||||
Get Early Bird deal
|
||||
</Button>
|
||||
</div>
|
||||
<p className="mt-2 mb-24 max-w-3xl text-xs tracking-tight text-slate-200 md:mb-0 md:max-w-sm lg:max-w-none">
|
||||
<p className="mb-24 mt-2 max-w-3xl text-xs tracking-tight text-slate-200 md:mb-0 md:max-w-sm lg:max-w-none">
|
||||
This saves you $588 every year.
|
||||
</p>
|
||||
<div className="absolute -right-20 -bottom-36 mx-auto h-96 w-96 scale-75 sm:-right-10">
|
||||
<div className="absolute -bottom-36 -right-20 mx-auto h-96 w-96 scale-75 sm:-right-10">
|
||||
<Image src={EarlyBird} fill alt="formbricks favicon open source forms typeform alternative" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,26 +1,11 @@
|
||||
import Link from "next/link";
|
||||
import clsx from "clsx";
|
||||
import { FooterLogo } from "./Logo";
|
||||
|
||||
const navigation = {
|
||||
/* creation: [
|
||||
{ name: "React Form Builder", href: "/react-form-library", status: true },
|
||||
{ name: "No-Code Builder", href: "/visual-builder", status: false },
|
||||
{ name: "Templates", href: "#", status: false },
|
||||
],
|
||||
pipelines: [
|
||||
{ name: "Core API", href: "/core-api", status: true },
|
||||
{ name: "Webhooks", href: "/webhooks", status: true },
|
||||
{ name: "Email", href: "/email", status: true },
|
||||
{ name: "Integrations", href: "#", status: false },
|
||||
],
|
||||
insights: [
|
||||
{ name: "Formbricks HQ", href: "/formbricks-hq", status: true },
|
||||
{ name: "Reports", href: "#", status: false },
|
||||
], */
|
||||
other: [
|
||||
{ name: "Community", href: "/community", status: true },
|
||||
{ name: "Blog", href: "/blog", status: true },
|
||||
{ name: "OSS Friends", href: "/oss-friends", status: true },
|
||||
{ name: "GDPR FAQ", href: "/gdpr", status: true },
|
||||
{ name: "GDPR Guide", href: "/gdpr-guide", status: true },
|
||||
],
|
||||
@@ -58,18 +43,18 @@ export default function Footer() {
|
||||
<h2 id="footer-heading" className="sr-only">
|
||||
Footer
|
||||
</h2>
|
||||
<div className="mx-auto flex max-w-7xl flex-col space-y-6 px-4 py-12 text-center sm:px-6 lg:py-16 lg:px-8">
|
||||
<div className="mx-auto flex max-w-7xl flex-col space-y-6 px-4 py-12 text-center sm:px-6 lg:px-8 lg:py-16">
|
||||
<Link href="/">
|
||||
<span className="sr-only">Formbricks</span>
|
||||
<FooterLogo className="mx-auto h-8 w-auto sm:h-10" />
|
||||
</Link>
|
||||
<p className="text-base text-slate-500 dark:text-slate-400">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,16 +1,103 @@
|
||||
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 { 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, useState } from "react";
|
||||
import { Button } from "@formbricks/ui";
|
||||
import { FooterLogo } from "./Logo";
|
||||
import { ThemeSelector } from "./ThemeSelector";
|
||||
import { PlayCircleIcon } from "@heroicons/react/24/solid";
|
||||
import VideoWalkThrough from "../home/VideoWalkThrough";
|
||||
|
||||
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 (
|
||||
<Popover className="relative" as="header">
|
||||
@@ -28,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">
|
||||
@@ -47,28 +262,53 @@ 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">
|
||||
<ThemeSelector className="relative z-10 mr-5" />
|
||||
<Button variant="secondary" className="px-2" onClick={() => setVideoModal(true)}>
|
||||
<Button
|
||||
variant="secondary"
|
||||
className="group px-2"
|
||||
href="https://formbricks.com/github"
|
||||
target="_blank">
|
||||
<Image
|
||||
src={GitHubMarkDark}
|
||||
alt="GitHub Sponsors Formbricks badge"
|
||||
width={24}
|
||||
className="block dark:hidden"
|
||||
/>
|
||||
<Image
|
||||
src={GitHubMarkWhite}
|
||||
alt="GitHub Sponsors Formbricks badge"
|
||||
width={24}
|
||||
className="hidden dark:block"
|
||||
/>
|
||||
</Button>
|
||||
{/* <Button variant="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"
|
||||
onClick={() => router.push("https://app.formbricks.com/auth/signup")}>
|
||||
Get started
|
||||
onClick={() => {
|
||||
router.push("https://app.formbricks.com");
|
||||
plausible("NavBar_CTA_Login");
|
||||
}}>
|
||||
Go to app
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -85,7 +325,7 @@ export default function Header() {
|
||||
focus
|
||||
className="absolute inset-x-0 top-0 z-20 origin-top-right transform p-2 transition md:hidden">
|
||||
<div className="dark:divide-slate divide-y-2 divide-slate-100 rounded-lg bg-slate-200 shadow-lg ring-1 ring-black ring-opacity-5 dark:divide-slate-700 dark:bg-slate-800">
|
||||
<div className="px-5 pt-5 pb-6">
|
||||
<div className="px-5 pb-6 pt-5">
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<FooterLogo className="h-8 w-auto" />
|
||||
@@ -100,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")}
|
||||
@@ -125,11 +394,3 @@ export default function Header() {
|
||||
</Popover>
|
||||
);
|
||||
}
|
||||
|
||||
function GitHubIcon(props: any) {
|
||||
return (
|
||||
<svg aria-hidden="true" viewBox="0 0 16 16" {...props}>
|
||||
<path d="M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
43
apps/formbricks-com/components/shared/HeaderLight.tsx
Normal file
43
apps/formbricks-com/components/shared/HeaderLight.tsx
Normal file
@@ -0,0 +1,43 @@
|
||||
import { Button } from "@formbricks/ui";
|
||||
import { Popover } from "@headlessui/react";
|
||||
import { usePlausible } from "next-plausible";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import { FooterLogo } from "./Logo";
|
||||
|
||||
export default function HeaderLight() {
|
||||
const plausible = usePlausible();
|
||||
const router = useRouter();
|
||||
return (
|
||||
<Popover className="relative" as="header">
|
||||
<div className="mx-auto flex items-center justify-between py-6 sm:px-2 md:justify-start lg:px-8 xl:px-12 ">
|
||||
<div className="flex w-0 flex-1 justify-start">
|
||||
<Link href="/">
|
||||
<span className="sr-only">Formbricks</span>
|
||||
<FooterLogo className="ml-7 h-8 w-auto sm:h-10" />
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div className="hidden flex-1 items-center justify-end md:flex">
|
||||
<Button
|
||||
variant="secondary"
|
||||
onClick={() => {
|
||||
router.push("https://cal.com/johannes/onboarding");
|
||||
plausible("Demo_CTA_TalkToUs");
|
||||
}}>
|
||||
Talk to us
|
||||
</Button>
|
||||
<Button
|
||||
variant="highlight"
|
||||
className="ml-2"
|
||||
onClick={() => {
|
||||
router.push("https://app.formbricks.com/auth/signup");
|
||||
plausible("Demo_CTA_TryForFree");
|
||||
}}>
|
||||
Start for free
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Popover>
|
||||
);
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
import clsx from "clsx";
|
||||
import {
|
||||
OnboardingIcon,
|
||||
PMFIcon,
|
||||
DogChaserIcon,
|
||||
CancelSubscriptionIcon,
|
||||
InterviewPromptIcon,
|
||||
DoorIcon,
|
||||
FeedbackIcon,
|
||||
BugBlueIcon,
|
||||
AngryBirdRageIcon,
|
||||
FeatureRequestIcon,
|
||||
} from "@formbricks/ui";
|
||||
|
||||
const BestPractices = [
|
||||
{
|
||||
title: "Onboarding Segmentation",
|
||||
description:
|
||||
"Get to know your users right from the start. Ask a few questions early, let us enrich the profile.",
|
||||
category: "Boost Retention",
|
||||
icon: OnboardingIcon,
|
||||
},
|
||||
{
|
||||
title: "Product-Market Fit Survey",
|
||||
description: "Find out how disappointed people would be if they could not use your service any more.",
|
||||
category: "Boost Retention",
|
||||
icon: PMFIcon,
|
||||
href: "/pmf",
|
||||
},
|
||||
{
|
||||
title: "Feature Chaser",
|
||||
description: "Show a survey about a new feature shown only to people who used it.",
|
||||
category: "Boost Retention",
|
||||
icon: DogChaserIcon,
|
||||
},
|
||||
{
|
||||
title: "Cancel Subscription Flow",
|
||||
description: "Request users going through a cancel subscription flow before cancelling.",
|
||||
category: "Boost Retention",
|
||||
icon: CancelSubscriptionIcon,
|
||||
},
|
||||
{
|
||||
title: "Interview Prompt",
|
||||
description: "Ask high-interest users to book a time in your calendar to get all the juicy details.",
|
||||
category: "Exploration",
|
||||
icon: InterviewPromptIcon,
|
||||
},
|
||||
{
|
||||
title: "Fake Door Follow-Up",
|
||||
description: "Running a fake door experiment? Catch users right when they are full of expectations.",
|
||||
category: "Exploration",
|
||||
icon: DoorIcon,
|
||||
},
|
||||
{
|
||||
title: "Feedback Box",
|
||||
description: "Give users the chance to share feedback in a single click.",
|
||||
category: "Retain Users",
|
||||
icon: FeedbackIcon,
|
||||
},
|
||||
|
||||
{
|
||||
title: "Rage Click Survey",
|
||||
description: "Sometimes things don’t work. Trigger this rage click survey to catch users in rage.",
|
||||
category: "Retain Users",
|
||||
icon: AngryBirdRageIcon,
|
||||
},
|
||||
];
|
||||
|
||||
export default function InsightOppos() {
|
||||
return (
|
||||
<div className="pt-12 pb-10 md:pt-20">
|
||||
<div className="px-4 py-20 text-center sm:px-6 lg:px-8" id="best-practices">
|
||||
<h1 className="text-3xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-4xl md:text-5xl">
|
||||
Get started with{" "}
|
||||
<span className="from-brand-light to-brand-dark bg-gradient-to-b bg-clip-text text-transparent xl:inline">
|
||||
Best Practices
|
||||
</span>
|
||||
</h1>
|
||||
<p className="mx-auto mt-3 max-w-md text-base text-slate-500 dark:text-slate-300 sm:text-lg md:mt-5 md:max-w-3xl md:text-xl">
|
||||
Run battle-tested approaches for qualitative user research in minutes.
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<div className=" mx-auto grid max-w-5xl grid-cols-1 gap-6 px-2 sm:grid-cols-2">
|
||||
{BestPractices.map((bestPractice) => (
|
||||
<div
|
||||
key={bestPractice.title}
|
||||
className="drop-shadow-card duration-120 relative cursor-pointer rounded-lg bg-slate-100 p-8 transition-all ease-in-out hover:scale-105 dark:bg-slate-800">
|
||||
<div
|
||||
className={clsx(
|
||||
// base styles independent what type of button it is
|
||||
"absolute right-10 rounded-full py-1 px-3",
|
||||
// different styles depending on type
|
||||
bestPractice.category === "Boost Retention" &&
|
||||
"bg-pink-100 text-pink-500 dark:bg-pink-800 dark:text-pink-200",
|
||||
bestPractice.category === "Exploration" &&
|
||||
"bg-blue-100 text-blue-500 dark:bg-blue-800 dark:text-blue-200",
|
||||
bestPractice.category === "Retain Users" &&
|
||||
"bg-orange-100 text-orange-500 dark:bg-orange-800 dark:text-orange-200"
|
||||
)}>
|
||||
{bestPractice.category}
|
||||
</div>
|
||||
<div className="h-12 w-12">
|
||||
<bestPractice.icon className="h-12 w-12 " />
|
||||
</div>
|
||||
<h3 className="mt-3 mb-1 text-xl font-bold text-slate-700 dark:text-slate-200">
|
||||
{bestPractice.title}
|
||||
</h3>
|
||||
<p className="text-sm text-slate-600 dark:text-slate-400">{bestPractice.description}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import Footer from "./Footer";
|
||||
import MetaInformation from "./MetaInformation";
|
||||
import HeaderLight from "./HeaderLight";
|
||||
|
||||
interface LayoutProps {
|
||||
children: React.ReactNode;
|
||||
@@ -11,8 +12,9 @@ export default function Layout({ title, description, children }: LayoutProps) {
|
||||
return (
|
||||
<div className="flex h-screen flex-col justify-between">
|
||||
<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>
|
||||
}
|
||||
@@ -2,6 +2,25 @@ import Footer from "./Footer";
|
||||
import Header from "./Header";
|
||||
import MetaInformation from "./MetaInformation";
|
||||
import { Prose } from "./Prose";
|
||||
import { useEffect } from "react";
|
||||
|
||||
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]);
|
||||
};
|
||||
|
||||
interface Props {
|
||||
meta: {
|
||||
@@ -12,11 +31,12 @@ interface Props {
|
||||
}
|
||||
|
||||
export default function LayoutMdx({ meta, children }: Props) {
|
||||
useExternalLinks(".prose a");
|
||||
return (
|
||||
<div className="flex h-screen flex-col justify-between">
|
||||
<MetaInformation title={meta.title} description={meta.description} />
|
||||
<Header />
|
||||
<main className="min-w-0 max-w-2xl flex-auto px-4 lg:max-w-none lg:pr-0 lg:pl-8 xl:px-16">
|
||||
<main className="min-w-0 max-w-2xl flex-auto px-4 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16">
|
||||
<article className="mx-auto my-16 max-w-3xl px-2">
|
||||
{meta.title && (
|
||||
<header className="mb-9 space-y-1">
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { Button } from "@formbricks/ui";
|
||||
import { useRouter } from "next/router";
|
||||
import HeadingCentered from "./HeadingCentered";
|
||||
|
||||
export default function CTA() {
|
||||
const router = useRouter();
|
||||
return (
|
||||
<>
|
||||
<div className="mx-auto py-16 lg:pt-24 lg:pb-40">
|
||||
<div className="mx-auto py-16 lg:pb-40 lg:pt-24">
|
||||
<p className="text-md text-brand-dark dark:text-brand-light font-semibold uppercase">
|
||||
It's free & open-source
|
||||
</p>
|
||||
@@ -14,16 +13,16 @@ export default function CTA() {
|
||||
Try Formbricks right now!
|
||||
</p>
|
||||
<div className="mt-12 grid grid-cols-1 content-center md:grid-cols-2">
|
||||
<div className="-mb-2 rounded-t-xl bg-gradient-to-br from-slate-300 to-slate-200 text-center text-slate-900 dark:from-slate-800 dark:to-slate-900 dark:text-slate-200 md:mb-0 md:ml-2.5 md:-mr-5 md:rounded-l-xl">
|
||||
<div className="-mb-2 rounded-t-xl bg-gradient-to-br from-slate-300 to-slate-200 text-center text-slate-900 dark:from-slate-800 dark:to-slate-900 dark:text-slate-200 md:-mr-5 md:mb-0 md:ml-2.5 md:rounded-l-xl">
|
||||
<h3 className="text-3xl font-bold">Self-hosted</h3>
|
||||
<p className="mt-2 mb-4 dark:text-slate-400">Run locally with docker-compose.</p>
|
||||
<Button variant="secondary" onClick={() => router.push("/docs")} className="mt-3 mb-8 md:mb-0">
|
||||
<p className="mb-4 mt-2 dark:text-slate-400">Run locally with docker-compose.</p>
|
||||
<Button variant="secondary" onClick={() => router.push("/docs")} className="mb-8 mt-3 md:mb-0">
|
||||
Read docs
|
||||
</Button>
|
||||
</div>
|
||||
<div className="rounded-xl bg-gradient-to-br from-slate-400 to-slate-300 pb-10 text-center text-slate-800 dark:from-slate-800 dark:to-slate-700 dark:text-slate-200">
|
||||
<h3 className="text-3xl font-bold">Cloud</h3>
|
||||
<p className="mt-2 mb-4 dark:text-slate-400">Use our free managed service.</p>
|
||||
<p className="mb-4 mt-2 dark:text-slate-400">Use our free managed service.</p>
|
||||
<Button variant="secondary" onClick={() => router.push("/waitlist")} className="mt-3">
|
||||
Get started
|
||||
</Button>
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useRouter } from "next/router";
|
||||
export default function HeadingCentered() {
|
||||
const router = useRouter();
|
||||
return (
|
||||
<div className="mx-auto grid grid-cols-1 content-center gap-10 pt-24 pb-12 md:grid-cols-2">
|
||||
<div className="mx-auto grid grid-cols-1 content-center gap-10 pb-12 pt-24 md:grid-cols-2">
|
||||
<div className="">
|
||||
<p className="text-md text-brand-dark dark:text-brand-light font-semibold uppercase">
|
||||
What are you waiting for?
|
||||
|
||||
@@ -6,7 +6,7 @@ interface Props {
|
||||
}
|
||||
|
||||
export default function MetaInformation({ title, description }: Props) {
|
||||
const pageTitle = `${title} | Open Source Forms & Surveys by Formbricks`;
|
||||
const pageTitle = `${title} | Open-Source Survey Software`;
|
||||
return (
|
||||
<Head>
|
||||
<title>{pageTitle}</title>
|
||||
|
||||
@@ -48,9 +48,9 @@ const Modal: React.FC<Modal> = ({
|
||||
<Dialog.Panel
|
||||
className={clsx(
|
||||
"relative transform rounded-lg bg-slate-100 text-left shadow-xl transition-all dark:bg-slate-800 sm:my-8 sm:w-full sm:max-w-xl ",
|
||||
`${noPadding ? "" : "px-4 pt-5 pb-4 sm:p-6"}`
|
||||
`${noPadding ? "" : "px-4 pb-4 pt-5 sm:p-6"}`
|
||||
)}>
|
||||
<div className="absolute top-0 right-0 hidden pt-4 pr-4 sm:block">
|
||||
<div className="absolute right-0 top-0 hidden pr-4 pt-4 sm:block">
|
||||
<button
|
||||
type="button"
|
||||
className="rounded-md bg-white text-slate-400 hover:text-slate-500 focus:outline-none focus:ring-0 focus:ring-offset-2 dark:bg-slate-900"
|
||||
|
||||
@@ -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,6 @@
|
||||
import Image from "next/image";
|
||||
import { Button } from "@formbricks/ui";
|
||||
import Friends from "@/images/newsletter-signup-gif.gif";
|
||||
import { Button } from "@formbricks/ui";
|
||||
import Image from "next/image";
|
||||
|
||||
export default function WaitlistForm() {
|
||||
return (
|
||||
@@ -46,7 +46,7 @@ export default function WaitlistForm() {
|
||||
value="e0084486-8751-43e4-8cfb-58b7c3f5f318"
|
||||
readOnly
|
||||
/>
|
||||
<label htmlFor="e0084">Build in public</label>
|
||||
<label htmlFor="e0084">Stay in the loop</label>
|
||||
</div>
|
||||
<Button type="submit" className="mt-5 w-full justify-center">
|
||||
Subscribe
|
||||
|
||||
@@ -1,61 +1,84 @@
|
||||
import { useRouter } from "next/router";
|
||||
import HeadingCentered from "./HeadingCentered";
|
||||
import clsx from "clsx";
|
||||
import { Button } from "@formbricks/ui";
|
||||
import EarlyBirdDeal from "./EarlyBirdDeal";
|
||||
import clsx from "clsx";
|
||||
import HeadingCentered from "./HeadingCentered";
|
||||
import { CheckIcon } from "@heroicons/react/24/outline";
|
||||
import { usePlausible } from "next-plausible";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
const tiers = [
|
||||
{
|
||||
name: "Self-hosting",
|
||||
href: "https://formbricks.com/github",
|
||||
priceMonthly: "free",
|
||||
paymentRythm: "/always",
|
||||
button: "secondary",
|
||||
discounted: false,
|
||||
highlight: false,
|
||||
paymentRythm: "/always",
|
||||
description: "Host Formbricks on your own server.",
|
||||
ctaName: "View Code",
|
||||
ctaAction: () => window.open("https://formbricks.com/github"),
|
||||
features: [
|
||||
"All Free features",
|
||||
"Easy self-hosting (Docker)",
|
||||
"Unlimited surveys",
|
||||
"Unlimited responses",
|
||||
"Unlimited team members",
|
||||
],
|
||||
ctaName: "Read docs",
|
||||
plausibleGoal: "Pricing_CTA_SelfHosting",
|
||||
href: "/docs/self-hosting/deployment",
|
||||
},
|
||||
{
|
||||
name: "Free",
|
||||
href: "https://app.formbricks.com/auth/signup",
|
||||
priceMonthly: "$0",
|
||||
paymentRythm: "/month",
|
||||
button: "highlight",
|
||||
discounted: false,
|
||||
highlight: false,
|
||||
paymentRythm: "/month",
|
||||
description: "All features. 30 responses per survey.",
|
||||
ctaName: "Sign up now",
|
||||
ctaAction: () => window.open("https://app.formbricks.com/auth/signup"),
|
||||
highlight: true,
|
||||
description: "All Pro features included.",
|
||||
features: [
|
||||
"Unlimited surveys",
|
||||
"Unlimited team members",
|
||||
"Remove branding",
|
||||
"Granular targeting",
|
||||
"In-product surveys",
|
||||
"Link surveys",
|
||||
"30+ templates",
|
||||
"API access",
|
||||
"Integrations (Slack, PostHog, Zapier)",
|
||||
"100 responses per survey",
|
||||
],
|
||||
ctaName: "Start for free",
|
||||
plausibleGoal: "Pricing_CTA_FreePlan",
|
||||
},
|
||||
{
|
||||
name: "Pro",
|
||||
href: "https://app.formbricks.com/auth/signup",
|
||||
priceMonthly: "$99",
|
||||
button: "secondary",
|
||||
discounted: true,
|
||||
highlight: true,
|
||||
paymentRythm: "/month",
|
||||
description: "All features included. No limits.",
|
||||
ctaName: "Sign up now",
|
||||
ctaAction: () => window.open("https://app.formbricks.com/auth/signup"),
|
||||
button: "secondary",
|
||||
discounted: false,
|
||||
highlight: false,
|
||||
description: "All features included. Unlimited usage.",
|
||||
features: ["Unlimited responses per survey"],
|
||||
ctaName: "Start for free",
|
||||
plausibleGoal: "Pricing_CTA_ProPlan",
|
||||
},
|
||||
];
|
||||
|
||||
export default function PricingPmf() {
|
||||
export default function Pricing() {
|
||||
const plausible = usePlausible();
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<div className="-mt-10 pb-20">
|
||||
<div className="mx-auto max-w-7xl py-4 sm:px-6 sm:pb-6 lg:px-8" id="pricing">
|
||||
<HeadingCentered heading="One price, unlimited usage." teaser="Pricing" />
|
||||
|
||||
<div className="mx-auto space-y-4 px-4 lg:grid lg:grid-cols-3 lg:gap-6 lg:space-y-0 lg:px-0">
|
||||
<div className="mx-auto space-y-4 px-4 lg:grid lg:grid-cols-3 lg:gap-6 lg:space-y-0 lg:px-0">
|
||||
{tiers.map((tier) => (
|
||||
<div
|
||||
key={tier.name}
|
||||
className={clsx(
|
||||
`rounded-lg shadow-sm`,
|
||||
`h-fit rounded-lg shadow-sm`,
|
||||
tier.highlight
|
||||
? "border border-slate-300 bg-slate-200 dark:border-slate-500 dark:bg-slate-800"
|
||||
: "bg-slate-100 dark:bg-slate-700"
|
||||
@@ -70,15 +93,19 @@ export default function PricingPmf() {
|
||||
)}>
|
||||
{tier.name}
|
||||
</h2>
|
||||
<p
|
||||
className={clsx(
|
||||
"mt-4 whitespace-pre-wrap text-sm",
|
||||
tier.highlight
|
||||
? "text-slate-600 dark:text-slate-300"
|
||||
: "text-slate-500 dark:text-slate-300"
|
||||
)}>
|
||||
<p className="mt-4 whitespace-pre-wrap text-sm text-slate-600 dark:text-slate-300">
|
||||
{tier.description}
|
||||
</p>
|
||||
<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: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>
|
||||
))}
|
||||
</ul>
|
||||
<p className="mt-8">
|
||||
<span
|
||||
className={clsx(
|
||||
@@ -103,27 +130,30 @@ export default function PricingPmf() {
|
||||
{tier.paymentRythm}
|
||||
</span>
|
||||
</p>
|
||||
{tier.ctaName && tier.ctaAction && (
|
||||
<Button
|
||||
onClick={tier.ctaAction}
|
||||
className={clsx(
|
||||
"mt-6 w-full justify-center py-4 text-lg shadow-sm",
|
||||
tier.highlight
|
||||
? ""
|
||||
: "bg-slate-300 hover:bg-slate-200 dark:bg-slate-600 dark:hover:bg-slate-500"
|
||||
)}
|
||||
variant={tier.highlight ? "highlight" : "secondary"}>
|
||||
{tier.ctaName}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
onClick={() => {
|
||||
plausible(`${tier.plausibleGoal}`);
|
||||
router.push(`${tier.href}`);
|
||||
}}
|
||||
className={clsx(
|
||||
"mt-6 w-full justify-center py-4 text-lg shadow-sm",
|
||||
tier.highlight
|
||||
? ""
|
||||
: "bg-slate-300 hover:bg-slate-200 dark:bg-slate-600 dark:hover:bg-slate-500"
|
||||
)}
|
||||
variant={tier.highlight ? "highlight" : "secondary"}>
|
||||
{tier.ctaName}
|
||||
</Button>
|
||||
|
||||
{tier.name !== "Self-hosting" && (
|
||||
<p className="mt-1.5 text-center text-xs text-slate-500">No Creditcard required.</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="mx-auto max-w-7xl sm:px-6 lg:px-8">
|
||||
<EarlyBirdDeal />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useRouter } from "next/router";
|
||||
export default function HeadingCentered() {
|
||||
const router = useRouter();
|
||||
return (
|
||||
<div className="mx-auto grid max-w-md grid-cols-1 content-center gap-10 px-4 py-12 sm:max-w-3xl sm:px-6 md:grid-cols-2 md:pt-24 md:pb-36 lg:max-w-6xl lg:px-8">
|
||||
<div className="mx-auto grid max-w-md grid-cols-1 content-center gap-10 px-4 py-12 sm:max-w-3xl sm:px-6 md:grid-cols-2 md:pb-36 md:pt-24 lg:max-w-6xl lg:px-8">
|
||||
<div className="">
|
||||
<p className="text-md text-brand-dark dark:text-brand-light mb-3 font-semibold uppercase">
|
||||
What are you waiting for?
|
||||
|
||||
29
apps/formbricks-com/components/shared/UseCaseCTA.tsx
Normal file
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
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>
|
||||
);
|
||||
}
|
||||
@@ -43,7 +43,7 @@ const features = [
|
||||
export default function FeatureTable({}) {
|
||||
return (
|
||||
<div className="mt-32 rounded-xl bg-gradient-to-br from-slate-900 via-slate-900 to-slate-800 dark:from-slate-200 dark:to-slate-300 lg:mt-56">
|
||||
<div className="mx-auto max-w-4xl px-4 py-8 sm:px-6 sm:pt-8 sm:pb-12 lg:max-w-7xl lg:px-8 lg:pt-12">
|
||||
<div className="mx-auto max-w-4xl px-4 py-8 sm:px-6 sm:pb-12 sm:pt-8 lg:max-w-7xl lg:px-8 lg:pt-12">
|
||||
<p className="text-md dark:text-brand-dark text-brand-light mb-3 max-w-2xl font-semibold uppercase sm:mt-4">
|
||||
Why Formbricks?
|
||||
</p>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
1
apps/formbricks-com/images/clients/clovyr-logo.svg
Normal file
1
apps/formbricks-com/images/clients/clovyr-logo.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 416 98"><defs><style>.cls-1{fill:#00bf74;}.cls-2{fill:#00e874;}.cls-3{fill:#00a774;}</style></defs><title>clovyr-logo</title><path class="cls-1" d="M47,42.88a9.85,9.85,0,0,1-5.44-1.64L12.05,22.56s-3-1.64-3-4.24S12.46,14,12.46,14L32.33,2.35c.23-.14.47-.27.71-.4a18.72,18.72,0,0,1,2-.85,18.15,18.15,0,0,1,3-.88A9.89,9.89,0,0,1,40.82,0a8.73,8.73,0,0,1,2.74.74,11.82,11.82,0,0,0,2.87.77s.28,0,.58.06Z"/><path class="cls-1" d="M42.16,50.83A9.9,9.9,0,0,0,38,46.91L7.23,30.47S4.3,28.66,2.07,30s-2,5.16-2,5.16L0,58.28a7.48,7.48,0,0,0,0,.82,19.19,19.19,0,0,0,.24,2.14,19.51,19.51,0,0,0,.72,3,10.42,10.42,0,0,0,1.28,2.59,8.57,8.57,0,0,0,2,2A12,12,0,0,1,6.36,71s.18.22.35.47Z"/><path class="cls-2" d="M47,42.88a9.85,9.85,0,0,0,5.44-1.64L82,22.56s3-1.64,3-4.24S81.56,14,81.56,14L61.69,2.35c-.23-.14-.47-.27-.71-.4a17.84,17.84,0,0,0-2-.85,18.15,18.15,0,0,0-3-.88A9.89,9.89,0,0,0,53.2,0a8.73,8.73,0,0,0-2.74.74,11.7,11.7,0,0,1-2.87.77s-.28,0-.58.06Z"/><path class="cls-2" d="M51.86,50.83A9.9,9.9,0,0,1,56,46.91L86.8,30.47S89.72,28.66,92,30s2,5.16,2,5.16L94,58.28a7.48,7.48,0,0,1,0,.82,17.09,17.09,0,0,1-.24,2.14,19.51,19.51,0,0,1-.72,3,10.42,10.42,0,0,1-1.28,2.59,8.57,8.57,0,0,1-2,2A12,12,0,0,0,87.66,71s-.18.22-.35.47Z"/><path class="cls-3" d="M42.16,50.83a10.05,10.05,0,0,1,1.31,5.57L42.18,91.51s.1,3.46-2.13,4.76-5.43-.84-5.43-.84L14.69,83.92c-.24-.13-.48-.28-.71-.43a19,19,0,0,1-1.71-1.28A18.8,18.8,0,0,1,10,80.07a10.17,10.17,0,0,1-1.59-2.41,8.77,8.77,0,0,1-.73-2.76A11.55,11.55,0,0,0,6.94,72s-.1-.27-.23-.54Z"/><path class="cls-3" d="M51.86,50.83a10.05,10.05,0,0,0-1.31,5.57l1.29,35.11S51.74,95,54,96.27s5.43-.84,5.43-.84L79.33,83.92c.25-.13.48-.28.71-.43a17.7,17.7,0,0,0,1.71-1.28A18.8,18.8,0,0,0,84,80.07a10.17,10.17,0,0,0,1.59-2.41,8.51,8.51,0,0,0,.73-2.76A12,12,0,0,1,87.08,72s.1-.27.23-.54Z"/><path class="cls-2" d="M412.05,33.37l3.65-7c.73-1.31.07-2.37-1.42-2.37H400.94c-.25,0-.49,0-.73,0A11.47,11.47,0,0,0,392,28.87a39.46,39.46,0,0,0-4,6c-.89-7.84-4.14-10-7.95-10.1a6.09,6.09,0,0,0-.74,0c-2.62,0-2.89.27-2.89,2.89V59c0,6.48,0,13,0,19.44,0,2,.39,2.38,2.37,2.39h7.44c2.25,0,2.65-.4,2.65-2.65,0-9.78,0-19.57,0-29.35a21.91,21.91,0,0,1,.38-4,11.12,11.12,0,0,1,4.94-7.6,14.88,14.88,0,0,1,6.85-1.83,43,43,0,0,1,7.35,0A3.7,3.7,0,0,0,412.05,33.37Z"/><path class="cls-2" d="M226.83,81.76c-15.66.25-29.41-13.1-29.23-29.5a29.3,29.3,0,0,1,29.66-28.83c16.06.21,29.26,13.12,29.22,29.2A29.37,29.37,0,0,1,226.83,81.76ZM243.7,53.07a18,18,0,0,0-1.55-8,16.59,16.59,0,0,0-26.27-5.55,18.32,18.32,0,0,0-3.79,21,16.35,16.35,0,0,0,22.47,7.66C240.56,65,243.37,59.75,243.7,53.07Z"/><path class="cls-2" d="M327.6,95.23c-.7,1.88-.09,2.71,1.86,2.74,2.7,0,5.41,0,8.11,0a2.65,2.65,0,0,0,2.71-1.91Q346.34,81,352.42,65.92q5.15-12.83,10.28-25.66c1.78-4.43,3.57-8.86,5.33-13.31.75-1.9.16-2.82-1.85-2.85-3,0,.23,0-2.73,0-8.08,0-10,5.2-10.66,6.84q-1.92,5.08-3.85,10.18-3.48,9.29-7,18.57c-.21.58-.51,1.13-.76,1.69l-.36,0q-2.79-7.48-5.57-15-3.81-10.27-7.6-20.54a2.29,2.29,0,0,0-2.18-1.7c-2.83,0-5.67-.08-8.49,0-1.82.07-2.4,1.09-1.74,2.8,1,2.55,2,5.08,3.05,7.61,4.89,12,9.69,24.08,14.75,36,1.51,3.54,2.67,4.81.9,8.46Z"/><path class="cls-2" d="M146.23,82c-12.76-.36-23.44-7.75-27.49-19.77a28.13,28.13,0,0,1,3.87-26.48c4.46-6.26,10.5-10.48,18.08-11.7,8.76-1.41,16.14.8,23.29,6.5,1.09.87,1,2.09.17,3.28-4.5,7.09-12.92,1.71-16.62,1.32-7.8-.81-13.26,3.4-16.23,9.52-4,8.15-1.59,19.21,7.59,23.84A16.05,16.05,0,0,0,150,69.88c2.17-.49,9.7-3.66,14.63,2.69a1.84,1.84,0,0,1-.5,2.61A27.82,27.82,0,0,1,146.23,82Z"/><path class="cls-2" d="M285.07,80.8a2.77,2.77,0,0,0,3-2.08c1.19-2.88,2.4-5.75,3.6-8.62Q296.83,57.76,302,45.41q4-9.51,7.88-19c.67-1.63.15-2.37-1.59-2.39-3,0-.09,0-3.14,0a11,11,0,0,0-11.08,8c-.24.69-.49,1.38-.74,2.06q-4,11.14-8.05,22.28c-.63,1.74-1.27,3.48-2,5.5-.27.1-.47-.56-.52-.71q-3-8.25-6-16.5c-2.23-6.17-4.49-12.35-6.71-18.53a2.85,2.85,0,0,0-3-2.07c-2.58,0-5.15,0-7.73,0s-3.19,1.07-2.26,3.33Q261.51,38.16,266,49q3.88,9.41,7.74,18.82c1.49,3.63,3,7.25,4.48,10.89a3.09,3.09,0,0,0,3.25,2.13Z"/><path class="cls-2" d="M175.71,44.2v-31c0-2.58,5.88-4,10.47-3.85,1.78,0,2.29.53,2.37,2.31,0,.38,0,.77,0,1.15V77.36c0,.51,0,1,0,1.54a1.79,1.79,0,0,1-2,1.89c-3,0-5.92,0-8.88,0-1.32,0-1.93-.71-1.94-2.17,0-4,0-8,0-12.07Z"/></svg>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
20
apps/formbricks-com/images/clients/niLogoDark.svg
Normal file
20
apps/formbricks-com/images/clients/niLogoDark.svg
Normal file
@@ -0,0 +1,20 @@
|
||||
<svg width="1004" height="311" viewBox="0 0 1004 311" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M104.198 125.141L0.466736 187.097V62.9373L104.198 125.141Z" fill="#5B29FF"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M104 125.204L206.539 63L310.27 125.204V247.871L206.539 310.075V187.409L104 125.204Z" fill="#2962FF"/>
|
||||
<path d="M104.198 0.00195312L0.466736 62.9526L104.198 125.157L206.737 62.9526L104.198 0.00195312Z" fill="#FFC629"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.466736 62.9526L104.198 125.157L206.737 62.9526L104.198 0.00195312L0.466736 62.9526ZM19.8215 62.9004L104.17 113.481L187.549 62.9006L104.17 11.7126L19.8215 62.9004Z" fill="#FAFAFA"/>
|
||||
<path d="M104.189 113.486V11.7527L19.8417 62.9369L104.189 113.486Z" fill="#FFBC00"/>
|
||||
<path d="M418.241 188.759H450.845V301.364H418.241V188.759ZM434.543 173.061C428.552 173.061 423.675 171.317 419.913 167.829C416.151 164.34 414.27 160.015 414.27 154.852C414.27 149.689 416.151 145.363 419.913 141.875C423.675 138.386 428.552 136.642 434.543 136.642C440.535 136.642 445.411 138.317 449.173 141.666C452.935 145.014 454.816 149.201 454.816 154.224C454.816 159.666 452.935 164.201 449.173 167.829C445.411 171.317 440.535 173.061 434.543 173.061Z" fill="#192137"/>
|
||||
<path d="M538.998 187.084C552.931 187.084 564.147 191.271 572.647 199.643C581.285 208.015 585.605 220.434 585.605 236.899V301.364H553.001V241.922C553.001 232.992 551.05 226.364 547.149 222.038C543.247 217.573 537.604 215.34 530.22 215.34C521.999 215.34 515.45 217.922 510.574 223.085C505.697 228.108 503.259 235.643 503.259 245.69V301.364H470.655V188.759H501.796V201.945C506.115 197.201 511.479 193.573 517.889 191.061C524.298 188.41 531.334 187.084 538.998 187.084Z" fill="#192137"/>
|
||||
<path d="M646.717 303.039C637.382 303.039 628.256 301.922 619.338 299.69C610.421 297.318 603.315 294.388 598.02 290.899L608.888 267.457C613.904 270.666 619.965 273.318 627.071 275.411C634.177 277.364 641.144 278.341 647.971 278.341C661.765 278.341 668.662 274.922 668.662 268.085C668.662 264.876 666.781 262.573 663.019 261.178C659.257 259.783 653.475 258.597 645.672 257.62C636.476 256.224 628.883 254.62 622.891 252.806C616.9 250.992 611.675 247.783 607.216 243.178C602.897 238.573 600.737 232.015 600.737 223.503C600.737 216.387 602.758 210.108 606.798 204.666C610.978 199.085 616.97 194.759 624.772 191.689C632.714 188.619 642.05 187.084 652.778 187.084C660.72 187.084 668.593 187.991 676.395 189.805C684.337 191.48 690.886 193.852 696.042 196.922L685.173 220.154C675.281 214.573 664.482 211.782 652.778 211.782C645.812 211.782 640.587 212.759 637.103 214.713C633.62 216.666 631.878 219.178 631.878 222.248C631.878 225.736 633.759 228.178 637.521 229.573C641.283 230.968 647.275 232.294 655.495 233.55C664.691 235.085 672.215 236.759 678.068 238.573C683.919 240.248 689.005 243.387 693.324 247.992C697.644 252.597 699.803 259.015 699.803 267.248C699.803 274.225 697.713 280.434 693.533 285.876C689.353 291.318 683.223 295.574 675.141 298.643C667.199 301.574 657.725 303.039 646.717 303.039Z" fill="#192137"/>
|
||||
<path d="M786.173 295.922C782.968 298.295 778.997 300.108 774.26 301.364C769.662 302.481 764.785 303.039 759.63 303.039C746.254 303.039 735.873 299.62 728.489 292.783C721.243 285.946 717.621 275.899 717.621 262.643V216.387H700.274V191.271H717.621V163.852H750.225V191.271H778.231V216.387H750.225V262.225C750.225 266.969 751.409 270.666 753.778 273.318C756.286 275.829 759.769 277.085 764.228 277.085C769.383 277.085 773.772 275.69 777.395 272.899L786.173 295.922Z" fill="#192137"/>
|
||||
<path d="M837.288 187.084C854.705 187.084 868.081 191.271 877.416 199.643C886.751 207.875 891.419 220.364 891.419 237.108V301.364H860.905V287.341C854.774 297.806 843.349 303.039 826.629 303.039C817.99 303.039 810.466 301.574 804.057 298.643C797.787 295.713 792.98 291.667 789.636 286.504C786.292 281.341 784.62 275.48 784.62 268.922C784.62 258.457 788.521 250.224 796.324 244.224C804.266 238.224 816.458 235.224 832.899 235.224H858.815C858.815 228.108 856.655 222.666 852.336 218.899C848.017 214.992 841.538 213.038 832.899 213.038C826.908 213.038 820.986 214.015 815.134 215.968C809.421 217.782 804.545 220.294 800.504 223.503L788.8 200.689C794.931 196.364 802.246 193.015 810.745 190.643C819.384 188.271 828.231 187.084 837.288 187.084ZM834.78 281.062C840.353 281.062 845.3 279.806 849.619 277.294C853.938 274.643 857.004 270.806 858.815 265.783V254.271H836.452C823.076 254.271 816.388 258.666 816.388 267.457C816.388 271.643 817.99 274.992 821.195 277.504C824.539 279.876 829.067 281.062 834.78 281.062Z" fill="#192137"/>
|
||||
<path d="M908.387 146.061H940.991V301.364H908.387V146.061Z" fill="#192137"/>
|
||||
<path d="M960.8 146.061H993.404V301.364H960.8V146.061Z" fill="#192137"/>
|
||||
<path d="M419.913 167.738C423.675 171.227 428.552 172.971 434.543 172.971C440.535 172.971 445.411 171.227 449.173 167.738C452.935 164.11 454.816 159.576 454.816 154.134C454.816 149.11 452.935 144.924 449.173 141.575C445.411 138.227 440.535 136.552 434.543 136.552C428.552 136.552 423.675 138.296 419.913 141.785C416.151 145.273 414.27 149.599 414.27 154.762C414.27 159.924 416.151 164.25 419.913 167.738Z" fill="#192137"/>
|
||||
<path d="M482.602 7.03833C496.533 7.03833 507.748 11.2109 516.245 19.5559C524.883 27.9009 529.201 40.2794 529.201 56.6914V120.948H496.603V61.6984C496.603 52.797 494.652 46.1905 490.752 41.8789C486.851 37.4282 481.209 35.2029 473.825 35.2029C465.606 35.2029 459.059 37.7759 454.183 42.922C449.307 47.9291 446.869 55.4396 446.869 65.4537V120.948H414.27V8.70733H445.406V21.8508C449.725 17.1219 455.088 13.5057 461.496 11.0022C467.905 8.35962 474.94 7.03833 482.602 7.03833Z" fill="#192137"/>
|
||||
<path d="M660.517 65.245C660.517 65.6623 660.308 68.5831 659.89 74.0073H574.841C576.373 80.9616 579.995 86.4554 585.707 90.4888C591.419 94.5223 598.523 96.539 607.021 96.539C612.872 96.539 618.027 95.7045 622.485 94.0355C627.082 92.2274 631.331 89.4457 635.232 85.6904L652.576 104.467C641.988 116.567 626.525 122.617 606.186 122.617C593.508 122.617 582.294 120.183 572.542 115.315C562.79 110.308 555.268 103.424 549.974 94.6613C544.68 85.899 542.033 75.9545 542.033 64.8278C542.033 53.8401 544.61 43.9652 549.765 35.2029C555.059 26.3015 562.233 19.4168 571.288 14.5489C580.483 9.54184 590.722 7.03833 602.006 7.03833C613.012 7.03833 622.972 9.40276 631.888 14.1316C640.804 18.8605 647.77 25.6756 652.785 34.577C657.939 43.3393 660.517 53.562 660.517 65.245ZM602.215 31.6562C594.832 31.6562 588.632 33.7425 583.617 37.915C578.602 42.0875 575.537 47.79 574.423 55.0224H629.799C628.684 47.9291 625.619 42.2962 620.604 38.1236C615.589 33.812 609.459 31.6562 602.215 31.6562Z" fill="#192137"/>
|
||||
<path d="M791.767 8.70733L744.331 120.948H710.688L663.462 8.70733H697.105L728.241 85.0645L760.422 8.70733H791.767Z" fill="#192137"/>
|
||||
<path d="M912.132 65.245C912.132 65.6623 911.923 68.5831 911.506 74.0073H826.457C827.989 80.9616 831.611 86.4554 837.323 90.4888C843.034 94.5223 850.139 96.539 858.637 96.539C864.488 96.539 869.643 95.7045 874.101 94.0355C878.698 92.2274 882.947 89.4457 886.848 85.6904L904.192 104.467C893.604 116.567 878.141 122.617 857.801 122.617C845.124 122.617 833.91 120.183 824.158 115.315C814.406 110.308 806.883 103.424 801.59 94.6613C796.296 85.899 793.649 75.9545 793.649 64.8278C793.649 53.8401 796.226 43.9652 801.381 35.2029C806.674 26.3015 813.849 19.4168 822.904 14.5489C832.099 9.54184 842.338 7.03833 853.622 7.03833C864.628 7.03833 874.588 9.40276 883.504 14.1316C892.42 18.8605 899.386 25.6756 904.401 34.577C909.555 43.3393 912.132 53.562 912.132 65.245ZM853.831 31.6562C846.448 31.6562 840.248 33.7425 835.233 37.915C830.218 42.0875 827.153 47.79 826.039 55.0224H881.415C880.3 47.9291 877.235 42.2962 872.22 38.1236C867.205 33.812 861.075 31.6562 853.831 31.6562Z" fill="#192137"/>
|
||||
<path d="M964.971 23.5198C968.872 18.0955 974.096 13.9925 980.644 11.2109C987.331 8.42917 994.993 7.03833 1003.63 7.03833V37.0805C1000.01 36.8023 997.57 36.6633 996.316 36.6633C986.982 36.6633 979.669 39.3059 974.375 44.591C969.081 49.7372 966.434 57.5259 966.434 67.9572V120.948H933.836V8.70733H964.971V23.5198Z" fill="#192137"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.9 KiB |
20
apps/formbricks-com/images/clients/niLogoWhite.svg
Normal file
20
apps/formbricks-com/images/clients/niLogoWhite.svg
Normal file
@@ -0,0 +1,20 @@
|
||||
<svg width="1004" height="311" viewBox="0 0 1004 311" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M104.272 125.141L0.541077 187.097V62.9373L104.272 125.141Z" fill="#6A51F5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M104.271 125.131L206.81 62.9271L310.541 125.131V247.798L206.81 310.002V187.336L104.271 125.131Z" fill="#386DFF"/>
|
||||
<path d="M104.272 0.00195312L0.541077 62.9526L104.272 125.157L206.811 62.9526L104.272 0.00195312Z" fill="#FFC629"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.541077 62.9526L104.272 125.157L206.811 62.9526L104.272 0.00195312L0.541077 62.9526ZM19.8959 62.9004L104.244 113.481L187.623 62.9006L104.244 11.7126L19.8959 62.9004Z" fill="#FAFAFA"/>
|
||||
<path d="M104.263 113.486V11.7527L19.9161 62.9369L104.263 113.486Z" fill="#FFBC00"/>
|
||||
<path d="M418.512 188.723H451.116V301.328H418.512V188.723ZM434.814 173.025C428.822 173.025 423.946 171.281 420.184 167.792C416.422 164.304 414.541 159.978 414.541 154.815C414.541 149.652 416.422 145.327 420.184 141.838C423.946 138.35 428.822 136.606 434.814 136.606C440.805 136.606 445.682 138.28 449.444 141.629C453.206 144.978 455.087 149.164 455.087 154.187C455.087 159.629 453.206 164.164 449.444 167.792C445.682 171.281 440.805 173.025 434.814 173.025Z" fill="#FAFAFA"/>
|
||||
<path d="M539.268 187.048C553.201 187.048 564.418 191.234 572.917 199.606C581.556 207.978 585.875 220.397 585.875 236.862V301.328H553.271V241.886C553.271 232.955 551.32 226.327 547.419 222.002C543.518 217.537 537.875 215.304 530.49 215.304C522.269 215.304 515.721 217.886 510.844 223.048C505.967 228.072 503.529 235.607 503.529 245.653V301.328H470.925V188.723H502.066V201.909C506.385 197.164 511.75 193.537 518.159 191.025C524.568 188.374 531.605 187.048 539.268 187.048Z" fill="#FAFAFA"/>
|
||||
<path d="M646.988 303.002C637.653 303.002 628.526 301.886 619.609 299.654C610.692 297.281 603.586 294.351 598.291 290.863L609.159 267.421C614.175 270.63 620.236 273.281 627.342 275.374C634.448 277.328 641.415 278.305 648.242 278.305C662.036 278.305 668.933 274.886 668.933 268.049C668.933 264.839 667.052 262.537 663.29 261.142C659.528 259.746 653.746 258.56 645.943 257.583C636.747 256.188 629.153 254.583 623.162 252.769C617.171 250.955 611.946 247.746 607.487 243.141C603.168 238.537 601.008 231.979 601.008 223.467C601.008 216.351 603.028 210.072 607.069 204.63C611.249 199.048 617.24 194.723 625.043 191.653C632.985 188.583 642.32 187.048 653.049 187.048C660.991 187.048 668.863 187.955 676.666 189.769C684.608 191.443 691.157 193.816 696.312 196.885L685.444 220.118C675.551 214.537 664.753 211.746 653.049 211.746C646.082 211.746 640.857 212.723 637.374 214.676C633.891 216.63 632.149 219.141 632.149 222.211C632.149 225.7 634.03 228.141 637.792 229.537C641.554 230.932 647.545 232.258 655.766 233.514C664.962 235.048 672.486 236.723 678.338 238.537C684.19 240.211 689.276 243.351 693.595 247.955C697.914 252.56 700.074 258.979 700.074 267.211C700.074 274.188 697.984 280.398 693.804 285.839C689.624 291.281 683.493 295.537 675.412 298.607C667.47 301.537 657.995 303.002 646.988 303.002Z" fill="#FAFAFA"/>
|
||||
<path d="M786.443 295.886C783.239 298.258 779.268 300.072 774.53 301.328C769.932 302.444 765.056 303.002 759.9 303.002C746.524 303.002 736.144 299.584 728.759 292.747C721.514 285.909 717.891 275.863 717.891 262.607V216.351H700.544V191.234H717.891V163.815H750.495V191.234H778.501V216.351H750.495V262.188C750.495 266.932 751.68 270.63 754.048 273.281C756.556 275.793 760.04 277.049 764.498 277.049C769.654 277.049 774.043 275.653 777.665 272.863L786.443 295.886Z" fill="#FAFAFA"/>
|
||||
<path d="M837.559 187.048C854.975 187.048 868.351 191.234 877.687 199.606C887.022 207.839 891.69 220.327 891.69 237.072V301.328H861.176V287.305C855.045 297.77 843.62 303.002 826.9 303.002C818.261 303.002 810.737 301.537 804.328 298.607C798.057 295.677 793.251 291.63 789.907 286.467C786.563 281.305 784.89 275.444 784.89 268.886C784.89 258.421 788.792 250.188 796.595 244.188C804.536 238.188 816.728 235.188 833.17 235.188H859.086C859.086 228.072 856.926 222.63 852.607 218.862C848.287 214.955 841.808 213.002 833.17 213.002C827.178 213.002 821.257 213.979 815.405 215.932C809.692 217.746 804.815 220.258 800.775 223.467L789.071 200.653C795.201 196.327 802.516 192.978 811.016 190.606C819.654 188.234 828.502 187.048 837.559 187.048ZM835.051 281.025C840.624 281.025 845.57 279.77 849.89 277.258C854.209 274.607 857.274 270.77 859.086 265.746V254.235H836.723C823.346 254.235 816.659 258.63 816.659 267.421C816.659 271.607 818.261 274.956 821.466 277.467C824.81 279.839 829.338 281.025 835.051 281.025Z" fill="#FAFAFA"/>
|
||||
<path d="M908.658 146.025H941.262V301.328H908.658V146.025Z" fill="#FAFAFA"/>
|
||||
<path d="M961.071 146.025H993.675V301.328H961.071V146.025Z" fill="#FAFAFA"/>
|
||||
<path d="M420.184 167.702C423.946 171.19 428.822 172.935 434.814 172.935C440.805 172.935 445.682 171.19 449.444 167.702C453.206 164.074 455.087 159.539 455.087 154.097C455.087 149.074 453.206 144.888 449.444 141.539C445.682 138.19 440.805 136.516 434.814 136.516C428.822 136.516 423.946 138.26 420.184 141.748C416.422 145.237 414.541 149.562 414.541 154.725C414.541 159.888 416.422 164.214 420.184 167.702Z" fill="#FAFAFA"/>
|
||||
<path d="M482.873 7.00195C496.804 7.00195 508.018 11.1745 516.516 19.5195C525.153 27.8646 529.472 40.2431 529.472 56.655V120.912H496.873V61.662C496.873 52.7606 494.923 46.1541 491.022 41.8425C487.122 37.3918 481.479 35.1665 474.096 35.1665C465.877 35.1665 459.329 37.7396 454.453 42.8857C449.577 47.8927 447.139 55.4032 447.139 65.4173V120.912H414.541V8.67096H445.677V21.8144C449.995 17.0856 455.359 13.4694 461.767 10.9658C468.175 8.32325 475.21 7.00195 482.873 7.00195Z" fill="#FAFAFA"/>
|
||||
<path d="M660.787 65.2087C660.787 65.6259 660.578 68.5467 660.16 73.971H575.111C576.644 80.9252 580.266 86.419 585.977 90.4524C591.689 94.4859 598.794 96.5026 607.292 96.5026C613.143 96.5026 618.298 95.6681 622.755 93.9991C627.353 92.191 631.602 89.4093 635.502 85.654L652.846 104.43C642.259 116.531 626.795 122.581 606.456 122.581C593.779 122.581 582.564 120.147 572.813 115.279C563.061 110.272 555.538 103.387 550.244 94.625C544.951 85.8627 542.304 75.9181 542.304 64.7914C542.304 53.8038 544.881 43.9288 550.035 35.1665C555.329 26.2651 562.504 19.3804 571.559 14.5125C580.753 9.50546 590.993 7.00195 602.277 7.00195C613.282 7.00195 623.243 9.36639 632.159 14.0952C641.075 18.8241 648.04 25.6392 653.055 34.5406C658.21 43.3029 660.787 53.5256 660.787 65.2087ZM602.486 31.6198C595.102 31.6198 588.903 33.7061 583.888 37.8786C578.873 42.0512 575.808 47.7536 574.693 54.986H630.069C628.955 47.8927 625.89 42.2598 620.875 38.0873C615.86 33.7757 609.73 31.6198 602.486 31.6198Z" fill="#FAFAFA"/>
|
||||
<path d="M792.037 8.67096L744.602 120.912H710.959L663.732 8.67096H697.376L728.512 85.0282L760.692 8.67096H792.037Z" fill="#FAFAFA"/>
|
||||
<path d="M912.403 65.2087C912.403 65.6259 912.194 68.5467 911.776 73.971H826.727C828.26 80.9252 831.882 86.419 837.593 90.4524C843.305 94.4859 850.41 96.5026 858.908 96.5026C864.759 96.5026 869.913 95.6681 874.371 93.9991C878.969 92.191 883.217 89.4093 887.118 85.654L904.462 104.43C893.875 116.531 878.411 122.581 858.072 122.581C845.395 122.581 834.18 120.147 824.429 115.279C814.677 110.272 807.154 103.387 801.86 94.625C796.566 85.8627 793.92 75.9181 793.92 64.7914C793.92 53.8038 796.497 43.9288 801.651 35.1665C806.945 26.2651 814.12 19.3804 823.175 14.5125C832.369 9.50546 842.609 7.00195 853.893 7.00195C864.898 7.00195 874.859 9.36639 883.775 14.0952C892.691 18.8241 899.656 25.6392 904.671 34.5406C909.826 43.3029 912.403 53.5256 912.403 65.2087ZM854.102 31.6198C846.718 31.6198 840.519 33.7061 835.504 37.8786C830.488 42.0512 827.424 47.7536 826.309 54.986H881.685C880.571 47.8927 877.506 42.2598 872.491 38.0873C867.475 33.7757 861.346 31.6198 854.102 31.6198Z" fill="#FAFAFA"/>
|
||||
<path d="M965.242 23.4834C969.143 18.0591 974.367 13.9562 980.914 11.1745C987.601 8.39279 995.263 7.00195 1003.9 7.00195V37.0441C1000.28 36.766 997.841 36.6269 996.587 36.6269C987.253 36.6269 979.939 39.2695 974.645 44.5547C969.352 49.7008 966.705 57.4895 966.705 67.9208V120.912H934.106V8.67096H965.242V23.4834Z" fill="#FAFAFA"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user