Compare commits

...

179 Commits

Author SHA1 Message Date
review-agent-prime[bot]
d9a26c6f79 Edit apps/web/app/(auth)/auth/login/components/SigninForm.tsx 2024-03-14 15:34:58 +00:00
ShubhamPalriwala
b141561c96 feat: redirect user to email verification page if not done 2024-03-14 21:02:11 +05:30
Matti Nannt
0332a2efe3 chore: add cache headers to og endpoint (#2240) 2024-03-14 14:24:23 +00:00
Kanishk Rawat
be8e461f55 chore: update Requestly url in OSS Friends (#2239) 2024-03-14 14:06:56 +00:00
Piyush Gupta
722ee68b4c feat: Paginated Surveys Management API (#2198) 2024-03-14 13:59:58 +00:00
Shubham Palriwala
e4078a3307 feat: opentelemetry integration (#2235)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-14 13:59:49 +00:00
Matti Nannt
907a9dc563 chore: rename github actions for simplification (#2238) 2024-03-14 13:46:41 +00:00
Piyush Gupta
f6df94081d feat: Add Server-side pagination to Surveys List (#2197)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-14 13:45:31 +00:00
talboren
2436192995 chore: add Keep to OSS friends (#2229)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-03-14 13:32:15 +00:00
Matti Nannt
f54e2e032a chore: update formbricks-com dependencies (#2237) 2024-03-14 13:17:13 +00:00
Piyush Gupta
1a28660dfd feat: added image link (#2228)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-03-14 09:38:29 +00:00
Matti Nannt
f98a57582a chore: prepare 1.6.1 release (#2232) 2024-03-13 15:35:51 +00:00
David Septimus
0cc365261e feat: improve configurability for upload storage (#2144)
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-13 14:57:13 +00:00
Anshuman Pandey
6f78049c1f fix: fixes authorization checks for update product server action (#2231) 2024-03-13 13:31:22 +00:00
Piyush Gupta
2f11aa6c14 feat: adds response count indicator (#2213)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-13 10:18:37 +00:00
Dhruwang Jariwala
09cb61ae1e fix: display email instead of id (#2202)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-13 09:16:57 +00:00
Dhruwang Jariwala
65a152e518 fix: survey background image upload issue (#2222)
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
2024-03-13 09:13:05 +00:00
Dhruwang Jariwala
92d88271d7 fix: scroll to bottom when other option is selected (#2204) 2024-03-13 09:11:40 +00:00
Dhruwang Jariwala
a56c354e84 fix: Incorrect created_at value while duplicating a survey (#2217)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-13 09:10:09 +00:00
Dhruwang Jariwala
29a9b7e23e fix: Autoclose issue (#2216) 2024-03-13 09:06:57 +00:00
Shubham Palriwala
94a419249b fix: font usage in surveys package (#2220) 2024-03-13 09:04:54 +00:00
Shubham Palriwala
12907c9061 feat: support for supercronic in arm images (#2224) 2024-03-13 09:02:11 +00:00
Shubham Palriwala
0aa468f8f3 fix: (e2e) API surveys after icons changed (#2225) 2024-03-13 09:01:37 +00:00
Shubham Palriwala
91447e1502 docs: remove old debug functionality in params (#2226) 2024-03-13 09:01:11 +00:00
Shubham Palriwala
84ea14820a docs: azure sso integration (#2227) 2024-03-13 08:04:20 +00:00
Piyush Gupta
8fb472c37c fix: rating quese style hotfix (#2223) 2024-03-13 07:57:56 +00:00
Naitik Kapadia
6efb6d4e7b feat: Ability to startAt specific question (#2175)
Co-authored-by: Piyush Gupta <piyushguptaa2z123@gmail.com>
2024-03-12 12:34:40 +00:00
Dhruwang Jariwala
99da20f831 chore: replaced Heroicons with corresponding lucide-react icons (#2221) 2024-03-12 12:29:21 +00:00
Shubham Palriwala
52d1dc9ed9 fix: e2e tests breaking in main (#2219)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-12 11:55:10 +00:00
JianJroh
5633bb18ef fix: use fileURLToPath to get correct file path on windows (#2147)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-12 11:53:39 +00:00
Piyush Gupta
b2cb0ecff3 fix: rating question options size (#2206)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-03-11 19:12:26 +00:00
Piyush Gupta
2089b339b4 fix: added checks on unauthorized server actions (#2218)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-11 14:16:47 +00:00
Piyush Gupta
2e83adc846 feat: adds skeleton loader (#2214) 2024-03-11 11:21:25 +00:00
Matti Nannt
189cbcecd7 chore: dockerfile needs no internet access to run (#2215) 2024-03-11 11:01:12 +00:00
Shubham Palriwala
5aebde79e7 docs: remove old debug functionality (#2212) 2024-03-11 10:21:55 +00:00
Piyush Gupta
5cce4a1db4 fix: display count change on date filter (#2208) 2024-03-11 08:33:49 +00:00
Piyush Gupta
c6ff74f166 fix: added sanitizeString util helper (#2209) 2024-03-09 06:47:37 +00:00
Shubham Palriwala
e8aad9f469 fix: remove unset env vars from kamal & gh action (#2210) 2024-03-08 13:30:18 +00:00
Shubham Palriwala
455a061f35 feat: kamal deployment integration (#2178) 2024-03-08 12:04:58 +00:00
Piyush Gupta
a9f35df278 fix: download responses not working (#2205) 2024-03-08 10:32:36 +00:00
Dhruwang Jariwala
82124a8b1c fix: lint warnings (#2201) 2024-03-07 14:41:33 +00:00
Dhruwang Jariwala
f3f93faf1d fix: Add button to link editor (#2200)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-03-07 14:41:02 +00:00
Piyush Gupta
57d117eb98 fix: Smiley Rating Question on iPhone / WebKit (#2195) 2024-03-07 11:18:47 +00:00
Piyush Gupta
d01b293a27 feat: Move Response Summary Server-side (#2160)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-06 11:53:21 +00:00
Shubham Palriwala
a9f5289672 feat: tests for survey API endpoints & fix survey create API input params (#2013)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-06 11:10:35 +00:00
Matti Nannt
1df1419827 chore: remove s3 check from health check for now (#2194) 2024-03-06 08:49:28 +00:00
Dhruwang Jariwala
f20a0d2ff7 fix: confirm modal on back button (#2189) 2024-03-06 07:42:32 +00:00
Johannes
b9e5a6f9b9 fix: onboarding skips + track sdk setup success (#2191) 2024-03-06 07:37:32 +00:00
Matti Nannt
b2eaf1f6a3 chore: remove posthog tracking from auth and share (#2190) 2024-03-05 14:41:50 +00:00
Matti Nannt
a873974f0d chore: improve db indexes with segmentId index (#2192) 2024-03-05 14:23:08 +00:00
Matti Nannt
09974e1a10 fix: action cacheClass cache not getting revalidation after deleting (#2188) 2024-03-05 12:04:36 +00:00
Piyush Gupta
45d5980527 fix: rating icon bug in safari (#2183)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-05 10:30:59 +00:00
Piyush Gupta
73a25a412c fix: Call to Action question bug (#2184) 2024-03-05 09:44:41 +00:00
Matti Nannt
f0647ce240 fix: only get first page of surveys for survey list (#2186) 2024-03-05 08:45:08 +00:00
Anshuman Pandey
7c09dd9d10 fix: refetch server data when share embed modal is closed (#2185) 2024-03-05 08:10:49 +00:00
Matti Nannt
c5bdbc89ca fix: multiple surveys might be showing at the same time (#2179) 2024-03-04 11:15:06 +00:00
Dhruwang Jariwala
673832a7e1 fix: CORS error while using iframes (#2176) 2024-03-04 10:54:36 +00:00
Dhruwang Jariwala
6c1989b527 fix: break lines at new line character in single response card (#2177) 2024-03-04 07:20:23 +00:00
Dhruwang Jariwala
96bc0e669c fix: Recall in verify email question preview and integrations (#2145)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-02 11:30:07 +00:00
Matti Nannt
9791490449 chore: update npm deps & survey/js package version (#2171) 2024-03-02 11:17:53 +00:00
Shubham Palriwala
ee053e6642 feat: webapp URL based redirects in middleware for external LB integrations (#2151)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-02 11:00:20 +00:00
Anshuman Pandey
56f6dbe9a6 feat: sync endpoint error handling (#2132)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-03-02 10:53:39 +00:00
Johannes
49c18023bd chore: add css ids to onboarding (#2170) 2024-03-02 09:02:53 +00:00
Johannes
3f5f29122b fix: add onboarding tracking (#2169) 2024-03-01 15:54:37 +00:00
Anshuman Pandey
2ed03bc8da fix: fixes duplicate survey segment (#2168) 2024-03-01 13:30:06 +00:00
Shubham Palriwala
5aa72a4c76 feat: show error on browser console for easier debugging for webhook test endpoint (#2163) 2024-03-01 12:03:12 +00:00
Anshuman Pandey
4a8fdcbbbc fix: saved actions (#2167) 2024-03-01 11:42:34 +00:00
Johannes
5855804291 fix: remove naviate from save (#2166) 2024-03-01 11:05:03 +00:00
Anshuman Pandey
9fdb7452a2 hotfix: e2e tests (#2164) 2024-03-01 10:57:12 +00:00
Johannes
7573b2d0ba fix: height issue (#2165) 2024-03-01 10:39:39 +00:00
Dhruwang Jariwala
cdd93ee86b fix: Cta button issue on thank you card (#2148)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
2024-03-01 09:37:42 +00:00
Matti Nannt
dbbd450b62 chore: improve person & attribute query performance (#2161) 2024-03-01 07:36:49 +00:00
Matti Nannt
255f1cee61 fix: vercel-config failing on Vercel (#2159) 2024-02-29 12:40:36 +01:00
Johannes
36ac4ecdb9 fix: isCloud condition (#2156) 2024-02-29 09:32:46 +01:00
Thomas Kaul
4edb92365a fix: Typo in OSS Friends API (#2155)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-02-29 08:47:28 +01:00
Dhruwang Jariwala
89eee21978 fix: allow decimal in number input field (#2149) 2024-02-29 08:46:51 +01:00
Dhruwang Jariwala
a8563ad905 feat: Onboarding revamp (#2073)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-28 21:35:10 +01:00
Matti Nannt
06eebe36ee fix: update action indexes for faster query processing (#2154) 2024-02-28 18:17:40 +00:00
Shubham Palriwala
5fc18fc445 fix: increase max height of open text question input to 8 lines (#2153) 2024-02-28 16:15:50 +00:00
Shubham Palriwala
53d3be3b27 feat: identify teams & their billing in Posthog (#2112) 2024-02-28 09:59:27 +00:00
Dhruwang Jariwala
078c5db2b0 fix: preview bugs (#2134) 2024-02-28 05:51:53 +00:00
Shubham Palriwala
356d237e60 fix: hidden fields object was incorrectly required in survey creation api (#2140) 2024-02-27 16:44:00 +00:00
Shubham Palriwala
e799aa9b37 fix: authorization checks across all billing pages (#2143) 2024-02-27 16:31:53 +00:00
Matti Nannt
b36a263ef6 fix: invite token of null when callbackUrl present (#2142) 2024-02-27 15:41:41 +00:00
Shubham Palriwala
6e2fa40155 feat: 99 unlimited plan (#2137) 2024-02-27 13:10:39 +00:00
Piyush Gupta
df2cb9e26c feat: add picture selection support to response filters (#2105) 2024-02-27 13:06:31 +00:00
Nathan Clevenger
e33d640620 fix: landing page typo (#2135) 2024-02-27 12:58:25 +00:00
Matti Nannt
32dcb75ef8 fix: health endpoint s3 connection (#2136) 2024-02-27 13:20:49 +01:00
Midka
b1c2f90feb fix(S3): add support for custom endpoint (#2049)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-27 11:39:43 +00:00
Dhruwang Jariwala
8064e1ecf6 fix: Check for complete submission before displaying CTA on Thank You… (#1979)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-27 11:35:52 +00:00
Shubham Palriwala
21787f2af5 fix: react console errors & warnings in dashboard & survey editor (#2113)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-27 11:06:01 +00:00
Sebastian Goscinski
5acdf018d3 feat: custom S3 endpoint to use third party storage services (#2133)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-27 10:53:00 +00:00
Matti Nannt
47ec19b46d chore: update version for 1.6 release (#2123) 2024-02-26 22:31:52 +01:00
Dhruwang Jariwala
60b474a4f9 fix: unformatted recall question in logic editor (#2126) 2024-02-26 20:17:59 +00:00
Dhruwang Jariwala
a027d1ef3d fix: gs readability issue for multiple file uploads (#2127) 2024-02-26 20:07:42 +00:00
Dhruwang Jariwala
7f68b4f800 fix: welcome card fixes (#2128) 2024-02-26 20:06:22 +00:00
Matti Nannt
71717c6b02 fix: github action (#2131) 2024-02-26 19:29:28 +00:00
Michele
8ad1ecfcb9 feat: added Tiledesk to OSS friends (#2124) 2024-02-26 07:37:19 +00:00
Matti Nannt
338b21620b chore: Add database migration dockerfile (#2122) 2024-02-24 16:08:57 +00:00
Matti Nannt
78ed91b7c3 chore: update dockerfile to use turbo prune (#2121) 2024-02-24 15:39:46 +00:00
Matti Nannt
dbe249e6ce chore: run github actions with node 20 (#2120) 2024-02-24 11:07:46 +00:00
Shubham Palriwala
241716b4f3 docs: add migration guide for v1.6 (#2010)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-23 16:41:38 +00:00
Anshuman Pandey
f19e1960b7 fix: adds relative image url path for self hosters without s3 (#2096) 2024-02-23 14:50:08 +00:00
Anshuman Pandey
70b7f6614e feat: on the fly triggers (#2110)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-23 14:37:35 +00:00
Johannes
a680a62220 fix: adjust name size in survey card (#2118) 2024-02-23 13:37:41 +00:00
Piyush Gupta
cb17e185f1 fix: hide attributes from sync endpoint (#2117)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-23 12:14:10 +00:00
Johannes
8b2990a16f fix: remove delete functionality from handle Go Back in survey editor (#2107)
Co-authored-by: Shubham Palriwala <spalriwalau@gmail.com>
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-23 10:26:32 +00:00
Anshuman Pandey
6111e02b1b fix: edit segment card changes (#2081) 2024-02-23 10:16:22 +00:00
Matti Nannt
186feefdb5 chore: caching optimisations in sync endpoints (#2111)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-02-22 18:18:06 +00:00
Shubham Palriwala
312858e278 fix: dont interrupt response on display updation failure (#2102)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-22 14:45:30 +00:00
Jonas Höbenreich
61ca42eb83 feat: add Cache-Control header to public file serving (#2099) 2024-02-22 14:36:19 +00:00
Shubham Palriwala
7f21e65625 feat: custom OIDC providers (#2109) 2024-02-22 14:31:48 +00:00
Dhruwang Jariwala
cdf8e91dad fix: Rating issue fix (#2100)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-02-22 10:45:49 +00:00
Johannes
aa55ced425 feat: allow remove branding of in app surveys (#2085)
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
2024-02-22 10:13:34 +00:00
Shubham Palriwala
1d2c8719c3 fix: google oauth check only on google envs (#2106) 2024-02-22 09:09:23 +00:00
Piyush Gupta
09ede38509 feat: move download functionality server side (#2103)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-22 08:44:57 +00:00
Johannes
be14678cd0 fix: show real date and remember survey list orientation (#2108) 2024-02-21 15:25:19 +00:00
Piyush Gupta
d2e6238ad7 feat: move response filtering server-side (#1844)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-20 15:34:34 +00:00
Shubham Palriwala
f69e8e82e3 fix: rewrite stripe + bug in unsubscribing (#2084) 2024-02-20 07:49:53 +00:00
Johannes
96808b3464 chore: add themeisle and optimole logos to lp (#2086)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-19 12:39:37 +00:00
Johannes
3ce4e7f7a2 chore: added enterprise license page for self-hosters incl. status indicator (#2077)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-19 12:29:43 +00:00
Shubham Palriwala
606ca4ea98 docs: link-surveys: hidden fields page (#2082)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-19 11:20:29 +00:00
Shubham Palriwala
acf279d3ba feat: add RATE_LIMITING_DISABLED env var to bypass rate limiting (#2091)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-19 10:58:35 +00:00
Shubham Palriwala
2425dc5459 feat: rate limit per user per env sync user identification endpoint (#2090)
Co-authored-by: review-agent-prime[bot] <147289438+review-agent-prime[bot]@users.noreply.github.com>
2024-02-19 10:58:30 +00:00
Shubham Palriwala
6ae782b984 feat: downgrade team functionality when payment subscription has expired (#2092) 2024-02-19 10:50:24 +00:00
Sudhanshu Pandey
eadf63b47e chore: revert ECS Github Action (#2094) 2024-02-19 10:32:53 +00:00
Shubham Palriwala
12e5f097a5 docs: move env vars to config page (#2095)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-19 10:29:37 +00:00
Jonas Höbenreich
4c1e688f12 feat: add caching to survey sync (#2011) 2024-02-16 08:38:01 +00:00
Shubham Palriwala
3b2cf7c0da fix: (landing page) setup code font visibility (#2079)
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
2024-02-15 17:50:50 +00:00
Shubham Palriwala
4cc3ee278d feat: add go to dashboard button in error modal (#2063) 2024-02-15 17:45:10 +00:00
Malte Hecht
95493608ed fix: Add missing space to .env.example (#2075) 2024-02-15 17:44:40 +00:00
Johannes
101a029344 chore: Add new logos to readme (#2087) 2024-02-15 15:39:06 +00:00
Shubham Palriwala
92fe0adf1e fix: (docs) dark mode hover states (#2080) 2024-02-15 13:47:37 +00:00
Matti Nannt
0e41ebf849 chore: reduce vercel memory usage (#2083) 2024-02-15 11:55:47 +00:00
Matti Nannt
969fb0241a fix: formbricks-com build error (#2072) 2024-02-14 13:25:27 +00:00
McPizza
d588a61be5 docs: add UnInbox to OSS Friends (#2076) 2024-02-14 12:54:10 +00:00
Dhruwang Jariwala
82207d8f52 fix: redirect for nested windows (#2074) 2024-02-14 12:41:42 +00:00
Anshuman Pandey
c85ae57697 fix: image cache revalidation (#2071)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-14 10:32:44 +00:00
Anshuman Pandey
e6fe027e57 fix: segments modals (#2070) 2024-02-14 09:41:57 +00:00
Nick van Leeuwen
3090151c50 feat: Added the ability to remove the login via email button (#1993)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-14 09:02:08 +00:00
Sudhanshu Pandey
f899cb0478 fix: ECS Github Action (#2069) 2024-02-14 07:51:39 +00:00
Sudhanshu Pandey
f5c5ce23b0 fix: ecs Github Action (#2066) 2024-02-13 15:56:45 +00:00
Johannes
084b17e950 fix: lp fixes and updates (#2067) 2024-02-13 15:13:30 +00:00
Johannes
a643d90a2b chore: Add StackedCardsContainer component (#2064) 2024-02-13 15:06:19 +00:00
Anshuman Pandey
10b61be19a fix: load segment modal UI fix (#2065) 2024-02-13 11:04:29 +00:00
Sudhanshu Pandey
f0833786d9 fix: ECS deployment GitHub Action (#2061)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-13 07:56:01 +00:00
Anshuman Pandey
ad9296a00c fix: getSyncSurveys (#2062) 2024-02-13 06:44:46 +00:00
Anshuman Pandey
bf51e578b2 feat: Advanced Targeting (#758)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-12 19:08:47 +00:00
meletj
000a11c8bc docs: add Prisma to OSS Friends (#2059) 2024-02-12 16:12:31 +00:00
Jonas Höbenreich
531facd74c feat: add debug mode via url parameter (#2039)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-12 13:00:20 +00:00
Johannes
7843e2da99 fix: update Upgrade Notifier in branding removal (#2058) 2024-02-12 11:51:52 +00:00
Dhruwang Jariwala
77e2472175 chore: redirect for deletion survey (#2054)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-12 10:56:16 +00:00
Dhruwang Jariwala
336480a338 fix: cache revalidation on createResponse and docs (#2057) 2024-02-12 10:53:59 +00:00
Dhruwang Jariwala
f102901b90 fix: open text question validation issue (#2051)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-12 10:48:46 +00:00
Shubham Palriwala
14b162aabc feat: group events by environmentId in posthog (#2036)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-12 10:11:05 +00:00
Dhruwang Jariwala
07f28d0971 fix: team issues (#2050)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-12 09:53:38 +00:00
Dhruwang Jariwala
40d3ac19d1 chore: "include one of" option for single select (#2052) 2024-02-12 08:31:58 +00:00
Dhruwang Jariwala
7c0a9bed46 fix: multi select scroll issue (#2053) 2024-02-12 08:25:32 +00:00
Dhruwang Jariwala
c372108b91 fix: weekly template (#2041) 2024-02-09 05:42:40 +00:00
Dhruwang Jariwala
0bccee23e9 fix: File upload issues and tweaks (#2040)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-02-08 15:41:00 +00:00
Dhruwang Jariwala
831bf148d8 fix: bg animation and publish survey issue (#2037)
Co-authored-by: Johannes <johannes@formbricks.com>
2024-02-08 14:18:17 +00:00
Shubham Palriwala
4b1bbf0ba4 feat: double client side api rate limits (#2043) 2024-02-08 14:16:51 +00:00
Matti Nannt
5ef9b574ab docs: fix env variable table (#2035) 2024-02-07 18:01:13 +00:00
Matti Nannt
d55611ce02 chore: fix formbricks-com build issues (#2033) 2024-02-07 13:44:14 +00:00
Thomas Kaul
07228c4575 docs: Update README.md (#2032)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-07 13:42:28 +00:00
Shubham Palriwala
7bd15053e5 docs: mention reverse proxy & fix font shade in dark mode (#2031)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-07 12:10:48 +00:00
Matti Nannt
548251a2ba chore: remove *_auth_enabled env variables (#1997) 2024-02-07 11:35:13 +00:00
Matti Nannt
fd6322652b docs: add more license information (#2030) 2024-02-07 11:24:15 +00:00
Johannes
8b1718c9b3 chore: tweak billing page for clarity (#2028) 2024-02-07 09:10:34 +00:00
Shubham Palriwala
82aba726db docs: readme for @formbricks/api (#2027) 2024-02-07 08:15:36 +00:00
Dhruwang Jariwala
b264b2473b fix: gs spreadsheet scroll issue (#2020) 2024-02-07 07:45:47 +00:00
Matti Nannt
e80d71e654 fix: posthog free limit reporting (#2026) 2024-02-06 20:40:00 +00:00
Jonas Höbenreich
3472033c7e feat: Introduce Dynamic Pixel Server for Seamless Self-Hosting (#2015)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-02-06 16:10:49 +00:00
Matti Nannt
3db4f59b0a chore: update formbricks pricing page with new features (#2025) 2024-02-06 11:26:38 +00:00
Johannes
5c023d58d9 chore: tidy up blog and article typos (#2023) 2024-02-06 10:21:17 +00:00
Shubham Palriwala
6a9968bd97 feat: send free limit reached to PostHog (#2014)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
2024-02-06 09:55:09 +00:00
Matti Nannt
9c90c9faf1 fix: deleted responses still show in API (#2022) 2024-02-06 09:37:05 +00:00
Shubham Palriwala
b51e9ccdb9 fix: remove default env vars in docker compose (#2018) 2024-02-05 16:09:05 +00:00
Shubham Palriwala
967680263b feat: cache web builds & playwright binaries in CI (#2009) 2024-02-05 11:19:11 +00:00
625 changed files with 26888 additions and 14845 deletions

View File

@@ -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/

View File

@@ -1,8 +1,7 @@
########################################################################
# ------------ MANDATORY (CHANGE ACCORDING TO YOUR SETUP) ------------#
# ------------ MANDATORY (CHANGE ACCORDING TO YOUR SETUP) ------------ #
########################################################################
############
# BASICS #
############
@@ -51,13 +50,28 @@ SMTP_SECURE_ENABLED=0
SMTP_USER=smtpUser
SMTP_PASSWORD=smtpPassword
########################################################################
# ------------------------------ OPTIONAL -----------------------------#
########################################################################
# Uncomment the variables you would like to use and customize the values.
# Custom local storage path for file uploads
#UPLOADS_DIR=
##############
# S3 STORAGE #
##############
# S3 Storage is required for the file upload in serverless environments like Vercel
S3_ACCESS_KEY=
S3_SECRET_KEY=
S3_REGION=
S3_BUCKET_NAME=
# Configure a third party S3 compatible storage service endpoint like StorJ leave empty if you use Amazon S3
# e.g., https://gateway.storjshare.io
S3_ENDPOINT_URL=
#####################
# Disable Features #
#####################
@@ -71,6 +85,9 @@ PASSWORD_RESET_DISABLED=1
# Signup. Disable the ability for new users to create an account.
# SIGNUP_DISABLED=1
# Email login. Disable the ability for users to login with email.
# EMAIL_AUTH_DISABLED=1
# Team Invite. Disable the ability for invited users to create an account.
# INVITE_DISABLED=1
@@ -84,21 +101,25 @@ TERMS_URL=
IMPRINT_URL=
# Configure Github Login
GITHUB_AUTH_ENABLED=0
GITHUB_ID=
GITHUB_SECRET=
# Configure Google Login
GOOGLE_AUTH_ENABLED=0
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# Configure Azure Active Directory Login
AZUREAD_AUTH_ENABLED=0
AZUREAD_CLIENT_ID=
AZUREAD_CLIENT_SECRET=
AZUREAD_TENANT_ID=
# OpenID Connect (OIDC) configuration
# OIDC_CLIENT_ID=
# OIDC_CLIENT_SECRET=
# OIDC_ISSUER=
# OIDC_DISPLAY_NAME=
# OIDC_SIGNING_ALGORITHM=
# Cron Secret
CRON_SECRET=
@@ -118,12 +139,12 @@ NEXT_PUBLIC_FORMBRICKS_API_HOST=
NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID=
NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID=
# Oauth credentials for Google sheet integration
# Oauth credentials for Google sheet integration
GOOGLE_SHEETS_CLIENT_ID=
GOOGLE_SHEETS_CLIENT_SECRET=
GOOGLE_SHEETS_REDIRECT_URL=
# Oauth credentials for Airtable integration
# Oauth credentials for Airtable integration
AIRTABLE_CLIENT_ID=
# Enterprise License Key
@@ -141,3 +162,9 @@ ENTERPRISE_LICENSE_KEY=
# Send new users to customer.io
# CUSTOMER_IO_API_KEY=
# CUSTOMER_IO_SITE_ID=
# Ignore Rate Limiting across the Formbricks app
# RATE_LIMITING_DISABLED=1
# OpenTelemetry URL for tracing
# OPENTELEMETRY_LISTENER_URL=http://localhost:4318/v1/traces

View File

@@ -0,0 +1,55 @@
name: Build & Cache Web App
runs:
using: "composite"
steps:
- name: Checkout repo
uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- name: Cache Build
uses: actions/cache@v3
id: cache-build
env:
cache-name: prod-build
key-1: ${{ hashFiles('pnpm-lock.yaml') }}
key-2: ${{ hashFiles('apps/**/**.[jt]s', 'apps/**/**.[jt]sx', 'packages/**/**.[jt]s', 'packages/**/**.[jt]sx', '!**/node_modules') }}
key-3: ${{ github.event.pull_request.number || github.ref }}
with:
path: |
${{ github.workspace }}/apps/web/.next
**/.turbo/**
**/dist/**
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}
- name: Setup Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
if: steps.cache-build.outputs.cache-hit != 'true'
- name: Install pnpm
uses: pnpm/action-setup@v2
if: steps.cache-build.outputs.cache-hit != 'true'
- name: Install dependencies
run: pnpm install --config.platform=linux --config.architecture=x64
if: steps.cache-build.outputs.cache-hit != 'true'
shell: bash
- name: create .env
run: cp .env.example .env
shell: bash
- name: Generate Random ENCRYPTION_KEY
run: |
SECRET=$(openssl rand -hex 32)
echo "ENCRYPTION_KEY=$SECRET" >> $GITHUB_ENV
shell: bash
- run: |
pnpm build --filter=web...
if: steps.cache-build.outputs.cache-hit != 'true'
shell: bash

View File

@@ -0,0 +1,10 @@
name: Dangerous git Checkout
description: "Git Checkout from PR code so we can run checks from forks"
runs:
using: "composite"
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 2

View File

@@ -8,13 +8,13 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout repo
uses: actions/checkout@v3
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- name: Setup Node.js 18.x
- name: Setup Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x
- name: Install pnpm
uses: pnpm/action-setup@v2

View File

@@ -7,29 +7,18 @@ jobs:
name: Run E2E Tests
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- uses: ./.github/actions/dangerous-git-checkout
- name: Install Docker Compose
run: sudo apt-get update && sudo apt-get install -y docker-compose
- name: Build & Cache Web Binaries
uses: ./.github/actions/cache-build-web
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: create .env
run: cp .env.example .env
- name: Generate ENCRYPTION_KEY
run: |
SECRET=$(openssl rand -hex 32)
echo "ENCRYPTION_KEY=$SECRET" >> $GITHUB_ENV
run: pnpm install
- name: Start PostgreSQL
run: |
@@ -43,11 +32,6 @@ jobs:
sleep 5
done
pnpm db:migrate:dev
- name: Build App in dev mode without external dependencies
run: |
pnpm build:dev --filter=web...
- name: Serve packages for lazy loading
run: |
cd packages/surveys && pnpm serve &
@@ -68,6 +52,17 @@ jobs:
run: |
curl -s http://localhost:3003
- name: Cache Playwright
uses: actions/cache@v3
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install Playwright
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm exec playwright install --with-deps
- name: Run E2E Tests
run: |
pnpm test:e2e

View File

@@ -7,14 +7,11 @@ name: ECS
on:
push:
branches:
- main
branches: [main]
workflow_dispatch: # Add manual trigger support
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: formbricks/formbricks-experimental
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/formbricks?schema=public"
@@ -24,20 +21,13 @@ jobs:
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
id-token: write # Only necessary for sigstore/fulcio outside PRs
steps:
- name: Generate Random NEXTAUTH_SECRET
- name: Generate Secrets
run: |
SECRET=$(openssl rand -hex 32)
echo "NEXTAUTH_SECRET=$SECRET" >> $GITHUB_ENV
- name: Generate Random ENCRYPTION_KEY
run: |
SECRET=$(openssl rand -hex 32)
echo "ENCRYPTION_KEY=$SECRET" >> $GITHUB_ENV
echo "NEXTAUTH_SECRET=$(openssl rand -hex 32)" >> $GITHUB_ENV
echo "ENCRYPTION_KEY=$(openssl rand -hex 32)" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v3
@@ -53,7 +43,7 @@ jobs:
# https://github.com/docker/login-action
- name: Log into registry
uses: docker/login-action@v3 # v3.0.0
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
@@ -68,7 +58,6 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,format=long
type=raw,value=latest,enable={{is_default_branch}}
# Build and push Docker image with Buildx
# https://github.com/docker/build-push-action
@@ -93,7 +82,7 @@ jobs:
DATABASE_URL=${{ env.DATABASE_URL }}
ENCRYPTION_KEY=${{ env.ENCRYPTION_KEY }}
NEXT_PUBLIC_SENTRY_DSN=${{ env.NEXT_PUBLIC_SENTRY_DSN }}
- name: Sign the images with GitHub OIDC Token
env:
DIGEST: ${{ steps.build-and-push.outputs.digest }}
@@ -104,6 +93,9 @@ jobs:
images+="${tag}@${DIGEST} "
done
cosign sign --yes ${images}
outputs:
image_tag_sha: ${{ steps.meta.outputs.tags }}
deploy:
needs: build
@@ -126,7 +118,7 @@ jobs:
with:
task-definition: task-definition.json
container-name: prod-webapp-container
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
image: ${{ needs.build.outputs.image_tag_sha }}
- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1

119
.github/workflows/kamal.yml vendored Normal file
View File

@@ -0,0 +1,119 @@
name: Kamal Deploy
concurrency:
group: deploy-to-kamal
cancel-in-progress: false
on:
push:
branches:
- main
jobs:
Deploy:
runs-on: ubuntu-latest
environment: production
env:
DOCKER_BUILDKIT: 1
IS_FORMBRICKS_CLOUD: ${{ vars.IS_FORMBRICKS_CLOUD }}
WEBAPP_URL: ${{ vars.WEBAPP_URL }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
SHORT_URL_BASE: ${{ vars.SHORT_URL_BASE }}
MAIL_FROM: ${{ secrets.MAIL_FROM }}
SMTP_HOST: ${{ secrets.SMTP_HOST }}
SMTP_PORT: ${{ secrets.SMTP_PORT }}
SMTP_USER: ${{ secrets.SMTP_USER }}
SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }}
PRIVACY_URL: ${{ vars.PRIVACY_URL }}
TERMS_URL: ${{ vars.TERMS_URL }}
IMPRINT_URL: ${{ vars.IMPRINT_URL }}
GITHUB_ID: ${{ secrets.GITHUB_ID }}
GITHUB_SECRET: ${{ secrets.GITHUB_SECRET }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
AZUREAD_CLIENT_ID: ${{ secrets.AZUREAD_CLIENT_ID }}
AZUREAD_CLIENT_SECRET: ${{ secrets.AZUREAD_CLIENT_SECRET }}
AZUREAD_TENANT_ID: ${{ secrets.AZUREAD_TENANT_ID }}
OIDC_CLIENT_ID: ${{ secrets.OIDC_CLIENT_ID }}
OIDC_CLIENT_SECRET: ${{ secrets.OIDC_CLIENT_SECRET }}
OIDC_ISSUER: ${{ secrets.OIDC_ISSUER }}
OIDC_DISPLAY_NAME: ${{ secrets.OIDC_DISPLAY_NAME }}
OIDC_SIGNING_ALGORITHM: ${{ secrets.OIDC_SIGNING_ALGORITHM }}
CRON_SECRET: ${{ secrets.CRON_SECRET }}
ASSET_PREFIX_URL: ${{ vars.ASSET_PREFIX_URL }}
NOTION_OAUTH_CLIENT_ID: ${{ secrets.NOTION_OAUTH_CLIENT_ID }}
NOTION_OAUTH_CLIENT_SECRET: ${{ secrets.NOTION_OAUTH_CLIENT_SECRET }}
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
STRIPE_WEBHOOK_SECRET: ${{ secrets.STRIPE_WEBHOOK_SECRET }}
GOOGLE_SHEETS_CLIENT_ID: ${{ secrets.GOOGLE_SHEETS_CLIENT_ID }}
GOOGLE_SHEETS_CLIENT_SECRET: ${{ secrets.GOOGLE_SHEETS_CLIENT_SECRET }}
GOOGLE_SHEETS_REDIRECT_URL: ${{ secrets.GOOGLE_SHEETS_REDIRECT_URL }}
AIRTABLE_CLIENT_ID: ${{ secrets.AIRTABLE_CLIENT_ID }}
ENTERPRISE_LICENSE_KEY: ${{ secrets.ENTERPRISE_LICENSE_KEY }}
DEFAULT_TEAM_ID: ${{ vars.DEFAULT_TEAM_ID }}
ONBOARDING_DISABLED: ${{ vars.ONBOARDING_DISABLED }}
CUSTOMER_IO_API_KEY: ${{ secrets.CUSTOMER_IO_API_KEY }}
CUSTOMER_IO_SITE_ID: ${{ secrets.CUSTOMER_IO_SITE_ID }}
NEXT_PUBLIC_POSTHOG_API_KEY: ${{ vars.NEXT_PUBLIC_POSTHOG_API_KEY }}
NEXT_PUBLIC_POSTHOG_API_HOST: ${{ vars.NEXT_PUBLIC_POSTHOG_API_HOST }}
NEXT_PUBLIC_FORMBRICKS_API_HOST: ${{ vars.NEXT_PUBLIC_FORMBRICKS_API_HOST }}
NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID: ${{ vars.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID }}
NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID: ${{ vars.NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID }}
NEXT_PUBLIC_SENTRY_DSN: ${{ vars.NEXT_PUBLIC_SENTRY_DSN }}
NODE_ENV: production
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }}
CLOUDFLARE_DNS_API_TOKEN: ${{ secrets.CLOUDFLARE_DNS_API_TOKEN }}
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
S3_REGION: ${{ vars.S3_REGION }}
S3_BUCKET_NAME: ${{ vars.S3_BUCKET_NAME }}
OPENTELEMETRY_LISTENER_URL: ${{ vars.OPENTELEMETRY_LISTENER_URL }}
KAMAL_REGISTRY_PASSWORD: ${{ secrets.KAMAL_REGISTRY_PASSWORD }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.0
bundler-cache: true
- name: Install dependencies
run: |
gem install kamal
- uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Create builder
run: docker buildx create --use --name formbricks-gh-actions-builder
if: steps.buildx.outputs.should_create_builder == 'true'
- name: Push env variables to Kamal
run: |
kamal() { command kamal "$@" -c kamal/deploy.yml; }
kamal env push
- name: Run deploy command
run: |
kamal() { command kamal "$@" -c kamal/deploy.yml; }
set +e
DEPLOY_OUTPUT=$(kamal setup 2>&1)
DEPLOY_EXIT_CODE=$?
echo "$DEPLOY_OUTPUT"
if [[ "$DEPLOY_OUTPUT" == *"container not unhealthy (healthy)"* ]]; then
echo "Deployment reported healthy container. Considering as success."
kamal lock release
exit 0
else
exit $DEPLOY_EXIT_CODE
fi
shell: bash

View File

@@ -8,8 +8,8 @@ jobs:
timeout-minutes: 15
steps:
- name: Checkout repo
uses: actions/checkout@v3
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- name: Setup Node.js 18.x
uses: actions/setup-node@v3

View File

@@ -1,7 +1,7 @@
name: PR Update
on:
pull_request_target:
pull_request:
branches:
- main
merge_group:
@@ -12,27 +12,53 @@ concurrency:
cancel-in-progress: true
jobs:
changes:
name: Detect changes
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
has-files-requiring-all-checks: ${{ steps.filter.outputs.has-files-requiring-all-checks }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
has-files-requiring-all-checks:
- "!(**.md|.github/CODEOWNERS)"
test:
name: Run Tests
name: Run Unit Tests
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/test.yml
secrets: inherit
lint:
name: Run Linters
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/lint.yml
secrets: inherit
build:
name: Build Formbricks-web
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/build-web.yml
secrets: inherit
e2e-test:
name: Run E2E Tests
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/e2e.yml
secrets: inherit
required:
name: PR Check Summary
needs: [lint, test, build, e2e-test]
if: always()
runs-on: ubuntu-latest

View File

@@ -0,0 +1,70 @@
name: Docker for Data Migrations
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
workflow_dispatch:
push:
tags:
- "v*"
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
IMAGE_NAME: formbricks/data-migrations
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/formbricks?schema=public"
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1
with:
cosign-release: "v2.1.1"
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=tag
type=raw,value=${{ github.ref_name }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ./packages/database/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
DATABASE_URL=${{ env.DATABASE_URL }}
- name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }}
run: |
cosign sign --yes ghcr.io/${{ env.IMAGE_NAME }}:${{ github.ref_name }}

View File

@@ -3,22 +3,18 @@ on:
workflow_call:
jobs:
build:
name: Tests
name: Unit Tests
runs-on: ubuntu-latest
timeout-minutes: 15
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- name: Setup Node.js 18.x
- name: Setup Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x
- name: Install pnpm
uses: pnpm/action-setup@v2
@@ -34,8 +30,5 @@ jobs:
SECRET=$(openssl rand -hex 32)
echo "ENCRYPTION_KEY=$SECRET" >> $GITHUB_ENV
- name: Build formbricks-js dependencies
run: pnpm build --filter=js
- name: Test
run: pnpm test

3
.gitignore vendored
View File

@@ -51,3 +51,6 @@ Zone.Identifier
/playwright-report/
/blob-report/
/playwright/.cache/
# uploads
packages/lib/uploads

14
.kamal/hooks/post-deploy.sample Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
# A sample post-deploy hook
#
# These environment variables are available:
# KAMAL_RECORDED_AT
# KAMAL_PERFORMER
# KAMAL_VERSION
# KAMAL_HOSTS
# KAMAL_ROLE (if set)
# KAMAL_DESTINATION (if set)
# KAMAL_RUNTIME
echo "$KAMAL_PERFORMER deployed $KAMAL_VERSION to $KAMAL_DESTINATION in $KAMAL_RUNTIME seconds"

View File

@@ -0,0 +1,3 @@
#!/bin/sh
echo "Rebooted Traefik on $KAMAL_HOSTS"

51
.kamal/hooks/pre-build.sample Executable file
View File

@@ -0,0 +1,51 @@
#!/bin/sh
# A sample pre-build hook
#
# Checks:
# 1. We have a clean checkout
# 2. A remote is configured
# 3. The branch has been pushed to the remote
# 4. The version we are deploying matches the remote
#
# These environment variables are available:
# KAMAL_RECORDED_AT
# KAMAL_PERFORMER
# KAMAL_VERSION
# KAMAL_HOSTS
# KAMAL_ROLE (if set)
# KAMAL_DESTINATION (if set)
if [ -n "$(git status --porcelain)" ]; then
echo "Git checkout is not clean, aborting..." >&2
git status --porcelain >&2
exit 1
fi
first_remote=$(git remote)
if [ -z "$first_remote" ]; then
echo "No git remote set, aborting..." >&2
exit 1
fi
current_branch=$(git branch --show-current)
if [ -z "$current_branch" ]; then
echo "Not on a git branch, aborting..." >&2
exit 1
fi
remote_head=$(git ls-remote $first_remote --tags $current_branch | cut -f1)
if [ -z "$remote_head" ]; then
echo "Branch not pushed to remote, aborting..." >&2
exit 1
fi
if [ "$KAMAL_VERSION" != "$remote_head" ]; then
echo "Version ($KAMAL_VERSION) does not match remote HEAD ($remote_head), aborting..." >&2
exit 1
fi
exit 0

47
.kamal/hooks/pre-connect.sample Executable file
View File

@@ -0,0 +1,47 @@
#!/usr/bin/env ruby
# A sample pre-connect check
#
# Warms DNS before connecting to hosts in parallel
#
# These environment variables are available:
# KAMAL_RECORDED_AT
# KAMAL_PERFORMER
# KAMAL_VERSION
# KAMAL_HOSTS
# KAMAL_ROLE (if set)
# KAMAL_DESTINATION (if set)
# KAMAL_RUNTIME
hosts = ENV["KAMAL_HOSTS"].split(",")
results = nil
max = 3
elapsed = Benchmark.realtime do
results = hosts.map do |host|
Thread.new do
tries = 1
begin
Socket.getaddrinfo(host, 0, Socket::AF_UNSPEC, Socket::SOCK_STREAM, nil, Socket::AI_CANONNAME)
rescue SocketError
if tries < max
puts "Retrying DNS warmup: #{host}"
tries += 1
sleep rand
retry
else
puts "DNS warmup failed: #{host}"
host
end
end
tries
end
end.map(&:value)
end
retries = results.sum - hosts.size
nopes = results.count { |r| r == max }
puts "Prewarmed %d DNS lookups in %.2f sec: %d retries, %d failures" % [ hosts.size, elapsed, retries, nopes ]

109
.kamal/hooks/pre-deploy.sample Executable file
View File

@@ -0,0 +1,109 @@
#!/usr/bin/env ruby
# A sample pre-deploy hook
#
# Checks the Github status of the build, waiting for a pending build to complete for up to 720 seconds.
#
# Fails unless the combined status is "success"
#
# These environment variables are available:
# KAMAL_RECORDED_AT
# KAMAL_PERFORMER
# KAMAL_VERSION
# KAMAL_HOSTS
# KAMAL_COMMAND
# KAMAL_SUBCOMMAND
# KAMAL_ROLE (if set)
# KAMAL_DESTINATION (if set)
# Only check the build status for production deployments
if ENV["KAMAL_COMMAND"] == "rollback" || ENV["KAMAL_DESTINATION"] != "production"
exit 0
end
require "bundler/inline"
# true = install gems so this is fast on repeat invocations
gemfile(true, quiet: true) do
source "https://rubygems.org"
gem "octokit"
gem "faraday-retry"
end
MAX_ATTEMPTS = 72
ATTEMPTS_GAP = 10
def exit_with_error(message)
$stderr.puts message
exit 1
end
class GithubStatusChecks
attr_reader :remote_url, :git_sha, :github_client, :combined_status
def initialize
@remote_url = `git config --get remote.origin.url`.strip.delete_prefix("https://github.com/")
@git_sha = `git rev-parse HEAD`.strip
@github_client = Octokit::Client.new(access_token: ENV["GITHUB_TOKEN"])
refresh!
end
def refresh!
@combined_status = github_client.combined_status(remote_url, git_sha)
end
def state
combined_status[:state]
end
def first_status_url
first_status = combined_status[:statuses].find { |status| status[:state] == state }
first_status && first_status[:target_url]
end
def complete_count
combined_status[:statuses].count { |status| status[:state] != "pending"}
end
def total_count
combined_status[:statuses].count
end
def current_status
if total_count > 0
"Completed #{complete_count}/#{total_count} checks, see #{first_status_url} ..."
else
"Build not started..."
end
end
end
$stdout.sync = true
puts "Checking build status..."
attempts = 0
checks = GithubStatusChecks.new
begin
loop do
case checks.state
when "success"
puts "Checks passed, see #{checks.first_status_url}"
exit 0
when "failure"
exit_with_error "Checks failed, see #{checks.first_status_url}"
when "pending"
attempts += 1
end
exit_with_error "Checks are still pending, gave up after #{MAX_ATTEMPTS * ATTEMPTS_GAP} seconds" if attempts == MAX_ATTEMPTS
puts checks.current_status
sleep(ATTEMPTS_GAP)
checks.refresh!
end
rescue Octokit::NotFound
exit_with_error "Build status could not be found"
end

View File

@@ -0,0 +1,3 @@
#!/bin/sh
echo "Rebooting Traefik on $KAMAL_HOSTS..."

108
README.md
View File

@@ -1,50 +1,46 @@
<div id="top"></div>
<div id="top"></div>
<p align="center">
<p align="center">
<a href="https://formbricks.com">
<a href="https://formbricks.com">
<img width="120" alt="Open Source Privacy First Experience Management Solution Qualtrics Alternative Logo" src="https://github.com/formbricks/formbricks/assets/72809645/0086704f-bee7-4d38-9cc8-fa42ee59e004">
<img width="120" alt="Open Source Privacy First Experience Management Solution Qualtrics Alternative Logo" src="https://github.com/formbricks/formbricks/assets/72809645/0086704f-bee7-4d38-9cc8-fa42ee59e004">
</a>
<h3 align="center">Formbricks</h3>
<h3 align="center">Formbricks</h3>
<p align="center">
<p align="center">
Harvest user-insights, build irresistible experiences.
<br />
<a href="https://formbricks.com/">Website</a> | <a href="https://formbricks.com/discord">Join Discord community</a>
<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://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/formbricks](https://www.producthunt.com/posts/formbricks)"><img src="https://img.shields.io/badge/Product%20Hunt-455-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 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://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/formbricks](https://www.producthunt.com/posts/formbricks)"><img src="https://img.shields.io/badge/Product%20Hunt-455-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/>
<div style="background-color:#f8fafc; border-radius:5px;">
<p align="center">
<i>Trusted by</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://flixbus.com"><img src="https://github.com/formbricks/formbricks/assets/72809645/d6c91d89-7633-4845-ae1e-03bbd2ce0946" height="35px"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://github.com/calcom/cal.com/"><img src="https://github.com/formbricks/formbricks/assets/675065/1a8763cf-f47e-4960-90f6-334f6dc12a17#gh-light-mode-only" height="20px"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://github.com/CrowdDotDev/crowd.dev"><img src="https://github.com/formbricks/formbricks/assets/675065/59b1a4d4-25e4-4ef3-b0bf-4426446fbfd0#gh-light-mode-only" height="20px"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://neverinstall.com/"><img src="https://github.com/formbricks/formbricks/assets/675065/72e5e37b-8ef7-4340-b06e-f1d12a05330f#gh-light-mode-only" height="20px"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://clovyr.io/"><img src="https://github.com/formbricks/formbricks/assets/675065/9291c8df-9aac-423a-a430-a9a581240075" height="20px"></a>
<p align="center">
<i>Trusted by</i><br/>
<img width="867" alt="clients-hi-res" src="https://github.com/formbricks/formbricks/assets/72809645/924d3693-f66a-4063-bb31-6e5789a8175a">
</p>
<div>
<p align="center">
<a href="https://trendshift.io/repositories/2570" target="_blank"><img src="https://trendshift.io/api/badge/repositories/2570" alt="Trendshift Badge for formbricks/formbricks" style="width: 250px; height: 55px;" width="250" height="55"/></a>
<p align="center">
<a href="https://trendshift.io/repositories/2570" target="_blank"><img src="https://trendshift.io/api/badge/repositories/2570" alt="Trendshift Badge for formbricks/formbricks" style="width: 250px; height: 55px;" width="250" height="55"/></a>
</p>
## ✨ About Formbricks
<img width="1527" alt="formbricks-sneak" src="https://github-production-user-asset-6210df.s3.amazonaws.com/675065/249441967-ccb89ea3-82b4-4bf2-8d2c-528721ec313b.png">
<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 provides a free and open source surveying platform. Gather feedback at every point in the user journey with beautiful in-app, website, link and email surveys. Build on top of Formbricks or leverage prebuilt data analysis capabilities.
@@ -70,11 +66,11 @@ Formbricks is both a free and open source survey platform - and a privacy-first
- [Contact](#contact-us)
- [License](#license)
- [Security](#security)
<a id="features"></a>
- [License](#license)
<a id="features"></a>
### Features
@@ -108,19 +104,21 @@ Formbricks is both a free and open source survey platform - and a privacy-first
- 🧘‍♂️ [Zod](https://zod.dev/)
<a id="getting-started"></a>
- 🐛 [Vitest](https://vitest.dev/)
<a id="getting-started"></a>
## 🚀 Getting started
We've got several options depending on your need to help you quickly get started with Formbricks.
<a id="cloud-version"></a>
<a id="cloud-version"></a>
### ☁️ 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://app.formbricks.com/auth/signup).
<a id="self-hosted-version"></a>
<a id="self-hosted-version"></a>
### 🐳 Self-hosting Formbricks
@@ -140,11 +138,11 @@ You can deploy Formbricks on [Railway](https://railway.app) using the button bel
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/PPDzCd)
<a id="development"></a>
<a id="development"></a>
### 👨‍💻 Development
## 👨‍💻 Development
#### Prerequisites
### Prerequisites
Here is what you need to be able to run Formbricks:
@@ -154,11 +152,11 @@ Here is what you need to be able to run Formbricks:
- [Docker](https://www.docker.com/) - to run PostgreSQL and MailHog
#### Local Setup
### Local Setup
To get started locally, we've got a [guide to help you](https://formbricks.com/docs/contributing/setup).
#### Gitpod Setup
### Gitpod Setup
1. Click the button below to open this project in Gitpod.
@@ -166,7 +164,7 @@ To get started locally, we've got a [guide to help you](https://formbricks.com/d
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/formbricks/formbricks)
<a id="contribution"></a>
<a id="contribution"></a>
## ✍️ Contribution
@@ -184,30 +182,46 @@ Please check out [our contribution guide](https://formbricks.com/docs/contributi
## All Thanks To Our Contributors
<a href="https://github.com/formbricks/formbricks/graphs/contributors">
<a href="https://github.com/formbricks/formbricks/graphs/contributors">
<img src="https://contrib.rocks/image?repo=formbricks/formbricks" />
<img src="https://contrib.rocks/image?repo=formbricks/formbricks" />
</a>
<a id="contact-us"></a>
<a id="contact-us"></a>
## 📆 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>
<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>
<a id="license"></a>
<a id="license"></a>
## ⚖️ License
Distributed under the AGPLv3 License. See [`LICENSE`](./LICENSE) for more information.
<a id="security"></a>
<a id="security"></a>
## 🔒 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`](./SECURITY.md) for more information.
<p align="right"><a href="#top">🔼 Back to top</a></p>
<a id="license"></a>
## 👩‍⚖️ License
### The AGPL Formbricks Core
The Formbricks core application is licensed under the [AGPLv3 Open Source License](https://github.com/formbricks/formbricks/blob/main/LICENSE). The core application is fully functional and includes everything you need to design & run link surveys, website surveys and in-app surveys. You can use the software for free for personal and commercial use. You're also allowed to create and distribute modified versions as long as you document the changes you make incl. date. The AGPL license requires you to publish your modified version under the AGPLv3 license as well.
### The Enterprise Edition
Additional to the AGPL licensed Formbricks core, this repository contains code licensed under an Enterprise license. The [code](https://github.com/formbricks/formbricks/tree/main/packages/ee) and [license](https://github.com/formbricks/formbricks/blob/main/packages/ee/LICENSE) for the enterprise functionality can be found in the `/packages/ee` folder of this repository. This additional functionality is not part of the AGPLv3 licensed Formbricks core and is designed to meet the needs of larger teams and enterprises. This advanced functionality is already included in the Docker images, but you need an [Enterprise License Key](https://formbricks.com/docs/self-hosting/enterprise) to unlock it.
### White-Labeling Formbricks and Other Licensing Needs
If you have other licensing requirements such as White-Labeling please [send us an email](mailto:hola@formbricks.com).
### Why charge for Enterprise Features?
The Enterprise Edition and White-Label Licenses allow us to fund the development of Formbricks sustainably. It guarantees that the open-source surveying infrastructure we're building will be around for decades to come.
<p align="right"><a href="#top">🔼 Back to top</a></p>

View File

@@ -3,25 +3,25 @@ import {
ClockIcon,
CogIcon,
CreditCardIcon,
DocumentChartBarIcon,
FileBarChartIcon,
HelpCircleIcon,
HomeIcon,
QuestionMarkCircleIcon,
ScaleIcon,
ShieldCheckIcon,
UserGroupIcon,
} from "@heroicons/react/24/outline";
UsersIcon,
} from "lucide-react";
const navigation = [
{ name: "Home", href: "#", icon: HomeIcon, current: true },
{ name: "History", href: "#", icon: ClockIcon, current: false },
{ name: "Balances", href: "#", icon: ScaleIcon, current: false },
{ name: "Cards", href: "#", icon: CreditCardIcon, current: false },
{ name: "Recipients", href: "#", icon: UserGroupIcon, current: false },
{ name: "Reports", href: "#", icon: DocumentChartBarIcon, current: false },
{ name: "Recipients", href: "#", icon: UsersIcon, current: false },
{ name: "Reports", href: "#", icon: FileBarChartIcon, current: false },
];
const secondaryNavigation = [
{ name: "Settings", href: "#", icon: CogIcon },
{ name: "Help", href: "#", icon: QuestionMarkCircleIcon },
{ name: "Help", href: "#", icon: HelpCircleIcon },
{ name: "Privacy", href: "#", icon: ShieldCheckIcon },
];

View File

@@ -12,8 +12,8 @@
},
"dependencies": {
"@formbricks/js": "workspace:*",
"@heroicons/react": "^2.1.1",
"next": "14.1.0",
"lucide-react": "^0.356.0",
"next": "14.1.3",
"react": "18.2.0",
"react-dom": "18.2.0"
},

View File

@@ -23,13 +23,12 @@ export default function AppPage({}) {
useEffect(() => {
if (process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID && process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST) {
const isUserId = window.location.href.includes("userId=true");
const userId = isUserId ? "THIS-IS-A-VERY-LONG-USER-ID-FOR-TESTING" : undefined;
const attributes = isUserId ? { "Init Attribute 1": "eight", "Init Attribute 2": "two" } : undefined;
const userId = isUserId ? "THIS-IS-A-VERY-LONG-USER-ID-FOR-TESTING" : undefined;
formbricks.init({
environmentId: process.env.NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID,
apiHost: process.env.NEXT_PUBLIC_FORMBRICKS_API_HOST,
userId,
debug: true,
attributes,
});
window.formbricks = formbricks;
@@ -105,8 +104,8 @@ export default function AppPage({}) {
Reset person / pull data from Formbricks app
</h3>
<p className="text-slate-700 dark:text-slate-300">
On formbricks.reset() a few things happen: <strong>New person is created</strong> and{" "}
<strong>surveys & no-code actions are pulled from Formbricks:</strong>.
On formbricks.reset() the local state will <strong>be deleted</strong> and formbricks gets{" "}
<strong>reinitialized</strong>.
</p>
<button
className="my-4 rounded-lg bg-slate-500 px-6 py-3 text-white hover:bg-slate-700 dark:bg-slate-700 dark:hover:bg-slate-600"

View File

@@ -45,8 +45,7 @@ Adds an Actions for a given User by their User ID
curl --location --request POST 'https://app.formbricks.com/api/v1/client/<environment-id>/actions' \
--data-raw '{
"userId": "1",
"name": "new_action_v2",
"properties":{}
"name": "new_action_v2"
}'
```
@@ -54,8 +53,7 @@ Adds an Actions for a given User by their User ID
```json {{ title: 'Example Request Body' }}
{
"userId": "1",
"name": "new_action_v3",
"properties":{}
"name": "new_action_v3"
}
```

View File

@@ -1,14 +1,16 @@
import { Fence } from "@/components/shared/Fence";
import {generateManagementApiMetadata} from "@/lib/utils"
import { generateManagementApiMetadata } from "@/lib/utils";
export const metadata = generateManagementApiMetadata("Responses",["Fetch","Delete"])
export const metadata = generateManagementApiMetadata("Responses", ["Fetch", "Delete"]);
#### Management API
# Responses API
This set of API can be used to
- [List Responses](#list-all-responses)
- [List all Responses by surveyId](#list-all-responses-by-survey-id)
- [Get Response](#get-response-by-id)
- [Delete Response](#delete-a-response)
@@ -107,6 +109,97 @@ This set of API can be used to
---
## List all Responses by surveyId {{ tag: 'GET', label: '/api/v1/management/responses?surveyId=<survey-Id>' }}
<Row>
<Col>
Retrieve all the responses received in your survey.
### Mandatory Headers
<Properties>
<Property name="x-Api-Key" type="string">
Your Formbricks API key.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/management/responses?surveyId=<survey-Id>">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/management/responses?surveyId=<survey-Id>' \
--header \
'x-api-key: <your-api-key>'
```
</CodeGroup>
<CodeGroup title="Response">
```json {{title:'200 Success'}}
{
"data":[
{
"id": "cln8k0tqv00pcz87no4qrw333",
"createdAt": "2023-10-02T07:13:20.023Z",
"updatedAt": "2023-10-02T07:13:20.023Z",
"surveyId": "cln8k0tqu00p7z87nqr4thi3k",
"finished": true,
"data": {
"interview-prompt": "clicked"
},
"meta": {
"userAgent": {
"os": "MacOS",
"browser": "Chrome"
}
},
"personAttributes": null,
"person": {
"id": "e0x4i5tvsp8puxfztyrwykvn",
"attributes": {
"userId": "CYO675",
"email": "ravi@netflix.com",
"Name": "Ravi Kumar",
"Role": "Manager",
"Company": "Netflix",
"Experience": "6 years",
"Usage Frequency": "Monthly",
"Company Size": "4610 employees",
"Product Satisfaction Score": "43",
"Recommendation Likelihood": "4"
},
"environmentId": "cln8k0t47000fz87njmmu2bck",
"createdAt": "2023-10-02T07:13:19.444Z",
"updatedAt": "2023-10-02T07:13:19.444Z"
},
"notes": [],
"tags": []
},
]
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
"message": "Not authenticated",
"details": {
"x-Api-Key": "Header not provided or API Key invalid"
}
}
```
</CodeGroup>
</Col>
</Row>
---
## Get Response by ID {{ tag: 'GET', label: '/api/v1/management/responses/<response-id>' }}
<Row>

View File

@@ -1,13 +1,14 @@
import { Fence } from "@/components/shared/Fence";
import {generateManagementApiMetadata} from "@/lib/utils"
import { generateManagementApiMetadata } from "@/lib/utils";
export const metadata = generateManagementApiMetadata("Surveys",["Fetch","Create","Update","Delete"])
export const metadata = generateManagementApiMetadata("Surveys", ["Fetch", "Create", "Update", "Delete"]);
#### Management API
# Surveys API
This set of API can be used to
- [List All Surveys](#list-all-surveys)
- [Get Survey](#get-survey-by-id)
- [Create Survey](#create-survey)
@@ -22,8 +23,7 @@ This set of API can be used to
<Row>
<Col>
Retrieve all the surveys you have for the environment.
Retrieve all the surveys you have for the environment with pagination.
### Mandatory Headers
@@ -33,14 +33,26 @@ This set of API can be used to
</Property>
</Properties>
### Query Parameters
<Properties>
<Property name="offset" type="number">
The number of surveys to skip before returning the results.
</Property>
<Property name="limit" type="number">
The number of surveys to return.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/v1/management/surveys">
```bash {{ title: 'cURL' }}
curl --location \
'https://app.formbricks.com/api/v1/management/surveys' \
'https://app.formbricks.com/api/v1/management/surveys?offset=20&limit=10' \
--header \
'x-api-key: <your-api-key>'
```
@@ -403,7 +415,6 @@ This set of API can be used to
```
</CodeGroup>
</Col>
<Col sticky>
@@ -453,7 +464,7 @@ This set of API can be used to
}
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
@@ -497,7 +508,6 @@ This set of API can be used to
```
</CodeGroup>
</Col>
<Col sticky>
@@ -568,7 +578,7 @@ This set of API can be used to
}
}
```
```json {{ title: '401 Not Authenticated' }}
{
"code": "not_authenticated",
@@ -585,7 +595,6 @@ This set of API can be used to
---
## Delete Survey by ID {{ tag: 'DELETE', label: '/api/v1/management/surveys/<survey-id>' }}
<Row>

View File

@@ -1,4 +1,5 @@
import Image from "next/image";
import CorsHandling from "./cors-handling-in-api.webp";
export const metadata = {
@@ -25,7 +26,7 @@ Thank you for choosing to contribute to Formbricks. Before you start, please fam
- Constants should be in the packages folder
- Types should be in the packages folder
- How we handle Pull Requests
- Read environment variables from `.env.mjs`
- Read server-side environment variables from `constants.ts`
---
@@ -83,9 +84,9 @@ You should store constants in `packages/lib/constants`
You should store type in `packages/types`
## Read environment variables from `.env.mjs`
## Read server-side environment variables from `constants.ts`
Environment variables (`process.env`) shouldnt be accessed directly but be added in the `.env.mjs` and should be accessed from here. This practice helps us ensure that the variables are typesafe.
Server-side environment variables (`process.env`) shouldnt be accessed directly but included into the `constants.ts` file and read from there. This way we can assure they are used only on the server side and are also type-safe.
## How we handle Pull Requests

View File

@@ -46,13 +46,13 @@ All you need to do is copy a `<script>` tag to your HTML head, and thats abou
```html {{ title: 'index.html' }}
<!-- START Formbricks Surveys -->
<script type="text/javascript">
!function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://unpkg.com/@formbricks/js@^1.4.0/dist/index.umd.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e),setTimeout(function(){window.formbricks.init({environmentId: "<your-environment-id>", apiHost: "<api-host>"})},500)}();
</script>
!function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://unpkg.com/@formbricks/js@^1.6.0/dist/index.umd.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e),setTimeout(function(){window.formbricks.init({environmentId: "<your-environment-id>", apiHost: "<api-host>"})},500)}();
</script>
<!-- END Formbricks Surveys -->
```
</CodeGroup>
</Col>
### Required Customizations to be Made
### Required customizations to be made
<Properties>
<Property name="environment-id" type="string">
@@ -99,7 +99,6 @@ if (typeof window !== "undefined") {
formbricks.init({
environmentId: "<environment-id>",
apiHost: "<api-host>",
debug: true, // remove when in production
});
}
@@ -112,7 +111,7 @@ export default App;
</CodeGroup>
</Col>
### Required Customizations to be Made
### Required customizations to be made
<Properties>
<Property name="environment-id" type="string">
@@ -182,7 +181,6 @@ useEffect(() => {
formbricks.init({
environmentId: "<environment-id>",
apiHost: "<api-host>",
debug: true, // remove when in production
});
}, []);
@@ -232,7 +230,6 @@ if (typeof window !== "undefined") {
formbricks.init({
environmentId: "<environment-id>",
apiHost: "<api-host>",
debug: true, // remove when in production
});
}
@@ -256,7 +253,7 @@ export default function App({ Component, pageProps }: AppProps) {
</Col>
Refer to our [Example NextJS Pages Directory project](https://github.com/formbricks/examples/tree/main/nextjs-pages) for more help!
### Required Customizations to be Made
### Required customizations to be made
<Properties>
<Property name="environment-id" type="string">
@@ -269,14 +266,6 @@ Refer to our [Example NextJS Pages Directory project](https://github.com/formbri
</Property>
</Properties>
### Optional Customizations to be Made
<Properties>
<Property name="debug" type="boolean">
Whether you want to see debug messages from Formbricks on your client-side console.
</Property>
</Properties>
### What are we doing here?
First we need to initialize the Formbricks SDK, making sure it only runs on the client side.
@@ -345,7 +334,7 @@ router.afterEach((to, from) => {
</CodeGroup>
</Col>
### Required Customizations to be Made
### Required customizations to be made
<Properties>
<Property name="environment-id" type="string">
@@ -358,14 +347,6 @@ router.afterEach((to, from) => {
</Property>
</Properties>
### Optional Customizations to be Made
<Properties>
<Property name="debug" type="boolean">
Whether you want to see debug messages from Formbricks on your client-side console.
</Property>
</Properties>
Refer to our [Example VueJs project](https://github.com/formbricks/examples/tree/main/vuejs) for more help! Now visit the [Validate your Setup](#validate-your-setup) section to verify your setup!
## Validate your setup
@@ -388,6 +369,55 @@ To this:
className="max-w-full rounded-lg sm:max-w-3xl"
/>
## Debugging Formbricks Integration
Enabling Formbricks debug mode in your browser is a useful troubleshooting step for identifying and resolving complex issues. This section outlines how to activate debug mode, covers common use cases, and provides insights into specific debug log messages.
### Activate Debug Mode
To activate Formbricks debug mode:
1. **In Your Integration Code:**
- Locate the initialization code for Formbricks in your application (HTML, ReactJS, NextJS, VueJS).
- Set the `debug` option to `true` when initializing Formbricks.
2. **View Debug Logs:**
- Open your browser's developer tools by pressing `F12` or right-clicking and selecting "Inspect."
- Navigate to the "Console" tab to view Formbricks debugging information.
**How to Open Browser Console:**
- **Google Chrome:** Press `F12` or right-click, select "Inspect," and go to the "Console" tab.
- **Firefox:** Press `F12` or right-click, select "Inspect Element," and go to the "Console" tab.
- **Safari:** Press `Option + Command + C` to open the developer tools and navigate to the "Console" tab.
- **Edge:** Press `F12` or right-click, select "Inspect Element," and go to the "Console" tab.
3. **Via URL Parameter:**
- For quick activation, add `?formbricksDebug=true` to your application's URL.
This parameter will enable debugging for the current session.
### Common Use Cases
Debug mode is beneficial for scenarios such as:
- Verifying Formbricks functionality.
- Identifying integration issues.
- Troubleshooting unexpected behavior.
### Debug Log Messages
Specific debug log messages may provide insights into:
- API calls and responses.
- Event tracking and form interactions.
- Integration errors.
**Note:** Disable debugging in production to prevent unnecessary logs and improve performance.
## Overwrite CSS Styles for In-App Surveys
You can overwrite the default CSS styles for the in-app surveys by adding the following CSS to your global CSS file (eg. `globals.css`):

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@@ -0,0 +1,97 @@
import Image from "next/image";
import FilledHiddenFields from "./filled-hidden-fields.webp";
import HiddenFieldResponses from "./hidden-field-responses.webp";
import HiddenFields from "./hidden-fields.webp";
import InputHiddenFields from "./input-hidden-fields.webp";
import SettingsPage from "./settings.webp";
export const metadata = {
title: "Hidden Fields",
description: "Add hidden fields to your surveys to capture additional data without requiring user inputs!",
};
#### Link Surveys
# Hidden Fields
Hidden fields are a powerful feature in Formbricks that allows you to add data to a submission without asking the user to type it in. This feature is especially useful when you already have information about a user that you want to use in the analysis of the survey results (e.g. `payment plan` or `email`)
## How to Add Hidden Fields
### Enable them in the Survey Builder
1. Edit the survey you want to add hidden fields to & open it's settings, make sure it's selected as a **Link Survey**.
<Image
src={SettingsPage}
alt="Select the Survey Type as Link Survey"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
2. Switch to the Questions tab and scroll down to the bottom of the page. You will see a section called **Hidden Fields**. Make sure to enable it by toggling the switch.
<Image
src={HiddenFields}
alt="Enable Hidden Fields"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
3. Now click on it to add a new hidden field ID. You can add as many hidden fields as you want.
<Image
src={InputHiddenFields}
alt="Add Hidden Fields"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<Image
src={FilledHiddenFields}
alt="Filled Hidden Fields"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
### Set Single Hidden Field
<Col>
<CodeGroup title="Example Screen from which the User filled it">
```sh
https://formbricks.com/clin3dxja02k8l80hpwmx4bjy?screen=pricing
```
</CodeGroup>
</Col>
### Set Multiple Hidden Fields
<Col>
<CodeGroup title="Example Screen from which the User filled it">
```sh
https://formbricks.com/clin3dxja02k8l80hpwmx4bjy?screen=landing_page&job=Founder
```
</CodeGroup>
</Col>
## View Hidden Fields in Responses
These hidden fields will now be visible in the responses tab just like other fields in the Summary as well as the Response Cards, and you can use them to filter and analyze your responses.
<Image
src={HiddenFieldResponses}
alt="Hidden Field Responses"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
## Use Cases
- **Tracking Source**: You can add a hidden field to track the source of the survey. For a detailed guide on Source Tracking, check out the [Source Tracking](/docs/link-surveys/source-tracking) guide.
- **User Metadata**: You can add hidden fields to capture user metadata such as user ID, email, or any other user-specific information.
- **Survey Metadata**: You can add hidden fields to capture other metadata, e.g. the screen from which the survey was filled, or any other app specific information.

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@@ -10,7 +10,7 @@ export const metadata = {
Quickly set up and start using Formbricks without getting into the technicalities of the build process. You'll be using an image that we've already built for you. The pre-built image is ready-to-run, and it only requires minimal configuration on your part. This approach is perfect for getting a functional instance of Formbricks up and running with minimal hassle. It's as easy as downloading the Docker image and firing up the container.
This is ideal for those who are testing Formbricks or want to run it with minimal to no modifications. For this we use the [public Docker image](https://hub.docker.com/r/formbricks/formbricks) and a simple docker-compose file.
This is ideal for those who are testing Formbricks or want to run it with minimal to no modifications. For this we use the [public Docker image](https://github.com/formbricks/formbricks/pkgs/container/formbricks) and a simple docker-compose file.
### Requirements
@@ -201,69 +201,10 @@ formbricks-quickstart-formbricks-1 | Listening on port 3000 url: http://<random
You can close the logs again with `CTRL + C`.
<Note>
## Customizing the Build Time variables
## Customizing environment variables
To edit any of the variables that start with `NEXT_PUBLIC_`, you need to rebuild the Formbricks Docker Image!
To edit any of the available environment variables, check out our [Configure](/docs/self-hosting/external-auth-providers) section!
</Note>
## Important Run-time Variables
These variables can be provided at the runtime i.e. in your docker-compose file.
| Variable | Description | Required | Default |
| --------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------- |
| WEBAPP_URL | Base URL of the site. | required | `http://localhost:3000` |
| DATABASE_URL | Database URL with credentials. | required | `postgresql://postgres:postgres@postgres:5432/formbricks?schema=public` |
| NEXTAUTH_SECRET | Secret for NextAuth, used for session signing and encryption. | required | (Generated by the user) |
| NEXTAUTH_URL | Location of the auth server. By default, this is the Formbricks docker instance itself. | required | `http://localhost:3000` |
| PRIVACY_URL | URL for privacy policy. | optional | |
| TERMS_URL | URL for terms of service. | optional | |
| IMPRINT_URL | URL for imprint. | optional | |
| SIGNUP_DISABLED | Disables the ability for new users to create an account if set to `1`. | optional | |
| PASSWORD_RESET_DISABLED | Disables password reset functionality if set to `1`. | optional | |
| EMAIL_VERIFICATION_DISABLED | Disables email verification if set to `1`. | optional | |
| INVITE_DISABLED | Disables the ability for invited users to create an account if set to `1`. | optional | |
| MAIL_FROM | Email address to send emails from. | optional (required if email services are to be enabled) | |
| SMTP_HOST | Host URL of your SMTP server. | optional (required if email services are to be enabled) | |
| SMTP_PORT | Host Port of your SMTP server. | optional (required if email services are to be enabled) | |
| SMTP_USER | Username for your SMTP Server. | optional (required if email services are to be enabled) | |
| SMTP_PASSWORD | Password for your SMTP Server. | optional (required if email services are to be enabled) | |
| SMTP_SECURE_ENABLED | SMTP secure connection. For using TLS, set to `1` else to `0`. | optional (required if email services are to be enabled) | |
| GITHUB_AUTH_ENABLED | Enables GitHub login if set to `1`. | optional | |
| GOOGLE_AUTH_ENABLED | Enables Google login if set to `1`. | optional | |
| GITHUB_ID | Client ID for GitHub. | optional (required if GitHub auth is enabled) | |
| GITHUB_SECRET | Secret for GitHub. | optional (required if GitHub auth is enabled) | |
| GOOGLE_CLIENT_ID | Client ID for Google. | optional (required if Google auth is enabled) | |
| GOOGLE_CLIENT_SECRET | Secret for Google. | optional (required if Google auth is enabled) | |
| CRON_SECRET | API Secret for running cron jobs. | optional | |
| STRIPE_SECRET_KEY | Secret key for Stripe integration. | optional | |
| STRIPE_WEBHOOK_SECRET | Webhook secret for Stripe integration. | optional | |
| TELEMETRY_DISABLED | Disables telemetry if set to `1`. | optional | |
| INSTANCE_ID | Instance ID for Formbricks Cloud to be sent to Telemetry. | optional | |
| INTERNAL_SECRET | Internal Secret (Currently we overwrite the value with a random value). | optional | |
| DEFAULT_BRAND_COLOR | Default brand color for your app (Can be overwritten from the UI as well). | optional | `#64748b` |
| DEFAULT_TEAM_ID | Automatically assign new users to a specific team when joining | optional | |
| DEFAULT_TEAM_ROLE | Role of the user in the default team. | optional | `admin` |
| ONBOARDING_DISABLED | Disables onboarding for new users if set to `1` | optional | |
## Build-time Variables
These variables must be provided at the time of the docker build and would require rebuilding the image.
| Variable | Description | Required | Default |
| -------------------------------------------------- | --------------------------------------------------------------- | -------- | ------- |
| NEXT_PUBLIC_FORMBRICKS_API_HOST | Host for the Formbricks API. | optional | |
| NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID | If you already have a preset environment ID of the environment. | optional | |
| NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID | If you already have an onboarding survey ID to show new users. | optional | |
| NEXT_PUBLIC_POSTHOG_API_KEY | API key for PostHog analytics. | optional | |
| NEXT_PUBLIC_POSTHOG_API_HOST | Host for PostHog analytics. | optional | |
| NEXT_PUBLIC_SENTRY_DSN | DSN for Sentry error tracking. | optional | |
| NEXT_PUBLIC_DOCSEARCH_APP_ID | ID of the DocSearch application. | optional | |
| NEXT_PUBLIC_DOCSEARCH_API_KEY | API key of the DocSearch application. | optional | |
| NEXT_PUBLIC_DOCSEARCH_INDEX_NAME | Name of the DocSearch index. | optional | |
| NEXT_PUBLIC_FORMBRICKS_COM_ENVIRONMENT_ID | Environment ID for Formbricks (if you already have one) | optional | |
| NEXT_PUBLIC_FORMBRICKS_COM_DOCS_FEEDBACK_SURVEY_ID | Survey ID for the feedback survey on the docs site. | optional | |
| NEXT_PUBLIC_FORMBRICKS_COM_API_HOST | Host for the Formbricks API. | optional | |
Still facing issues? [Join our Discord!](https://formbricks.com/discord) and we'd be glad to assist you!

View File

@@ -0,0 +1,26 @@
export const metadata = {
title: "Enterprise License to unlock advanced functionality",
description:
"Request a self-hosting licenses to unlock advanced enterprise functionality",
};
#### Self-Hosting
# Enterprise License Request (Beta)
We're handing out free enterprise license keys during our beta.
Additional to the AGPL licensed Formbricks core, the Formbricks repository contains code licensed under an [Enterprise license](https://github.com/formbricks/formbricks/blob/main/packages/ee/LICENSE). This additional functionality is not part of the AGPLv3 licensed Formbricks core and is designed to meet the needs of larger teams and enterprises. This advanced functionality is already included in the Docker images, but you need an [Enterprise License Key](https://formbricks.com/docs/self-hosting/license) to unlock it.
**Please note:** Sooner than later we will introduce a enterprise license pricing. For a free beta key, fill out this form:
<div style={{ position: 'relative', height: '100vh', maxHeight: '100vh', overflow: 'auto', borderRadius:'12px' }}>
<iframe
src="https://app.formbricks.com/s/clrf4z8zg1u3912250j7shqb5"
style={{ position: 'absolute', left: 0, top: 0, width: '100%', height: '100%', border: 0 }}
>
</iframe>
</div>
**Cant figure it out?**: [Join our Discord!](https://formbricks.com/discord)

View File

@@ -40,12 +40,11 @@ Integrating Google OAuth with your Formbricks instance allows users to log in us
- Ensure to specify authorized JavaScript origins and authorized redirect URIs.
<Col>
<CodeGroup title="Configuration URLs">
``` {{ title: 'Redirect & Origin URLs' }}
Authorized JavaScript origins: {WEBAPP_URL}
Authorized redirect URIs: {WEBAPP_URL}/api/auth/callback/google
```
</CodeGroup>
<CodeGroup title="Configuration URLs">
``` {{ title: "Redirect & Origin URLs" }}
Authorized JavaScript origins: {WEBAPP_URL}
Authorized redirect URIs: {WEBAPP_URL}/api/auth/callback/google ```
</CodeGroup>
</Col>
5. **Update Environment Variables in Docker**:
@@ -58,14 +57,12 @@ Authorized redirect URIs: {WEBAPP_URL}/api/auth/callback/google
```sh {{ title: 'Shell commands' }}
docker exec -it container_id /bin/bash
export GOOGLE_AUTH_ENABLED=1
export GOOGLE_CLIENT_ID=your-client-id-here
export GOOGLE_CLIENT_SECRET=your-client-secret-here
exit
```
```sh {{ title: 'env file' }}
GOOGLE_AUTH_ENABLED=1
GOOGLE_CLIENT_ID=your-client-id-here
GOOGLE_CLIENT_SECRET=your-client-secret-here
```
@@ -78,3 +75,126 @@ GOOGLE_CLIENT_SECRET=your-client-secret-here
- Once the environment variables have been updated, it's crucial to restart your Docker containers to apply the changes. This ensures that your Formbricks instance can utilize the new Google OAuth configuration for user authentication. Here's how you can do it:
- Navigate to your Docker setup directory where your `docker-compose.yml` file is located.
- Run the following command to bring down your current Docker containers and then bring them back up with the updated environment configuration:
## Azure SSO Integration
Have an Azure Active Directory (AAD) instance? Integrate it with your Formbricks instance to allow users to log in using their existing AAD credentials. This guide will walk you through the process of setting up Azure SSO for your Formbricks instance.
### Requirements
- An Azure Active Directory (AAD) instance.
- A Formbricks instance running and accessible.
### Steps
1. Create a new Tenant in Azure Active Directory as per their [official documentation](https://learn.microsoft.com/en-us/entra/fundamentals/create-new-tenant).
2. Add Users & Groups to your AAD instance.
3. Now we need to fill the below environment variables in our Formbricks instance so get them from your AD configuration:
- `AZUREAD_CLIENT_ID`
- `AZUREAD_CLIENT_SECRET`
- `AZUREAD_TENANT_ID`
4. Update these environment variables in your `docker-compose.yml` or pass it like your other environment variables to the Formbricks container.
5. Restart your Formbricks instance.
6. You're all set! Users can now signup & log in using their AAD credentials.
## OpenID Integration
Integrating your own OIDC (OpenID Connect) instance with your Formbricks instance allows users to log in using their OIDC credentials, ensuring a secure and streamlined user experience. Please follow the steps below to set up OIDC for your Formbricks instance.
1. Configure your OIDC provider & get the following variables:
- `OIDC_CLIENT_ID`
- `OIDC_CLIENT_SECRET`
- `OIDC_ISSUER`
- `OIDC_SIGNING_ALGORITHM`
<Note>
Make sure the Redirect URI for your OIDC Client is set to `{WEBAPP_URL}/api/auth/callback/openid`.
</Note>
2. Update these environment variables in your `docker-compose.yml` or pass it directly to the running container.
An example configuration for a FusionAuth OpenID Connect in Formbricks would look like:
<Col>
<CodeGroup title="Formbricks Env for FusionAuth OIDC">
```yml {{ title: '.env' }}
OIDC_CLIENT_ID=59cada54-56d4-4aa8-a5e7-5823bbe0e5b7
OIDC_CLIENT_SECRET=4f4dwP0ZoOAqMW8fM9290A7uIS3E8Xg29xe1umhlB_s
OIDC_ISSUER=http://localhost:9011
OIDC_DISPLAY_NAME=FusionAuth
OIDC_SIGNING_ALGORITHM=HS256
```
</CodeGroup>
</Col>
3. Set an environment variable `OIDC_DISPLAY_NAME` to the display name of your OIDC provider.
4. Restart your Formbricks instance.
5. You're all set! Users can now signup & log in using their OIDC credentials.
## Important Run-time Variables
These variables can be provided at the runtime i.e. in your docker-compose file.
| Variable | Description | Required | Default |
|-----------------------------|----------------------------------------------------------------------------------------------|---------------------------------------------------------|---------------------------|
| WEBAPP_URL | Base URL of the site. | required | `http://localhost:3000` |
| DATABASE_URL | Database URL with credentials. | required | |
| NEXTAUTH_SECRET | Secret for NextAuth, used for session signing and encryption. | required | (Generated by the user) |
| ENCRYPTION_KEY | Secret for used by Formbricks for data encryption | required | (Generated by the user) |
| NEXTAUTH_URL | Location of the auth server. By default, this is the Formbricks docker instance itself. | required | `http://localhost:3000` |
| UPLOADS_DIR | Local directory for storing uploads. | optional | `./uploads` |
| S3_ACCESS_KEY | Access key for S3. | optional | (resolved by the AWS SDK) |
| S3_SECRET_KEY | Secret key for S3. | optional | (resolved by the AWS SDK) |
| S3_REGION | Region for S3. | optional | (resolved by the AWS SDK) |
| S3_BUCKET | Bucket name for S3. | optional (required if S3 is enabled) | |
| S3_ENDPOINT | Endpoint for S3. | optional | (resolved by the AWS SDK) |
| PRIVACY_URL | URL for privacy policy. | optional | |
| TERMS_URL | URL for terms of service. | optional | |
| IMPRINT_URL | URL for imprint. | optional | |
| SIGNUP_DISABLED | Disables the ability for new users to create an account if set to `1`. | optional | |
| EMAIL_AUTH_DISABLED | Disables the ability for users to signup or login via email and password if set to `1`. | optional | |
| PASSWORD_RESET_DISABLED | Disables password reset functionality if set to `1`. | optional | |
| EMAIL_VERIFICATION_DISABLED | Disables email verification if set to `1`. | optional | |
| RATE_LIMITING_DISABLED | Disables rate limiting if set to `1`. | optional | |
| INVITE_DISABLED | Disables the ability for invited users to create an account if set to `1`. | optional | |
| MAIL_FROM | Email address to send emails from. | optional (required if email services are to be enabled) | |
| SMTP_HOST | Host URL of your SMTP server. | optional (required if email services are to be enabled) | |
| SMTP_PORT | Host Port of your SMTP server. | optional (required if email services are to be enabled) | |
| SMTP_USER | Username for your SMTP Server. | optional (required if email services are to be enabled) | |
| SMTP_PASSWORD | Password for your SMTP Server. | optional (required if email services are to be enabled) | |
| SMTP_SECURE_ENABLED | SMTP secure connection. For using TLS, set to `1` else to `0`. | optional (required if email services are to be enabled) | |
| GITHUB_ID | Client ID for GitHub. | optional (required if GitHub auth is enabled) | |
| GITHUB_SECRET | Secret for GitHub. | optional (required if GitHub auth is enabled) | |
| GOOGLE_CLIENT_ID | Client ID for Google. | optional (required if Google auth is enabled) | |
| GOOGLE_CLIENT_SECRET | Secret for Google. | optional (required if Google auth is enabled) | |
| CRON_SECRET | API Secret for running cron jobs. | optional | |
| STRIPE_SECRET_KEY | Secret key for Stripe integration. | optional | |
| STRIPE_WEBHOOK_SECRET | Webhook secret for Stripe integration. | optional | |
| TELEMETRY_DISABLED | Disables telemetry if set to `1`. | optional | |
| INSTANCE_ID | Instance ID for Formbricks Cloud to be sent to Telemetry. | optional | |
| INTERNAL_SECRET | Internal Secret (Currently we overwrite the value with a random value). | optional | |
| DEFAULT_BRAND_COLOR | Default brand color for your app (Can be overwritten from the UI as well). | optional | `#64748b` |
| DEFAULT_TEAM_ID | Automatically assign new users to a specific team when joining | optional | |
| DEFAULT_TEAM_ROLE | Role of the user in the default team. | optional | `admin` |
| ONBOARDING_DISABLED | Disables onboarding for new users if set to `1` | optional | |
| OIDC_DISPLAY_NAME | Display name for Custom OpenID Connect Provider | optional | |
| OIDC_CLIENT_ID | Client ID for Custom OpenID Connect Provider | optional (required if OIDC auth is enabled) | |
| OIDC_CLIENT_SECRET | Secret for Custom OpenID Connect Provider | optional (required if OIDC auth is enabled) | |
| OIDC_ISSUER | Issuer URL for Custom OpenID Connect Provider (should have `.well-known` configured at this) | optional (required if OIDC auth is enabled) | |
| OIDC_SIGNING_ALGORITHM | Signing Algorithm for Custom OpenID Connect Provider | optional | `RS256` |
| OPENTELEMETRY_LISTENER_URL | URL for OpenTelemetry listener inside Formbricks. | optional | | |
## Build-time Variables
These variables must be provided at the time of the docker build and would require rebuilding the image.
| Variable | Description | Required | Default |
| ------------------------------------- | ----------------------------------------------------- | -------- | ------- |
| NEXT_PUBLIC_FORMBRICKS_API_HOST | Host for the Formbricks API to use inside Formbricks. | optional | |
| NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID | Formbricks environment ID for use inside Formbricks. | optional | |
| NEXT_PUBLIC_POSTHOG_API_KEY | API key to use PostHog analytics inside Formbricks. | optional | |
| NEXT_PUBLIC_POSTHOG_API_HOST | Host to use PostHog analytics inside Formbricks. | optional | |
| NEXT_PUBLIC_SENTRY_DSN | DSN for Sentry error tracking inside Formbricks. | optional | |
Still facing issues? [Join our Discord!](https://formbricks.com/discord) and we'd be glad to assist you!

View File

@@ -1,24 +1,27 @@
export const metadata = {
title: "Self-hosting License to run Formbricks on premises",
title: "About the Formbricks Open-Source License",
description:
"Request a self-hosting licenses to run Formbricks on your own servers.",
"The Formbricks core is available under the AGPLv3 license",
};
#### Self-Hosting
# License Request (Beta)
# License
We're handing out free self-hosting license keys during our Beta.
## The AGPL Formbricks Core
**Please note:** Sooner than later we will introduce a self-hosting license pricing. For a free beta key, fill out this form:
The Formbricks core application is licensed under the [AGPLv3 Open Source License](https://github.com/formbricks/formbricks/blob/main/LICENSE). The core application is fully functional and includes everything you need to design & run link surveys, website surveys and in-app surveys. You can use the software for free for personal and commercial use. You're also allowed to create and distribute modified versions as long as you document the changes you make incl. date. The AGPL license requires you to publish your modified version under the AGPLv3 license as well.
<div style={{ position: 'relative', height: '100vh', maxHeight: '100vh', overflow: 'auto', borderRadius:'12px' }}>
<iframe
src="https://app.formbricks.com/s/clrf4z8zg1u3912250j7shqb5"
style={{ position: 'absolute', left: 0, top: 0, width: '100%', height: '100%', border: 0 }}
>
</iframe>
</div>
## The Enterprise Edition
Additional to the AGPL licensed Formbricks core, this repository contains code licensed under an Enterprise license. The [code](https://github.com/formbricks/formbricks/tree/main/packages/ee) and [license](https://github.com/formbricks/formbricks/blob/main/packages/ee/LICENSE) for the enterprise functionality can be found in the `/packages/ee` folder of this repository. This additional functionality is not part of the AGPLv3 licensed Formbricks core and is designed to meet the needs of larger teams and enterprises. This advanced functionality is already included in the Docker images, but you need an [Enterprise License Key](https://formbricks.com/docs/self-hosting/enterprise) to unlock it.
**Cant figure it out?**: [Join our Discord!](https://formbricks.com/discord)
## White-Labeling Formbricks and Other Licensing Needs
If you have other licensing requirements such as White-Labeling please [send us an email](mailto:hola@formbricks.com).
## Why charge for Enterprise Features?
The Enterprise Edition and White-Label Licenses allow us to fund the development of Formbricks sustainably. It guarantees that the open-source surveying infrastructure we're building will be around for decades to come.
**Having more questions?**: [Join our Discord!](https://formbricks.com/discord)

View File

@@ -8,16 +8,101 @@ export const metadata = {
# Migration Guide
## v1.1 -> v1.2
## v1.6
Formbricks v1.6 comes with a big new features like Advanced Targeting & Segmentation of your end-users along with on-the-fly triggers for surveys and a ton of stability improvements & features. This also involves a few changes in our environment variables. This guide will help you migrate your existing Formbricks instance to v1.6 without any hassles or build errors.
<Note>
This upgrade requires a **data migration**. Please make sure to backup your database before proceeding with
the upgrade. Follow the below steps thoroughly to upgrade your Formbricks instance to v1.6.
</Note>
### Steps to Migrate
This guide is for users who are self-hosting Formbricks using our one-click setup. If you are using a different setup, you might adjust the commands accordingly.
To run all these steps, please navigate to the `formbricks` folder where your `docker-compose.yml` file is located.
1. **Backup your Database**: This is a crucial step. Please make sure to backup your database before proceeding with the upgrade. You can use the following command to backup your database:
<Col>
<CodeGroup title="Backup Postgres">
```bash
docker exec formbricks-quickstart-postgres-1 pg_dump -U postgres -d formbricks > formbricks_pre_v1.6_$(date +%Y%m%d_%H%M%S).sql
```
</CodeGroup>
</Col>
2. Stop the running Formbricks instance & remove the related containers:
<Col>
<CodeGroup title="Stop the containers">
```bash
docker-compose down
```
</CodeGroup>
</Col>
3. Restarting the containers will automatically pull the latest version of Formbricks:
<Col>
<CodeGroup title="Restart the containers">
```bash
docker-compose up -d
```
</CodeGroup>
</Col>
4. Now let's migrate the data to the latest schema:
<Note>To find your Docker Network name for your Postgres Database, find it using `docker network ps`</Note>
<Col>
<CodeGroup title="Migrate the data">
```bash
docker run --rm \
--network=formbricks_default \
-e DATABASE_URL="postgresql://postgres:postgres@postgres:5432/formbricks?schema=public" \
-e UPGRADE_TO_VERSION="v1.6" \
ghcr.io/formbricks/data-migrations:v1.6
```
</CodeGroup>
</Col>
The above command will migrate your data to the latest schema. This is a crucial step to migrate your existing data to the new structure. Only if the script runs successful, changes are made to the database. The script can safely run multiple times.
5. That's it! Once the migration is complete, you can **now access your Formbricks instance** at the same URL as before.
### In-App Surveys with @formbricks/js
If you are using the `@formbricks/js` package, please make sure to update it to version 1.6.0 to use the latest features and improvements.
### Deprecated Environment Variables
| Environment Variable | Comments |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| GITHUB_AUTH_ENABLED | Was used to enable GitHub OAuth, but from v1.6, you can just set the `GITHUB_ID` and `GITHUB_SECRET` environment variables. |
| GOOGLE_AUTH_ENABLED | Was used to enable Google OAuth, but from v1.6, you can just set the `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET` environment variables. |
| AZUREAD_AUTH_ENABLED | Was used to enable AzureAD OAuth, but from v1.6, you can just set the `AZUREAD_CLIENT_ID`, `AZUREAD_CLIENT_SECRET` & `AZUREAD_TENANT_ID` environment variables. |
## v1.2
Formbricks v1.2 ships a lot of features targeting our Link Surveys. We have also improved our security posture to be as robust as ever. However, it also comes with a few breaking changes specifically with the environment variables. This guide will help you migrate your existing Formbricks instance to v1.2 without any hassles or build errors.
### New Environment Variables
| Environment Variable | Required | Recommended Generation | Comments |
| -------------------- | -------- | ------------------------------ | ----------------------------------------------------------- |
| ENCRYPTION_KEY | true | `openssl rand -hex 32` | Needed for 2 Factor Authentication |
| SHORT_URL_BASE | false | `<your-short-base-url>` | Needed if you want to enable shorter links for Link Surveys |
| Environment Variable | Required | Recommended Generation | Comments |
| -------------------- | -------- | ----------------------- | ----------------------------------------------------------- |
| ENCRYPTION_KEY | true | `openssl rand -hex 32` | Needed for 2 Factor Authentication |
| SHORT_URL_BASE | false | `<your-short-base-url>` | Needed if you want to enable shorter links for Link Surveys |
### Deprecated / Removed Environment Variables
@@ -25,7 +110,7 @@ Formbricks v1.2 ships a lot of features targeting our Link Surveys. We have also
| -------------------- | ------------------------------------------------------------------------- |
| SURVEY_BASE_URL | The WEBAPP_URL is now used to determine the survey base url in all places |
## v1.0 -> v1.1
## v1.1
Formbricks v1.1 includes a lot of new features and improvements. However, it also comes with a few breaking changes specifically with the environment variables. This guide will help you migrate your existing Formbricks instance to v1.1 without losing any data.
@@ -113,6 +198,9 @@ x-environment: &environment
# Uncomment the below and set it to 1 to disable Signups
# SIGNUP_DISABLED:
# Uncomment the below and set it to 1 to disable loging in with email
# EMAIL_AUTH_DISABLED:
# Uncomment the below and set it to 1 to disable Invites
# INVITE_DISABLED:
@@ -136,6 +224,7 @@ x-environment: &environment
# GOOGLE_CLIENT_SECRET:
```
</CodeGroup>
</Col>
Did we miss something? Are you still facing issues migrating your app? [Join our Discord!](https://formbricks.com/discord) We'd be happy to help!

View File

@@ -10,8 +10,16 @@ export const metadata = {
If you want to quickly set up a production instance of Formbricks on a server running Ubuntu, we've got you covered! This method utilizes a convenient shell script that takes care of everything, including Docker, Postgres DB, and SSL certificate configuration. The shell script will automatically install all the required dependencies and configure your server, making the process a breeze.
<Note>
This setup installs **Traefik** to work as a **reverse proxy**. This configuration is crucial for directing incoming traffic to the correct container, allowing Formbricks to be accessible from the internet securely.
Traefik is chosen for its simplicity and automatic SSL management with Let's Encrypt.
</Note>
This is the quickest way to get Formbricks up and running on an Ubuntu server. The shell script will automatically install all the required dependencies and configure your server, making the process a breeze.
If you want to run Formbricks on a different OS or have more control over the installation process, you can follow the [advanced installation guide](/docs/self-hosting/docker) with Docker.
### Requirements
Before you proceed, make sure you have the following:

View File

@@ -23,7 +23,7 @@ const variantStyles = {
"rounded-full bg-slate-900 py-1 px-3 text-white hover:bg-slate-700 dark:bg-teal-500 dark:text-white dark:hover:bg-teal-400",
outline:
"rounded-full py-1 px-3 text-slate-700 ring-1 ring-inset ring-slate-900/10 hover:bg-slate-900/2.5 hover:text-slate-900 dark:text-slate-400 dark:ring-white/10 dark:hover:bg-white/5 dark:hover:text-white",
text: "text-teal-500 hover:text-teal-700 dark:text-teal-400 dark:hover:text-teal-600",
text: "text-teal-500 hover:text-teal-700 dark:text-teal-400 dark:hover:text-teal-300",
};
type ButtonProps = {

View File

@@ -42,7 +42,7 @@ export function Libraries() {
<a
key={library.name}
href={library.href}
className="flex flex-row-reverse gap-6 rounded-2xl p-6 transition-all duration-100 ease-in-out hover:cursor-pointer hover:bg-slate-100/50">
className="flex flex-row-reverse gap-6 rounded-2xl p-6 transition-all duration-100 ease-in-out hover:cursor-pointer hover:bg-slate-100/50 dark:hover:bg-slate-800/50">
<div className="flex-auto">
<h3 className="text-sm font-semibold text-slate-900 dark:text-white">{library.name}</h3>
<p className="mt-1 text-sm text-slate-600 dark:text-slate-400">{library.description}</p>

View File

@@ -207,6 +207,7 @@ export const navigation: Array<NavGroup> = [
{ title: "Identify Users", href: "/docs/link-surveys/user-identification" },
{ title: "Single Use Links", href: "/docs/link-surveys/single-use-links" },
{ title: "Source Tracking", href: "/docs/link-surveys/source-tracking" },
{ title: "Hidden Fields", href: "/docs/link-surveys/hidden-fields" },
],
},
{
@@ -242,7 +243,8 @@ export const navigation: Array<NavGroup> = [
{ title: "Advanced Setup", href: "/docs/self-hosting/docker" },
{ title: "Configure", href: "/docs/self-hosting/external-auth-providers" },
{ title: "Migration Guide", href: "/docs/self-hosting/migration-guide" },
{ title: "Self-hosting License", href: "/docs/self-hosting/license" },
{ title: "License", href: "/docs/self-hosting/license" },
{ title: "Enterprise License", href: "/docs/self-hosting/enterprise" },
],
},
{

View File

@@ -1,4 +1,4 @@
import { PlusIcon, TrashIcon } from "@heroicons/react/24/solid";
import { PlusIcon, TrashIcon } from "lucide-react";
import { useState } from "react";
import { Button } from "@formbricks/ui/Button";

View File

@@ -1,4 +1,4 @@
import { CursorArrowRaysIcon } from "@heroicons/react/24/solid";
import { MousePointerClickIcon } from "lucide-react";
import { Button } from "@formbricks/ui/Button";
import { Input } from "@formbricks/ui/Input";
@@ -20,7 +20,7 @@ export const AddNoCodeEventModalDummy: React.FC<EventDetailModalProps> = ({ open
<div className="p-4 sm:p-6">
<div className="flex items-center space-x-2">
<div className="h-6 w-6 text-slate-500">
<CursorArrowRaysIcon />
<MousePointerClickIcon className="h-5 w-5" />
</div>
<div>
<div className="text-lg font-medium text-slate-700 dark:text-slate-300">Add Action</div>

View File

@@ -1,10 +1,8 @@
import * as DOMPurify from "dompurify";
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: DOMPurify.sanitize(htmlString) }}></label>
dangerouslySetInnerHTML={{ __html: htmlString }}></label>
);
}

View File

@@ -5,8 +5,10 @@ import CrowdLogoLight from "@/images/clients/crowd-logo-light.svg";
import FlixbusLogo from "@/images/clients/flixbus-white.svg";
import NILogoDark from "@/images/clients/niLogoDark.svg";
import NILogoLight from "@/images/clients/niLogoWhite.svg";
import OptimoleLogo from "@/images/clients/optimole-logo.svg";
import ThemeisleLogo from "@/images/clients/themeisle-logo.webp";
import AnimationFallback from "@/public/animations/opensource-xm-platform-formbricks-fallback.png";
import { ShieldCheckIcon, StarIcon } from "@heroicons/react/24/outline";
import { ShieldCheckIcon, StarIcon } from "lucide-react";
import { usePlausible } from "next-plausible";
import Image from "next/image";
import { useRouter } from "next/router";
@@ -45,48 +47,42 @@ export const Hero: React.FC = ({}) => {
</span>
</p>
<div className="mx-auto mt-5 max-w-2xl items-center px-4 sm:flex sm:justify-center md:mt-6 md:space-x-8 md:px-0">
<div className="grid grid-cols-4 items-center gap-6 pt-2 md:gap-8">
<div className="mx-auto mt-5 max-w-3xl items-center px-4 sm:flex sm:justify-center md:mt-6 md:space-x-8 md:px-0">
<div className="grid grid-cols-6 items-center gap-6 pt-2 md:gap-8">
<Image
src={FlixbusLogo}
alt="Flixbus Flix Flixtrain Logo"
className="rounded-lg pb-1 hover:opacity-100 md:opacity-50"
className="rounded-lg pb-1 "
width={200}
/>
<Image
src={CalLogoLight}
alt="Cal Logo"
className="block rounded-lg hover:opacity-100 md:opacity-50 dark:hidden"
width={170}
/>
<Image
src={CalLogoDark}
alt="Cal Logo"
className="hidden rounded-lg hover:opacity-100 md:opacity-50 dark:block"
width={170}
/>
<Image src={CalLogoLight} alt="Cal Logo" className="block rounded-lg dark:hidden" width={170} />
<Image src={CalLogoDark} alt="Cal Logo" className="hidden rounded-lg dark:block" width={170} />
<Image src={ThemeisleLogo} alt="Neverinstall Logo" className="pb-1" width={200} />
<Image
src={CrowdLogoLight}
alt="Crowd.dev Logo"
className="block rounded-lg pb-1 hover:opacity-100 md:opacity-50 dark:hidden"
className="block rounded-lg pb-1 dark:hidden"
width={200}
/>
<Image
src={CrowdLogoDark}
alt="Crowd.dev Logo"
className="hidden rounded-lg pb-1 hover:opacity-100 md:opacity-50 dark:block"
className="hidden rounded-lg pb-1 dark:block"
width={200}
/>
<Image src={OptimoleLogo} alt="Neverinstall Logo" className="pb-1" width={200} />
<Image src={NILogoDark} alt="Neverinstall Logo" className="block pb-1 dark:hidden" width={200} />
<Image
src={NILogoDark}
src={NILogoLight}
alt="Neverinstall Logo"
className="block pb-1 hover:opacity-100 md:opacity-50 dark:hidden"
className="hidden pb-1 dark:block"
width={200}
/>
<Image
src={NILogoLight}
alt="Neverinstall Logo"
className="hidden pb-1 hover:opacity-100 md:opacity-50 dark:block"
className="hidden pb-1 dark:block"
width={200}
/>
</div>

View File

@@ -1,5 +1,5 @@
import { ArrowUpIcon } from "@heroicons/react/24/solid";
import throttle from "lodash/throttle";
import { ArrowUpIcon } from "lucide-react";
import { useCallback, useEffect, useState } from "react";
import { Button } from "@formbricks/ui/Button";

View File

@@ -1,7 +1,7 @@
import DemoPreview from "@/components/dummyUI/DemoPreview";
import DashboardMockupDark from "@/images/dashboard-mockup-dark.png";
import DashboardMockup from "@/images/dashboard-mockup.png";
import { CursorArrowRaysIcon } from "@heroicons/react/24/solid";
import { MousePointerClickIcon } from "lucide-react";
import Image from "next/image";
import { useState } from "react";
@@ -47,13 +47,8 @@ export const Steps: React.FC = () => {
<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 sm:py-8 md:order-first dark:bg-slate-800">
<div className="flex h-40 items-center justify-center">
<Button
variant="primary"
className=""
onClick={() => {
setAddEventModalOpen(true);
}}>
<CursorArrowRaysIcon className="mr-2 h-5 w-5 text-white" />
<Button variant="primary">
<MousePointerClickIcon className="mr-2 h-5 w-5 text-white" />
Add Action
</Button>
</div>

View File

@@ -1,7 +1,7 @@
"use client";
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "@heroicons/react/24/solid";
import clsx from "clsx";
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
import { useState } from "react";
interface APICallProps {

View File

@@ -13,7 +13,7 @@ const styles: Record<string, CSSProperties> = {
marginTop: "1rem",
borderRadius: "0.375rem",
fontSize: "0.875rem",
fontWeight: "lighter",
fontWeight: "normal",
color: "#e5e7eb",
},
pre: {
@@ -21,7 +21,7 @@ const styles: Record<string, CSSProperties> = {
},
code: {
textShadow: "none",
color: "#fbbf24",
color: "#333333",
},
};

View File

@@ -1,8 +1,8 @@
import GitHubMarkWhite from "@/images/github-mark-white.svg";
import GitHubMarkDark from "@/images/github-mark.svg";
import { Popover, Transition } from "@headlessui/react";
import { Bars3Icon, ChevronDownIcon, ChevronRightIcon, XMarkIcon } from "@heroicons/react/24/outline";
import clsx from "clsx";
import { ChevronDownIcon, ChevronRightIcon, MenuIcon, XIcon } from "lucide-react";
import { usePlausible } from "next-plausible";
import Image from "next/image";
import Link from "next/link";
@@ -136,7 +136,7 @@ export default function Header() {
<div className="-my-2 -mr-2 md:hidden">
<Popover.Button className="inline-flex items-center justify-center rounded-md bg-slate-100 p-2 text-slate-400 hover:bg-slate-100 hover:text-slate-500 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-teal-500 dark:bg-slate-700 dark:text-slate-200">
<span className="sr-only">Open menu</span>
<Bars3Icon className="h-6 w-6" aria-hidden="true" />
<MenuIcon className="h-6 w-6" aria-hidden="true" />
</Popover.Button>
</div>
<Popover.Group as="nav" className="hidden space-x-6 md:flex lg:space-x-10">
@@ -356,7 +356,7 @@ export default function Header() {
<div className="-mr-2">
<Popover.Button className="inline-flex items-center justify-center rounded-md bg-white p-2 text-slate-400 hover:bg-slate-100 hover:text-slate-500 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-teal-500 dark:bg-slate-700 dark:text-slate-200">
<span className="sr-only">Close menu</span>
<XMarkIcon className="h-6 w-6" aria-hidden="true" />
<XIcon className="h-6 w-6" aria-hidden="true" />
</Popover.Button>
</div>
</div>

View File

@@ -1,4 +1,4 @@
import { DocumentDuplicateIcon } from "@heroicons/react/24/outline";
import { CopyIcon } from "lucide-react";
import { useRouter } from "next/router";
import { Button } from "@formbricks/ui/Button";
@@ -28,7 +28,7 @@ export default function HeadingCentered() {
<div className="flex h-20 w-full items-center justify-between rounded-lg bg-slate-300 px-8 text-slate-700 dark:bg-slate-800 dark:text-slate-200 ">
<p>npm install @formbricks/react</p>
<button onClick={() => navigator.clipboard.writeText("npm install @formbricks/react")}>
<DocumentDuplicateIcon className="h-8 w-8" />
<CopyIcon className="h-8 w-8" />
</button>
</div>
</div>

View File

@@ -1,4 +1,4 @@
import { CheckIcon, XMarkIcon } from "@heroicons/react/24/outline";
import { CheckIcon, XIcon } from "lucide-react";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@formbricks/ui/Tooltip";
@@ -54,13 +54,9 @@ export const PricingTable = ({ leadRow, pricing, endRow }) => {
</Tooltip>
</TooltipProvider>
) : feature.free ? (
<div className="h-6 w-6 rounded-full border border-green-300 bg-green-100 p-0.5 dark:border-green-600 dark:bg-green-900">
<CheckIcon className=" text-green-500 dark:text-green-300" />
</div>
<CheckIcon className=" rounded-full border border-green-300 bg-green-100 p-0.5 text-green-500 dark:border-green-600 dark:bg-green-900 dark:text-green-300" />
) : (
<div className="h-6 w-6 rounded-full border border-red-300 bg-red-100 p-0.5 dark:border-red-500 dark:bg-red-300">
<XMarkIcon className="text-red-500 dark:text-red-600" />
</div>
<XIcon className="rounded-full border border-red-300 bg-red-100 p-0.5 text-red-500 dark:border-red-500 dark:bg-red-300 dark:text-red-600" />
)}
</div>
<div className="flex w-1/3 items-center justify-center text-center text-sm text-slate-800 dark:text-slate-100">
@@ -78,13 +74,9 @@ export const PricingTable = ({ leadRow, pricing, endRow }) => {
</Tooltip>
</TooltipProvider>
) : feature.paid ? (
<div className="h-6 w-6 rounded-full border border-green-300 bg-green-100 p-0.5 dark:border-green-600 dark:bg-green-900">
<CheckIcon className="text-green-500 dark:text-green-300" />
</div>
<CheckIcon className=" rounded-full border border-green-300 bg-green-100 p-0.5 text-green-500 dark:border-green-600 dark:bg-green-900 dark:text-green-300" />
) : (
<div className="h-6 w-6 rounded-full border border-red-300 bg-red-100 p-0.5 dark:border-red-600 dark:bg-red-900">
<XMarkIcon className="text-red-500 dark:text-red-600" />
</div>
<XIcon className="rounded-full border border-red-300 bg-red-100 p-0.5 text-red-500 dark:border-red-500 dark:bg-red-300 dark:text-red-600" />
)}
</div>
</div>

View File

@@ -1,5 +1,5 @@
import LFGLuigi from "@/images/blog/lfg-luigi-200px.webp";
import { XMarkIcon } from "@heroicons/react/24/solid";
import { XIcon } from "lucide-react";
import Image from "next/image";
import React, { useEffect, useState } from "react";
@@ -70,7 +70,7 @@ const SlideInBanner: React.FC<Props> = ({ delay = 5000, scrollPercentage = 10, U
setTimeout(() => setIsDismissed(true), 500);
}}
className="rounded-full p-2 hover:bg-slate-600 hover:bg-opacity-30">
<XMarkIcon className="h-6 w-6" />
<XIcon className="h-6 w-6" />
</button>
</div>
</div>

View File

@@ -1,4 +1,4 @@
import { DocumentDuplicateIcon } from "@heroicons/react/24/outline";
import { CopyIcon } from "lucide-react";
import { useRouter } from "next/router";
import { Button } from "@formbricks/ui/Button";
@@ -30,7 +30,7 @@ export default function HeadingCentered() {
<div className="flex h-20 w-full items-center justify-between rounded-lg bg-slate-800 px-8 text-slate-100 ">
<p>npm install @formbricks/react</p>
<button onClick={() => navigator.clipboard.writeText("npm install @formbricks/react")}>
<DocumentDuplicateIcon className="h-8 w-8" />
<CopyIcon className="h-8 w-8" />
</button>
</div>
</div>

View File

@@ -1,42 +1,35 @@
import {
CommandLineIcon,
CubeTransparentIcon,
SquaresPlusIcon,
SwatchIcon,
UserGroupIcon,
UsersIcon,
} from "@heroicons/react/24/outline";
import { BlocksIcon, BoxIcon, LockIcon, SwatchBookIcon, TerminalIcon, UsersIcon } from "lucide-react";
const features = [
{
name: "Futureproof",
description: "Form needs change. With Formbricks youll avoid island solutions right from the start.",
icon: CubeTransparentIcon,
icon: BoxIcon,
},
{
name: "Privacy by design",
description: "Self-host the entire product and fly through privacy compliance reviews.",
icon: UsersIcon,
icon: LockIcon,
},
{
name: "Community driven",
description: "We're building for you. If you need something specific, were happy to build it!",
icon: UserGroupIcon,
icon: UsersIcon,
},
{
name: "Great DX",
description: "We love a solid developer experience. We felt your pain and do our best to avoid it.",
icon: CommandLineIcon,
icon: TerminalIcon,
},
{
name: "Customizable",
description: "We have to build opinionated. If it doesn't suit your need, just change it up.",
icon: SwatchIcon,
icon: SwatchBookIcon,
},
{
name: "Extendable",
description: "Even though we try, we cannot build every single integration. With Formbricks, you can.",
icon: SquaresPlusIcon,
icon: BlocksIcon,
},
];

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -1,50 +1,51 @@
import { slugifyWithCounter } from "@sindresorhus/slugify";
import glob from "fast-glob";
import * as fs from "fs";
import { toString } from "mdast-util-to-string";
import * as path from "path";
import { remark } from "remark";
import remarkMdx from "remark-mdx";
import { createLoader } from "simple-functional-loader";
import { filter } from "unist-util-filter";
import { SKIP, visit } from "unist-util-visit";
import * as url from "url";
import { slugifyWithCounter } from '@sindresorhus/slugify'
import glob from 'fast-glob'
import * as fs from 'fs'
import { toString } from 'mdast-util-to-string'
import * as path from 'path'
import { remark } from 'remark'
import remarkMdx from 'remark-mdx'
import { createLoader } from 'simple-functional-loader'
import { filter } from 'unist-util-filter'
import { SKIP, visit } from 'unist-util-visit'
import * as url from 'url'
const __filename = url.fileURLToPath(import.meta.url);
const processor = remark().use(remarkMdx).use(extractSections);
const slugify = slugifyWithCounter();
const __filename = url.fileURLToPath(import.meta.url)
const processor = remark().use(remarkMdx).use(extractSections)
const slugify = slugifyWithCounter()
function isObjectExpression(node) {
return (
node.type === "mdxTextExpression" && node.data?.estree?.body?.[0]?.expression?.type === "ObjectExpression"
);
node.type === 'mdxTextExpression' &&
node.data?.estree?.body?.[0]?.expression?.type === 'ObjectExpression'
)
}
function excludeObjectExpressions(tree) {
return filter(tree, (node) => !isObjectExpression(node));
return filter(tree, (node) => !isObjectExpression(node))
}
function extractSections() {
return (tree, { sections }) => {
slugify.reset();
slugify.reset()
visit(tree, (node) => {
if (node.type === "heading" || node.type === "paragraph") {
let content = toString(excludeObjectExpressions(node));
if (node.type === "heading" && node.depth <= 2) {
let hash = node.depth === 1 ? null : slugify(content);
sections.push([content, hash, []]);
if (node.type === 'heading' || node.type === 'paragraph') {
let content = toString(excludeObjectExpressions(node))
if (node.type === 'heading' && node.depth <= 2) {
let hash = node.depth === 1 ? null : slugify(content)
sections.push([content, hash, []])
} else {
sections.at(-1)?.[2].push(content);
sections.at(-1)?.[2].push(content)
}
return SKIP;
return SKIP
}
});
};
})
}
}
export default function (nextConfig = {}) {
let cache = new Map();
export default function Search(nextConfig = {}) {
let cache = new Map()
return Object.assign({}, nextConfig, {
webpack(config, options) {
@@ -52,26 +53,26 @@ export default function (nextConfig = {}) {
test: __filename,
use: [
createLoader(function () {
let appDir = path.resolve("./app");
this.addContextDependency(appDir);
let appDir = path.resolve('./src/app')
this.addContextDependency(appDir)
let files = glob.sync("**/*.mdx", { cwd: appDir });
let files = glob.sync('**/*.mdx', { cwd: appDir })
let data = files.map((file) => {
let url = "/" + file.replace(/(^|\/)page\.mdx$/, "");
let mdx = fs.readFileSync(path.join(appDir, file), "utf8");
let url = '/' + file.replace(/(^|\/)page\.mdx$/, '')
let mdx = fs.readFileSync(path.join(appDir, file), 'utf8')
let sections = [];
let sections = []
if (cache.get(file)?.[0] === mdx) {
sections = cache.get(file)[1];
sections = cache.get(file)[1]
} else {
let vfile = { value: mdx, sections };
processor.runSync(processor.parse(vfile), vfile);
cache.set(file, [mdx, sections]);
let vfile = { value: mdx, sections }
processor.runSync(processor.parse(vfile), vfile)
cache.set(file, [mdx, sections])
}
return { url, sections };
});
return { url, sections }
})
// When this file is imported within the application
// the following module is loaded:
@@ -119,16 +120,16 @@ export default function (nextConfig = {}) {
pageTitle: item.doc.pageTitle,
}))
}
`;
`
}),
],
});
})
if (typeof nextConfig.webpack === "function") {
return nextConfig.webpack(config, options);
if (typeof nextConfig.webpack === 'function') {
return nextConfig.webpack(config, options)
}
return config;
return config
},
});
})
}

View File

@@ -200,6 +200,11 @@ const nextConfig = {
destination: "https://app.formbricks.com/auth/signup",
permanent: true,
},
{
source: "/blog/preseed-announcement",
destination: "/blog",
permanent: true,
},
];
},
async rewrites() {

View File

@@ -12,62 +12,60 @@
},
"browserslist": "defaults, not ie <= 11",
"dependencies": {
"@algolia/autocomplete-core": "^1.13.0",
"@calcom/embed-react": "^1.3.0",
"@docsearch/react": "^3.5.2",
"@algolia/autocomplete-core": "^1.17.0",
"@calcom/embed-react": "^1.3.2",
"@docsearch/react": "^3.6.0",
"@formbricks/lib": "workspace:*",
"@formbricks/types": "workspace:*",
"@formbricks/ui": "workspace:*",
"@headlessui/react": "^1.7.17",
"@headlessui/react": "^1.7.18",
"@headlessui/tailwindcss": "^0.2.0",
"@heroicons/react": "^2.1.1",
"lucide-react": "^0.356.0",
"@mapbox/rehype-prism": "^0.9.0",
"@mdx-js/loader": "^3.0.0",
"@mdx-js/react": "^3.0.0",
"@next/mdx": "14.0.4",
"@mdx-js/loader": "^3.0.1",
"@mdx-js/react": "^3.0.1",
"@next/mdx": "14.1.3",
"@paralleldrive/cuid2": "^2.2.2",
"@radix-ui/react-slider": "^1.1.2",
"@radix-ui/react-tooltip": "^1.0.6",
"@sindresorhus/slugify": "^2.2.1",
"@tailwindcss/typography": "^0.5.10",
"@types/dompurify": "^3.0.5",
"@types/react-highlight-words": "^0.16.5",
"acorn": "^8.10.0",
"autoprefixer": "^10.4.15",
"clsx": "^2.0.0",
"fast-glob": "^3.3.1",
"flexsearch": "^0.7.31",
"framer-motion": "10.17.8",
"acorn": "^8.11.3",
"autoprefixer": "^10.4.18",
"clsx": "^2.1.0",
"fast-glob": "^3.3.2",
"flexsearch": "^0.7.43",
"framer-motion": "11.0.13",
"lottie-web": "^5.12.2",
"mdast-util-to-string": "^4.0.0",
"mdx-annotations": "^0.1.4",
"next": "13.4.19",
"next": "14.1.3",
"next-plausible": "^3.12.0",
"next-seo": "^6.4.0",
"next-seo": "^6.5.0",
"next-sitemap": "^4.2.3",
"next-themes": "^0.2.1",
"next-themes": "^0.3.0",
"node-fetch": "^3.3.2",
"prism-react-renderer": "^2.3.1",
"prismjs": "^1.29.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-highlight-words": "^0.20.0",
"react-icons": "^4.12.0",
"react-icons": "^5.0.1",
"react-markdown": "^9.0.1",
"react-responsive-embed": "^2.1.0",
"remark": "^15.0.1",
"remark-gfm": "^4.0.0",
"remark-mdx": "^3.0.0",
"sharp": "^0.33.1",
"remark-mdx": "^3.0.1",
"sharp": "^0.33.2",
"shiki": "^0.14.7",
"simple-functional-loader": "^1.2.1",
"tailwindcss": "^3.4.0",
"tailwindcss": "^3.4.1",
"unist-util-filter": "^5.0.1",
"unist-util-visit": "^5.0.0",
"zustand": "^4.4.7"
"zustand": "^4.5.2"
},
"devDependencies": {
"@formbricks/tsconfig": "workspace:*",
"@types/dompurify": "^3.0.5",
"@types/react-highlight-words": "^0.16.7",
"eslint-config-formbricks": "workspace:*"
}
}

View File

@@ -1,41 +1,7 @@
import { Head, Html, Main, NextScript } from "next/document";
const themeScript = `
let isDarkMode = window.matchMedia('(prefers-color-scheme: dark)')
function updateTheme(theme) {
theme = theme ?? window.localStorage.theme ?? 'system'
if (theme === 'dark' || (theme === 'system' && isDarkMode.matches)) {
document.documentElement.classList.add('dark')
} else if (theme === 'light' || (theme === 'system' && !isDarkMode.matches)) {
document.documentElement.classList.remove('dark')
}
return theme
}
function updateThemeWithoutTransitions(theme) {
updateTheme(theme)
document.documentElement.classList.add('[&_*]:!transition-none')
window.setTimeout(() => {
document.documentElement.classList.remove('[&_*]:!transition-none')
}, 0)
}
document.documentElement.setAttribute('data-theme', updateTheme())
new MutationObserver(([{ oldValue }]) => {
let newValue = document.documentElement.getAttribute('data-theme')
if (newValue !== oldValue) {
try {
window.localStorage.setItem('theme', newValue)
} catch {}
updateThemeWithoutTransitions(newValue)
}
}).observe(document.documentElement, { attributeFilter: ['data-theme'], attributeOldValue: true })
isDarkMode.addEventListener('change', () => updateThemeWithoutTransitions())
document.documentElement.classList.remove('dark');
`;
export default function Document() {

View File

@@ -18,7 +18,7 @@ export default async function handle(req: NextApiRequest, res: NextApiResponse)
},
{
name: "Argos",
description: "Argos provides the developer tools to debug tests and detect visual regressions..",
description: "Argos provides the developer tools to debug tests and detect visual regressions.",
href: "https://argos-ci.com",
},
{
@@ -121,6 +121,11 @@ export default async function handle(req: NextApiRequest, res: NextApiResponse)
"Open source, end-to-end encrypted platform that lets you securely manage secrets and configs across your team, devices, and infrastructure.",
href: "https://infisical.com",
},
{
name: "Keep",
description: "Open source alert management and AIOps platform.",
href: "https://keephq.dev",
},
{
name: "Langfuse",
description: "Open source LLM engineering platform. Debug, analyze and iterate together.",
@@ -159,11 +164,17 @@ export default async function handle(req: NextApiRequest, res: NextApiResponse)
"Open-Source Docsend Alternative to securely share documents with real-time analytics.",
href: "https://www.papermark.io/",
},
{
name: "Prisma",
description:
"Simplify working with databases. Build, optimize, and grow your app easily with an intuitive data model, type-safety, automated migrations, connection pooling, caching, and real-time db subscriptions.",
href: "https://www.prisma.io",
},
{
name: "Requestly",
description:
"Makes frontend development cycle 10x faster with API Client, Mock Server, Intercept & Modify HTTP Requests and Session Replays.",
href: "https://requestly.io",
href: "https://requestly.com",
},
{
name: "Revert",
@@ -193,6 +204,12 @@ export default async function handle(req: NextApiRequest, res: NextApiResponse)
"The .NET Web Framework for Makers. Build production ready, full-stack web applications fast without sweating the small stuff.",
href: "https://spark-framework.net",
},
{
name: "Tiledesk",
description:
"The innovative open-source framework for developing LLM-enabled chatbots, Tiledesk empowers developers to create advanced, conversational AI agents.",
href: "https://tiledesk.com",
},
{
name: "Tolgee",
description: "Software localization from A to Z made really easy.",
@@ -216,6 +233,12 @@ export default async function handle(req: NextApiRequest, res: NextApiResponse)
"A modern CRM offering the flexibility of open-source, advanced features and sleek design.",
href: "https://twenty.com",
},
{
name: "UnInbox",
description:
"Modern email for teams and professionals. Bringing the best of email and messaging into a single, modern, and secure platform.",
href: "https://uninbox.com",
},
{
name: "Unkey",
description:

View File

@@ -1,17 +1,16 @@
import Image from "next/image";
import LayoutMdx from "@/components/shared/LayoutMdx";
import AuthorBox from "@/components/shared/AuthorBox";
import Formbricks from "./open-source-survey-software-free-2023-formbricks-typeform-alternative.png";
import Typebot from "./typebot-open-source-free-conversational-form-builder-survey-software-opensource.jpg";
import LimeSurvey from "./free-survey-tool-limesurvey-open-source-software-opensource.png";
import OpnForm from "./opnform-free-open-source-form-survey-tools-builder-2023-self-hostign.jpg";
import LayoutMdx from "@/components/shared/LayoutMdx";
import Image from "next/image";
import HeaderImage from "./2023-title-best-open-source-survey-software-tools-and-alternatives.png";
import LimeSurvey from "./free-survey-tool-limesurvey-open-source-software-opensource.png";
import Formbricks from "./open-source-survey-software-free-2023-formbricks-typeform-alternative.png";
import OpnForm from "./opnform-free-open-source-form-survey-tools-builder-2023-self-hostign.jpg";
import SurveyJS from "./surveyjs-free-opensource-form-survey-tool-software-to-make-surveys-2023.png";
import Typebot from "./typebot-open-source-free-conversational-form-builder-survey-software-opensource.jpg";
export const meta = {
title: "5 Open Source Survey and Form Tools maintained in 2023",
title: "5 Open Source Survey and Form Tools maintained in 2024",
description:
"Most open source projects get abandoned after a while. But these 5 open source survey tools are still alive and kicking in 2023.",
"Most open source projects get abandoned after a while. But these 5 open source survey tools are still alive and kicking in 2024.",
date: "2023-04-12",
publishedTime: "2023-04-12T12:00:00",
authors: ["Johannes"],
@@ -21,17 +20,17 @@ export const meta = {
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" author={"Johannes"} />
_Most open source projects get abandoned after a while. But these 5 open source survey tools are still alive and kicking in 2023._
_Most open source projects get abandoned after a while. But these 5 open source survey tools are still alive and kicking in 2024._
<Image
src={HeaderImage}
alt="Open source survey tool self-hostable: Find the 5 best (and maintained) open source survey tool 2023."
alt="Open source survey tool self-hostable: Find the 5 best (and maintained) open source survey tool 2024."
className="rounded-lg w-full"
/>
Looking for the perfect open source survey tool to help you gather valuable insights and improve your business? Look no further!
We've compiled a list of the top 5 open source form and survey tools that are still maintained in 2023. In app surveys, conversational bots, AI-generated surveys: These open source tools offer various features that cater to different needs.
We've compiled a list of the top 5 open source form and survey tools that are still maintained in 2024. In app surveys, conversational bots, AI-generated surveys: These open source tools offer various features that cater to different needs.
## 1. Formbricks - In app micro surveys
@@ -124,7 +123,7 @@ LimeSurvey has been around for at least a decade. It's a powerful survey tool ma
## Summary ☟
In this article, we've rounded up the top 5 open source form and survey tools that are still rocking it in 2023. Perfect for devs who are always on the lookout for the latest and greatest!
In this article, we've rounded up the top 5 open source form and survey tools that are still rocking it in 2024. Perfect for devs who are always on the lookout for the latest and greatest!
1. Formbricks: A game-changer for in app micro surveys, letting you target specific customer segments at any point in their journey. It's still early days, but this bad boy is worth keeping an eye on.

View File

@@ -1,57 +0,0 @@
import Image from "next/image";
import LayoutMdx from "@/components/shared/LayoutMdx";
import AuthorBox from "@/components/shared/AuthorBox";
import Preseed from "./preseed-header.webp";
export const meta = {
title: "We raised Pre-Seed Funding 💸",
description:
"Were delighted to announce that Formbricks successfully acquired pre-seed funding in May 2023.",
date: "2023-11-01",
publishedTime: "2023-11-01T12:00:00",
authors: ["Johannes"],
section: "Open Source Surveys",
tags: ["Open Source Surveys", "Formbricks", "Typeform", "SurveyJS", "Typebot", "OpnForm", "LimeSurvey"],
};
<Image
src={Preseed}
alt="Formbricks raises a preseed round led by OSS Capital"
className="w-full rounded-lg"
/>
_Were delighted to announce that Formbricks successfully acquired pre-seed funding in May 2023._
<AuthorBox name="Johannes" title="Co-Founder" date="November 1st, 2023" duration="2" author={"Johannes"}/>
The Formbricks pre-seed round was led by [OSS Capital](https://oss.capital/portfolio) with participation of Peer Richelsen, co-founder at [Cal.com](http://Cal.com), as well as other angel investors.
## OSS Capital leads the round
We are both humbled and excited to have won such highly specialized and experienced investors for our mission! This influx of capital allows us to be even more ambitious in shaping the future of Experience Management globally.
We are on a mission to enable organizations to **gather, analyze and leverage** qualitative data to improve customer experience from first principles. Building Open Source uniquely allows us to offer a privacy-first solution which can be natively embedded into existing products and services.
Even in large organizations, every product decision **can** be based on user insight. We make that possible.
## How it started, and how it's going
Matti and Johannes kicked this off as a side project a good year ago. Today, we have several thousand users collecting valuable insights with both in-product surveys and standalone surveys.
Over the past couple of months, we gathered:
- 4.000+ GitHub stars ⭐
- 3.200+ Dockerhub clones 🐳
- 750+ Discord Members 👻
- 120+ community contributors 👨‍👩‍👧
… and we are just warming up!
Our journey has just begun, and with the support of our investors and the enthusiasm of our community, we cant wait to see where we stand 6 months from now!
## Onwards,
The Formbricks Team 🤍
export default ({ children }) => <LayoutMdx meta={meta}>{children}</LayoutMdx>;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

View File

@@ -1,17 +1,16 @@
import Image from "next/image";
import AuthorBox from "@/components/shared/AuthorBox";
import LayoutMdx from "@/components/shared/LayoutMdx";
import Formbricks from './formbricks-dashboard.png';
import Header from './cover-waitlist-survey-questions-open-source-free-tool copy.webp';
import Waiting from './waitlist-survey-best-practices-waiting-for-submissions.webp';
import Image from "next/image";
import Awareness from './awareness-urgency-waitlist-questions-survey-form.png';
import Header from './cover-waitlist-survey-questions-open-source-free-tool copy.webp';
import Demographics from './demographics-contact-waitlist-survey-questions-for-more-leads.png';
import Features from './features-wip-waitlist-form-questions-perfect-open-source.png';
import Formbricks from './formbricks-dashboard.png';
import Expectations from './pref-expectations-what-to-ask-waitlist-survey-form-open-source.png';
import Testing from './testing-feedback-waitlist-questions-form-survey.png';
import Waiting from './waitlist-survey-best-practices-waiting-for-submissions.webp';
export const meta = {
title: "The Perfect Waitlist Survey - What To Ask, Why, And How To Get The Most Out Of Your Leads",
title: "The perfect Waitlist Survey - What to ask, why, and how to get the most out of your leads",
description:
"Using a waitlist for product validation is tough. Use this waitlist best practice to gain clarity with actionable tips on questions to ask and insights utilization in this article.",
date: "2024-01-23",

View File

@@ -2,23 +2,24 @@ import AuthorBox from "@/components/shared/AuthorBox";
import LayoutMdx from "@/components/shared/LayoutMdx";
import Image from "next/image";
import Header from "./header.webp";
import Container from "./container.webp";
import Docker from "./docker.webp";
import DockerCompose from "./docker-compose.webp";
import SmartestPersonGif from "./smartest-person.gif";
import SelfHostGif from "./self-host.gif";
import SuperSonicGif from "./supersonic.gif";
import Docker from "./docker.webp";
import EndingGif from "./ending.gif";
import Header from "./header.webp";
import SelfHostGif from "./self-host.gif";
import SmartestPersonGif from "./smartest-person.gif";
import SuperSonicGif from "./supersonic.gif";
export const meta = {
title: "Understand Formbricks Self Hosting",
description:"We explain how we internally built Formbricks self hosting architecture with Docker, Docker Compose, and Bash Script. It's easy and to-the-point!",
description:
"We explain how we internally built Formbricks self hosting architecture with Docker, Docker Compose, and Bash Script. It's easy and to-the-point!",
date: "2024-01-23",
publishedTime: "2024-01-23T12:00:00",
authors: ["Shubham Palriwala"],
section: "Infrastructure",
tags: ["Infrastructure", "Docker", "Docker Compose", "Bash Script", "Self Hosting"],
tags: ["Infrastructure", "Docker", "Docker Compose", "Bash Script", "Self-Hosting"],
};
<Image src={Header} alt="How to effectively self host Formbricks" className="w-full rounded-lg" />
@@ -33,7 +34,7 @@ export const meta = {
_Embracing the open-source ethos of sharing knowledge, we're unveiling the inner workings of self-hosting a Formbricks instance. This initiative is designed to share & learn with [our community](https://formbricks.com/discord), providing deep insights into Formbricks' features for all, from developers to end-users._
## What is Self Hosting?
## What is Self-Hosting?
Self-hosting allows you to manage our Formbricks app **on your own server infrastructure**, providing complete control over its environment. This contrasts with relying on external cloud services. At Formbricks, we facilitate a swift and straightforward self-hosting process, enabling quick setup of your instance. For those who prefer a quicker way to get things going rather than managing it on your own, our cloud-based solution is readily accessible at [app.formbricks.com](https://app.formbricks.com).
@@ -54,7 +55,6 @@ Deciding to self-host is particularly advantageous in certain scenarios:
In these situations, self-hosting offers an unmatched level of control and customization.
### What to expect from this guide?
Embark on an insightful journey into the world of Formbricks self-hosting. We'll dive deep into two key methods: the [Advanced Docker Setup](https://formbricks.com/docs/self-hosting/docker) and the [Single Script Setup](https://formbricks.com/docs/self-hosting/production). Along the way, we'll demystify several core concepts:
@@ -95,12 +95,14 @@ Docker is a container runtime that enables you to abstract your projects into re
Building on the earlier analogy, Docker can be seen as the fleet of trucks that transport these secure boxes (containers). Each truck (Docker) is equipped to carry a container, ensuring it reaches its destination intact and operates smoothly. Docker takes care of the driving, navigating through different environments (operating systems), and making sure each container is running as it should, regardless of where it's deployed.
<Note>
It's important to note that Docker is a **runtime environment** — it's responsible for running the containers, rather than being a technology that creates them. While Docker is widely used, there are other alternatives in the field, such as Podman and Containerd, which also offer container runtime capabilities.
It's important to note that Docker is a **runtime environment** — it's responsible for running the
containers, rather than being a technology that creates them. While Docker is widely used, there are other
alternatives in the field, such as Podman and Containerd, which also offer container runtime capabilities.
</Note>
### Understanding Formbricks Dockerfile
The Dockerfile for our Formbricks application is structured into two key stages - the Builder and Runner stages. Its currently hosted [here](https://github.com/formbricks/formbricks/blob/main/apps/web/Dockerfile).
The Dockerfile for our Formbricks application is structured into two key stages - the Builder and Runner stages. Its currently hosted [here](https://github.com/formbricks/formbricks/blob/main/apps/web/Dockerfile).
<CodeGroup title="Dockerfile">
@@ -206,7 +208,6 @@ CMD supercronic -quiet /app/docker/cronjobs & \
4. **Port and Volume:** Exposes port 3000 and sets up a persistent volume mapping for uploads.
5. **Application Launch:** Uses a command sequence to run
### 3. What is Docker Compose
Docker Compose is a tool designed to manage multiple containers, streamlining the process of running multi-container Docker applications. It allows for the configuration of how these containers interact, including mapping ports, creating, and sharing data volumes. This orchestration is crucial when your application comprises several interconnected containers, each with its specific role.
@@ -285,13 +286,11 @@ x-environment: &environment
# Uncomment the below and set a value to have your own Imprint Page URL on the auth and the surveys page
# IMPRINT_URL:
# Uncomment the below and set to 1 if you want to enable GitHub OAuth
# GITHUB_AUTH_ENABLED:
# Uncomment the below if you want to enable GitHub OAuth
# GITHUB_ID:
# GITHUB_SECRET:
# Uncomment the below and set to 1 if you want to enable Google OAuth
# GOOGLE_AUTH_ENABLED:
# Uncomment the below if you want to enable Google OAuth
# GOOGLE_CLIENT_ID:
# GOOGLE_CLIENT_SECRET:
@@ -332,28 +331,28 @@ volumes:
</CodeGroup>
- Version Specification:
- **`version: "3.3"`**: Specifies the Docker Compose file version, which determines the syntax and functionalities available.
- **`version: "3.3"`**: Specifies the Docker Compose file version, which determines the syntax and functionalities available.
- Environment Variables Setup (x-environment):
- **`x-environment: &environment`**: A reusable anchor for environment variables, detailing settings for the Formbricks instance, database connections, authentication, and optional configurations like email, OAuth, and URLs for terms/privacy.
- **`x-environment: &environment`**: A reusable anchor for environment variables, detailing settings for the Formbricks instance, database connections, authentication, and optional configurations like email, OAuth, and URLs for terms/privacy.
- Services Configuration:
1. **Postgres Service**:
- **`postgres:`**: Defines the PostgreSQL service.
- **`restart: always`**: Ensures the container restarts automatically if it stops.
- **`image: postgres:15-alpine`**: Uses the Postgres 15 image on Alpine Linux, a lightweight version.
- **`volumes: - postgres:/var/lib/postgresql/data`**: Maps a named volume **`postgres`** to persist database data.
- **`<<: *environment`**: Inherits the environment settings defined earlier.
2. **Formbricks Service**:
- **`formbricks:`**: Defines the Formbricks application service.
- **`restart: always`**: Similar to Postgres, configures the container to restart automatically.
- **`image: ghcr.io/formbricks/formbricks:latest`**: Pulls the latest Formbricks image from GitHub Container Registry.
- **`depends_on: - postgres`**: Specifies that Formbricks depends on the PostgreSQL service.
- **`ports: - 3000:3000`**: Maps port 3000 from the container to the host, allowing web access to the application.
- **`volumes: - uploads:/home/nextjs/apps/web/uploads/`**: Sets a volume for uploads.
- **`<<: *environment`**: Inherits environment settings.
1. **Postgres Service**:
- **`postgres:`**: Defines the PostgreSQL service.
- **`restart: always`**: Ensures the container restarts automatically if it stops.
- **`image: postgres:15-alpine`**: Uses the Postgres 15 image on Alpine Linux, a lightweight version.
- **`volumes: - postgres:/var/lib/postgresql/data`**: Maps a named volume **`postgres`** to persist database data.
- **`<<: *environment`**: Inherits the environment settings defined earlier.
2. **Formbricks Service**:
- **`formbricks:`**: Defines the Formbricks application service.
- **`restart: always`**: Similar to Postgres, configures the container to restart automatically.
- **`image: ghcr.io/formbricks/formbricks:latest`**: Pulls the latest Formbricks image from GitHub Container Registry.
- **`depends_on: - postgres`**: Specifies that Formbricks depends on the PostgreSQL service.
- **`ports: - 3000:3000`**: Maps port 3000 from the container to the host, allowing web access to the application.
- **`volumes: - uploads:/home/nextjs/apps/web/uploads/`**: Sets a volume for uploads.
- **`<<: *environment`**: Inherits environment settings.
- Volumes Definition:
- **`volumes:`**
- **`postgres: { driver: local }`**: Defines a local volume for PostgreSQL data, ensuring data persistence.
- **`uploads:`**: Sets up a volume for storing uploads in the Formbricks application.
- **`volumes:`**
- **`postgres: { driver: local }`**: Defines a local volume for PostgreSQL data, ensuring data persistence.
- **`uploads:`**: Sets up a volume for storing uploads in the Formbricks application.
This Docker Compose file orchestrates the Formbricks application and its database, providing a harmonized and efficient deployment setup. It highlights the ease of configuring and running a multi-container application, where each service is finely tuned and interconnected.
@@ -363,20 +362,18 @@ This Docker Compose file orchestrates the Formbricks application and its databas
className="w-full rounded-lg"
/>
Thats it! **Youve understood our Advanced Docker Setup** in the Self Hosting Stack! Congratulations! Now lets go a step further and understand our cool Single Script Setup too!
### Quick Server Concepts before we understand our Single Script Setup
1. **Proxy**:
A proxy server acts as an intermediary between a user's computer and the internet. It's used to request resources from other servers, offering benefits like improved security and performance, and controlled access.
A proxy server acts as an intermediary between a user's computer and the internet. It's used to request resources from other servers, offering benefits like improved security and performance, and controlled access.
2. **Reverse Proxy**:
A reverse proxy sits in front of web servers and forwards client requests to those web servers. It's key for load balancing, providing SSL termination, and ensuring secure and anonymous browsing.
A reverse proxy sits in front of web servers and forwards client requests to those web servers. It's key for load balancing, providing SSL termination, and ensuring secure and anonymous browsing.
3. **SSL (Secure Sockets Layer)**:
SSL is a standard security technology for establishing an encrypted link between a web server and a browser. It ensures that all data passed between the web server and browsers remain private and integral, a must-have for securing online transactions.
SSL is a standard security technology for establishing an encrypted link between a web server and a browser. It ensures that all data passed between the web server and browsers remain private and integral, a must-have for securing online transactions.
4. **Cronjobs**:
Cronjobs are scheduled tasks that automate scripts at specified times. They're crucial for routine tasks like backups and system updates. However, managing cronjobs in Docker can be challenging due to its isolated environment.
Cronjobs are scheduled tasks that automate scripts at specified times. They're crucial for routine tasks like backups and system updates. However, managing cronjobs in Docker can be challenging due to its isolated environment.
### Struggles with running Cronjobs in Docker env
@@ -431,11 +428,11 @@ This script encapsulates all necessary steps for a user-friendly setup and maint
<Image
src={EndingGif}
alt="Explained Formbricks Self Hosting Setup in an easy to understand way"
alt="Explained Formbricks Self-Hosting Setup in an easy to understand way"
className="w-full rounded-lg"
/>
Thats it amigo! If youre reading this, we hope youve understood our Self Hosting stack inside out now! Thank you for taking the time to read through this comprehensive guide on Formbricks self-hosting. Don't forget to check out the [Slides](https://pitch.com/v/understanding-Formbricks-e2e-tests-i54auf) for this session.
Thats it amigo! If youre reading this, we hope youve understood our Self-Hosting stack inside out now! Thank you for taking the time to read through this comprehensive guide on Formbricks self-hosting. Don't forget to check out the [Slides](https://pitch.com/v/understanding-Formbricks-e2e-tests-i54auf) for this session.
Your participation and feedback are vital in shaping our community and its resources. So, [join us on Discord](https://formbricks.com/discord), to be a part of the next session, engage in lively discussions, connect with fellow enthusiasts and Formbricks team!

View File

@@ -1,5 +1,5 @@
import footerLogoDark from "@/images/logo/footerlogo-dark.svg";
import { Bars3Icon } from "@heroicons/react/24/solid";
import { MenuIcon } from "lucide-react";
import Image from "next/image";
import Link from "next/link";
import { useState } from "react";
@@ -50,7 +50,7 @@ export default function HeaderLight() {
<Popover open={mobileNavMenuOpen} onOpenChange={setMobileNavMenuOpen}>
<PopoverTrigger onClick={() => setMobileNavMenuOpen(!mobileNavMenuOpen)}>
<span>
<Bars3Icon className="h-8 w-8 rounded-md bg-slate-700 p-1 text-slate-200" />
<MenuIcon className="h-8 w-8 rounded-md bg-slate-700 p-1 text-slate-200" />
</span>
</PopoverTrigger>
<PopoverContent className="border-slate-600 bg-slate-700 shadow">

View File

@@ -1,4 +1,4 @@
import { ChevronDownIcon } from "@heroicons/react/24/outline";
import { ChevronDownIcon } from "lucide-react";
import Image from "next/image";
import Link from "next/link";
import { FaGithub } from "react-icons/fa6";

View File

@@ -199,7 +199,7 @@ const FAQ = [
{
question: "Why is there a Commercial plan?",
answer:
"The commercial plan is for features who break the OSS WIN-WIN Loop or incur additional cost. We charge 29$ if you want a custom domain, remove Formbricks branding, collect large files in surveys or collect payments. We think thats fair :)",
"The commercial plan is for features who break the OSS WIN-WIN Loop or incur additional cost. We charge 30$ if you want a custom domain, remove Formbricks branding, collect large files in surveys or collect payments. We think thats fair :)",
},
{
question: "Are your in app surveys also free forever?",

View File

@@ -26,7 +26,7 @@ export default function FeatureChaserPage() {
</h3>
<p className="text-slate-600 dark:text-slate-400">
Once you&apos;ve embedded the Formbricks Widget in your application, you can start following user
actions. Simply use our No-Code Action wizard to keep track of different actions users perfrom -
actions. Simply use our No-Code Action wizard to keep track of different actions users perform -
100% GPDR compliant.
</p>
<UseCaseCTA href="/docs/best-practices/feature-chaser" />

View File

@@ -22,8 +22,7 @@ const inProductSurveys = {
{ name: "API Access", free: true, paid: true },
{ name: "30+ Templates", free: true, paid: true },
{ name: "Unlimited Responses per Survey", free: false, paid: true },
{ name: "Team Role Management", free: false, paid: true, comingSoon: true },
{ name: "Advanced User Targeting", free: false, paid: true, comingSoon: true },
{ name: "Team Role Management", free: false, paid: true },
{ name: "Multi Language Surveys", free: false, paid: true, comingSoon: true },
],
endRow: {
@@ -58,11 +57,11 @@ const userSegmentation = {
{ name: "Identify Users", free: true, paid: true },
{ name: "Collect Events", free: true, paid: true },
{ name: "Collect Attributes", free: true, paid: true },
{ name: "Advanced User Targeting", free: false, paid: true, comingSoon: true },
{ name: "Reusable Segments", free: false, paid: true, comingSoon: true },
{ name: "Reusable Segments", free: true, paid: true },
{ name: "Advanced Targeting", free: false, paid: true },
],
endRow: {
title: "User Segmentation like Segment",
title: "User Segmentation",
free: "Free",
paid: (
<div>
@@ -91,13 +90,14 @@ const linkSurveys = {
{ name: "Unlimited Responses", free: true, paid: true },
{ name: "Partial Responses", free: true, paid: true },
{ name: "Multi-media Backgrounds", free: true, paid: true },
{ name: "File Upload", free: true, paid: true, comingSoon: true },
{ name: "File Upload", free: true, paid: true },
{ name: "Hidden Fields", free: true, paid: true },
{ name: "Single Use Survey Links", free: true, paid: true },
{ name: "Pin-protected Surveys", free: true, paid: true },
{ name: "Custom Styling", free: true, paid: true, comingSoon: true },
{ name: "Recall Information", free: true, paid: true, comingSoon: true },
{ name: "Collect Payments, Signatures and Appointments", free: true, paid: true, comingSoon: true },
{ name: "Recall Information", free: true, paid: true },
{ name: "Book appointments (powered by cal.com)", free: true, paid: true },
{ name: "Collect Payments and Signatures", free: true, paid: true, comingSoon: true },
{ name: "Custom URL", free: false, paid: true, comingSoon: true },
{ name: "Remove Formbricks Branding", free: false, paid: true },
],

View File

@@ -1,16 +1,17 @@
{
"extends": "@formbricks/tsconfig/nextjs.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "../../packages/types/*.d.ts"],
"exclude": ["../../.env"],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
},
"plugins": [
{
"name": "next"
}
],
"strictNullChecks": true
},
"plugins": [
{
"name": "next"
}
]
}
}

View File

@@ -22,18 +22,18 @@ export default function typographyStyles({ theme }: PluginUtils) {
"--tw-prose-th-borders": theme("colors.slate.300"),
"--tw-prose-td-borders": theme("colors.slate.200"),
"--tw-prose-invert-body": theme("colors.slate.400"),
"--tw-prose-invert-body": theme("colors.slate.200"),
"--tw-prose-invert-headings": theme("colors.white"),
"--tw-prose-invert-links": theme("colors.teal.400"),
"--tw-prose-invert-links": theme("colors.teal.200"),
"--tw-prose-invert-links-hover": theme("colors.teal.500"),
"--tw-prose-invert-links-underline": theme("colors.teal.500 / 0.3"),
"--tw-prose-invert-bold": theme("colors.white"),
"--tw-prose-invert-counters": theme("colors.slate.400"),
"--tw-prose-invert-counters": theme("colors.slate.200"),
"--tw-prose-invert-bullets": theme("colors.slate.600"),
"--tw-prose-invert-hr": theme("colors.white / 0.05"),
"--tw-prose-invert-quotes": theme("colors.slate.100"),
"--tw-prose-invert-quote-borders": theme("colors.slate.700"),
"--tw-prose-invert-captions": theme("colors.slate.400"),
"--tw-prose-invert-captions": theme("colors.slate.200"),
"--tw-prose-invert-code": theme("colors.white"),
"--tw-prose-invert-code-bg": theme("colors.slate.700 / 0.15"),
"--tw-prose-invert-code-ring": theme("colors.white / 0.1"),

View File

@@ -17,19 +17,19 @@
},
"devDependencies": {
"@formbricks/tsconfig": "workspace:*",
"@storybook/addon-essentials": "^7.6.7",
"@storybook/addon-interactions": "^7.6.7",
"@storybook/addon-links": "^7.6.7",
"@storybook/addon-onboarding": "^1.0.10",
"@storybook/blocks": "^7.6.7",
"@storybook/react": "^7.6.7",
"@storybook/react-vite": "^7.6.7",
"@storybook/addon-essentials": "^8.0.0",
"@storybook/addon-interactions": "^8.0.0",
"@storybook/addon-links": "^8.0.0",
"@storybook/addon-onboarding": "^8.0.0",
"@storybook/blocks": "^8.0.0",
"@storybook/react": "^8.0.0",
"@storybook/react-vite": "^8.0.0",
"@storybook/testing-library": "^0.2.2",
"@typescript-eslint/eslint-plugin": "^6.18.1",
"@typescript-eslint/parser": "^6.18.1",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"@vitejs/plugin-react": "^4.2.1",
"esbuild": "^0.19.11",
"tsup": "^8.0.1",
"vite": "^5.0.12"
"esbuild": "^0.20.1",
"tsup": "^8.0.2",
"vite": "^5.1.6"
}
}

View File

@@ -1,5 +1,4 @@
/** @type {import('tailwindcss').Config} */
import base from "../../packages/tailwind-config/tailwind.config";
export default {

3
apps/web/.gitignore vendored
View File

@@ -42,4 +42,5 @@ next-env.d.ts
token.json
# Local Uploads
uploads/
uploads/
certificates

View File

@@ -1,58 +1,72 @@
# Installer stage: Building the application
FROM node:20-alpine AS installer
FROM node:20-alpine AS base
#
## step 1: Prune monorepo
#
FROM base AS builder
RUN apk add --no-cache libc6-compat
RUN apk update
# Set working directory
WORKDIR /app
RUN yarn global add turbo
COPY . .
RUN turbo prune @formbricks/web --docker
#
## step 2: Install & build
#
FROM base AS installer
# Enable corepack and prepare pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
# Install necessary build tools and compilers
RUN apk update && apk add --no-cache g++ cmake make gcc python3 openssl-dev
RUN apk update && apk add --no-cache g++ cmake make gcc python3 openssl-dev jq
# Install Supercronic (cron for containers without super user privileges)
RUN apk add --no-cache curl \
&& curl -fsSLo /tmp/supercronic \
"https://github.com/aptible/supercronic/releases/download/v0.2.27/supercronic-linux-amd64" \
&& chmod +x /tmp/supercronic
# Set environment variables
ARG DATABASE_URL
ENV DATABASE_URL=$DATABASE_URL
ARG NEXTAUTH_SECRET
ENV NEXTAUTH_SECRET=$NEXTAUTH_SECRET
ARG ENCRYPTION_KEY
ENV ENCRYPTION_KEY=$ENCRYPTION_KEY
# Set hardcoded environment variables
ENV DATABASE_URL="postgresql://placeholder:for@build:5432/gets_overwritten_at_runtime?schema=public"
ENV NEXTAUTH_SECRET="placeholder_for_next_auth_of_64_chars_get_overwritten_at_runtime"
ENV ENCRYPTION_KEY="placeholder_for_build_key_of_64_chars_get_overwritten_at_runtime"
ARG NEXT_PUBLIC_SENTRY_DSN
# Set the working directory
WORKDIR /app
# Copy the application files
COPY . .
# Create a .env file
RUN touch /app/apps/web/.env
# Copy the package information
COPY .gitignore .gitignore
COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
# Install the dependencies
RUN pnpm install
# Prepare the build
COPY --from=builder /app/out/full/ .
# Create a .env file
RUN touch /app/apps/web/.env
# Build the project
RUN pnpm post-install --filter=web...
RUN pnpm turbo run build --filter=web...
# Runner stage: Setting up the runtime environment
FROM node:20-alpine AS runner
# Extract Prisma version
RUN jq -r '.devDependencies.prisma' packages/database/package.json > /prisma_version.txt
#
## step 3: setup production runner
#
FROM base AS runner
RUN corepack enable && corepack prepare pnpm@latest --activate
RUN apk add --no-cache curl \
&& apk add --no-cache supercronic \
# && addgroup --system --gid 1001 nodejs \
&& adduser --system --uid 1001 nextjs
WORKDIR /home/nextjs
COPY --from=installer /tmp/supercronic /usr/local/bin/supercronic
COPY --from=installer /app/apps/web/next.config.mjs .
COPY --from=installer /app/apps/web/package.json .
# Leverage output traces to reduce image size
@@ -60,8 +74,13 @@ COPY --from=installer --chown=nextjs:nextjs /app/apps/web/.next/standalone ./
COPY --from=installer --chown=nextjs:nextjs /app/apps/web/.next/static ./apps/web/.next/static
COPY --from=installer --chown=nextjs:nextjs /app/apps/web/public ./apps/web/public
COPY --from=installer --chown=nextjs:nextjs /app/packages/database/schema.prisma ./packages/database/schema.prisma
COPY --from=installer --chown=nextjs:nextjs /app/packages/database/package.json ./packages/database/package.json
COPY --from=installer --chown=nextjs:nextjs /app/packages/database/migrations ./packages/database/migrations
COPY --from=installer /app/docker/cronjobs /app/docker/cronjobs
COPY --from=installer --chown=nextjs:nextjs /prisma_version.txt .
COPY /docker/cronjobs /app/docker/cronjobs
# Install Prisma globally
RUN PRISMA_VERSION=$(cat prisma_version.txt) && npm install -g prisma@$PRISMA_VERSION
EXPOSE 3000
ENV HOSTNAME "0.0.0.0"
@@ -72,10 +91,5 @@ RUN mkdir -p /home/nextjs/apps/web/uploads/
VOLUME /home/nextjs/apps/web/uploads/
CMD supercronic -quiet /app/docker/cronjobs & \
if [ "$NEXTAUTH_SECRET" != "RANDOM_STRING" ]; then \
pnpm dlx prisma migrate deploy && \
exec node apps/web/server.js; \
else \
echo "ERROR: Please set a value for NEXTAUTH_SECRET in your docker compose variables!" >&2; \
exit 1; \
fi
(cd packages/database && pnpm db:migrate:deploy) && \
exec node apps/web/server.js

View File

@@ -4,7 +4,7 @@ import { formbricksEnabled } from "@/app/lib/formbricks";
import { useEffect } from "react";
import formbricks from "@formbricks/js";
import { env } from "@formbricks/lib/env.mjs";
import { env } from "@formbricks/lib/env";
type UsageAttributesUpdaterProps = {
numSurveys: number;

View File

@@ -1,21 +0,0 @@
"use client";
import type { Session } from "next-auth";
import { usePostHog } from "posthog-js/react";
import { useEffect } from "react";
import { env } from "@formbricks/lib/env.mjs";
const posthogEnabled = env.NEXT_PUBLIC_POSTHOG_API_KEY && env.NEXT_PUBLIC_POSTHOG_API_HOST;
export default function PosthogIdentify({ session }: { session: Session }) {
const posthog = usePostHog();
useEffect(() => {
if (posthogEnabled && session.user && posthog) {
posthog.identify(session.user.id, { name: session.user.name, email: session.user.email });
}
}, [session, posthog]);
return null;
}

View File

@@ -116,7 +116,7 @@ export const getActionCountInLast7DaysAction = async (actionClassId: string, env
return await getActionCountInLast7Days(actionClassId);
};
export const GetActiveInactiveSurveysAction = async (
export const getActiveInactiveSurveysAction = async (
actionClassId: string,
environmentId: string
): Promise<{ activeSurveys: string[]; inactiveSurveys: string[] }> => {

View File

@@ -1,6 +1,6 @@
"use client";
import { CodeBracketIcon, CursorArrowRaysIcon, SparklesIcon } from "@heroicons/react/24/solid";
import { Code2Icon, MousePointerClickIcon, SparklesIcon } from "lucide-react";
import { useEffect, useState } from "react";
import { capitalizeFirstLetter } from "@formbricks/lib/strings";
@@ -11,10 +11,10 @@ import { Label } from "@formbricks/ui/Label";
import LoadingSpinner from "@formbricks/ui/LoadingSpinner";
import {
GetActiveInactiveSurveysAction,
getActionCountInLast7DaysAction,
getActionCountInLast24HoursAction,
getActionCountInLastHourAction,
getActiveInactiveSurveysAction,
} from "../actions";
interface ActivityTabProps {
@@ -49,7 +49,7 @@ export default function EventActivityTab({ actionClass, environmentId }: Activit
getActionCountInLastHourAction(actionClass.id, environmentId),
getActionCountInLast24HoursAction(actionClass.id, environmentId),
getActionCountInLast7DaysAction(actionClass.id, environmentId),
GetActiveInactiveSurveysAction(actionClass.id, environmentId),
getActiveInactiveSurveysAction(actionClass.id, environmentId),
]);
setNumEventsLastHour(numEventsLastHourData);
setNumEventsLast24Hours(numEventsLast24HoursData);
@@ -125,11 +125,11 @@ export default function EventActivityTab({ actionClass, environmentId }: Activit
<div className="mt-1 flex items-center">
<div className="mr-1.5 h-4 w-4 text-slate-600">
{actionClass.type === "code" ? (
<CodeBracketIcon />
<Code2Icon className="h-5 w-5" />
) : actionClass.type === "noCode" ? (
<CursorArrowRaysIcon />
<MousePointerClickIcon className="h-5 w-5" />
) : actionClass.type === "automatic" ? (
<SparklesIcon />
<SparklesIcon className="h-5 w-5" />
) : null}
</div>
<p className="text-sm text-slate-700 ">{capitalizeFirstLetter(actionClass.type)}</p>

View File

@@ -1,6 +1,6 @@
"use client";
import { CursorArrowRaysIcon } from "@heroicons/react/24/solid";
import { MousePointerClickIcon } from "lucide-react";
import { useState } from "react";
import { useMembershipRole } from "@formbricks/lib/membership/hooks/useMembershipRole";
@@ -53,7 +53,7 @@ export default function ActionClassesTable({
onClick={() => {
setAddActionModalOpen(true);
}}>
<CursorArrowRaysIcon className="mr-2 h-5 w-5 text-white" />
<MousePointerClickIcon className="mr-2 h-5 w-5 text-white" />
Add Action
</Button>
</div>

View File

@@ -1,4 +1,4 @@
import { CodeBracketIcon, CursorArrowRaysIcon, SparklesIcon } from "@heroicons/react/24/solid";
import { Code2Icon, MousePointerClickIcon, SparklesIcon } from "lucide-react";
import { TActionClass } from "@formbricks/types/actionClasses";
import { TMembershipRole } from "@formbricks/types/memberships";
@@ -48,11 +48,11 @@ export default function ActionDetailModal({
tabs={tabs}
icon={
actionClass.type === "code" ? (
<CodeBracketIcon />
<Code2Icon className="h-5 w-5" />
) : actionClass.type === "noCode" ? (
<CursorArrowRaysIcon />
<MousePointerClickIcon className="h-5 w-5" />
) : actionClass.type === "automatic" ? (
<SparklesIcon />
<SparklesIcon className="h-5 w-5" />
) : null
}
label={actionClass.name}

View File

@@ -1,4 +1,4 @@
import { CodeBracketIcon, CursorArrowRaysIcon, SparklesIcon } from "@heroicons/react/24/solid";
import { Code2Icon, MousePointerClickIcon, SparklesIcon } from "lucide-react";
import { timeSinceConditionally } from "@formbricks/lib/time";
import { TActionClass } from "@formbricks/types/actionClasses";
@@ -10,11 +10,11 @@ export default function ActionClassDataRow({ actionClass }: { actionClass: TActi
<div className="flex items-center">
<div className="h-5 w-5 flex-shrink-0 text-slate-500">
{actionClass.type === "code" ? (
<CodeBracketIcon />
<Code2Icon className="h-5 w-5" />
) : actionClass.type === "noCode" ? (
<CursorArrowRaysIcon />
<MousePointerClickIcon className="h-5 w-5" />
) : actionClass.type === "automatic" ? (
<SparklesIcon />
<SparklesIcon className="h-5 w-5" />
) : null}
</div>
<div className="ml-4 text-left">

View File

@@ -4,10 +4,7 @@ import {
deleteActionClassAction,
updateActionClassAction,
} from "@/app/(app)/environments/[environmentId]/(actionsAndAttributes)/actions/actions";
import { CssSelector } from "@/app/(app)/environments/[environmentId]/(actionsAndAttributes)/actions/components/CssSelector";
import { InnerHtmlSelector } from "@/app/(app)/environments/[environmentId]/(actionsAndAttributes)/actions/components/InnerHtmlSelector";
import { PageUrlSelector } from "@/app/(app)/environments/[environmentId]/(actionsAndAttributes)/actions/components/PageUrlSelector";
import { TrashIcon } from "@heroicons/react/24/outline";
import { TrashIcon } from "lucide-react";
import { useRouter } from "next/navigation";
import { useState } from "react";
import { useForm } from "react-hook-form";
@@ -16,6 +13,7 @@ import { toast } from "react-hot-toast";
import { getAccessFlags } from "@formbricks/lib/membership/utils";
import { TActionClassInput, TActionClassNoCodeConfig, TNoCodeConfig } from "@formbricks/types/actionClasses";
import { TMembershipRole } from "@formbricks/types/memberships";
import { CssSelector, InnerHtmlSelector, PageUrlSelector } from "@formbricks/ui/Actions";
import { Button } from "@formbricks/ui/Button";
import { DeleteDialog } from "@formbricks/ui/DeleteDialog";
import { Input } from "@formbricks/ui/Input";

View File

@@ -1,16 +1,14 @@
"use client";
import { createActionClassAction } from "@/app/(app)/environments/[environmentId]/(actionsAndAttributes)/actions/actions";
import { CssSelector } from "@/app/(app)/environments/[environmentId]/(actionsAndAttributes)/actions/components/CssSelector";
import { InnerHtmlSelector } from "@/app/(app)/environments/[environmentId]/(actionsAndAttributes)/actions/components/InnerHtmlSelector";
import { PageUrlSelector } from "@/app/(app)/environments/[environmentId]/(actionsAndAttributes)/actions/components/PageUrlSelector";
import { CursorArrowRaysIcon } from "@heroicons/react/24/solid";
import { MousePointerClickIcon } from "lucide-react";
import { Terminal } from "lucide-react";
import { useState } from "react";
import { useForm } from "react-hook-form";
import toast from "react-hot-toast";
import { TActionClass, TActionClassInput, TActionClassNoCodeConfig } from "@formbricks/types/actionClasses";
import { CssSelector, InnerHtmlSelector, PageUrlSelector } from "@formbricks/ui/Actions";
import { Alert, AlertDescription, AlertTitle } from "@formbricks/ui/Alert";
import { Button } from "@formbricks/ui/Button";
import { Input } from "@formbricks/ui/Input";
@@ -157,7 +155,7 @@ export default function AddNoCodeActionModal({
<div className="flex w-full items-center justify-between p-6">
<div className="flex items-center space-x-2">
<div className="mr-1.5 h-6 w-6 text-slate-500">
<CursorArrowRaysIcon />
<MousePointerClickIcon className="h-5 w-5" />
</div>
<div>
<div className="text-xl font-medium text-slate-700">Track New User Action</div>
@@ -226,7 +224,7 @@ export default function AddNoCodeActionModal({
Cancel
</Button>
<Button variant="darkCTA" type="submit" loading={isCreatingAction}>
Track Action
Create Action
</Button>
</div>
</div>
@@ -277,7 +275,7 @@ export default function AddNoCodeActionModal({
Cancel
</Button>
<Button variant="darkCTA" type="submit" loading={isCreatingAction}>
Track Action
Create Action
</Button>
</div>
</div>

View File

@@ -1,4 +1,4 @@
import { CursorArrowRaysIcon } from "@heroicons/react/24/solid";
import { MousePointerClickIcon } from "lucide-react";
import { Button } from "@formbricks/ui/Button";
@@ -9,7 +9,7 @@ export default function Loading() {
<Button
variant="darkCTA"
className="pointer-events-none animate-pulse cursor-not-allowed select-none bg-slate-200">
<CursorArrowRaysIcon className="mr-2 h-5 w-5 text-white" />
<MousePointerClickIcon className="mr-2 h-5 w-5 text-white" />
Loading
</Button>
</div>

View File

@@ -4,22 +4,39 @@ import { getServerSession } from "next-auth";
import { canUserAccessAttributeClass } from "@formbricks/lib/attributeClass/auth";
import { authOptions } from "@formbricks/lib/authOptions";
import { getSurveysByAttributeClassId } from "@formbricks/lib/survey/service";
import { getSegmentsByAttributeClassName } from "@formbricks/lib/segment/service";
import { TAttributeClass } from "@formbricks/types/attributeClasses";
import { AuthorizationError } from "@formbricks/types/errors";
export const GetActiveInactiveSurveysAction = async (
attributeClassId: string
export const getSegmentsByAttributeClassAction = async (
environmentId: string,
attributeClass: TAttributeClass
): Promise<{ activeSurveys: string[]; inactiveSurveys: string[] }> => {
const session = await getServerSession(authOptions);
if (!session) throw new AuthorizationError("Not authorized");
try {
const session = await getServerSession(authOptions);
if (!session) throw new AuthorizationError("Not authorized");
const isAuthorized = await canUserAccessAttributeClass(session.user.id, attributeClassId);
if (!isAuthorized) throw new AuthorizationError("Not authorized");
const isAuthorized = await canUserAccessAttributeClass(session.user.id, attributeClass.id);
if (!isAuthorized) throw new AuthorizationError("Not authorized");
const segments = await getSegmentsByAttributeClassName(environmentId, attributeClass.name);
const surveys = await getSurveysByAttributeClassId(attributeClassId);
const response = {
activeSurveys: surveys.filter((s) => s.status === "inProgress").map((survey) => survey.name),
inactiveSurveys: surveys.filter((s) => s.status !== "inProgress").map((survey) => survey.name),
};
return response;
// segments is an array of segments, each segment has a survey array with objects with properties: id, name and status.
// We need the name of the surveys only and we need to filter out the surveys that are both in progress and not in progress.
const activeSurveys = segments
.map((segment) =>
segment.surveys.filter((survey) => survey.status === "inProgress").map((survey) => survey.name)
)
.flat();
const inactiveSurveys = segments
.map((segment) =>
segment.surveys.filter((survey) => survey.status !== "inProgress").map((survey) => survey.name)
)
.flat();
return { activeSurveys, inactiveSurveys };
} catch (err) {
console.log(err);
throw err;
}
};

View File

@@ -1,5 +1,5 @@
import SecondNavbar from "@/app/(app)/environments/[environmentId]/(actionsAndAttributes)/attributes/components/SecondNavbar";
import { CursorArrowRaysIcon, TagIcon } from "@heroicons/react/24/solid";
import { MousePointerClickIcon, TagIcon } from "lucide-react";
interface ActionsAttributesTabsProps {
activeId: string;
@@ -11,13 +11,13 @@ export default function ActionsAttributesTabs({ activeId, environmentId }: Actio
{
id: "actions",
label: "Actions",
icon: <CursorArrowRaysIcon />,
icon: <MousePointerClickIcon className="h-5 w-5" />,
href: `/environments/${environmentId}/actions`,
},
{
id: "attributes",
label: "Attributes",
icon: <TagIcon />,
icon: <TagIcon className="h-5 w-5" />,
href: `/environments/${environmentId}/attributes`,
},
];

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