Compare commits

..

1 Commits

Author SHA1 Message Date
Matthias Nannt
133691facb feature: support arm architecture with docker images 2023-12-14 12:02:42 +01:00
278 changed files with 3423 additions and 9578 deletions

View File

@@ -1,5 +1,5 @@
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=20
ARG VARIANT=18-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
# [Optional] Uncomment this section to install additional OS packages.
@@ -13,4 +13,4 @@ FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
# [Optional] Uncomment if you want to install more global node modules
# RUN su node -c "npm install -g <your-package-list-here>"
RUN su node -c "npm install -g pnpm"
RUN su node -c "npm install -g pnpm"

View File

@@ -2,27 +2,29 @@
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/javascript-node-postgres
// Update the VARIANT arg in docker-compose.yml to pick a Node.js version
{
"name": "Node.js & PostgreSQL",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
"name": "Node.js & PostgreSQL",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": ["dbaeumer.vscode-eslint"]
}
},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// This can be used to network with other containers or with the host.
"forwardPorts": [3000, 5432, 8025],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// This can be used to network with other containers or with the host.
"forwardPorts": [3000, 5432, 8025],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "cp .env.example .env && sed -i '/^ENCRYPTION_KEY=/c\\ENCRYPTION_KEY='$(openssl rand -hex 32) .env && sed -i '/^NEXTAUTH_SECRET=/c\\NEXTAUTH_SECRET='$(openssl rand -hex 32) .env && pnpm install && pnpm db:migrate:dev",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pnpm install",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
}

View File

@@ -6,10 +6,10 @@ services:
context: .
dockerfile: Dockerfile
args:
# Update 'VARIANT' to pick an LTS version of Node.js: 20, 18, 16, 14.
# Update 'VARIANT' to pick an LTS version of Node.js: 18, 16, 14.
# Append -bullseye or -buster to pin to an OS version.
# Use -bullseye variants on local arm64/Apple Silicon.
VARIANT: "20"
VARIANT: "18"
volumes:
- ..:/workspace:cached
@@ -33,7 +33,7 @@ services:
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: formbricks
POSTGRES_DB: postgres
# Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)

View File

@@ -1,3 +1,4 @@
/*
########################################################################
# ------------ MANDATORY (CHANGE ACCORDING TO YOUR SETUP) ------------#
########################################################################
@@ -63,10 +64,10 @@ SMTP_PASSWORD=smtpPassword
#####################
# Email Verification. If you enable Email Verification you have to setup SMTP-Settings, too.
EMAIL_VERIFICATION_DISABLED=1
# EMAIL_VERIFICATION_DISABLED=1
# Password Reset. If you enable Password Reset functionality you have to setup SMTP-Settings, too.
PASSWORD_RESET_DISABLED=1
# PASSWORD_RESET_DISABLED=1
# Signup. Disable the ability for new users to create an account.
# SIGNUP_DISABLED=1
@@ -105,10 +106,6 @@ CRON_SECRET=
# Configure this when you want to ship JS & CSS files from a complete URL instead of the current domain
# ASSET_PREFIX_URL=
# Oauth credentials for Notion Integration
NOTION_OAUTH_CLIENT_ID=
NOTION_OAUTH_CLIENT_SECRET=
# Stripe Billing Variables
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
@@ -137,3 +134,5 @@ ENTERPRISE_LICENSE_KEY=
# set to 1 to skip onboarding for new users
# ONBOARDING_DISABLED=1
*/

View File

@@ -25,7 +25,7 @@ jobs:
- name: create .env
run: cp .env.example .env
- name: Generate Random ENCRYPTION_KEY
- name: Generate Random NEXTAUTH_SECRET
run: |
SECRET=$(openssl rand -hex 32)
echo "ENCRYPTION_KEY=$SECRET" >> $GITHUB_ENV

View File

@@ -20,9 +20,6 @@ jobs:
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Build Formricks JS package
run: pnpm build --filter=js
- name: Build Formbricks Image & Run
run: docker-compose up -d

View File

@@ -89,7 +89,7 @@ jobs:
with:
context: .
file: ./apps/web/Dockerfile
# platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@@ -29,11 +29,6 @@ jobs:
- name: create .env
run: cp .env.example .env
- name: Generate Random ENCRYPTION_KEY
run: |
SECRET=$(openssl rand -hex 32)
echo "ENCRYPTION_KEY=$SECRET" >> $GITHUB_ENV
- name: Build formbricks-js dependencies
run: pnpm build --filter=js

View File

@@ -11,35 +11,55 @@
<h3 align="center">Formbricks</h3>
<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>
</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>
<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://flixbus.com"><img src="https://github.com/formbricks/formbricks/assets/72809645/d6c91d89-7633-4845-ae1e-03bbd2ce0946" height="35px"></a>
<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>
<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>
## ✨ About Formbricks

View File

@@ -12,7 +12,7 @@
},
"dependencies": {
"@formbricks/js": "workspace:*",
"@heroicons/react": "^2.1.1",
"@heroicons/react": "^2.0.18",
"next": "14.0.4",
"react": "18.2.0",
"react-dom": "18.2.0"

View File

@@ -74,7 +74,7 @@ export default function AppPage({}) {
</p>
<Image src={fbsetup} alt="fb setup" className="mt-4 rounded" priority />
<div className="mt-4 flex-col items-start text-sm text-slate-700 sm:flex sm:items-center sm:text-base dark:text-slate-300">
<div className="mt-4 flex-col items-start text-sm text-slate-700 dark:text-slate-300 sm:flex sm:items-center sm:text-base">
<p className="mb-1 sm:mb-0 sm:mr-2">You&apos;re connected with env:</p>
<div className="flex items-center">
<strong className="w-32 truncate sm:w-auto">

View File

@@ -218,7 +218,7 @@ This set of API can be used to
<CodeGroup title="Request" tag="DELETE" label="/api/v1/client/responses/<response-id>">
```bash {{ title: 'cURL' }}
curl -X DELETE https://app.formbricks.com/api/v1/management/responses/<response-id> \
curl -X DELETE https://app.formbricks.com/api/v1/management/resposnes/<response-id> \
--header 'x-api-key: <your-api-key>'
```

View File

@@ -1,22 +1,21 @@
import Image from "next/image";
import GitpodPorts from "./gitpod/ports.webp";
import GitpodAuth from "./gitpod/auth.webp";
import GitpodNewWorkspace from "./gitpod/new-workspace.webp";
import GitpodPorts from "./gitpod/ports.webp";
import GitpodPreparing from "./gitpod/preparing.webp";
import GitpodRunning from "./gitpod/running.webp";
import GithubCodespaceEnvFile from "./github-codespaces/env.webp";
import GithubCodespaceLoading from "./github-codespaces/loading.webp";
import GithubCodespaceNew from "./github-codespaces/new.webp";
import GithubCodespacePorts from "./github-codespaces/ports.webp";
import GithubCodespaceRun from "./github-codespaces/run.webp";
import GithubCodespaceLoading from "./github-codespaces/loading.webp";
import GithubCodespaceEnvFile from "./github-codespaces/env.webp";
import GithubCodespaceTerminal from "./github-codespaces/terminal.webp";
import GithubCodespaceRun from "./github-codespaces/run.webp";
import GithubCodespacePorts from "./github-codespaces/ports.webp";
export const metadata = {
title: "Formbricks Development Setup: Complete Guide to Local Environment Configuration for Dev",
description:
"Step-by-step guide to setting up a development environment for Formbricks. We officially support Gitpod and Github Codespaces for quick setup. Our advanced users can also setup Formbricks locally on their machine.",
"Step-by-step guide to setting up a development environment for Formbricks. We officially support Gitpod and Github Codespaces for quick setup.",
};
#### Contributing
@@ -26,29 +25,28 @@ export const metadata = {
We currently officially support the below methods to set up your development environment for Formbricks.
<Note>
Both the below cloud IDEs have a **generous free tier** to explore and develop! But make sure to not overuse
the machines as Formbricks will not be responsible for any charges incurred.
Both the below cloud IDEs have a **generous free tier** to explore and develop! But make sure to
not overuse the machines as Formbricks will not be responsible for any charges incurred.
</Note>
### [GitPod](#gitpod)
This will open a fully configured workspace in your browser with all the necessary dependencies already installed. Click the button below to open this project in Gitpod. For a detailed guide, visit the [Gitpod Setup Guide](#gitpod-guide) section below.
This will open a fully configured workspace in your browser with all the necessary dependencies already installed. Click the button below to open this project in Gitpod:
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://Github.com/formbricks/formbricks)
### [Github Codespaces](#Github-codespaces)
For a detailed guide, visit the [Gitpod Setup Guide](#gitpod-guide) section below.
This will open a Github VSCode Interface on the cloud for you. This setup will have the Formbricks codebase and all the dependencies installed. Click the button below to configure your instance and open the project in Github Codespaces. For a detailed guide, visit the [Github Codespaces Setup Guide](#github-codespaces-guide) section below.
### [Github Codespaces](#Github-codespaces)
This will open a Github VSCode Interface on the cloud for you. This setup will have the Formbricks codebase and all the dependencies installed. Click the button below to configure your instance and open the project in Github Codespaces:
[![Open in Github Codespaces](https://img.shields.io/badge/Open%20in-Github%20Codespaces-blue?logo=Github)](https://Github.com/codespaces/new?machine=standardLinux32gb&repo=500289888&ref=main&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=EastUs2)
### [Local Machine](#local-machine-setup)
This will install the Formbricks codebase and all the dependencies on your local machine. Note that this method is recommended **only for advanced users**. If you're an advanced user, access the steps for [Local Machine Setup here](#local-machine-setup).
For a detailed guide, visit the [Github Codespaces Setup Guide](#github-codespaces-guide) section below.
<Note>
For a smooth experience, we suggest the above cloud IDE methods. Assistance with setup issues on your local
machine may be limited due to varying factors like OS and permissions.
For a smooth experience, we suggest the above recommended methods.
Assistance with setup issues on your local machine may be limited due to varying factors like OS and permissions.
</Note>
## Gitpod Guide
@@ -56,16 +54,16 @@ This will install the Formbricks codebase and all the dependencies on your local
**Building custom image for the workspace:**
- This includes : Installing `yq` and `turbo` globally before the workspace starts. This is accomplished within the `.gitpod.Dockerfile` along with starting upon a base custom image building on [workspace-full](https://hub.docker.com/r/gitpod/workspace-full/dockerfile).
**Initialization of Formbricks:**
**Initialization of Formbricks:**
- During the prebuilds phase, we initialize Formbricks by performing the following tasks:
1. Setting up environment variables.
2. Installing monorepo dependencies.
3. Installing Docker images by extracting them from the `packages/database/docker-compose.yml` file.
4. Building the @formbricks/js component.
- When the workspace starts:
1. Wait for the web and demo apps to launch on Gitpod. This automatically opens the `apps/demo/.env` file. Utilize dynamic localhost URLs (e.g., `localhost:3000` for signup and `localhost:8025` for email confirmation) to configure `NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID`. After creating your account and finding the `ID` in the URL at `localhost:3000`, replace `YOUR_ENVIRONMENT_ID` in the `.env` file located in `app/demo`.
1. Wait for the web and demo apps to launch on Gitpod. This automatically opens the `apps/demo/.env` file. Utilize dynamic localhost URLs (e.g., `localhost:3000` for signup and `localhost:8025` for email confirmation) to configure `NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID`. After creating your account and finding the `ID` in the URL at `localhost:3000`, replace `YOUR_ENVIRONMENT_ID` in the `.env` file located in `app/demo`.
**Web Component Initialization:**
**Web Component Initialization:**
- we initialize the @formbricks/web component during prebuilds. This involves:
1. Installing build dependencies for the `@formbricks/web#go` task from turbo.json in prebuilds to save time.
2. Starting PostgreSQL and Mailhog containers for running migrations in prebuilds.
@@ -75,131 +73,95 @@ This will install the Formbricks codebase and all the dependencies on your local
2. Replacing `NEXT_PUBLIC_WEBAPP_URL` and `NEXTAUTH_URL` to take in Gitpod URL's ports when running on VSCode browser.
3. Starting the `@formbricks/web` dev environment.
**Demo Component Initialization:**
**Demo Component Initialization:**
- Similar to the web component, the demo component is also initialized during prebuilds. This includes:
1. Installing build dependencies for the `formbricks/demo#go` task from turbo.json in prebuilds to save time.
2. Caching hits and replaying builds from the `@formbricks/js` component.
- When the workspace starts:
- When the workspace starts:
1. Initializing environment variables.
2. Replaces `NEXT_PUBLIC_FORMBRICKS_API_HOST` to take in Gitpod URL's ports when running on VSCode browser.
3. Starting the `@formbricks/demo` dev environment.
**Github Prebuilds Configuration:**
**Github Prebuilds Configuration:**
- This configures Github Prebuilds for the master branch, pull requests, and adding comments. This helps automate the prebuild process for the specified branches and actions.
**VSCode Extensions:**
**VSCode Extensions:**
- This includes a list of VSCode extensions that are added to the configuration when using Gitpod. These extensions can enhance the development experience within Gitpod.
### 1. Browser Redirection
After clicking the one-click setup button, Gitpod will open a new tab or window. Please ensure that your browser allows redirection to successfully access the services:
### 2. Authorizing in Gitpod
<Image src={GitpodAuth} alt="Gitpod Auth Page" quality="100" className="max-w-full rounded-lg sm:max-w-3xl" />-
This is the Gitpod Authentication Page. It appears when you click the "Open in GitPod" button and Gitpod needs
to authenticate your access to the workspace. Click on 'Continue With Github' to authorize your GitPod session.
<Image src={GitpodAuth} alt="Gitpod Auth Page" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" />
- This is the Gitpod Authentication Page. It appears when you click the "Open in GitPod" button and Gitpod needs to authenticate your access to the workspace. Click on 'Continue With Github' to authorize your GitPod session.
### 3. Creating a New Workspace
<Image src={GitpodNewWorkspace} alt="Gitpod New workspace Page" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" />
- After authentication, Gitpod asks to create a new workspace for you. This page displays the configurations of your workspace.
- You can use either choose either VS Code Browser or VS Code Desktop editor with the 'Standard Class' for your workspace class.
- If you opt for the VS Code Desktop, follow the following steps
1. Gitpod will prompt you to grant access to the VSCode app. Once approved, install the GitPod extension from the VSCode Marketplace and follow the prompts to authorize the integration.
2. Change the `WEBAPP_URL` and the `NEXTAUTH_URL` to `https://localhost:3000`
<Image
src={GitpodNewWorkspace}
alt="Gitpod New workspace Page"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
- After authentication, Gitpod asks to create a new workspace for you. This page displays the configurations of
your workspace. - You can use either choose either VS Code Browser or VS Code Desktop editor with the 'Standard
Class' for your workspace class. - If you opt for the VS Code Desktop, follow the following steps 1. Gitpod will
prompt you to grant access to the VSCode app. Once approved, install the GitPod extension from the VSCode Marketplace
and follow the prompts to authorize the integration. 2. Change the `WEBAPP_URL` and the `NEXTAUTH_URL` to `https://localhost:3000`
### 4. Gitpod preparing the created Workspace
<Image
src={GitpodPreparing}
alt="Gitpod Preparing workspace Page"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
- Gitpod is preparing your workspace with all the necessary dependencies and configurations. You will see this
page while Gitpod sets up your development environment.
<Image src={GitpodPreparing} alt="Gitpod Preparing workspace Page" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" />
- Gitpod is preparing your workspace with all the necessary dependencies and configurations. You will see this page while Gitpod sets up your development environment.
### 5. Gitpod running the Workspace
<Image
src={GitpodRunning}
alt="Gitpod Running Workspace Page"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
- Once the workspace is fully prepared, voila, it enters the running state. You can start working on your project
in this environment.
<Image src={GitpodRunning} alt="Gitpod Running Workspace Page" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" />
- Once the workspace is fully prepared, voila, it enters the running state. You can start working on your project in this environment.
### Ports and Services
Here are the ports and corresponding URLs for the services within your Gitpod environment:
- **Port 3000**:
- **Service**: Demo App
- **Description**: This port hosts the demo application of your project. You can access and interact with your application's demo by navigating to this port.
- **Service**: Demo App
- **Description**: This port hosts the demo application of your project. You can access and interact with your application's demo by navigating to this port.
- **Port 3001**:
- **Service**: Formbricks website
- **Description**: This port hosts the [Formbricks](https://formbricks.com) website, which contains documents, pricing, blogs, best practices, and concierge service.
- **Service**: Formbricks website
- **Description**: This port hosts the [Formbricks](https://formbricks.com) website, which contains documents, pricing, blogs, best practices, and concierge service.
- **Port 3002**:
- **Service**: Formbricks In-product Survey Demo App
- **Description**: This app helps you test your in-app surveys. You can create and test user actions, create and update user attributes, etc.
- **Service**: Formbricks In-product Survey Demo App
- **Description**: This app helps you test your in-app surveys. You can create and test user actions, create and update user attributes, etc.
- **Port 5432**:
- **Service**: PostgreSQL Database Server
- **Description**: The PostgreSQL DB is hosted on this port.
- **Service**: PostgreSQL Database Server
- **Description**: The PostgreSQL DB is hosted on this port.
- **Port 1025**:
- **Service**: SMPT server
- **Description**: SMTP Server for sending and receiving email messages. This server is responsible for handling email communication.
- **Service**: SMPT server
- **Description**: SMTP Server for sending and receiving email messages. This server is responsible for handling email communication.
- **Port 8025**:
- **Service**: Mailhog
- **Service**: Mailhog
### Accessing port URLs
1. **Direct URL Composition**:
- You can access the dedicated port URL by pre-pending the port number to the workspace URL.
- For example, if you want to access port 3000, you can use the URL format: `3000-yourworkspace.ws-eu45.gitpod.io`.
1. **Direct URL Composition**:
2. **Using [gp CLI](https://www.gitpod.io/docs/references/gitpod-cli)**:
- Gitpod provides a convenient command, `gp url`, to quickly retrieve the URL for a specific port.
- Simply use the command followed by the desired port number. For example, to get the URL for port 3000, run: `gp url 3000`.
- You can access the dedicated port URL by pre-pending the port number to the workspace URL.
- For example, if you want to access port 3000, you can use the URL format: `3000-yourworkspace.ws-eu45.gitpod.io`.
3. **Listing All Open Port URLs**:
- If you prefer to see a list of all open port URLs at once, you can use the `gp ports list` command.
- Running this command will display a list of ports along with their corresponding URLs.
2. **Using [gp CLI](https://www.gitpod.io/docs/references/gitpod-cli)**:
4. **Viewing All Ports in Panel**:
- Gitpod also offers a user-friendly 'Ports' tab in the Gitpod panel.
- Click on the 'Ports' tab to view a list of all open ports and their respective URLs.
- Gitpod provides a convenient command, `gp url`, to quickly retrieve the URL for a specific port.
- Simply use the command followed by the desired port number. For example, to get the URL for port 3000, run: `gp url 3000`.
<Image src={GitpodPorts} alt="Gitpod Ports tab" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" />
3. **Listing All Open Port URLs**:
- If you prefer to see a list of all open port URLs at once, you can use the `gp ports list` command.
- Running this command will display a list of ports along with their corresponding URLs.
4. **Viewing All Ports in Panel**:
- Gitpod also offers a user-friendly 'Ports' tab in the Gitpod panel.
- Click on the 'Ports' tab to view a list of all open ports and their respective URLs.
{" "}
<Image
src={GitpodPorts}
alt="Gitpod Ports tab"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
These URLs and port numbers represent various services and endpoints within your Gitpod environment. You can access and interact with these services by the Port URL for the respective service.
These URLs and port numbers represent various services and endpoints within your Gitpod environment. You can access and interact with these services by the Port URL for the respective service.
---
@@ -207,41 +169,21 @@ These URLs and port numbers represent various services and endpoints within your
1. After clicking the one-click setup button, you will be redirected to the Github Codespaces page. Review the configuration and click on the 'Create Codespace' button to create a new Codespace.
<Image
src={GithubCodespaceNew}
alt="New Github Codespace"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<Image src={GithubCodespaceNew} alt="New Github Codespace" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" />
2. This will start loading the Codespace. Keep in mind this might take a few minutes to complete depending on your internet connection and the instance availability.
<Image
src={GithubCodespaceLoading}
alt="Loading Github Codespace"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<Image src={GithubCodespaceLoading} alt="Loading Github Codespace" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" />
3. Once the Codespace is loaded, you will be redirected to the VSCode editor. You can start working on your project in this environment.
4. Make the changes you want to, and now, to run the app, we first need to configure the .env file. Copy the .env.example and edit the variables as mentioned in the file itself.
<Image
src={GithubCodespaceEnvFile}
alt="Github Codespace Env File"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<Image src={GithubCodespaceEnvFile} alt="Github Codespace Env File" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" />
5. Once you have configured the .env, it's now time to run the app and see the changes. Lets open the terminal first
<Image
src={GithubCodespaceTerminal}
alt="Github Codespace Open Terminal"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<Image src={GithubCodespaceTerminal} alt="Github Codespace Open Terminal" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" />
6. Now, run the following command to run the app
@@ -255,12 +197,7 @@ pnpm dev
</CodeGroup>
</Col>
<Image
src={GithubCodespaceRun}
alt="Run on Github Codespace"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<Image src={GithubCodespaceRun} alt="Run on Github Codespace" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" />
7. Monitor the logs in the terminal and once you see the following, you are good to go!
@@ -273,7 +210,7 @@ pnpm dev
@formbricks/web:dev: - Environments: .env
@formbricks/web:dev: - Experiments (use at your own risk):
@formbricks/web:dev: · serverActions
@formbricks/web:dev:
@formbricks/web:dev:
@formbricks/web:dev: ✓ Ready in 9.4s
```
@@ -282,123 +219,10 @@ pnpm dev
8. Right next to the Terminal, you will see a **Ports** tab, click on it to see the ports and their respective URLs. Now access the Forwarded Address for port 3000 and you should be able to visit your Formbricks App!
<Image
src={GithubCodespacePorts}
alt="Github Codespace Ports"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<Image src={GithubCodespacePorts} alt="Github Codespace Ports" quality="100" className="rounded-lg max-w-full sm:max-w-3xl" />
Now make the changes you want to and see them live in action!
---
## Local Machine Setup
<Note>
The below only works for **Mac**, **Linux** & **WSL2** on Windows (not on pure Windows)!
This method is recommended **only for advanced users** & we won't be able to provide official support for this.
</Note>
To get the project running locally on your machine you need to have the following development tools installed:
- Node.JS (we recommend v20)
- [pnpm](https://pnpm.io/)
- [Docker](https://www.docker.com/) (to run PostgreSQL / MailHog)
1. Clone the project & move into the directory:
<Col>
<CodeGroup title="Git clone Formbricks monorepo">
```bash
git clone https://github.com/formbricks/formbricks && cd formbricks
```
</CodeGroup>
</Col>
2. Install Node.JS packages via pnpm. Don't have pnpm? Get it [here](https://pnpm.io/installation)
<Col>
<CodeGroup title="Install dependencies via pnpm">
```bash
pnpm install
```
</CodeGroup>
</Col>
3. Create a `.env` file based on `.env.example`. It's already preset to work with the local development setup but you can also change values if needed.
<Col>
<CodeGroup title="Define environment variables">
```bash
cp .env.example .env
```
</CodeGroup>
</Col>
4. Generate & set some secret values mandatory for the ENCRYPTION_KEY & NEXTAUTH_SECRET in the .env file. You can use the following command to generate the random string of required length:
<Col>
<CodeGroup title="Set value of ENCRYPTION_KEY">
```bash
sed -i '/^ENCRYPTION_KEY=/c\ENCRYPTION_KEY='$(openssl rand -hex 32) .env
sed -i '/^NEXTAUTH_SECRET=/c\NEXTAUTH_SECRET='$(openssl rand -hex 32) .env
```
</CodeGroup>
</Col>
5. Make sure you have [`Docker`](https://docs.docker.com/compose/) & [`docker-compose`](https://docs.docker.com/compose/) installed and running on your machine. Then run the following command to start the Formbricks dev setup:
<Col>
<CodeGroup title="Start Formbricks Dev Setup">
```bash
pnpm go
```
</CodeGroup>
</Col>
This starts the Formbricks main app (plus all its dependencies) as well as the following services using Docker:
- a `postgres` container for hosting your database,
- a `mailhog` container that acts as a mock SMTP server and shows received mails in a web UI (forwarded to your host's `localhost:8025`)
- Demo App at [http://localhost:3002](http://localhost:3002)
- Landing Page at [http://localhost:3001](http://localhost:3001)
**You can now access the Formbricks app on [http://localhost:3000](http://localhost:3000)**. You will be automatically redirected to the login. To use your local installation of formbricks, create a new account.
{" "}
<Note>
A fresh setup does not have a default account. Please create a new account and proceed accordingly.
</Note>
For viewing the emails sent by the system, you can access mailhog at [http://localhost:8025](http://localhost:8025)
### Build
To build all apps and packages and check for build errors, run the following command:
<Col>
<CodeGroup title="Build Formbricks stack">
```bash
pnpm build
```
</CodeGroup>
</Col>
---
Still cant figure it out? Join our [Discord](https://discord.com/invite/3YFcABF2Ts)!
Still cant figure it out? Join our [Discord](https://discord.com/invite/3YFcABF2Ts)!

View File

@@ -45,7 +45,7 @@ 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)}();
!function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://unpkg.com/@formbricks/js@^1.2.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 -->
```

View File

@@ -10,9 +10,8 @@ import DeleteConnection from "./delete-connection.webp";
import Image from "next/image";
export const metadata = {
title: "Google Sheets",
description:
"The Google Sheets integration allows you to automatically send responses to a Google Sheet of your choice.",
title: "n8n Setup",
description: "Wire up Formbricks with n8n and 350+ other apps",
};
#### Integrations
@@ -63,7 +62,7 @@ Before the next step, make sure that you have a Formbricks Survey with at least
</Note>
5. Now click on the "Link New Sheet" button to link a new Google Sheet with Formbricks and a modal will open up.
6. Now click on the "Link New Sheet" button to link a new Google Sheet with Formbricks and a modal will open up.
<Image
src={LinkSurveyWithSheet}
@@ -72,16 +71,17 @@ Before the next step, make sure that you have a Formbricks Survey with at least
className="max-w-full rounded-lg sm:max-w-3xl"
/>
6. Select the Google Sheet you want to link with Formbricks and the Survey. On doing so, you will be asked with what questions' responses you want to feed in the Google Sheet. Select the questions and click on the "Link Sheet" button.
7. Select the Google Sheet you want to link with Formbricks and the Survey. On doing so, you will be asked with what questions' responses you want to feed in the Google Sheet. Select the questions and click on the "Link Sheet" button.
<Image
src={LinkWithQuestions}
alt="Select question to link with Google Sheet"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
7. On submitting, the modal will close and you will see the linked Google Sheet in the list of linked Google Sheets.
8. On submitting, the modal will close and you will see the linked Google Sheet in the list of linked Google Sheets.
<Image
src={ListLinkedSurveys}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 653 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 498 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 836 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 KiB

View File

@@ -1,126 +0,0 @@
import IntegrationsTab from "./images/integrations-tab.png";
import ConnectWithNotion from "./images/connect-with-notion.png";
import NotionConnected from "./images/notion-connected.png";
import LinkSurveyWithDatabase from "./images/link-survey-with-database.png";
import LinkWithDatabases from "./images/link-with-databases.png";
import ListLinkedDatabases from "./images/list-linked-databases.png";
import DeleteConnection from "./images/delete-connection.png";
import Image from "next/image";
export const metadata = {
title: "Notion",
description:
"The notion integration allows you to automatically send responses to a Notion database of your choice.",
};
#### Integrations
# Notion
The notion integration allows you to automatically send responses to a Notion database of your choice.
<Note>
This feature is enabled by default in Formbricks Cloud but needs to be self-configured when running a
self-hosted version of Formbricks.
</Note>
## Formbricks Cloud
1. Go to the Integrations tab in your [Formbricks Cloud dashboard](https://app.formbricks.com/) and click on the "Connect" button under Notion integration.
<Image
src={IntegrationsTab}
alt="Formbricks Integrations Tab"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
2. Now click on the "Connect with Notion" button to authenticate yourself with Notion.
<Image
src={ConnectWithNotion}
alt="Connect Formbricks with your Notion account"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
3. You will now be taken to the Notion OAuth page where you can select the Notion account you want to use for the integration
4. Once you have selected the account and databases and completed the authentication and authorization process, you will be taken back to Formbricks Cloud and see the connected status as below:
<Image
src={NotionConnected}
alt="Formbricks is now connected with Notion"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
<Note>
Before the next step, make sure that you have a Formbricks Survey with at least one question and a Notion
database in the Notion account you integrated.
</Note>
5. Now click on the "Link New Database" button to link a new Notion database with Formbricks and a modal will open up.
<Image
src={LinkSurveyWithDatabase}
alt="Link Formbricks with a Notion database"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
6. Select the Notion database you want to link with Formbricks and the Survey. On doing so, you will be asked to map formbricks' survey questions with selected databases' column. Complete the mapping and click on the "Link Database" button.
<Image
src={LinkWithDatabases}
alt="Question to notion database column mapping"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
7. On submitting, the modal will close and you will see the linked Notion database in the list of linked Notion databases.
<Image
src={ListLinkedDatabases}
alt="List of linked notion databases"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
Congratulations! You have successfully linked a Notion database with Formbricks. Now whenever a response is submitted for the linked Survey, it will be automatically added to the linked Notion database.
## Setup in self-hosted Formbricks
Enabling the Notion Integration in a self-hosted environment requires a setup using Notion account and changing the environment variables of your Formbricks instance.
1. Sign up for a [Notion](https://www.notion.so/) account, if you don't have one already.
2. Go to the [my integrations](https://www.notion.so/my-integrations) page and click on **New integration**.
3. Fill up the basic information like **Name**, **Logo** and click on **Submit**.
4. Now, click on **Distribution** tab on the sidebar. A text will appear which will ask you to make the integration public. Click on that toggle button. A form will appear below the text.
5. Now provide it the details such as requested. Under **Redirect URIs** field:
- If you are running formbricks locally, you can enter `http://localhost:3000/api/v1/integrations/notion/callback`.
- Or, you can enter `https://<your-public-facing-url>/api/v1/integrations/notion/callback`
6. Once you've filled all the necessary details, click on **Submit**.
7. A screen will appear which will have **Client ID**, **Client secret** and **Authorization URL**. Copy them and set them as the environment variables in your Formbricks instance as:
- `NOTION_OAUTH_CLIENT_ID` - OAuth Client ID
- `NOTION_OAUTH_CLIENT_SECRET` - OAuth Client Secret
Voila! You have successfully enabled the Notion integration in your self-hosted Formbricks instance. Now you can follow the steps mentioned in the [Formbricks Cloud](#formbricks-cloud) section to link a Notion database with Formbricks.
## Remove Integration with Notion Account
To remove the integration with Notion Account,
1. Visit the Integrations tab in your Formbricks Cloud dashboard.
2. Select "Manage" button in the Notion card.
3. Click on the "Connected with `<your-workspace-name-here`> Workspace" just before the "Link new Database" button.
4. It will now ask for a confirmation to remove the integration. Click on the "Delete" button to remove the integration. You can always come back and connect again with the same Notion Account.
<Image
src={DeleteConnection}
alt="Delete Notion Integration with Formbricks"
quality="100"
className="max-w-full rounded-lg sm:max-w-3xl"
/>
Still struggling or something not working as expected? [Join our Discord!](https://formbricks.com/discord) and we'd be glad to assist you!

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -1,11 +1,3 @@
import Image from "next/image";
import FormBuilder from "./form-builder.webp";
import Targeting from "./targeting.webp";
import Trigger from "./trigger.webp";
import integrations from "./integrations.webp";
import Analytics from "./analytics.webp";
export const metadata = {
title: "Inside Look: Formbricks In-Product Micro-Surveys",
description:
@@ -29,49 +21,14 @@ Formbricks is a powerful platform designed to help you create and manage in-prod
The Form Builder is where you create and customize your micro-surveys. With its intuitive drag-and-drop interface, you can easily add different question types, set response options, and apply your branding to the survey forms. The Form Builder allows you to preview your survey in real-time, ensuring it looks and feels perfect for your users.
<Image
src={FormBuilder}
alt="Create & Customize Surveys No Code with Formbricks"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
## Targeting & Triggers
Formbricks offers fine-grained user targeting and event-based triggers to help you display your surveys to the most relevant audience. Using the platform, you can define user segments based on attributes and behaviors, and set up triggers to show your surveys at specific moments within your product. This ensures that you're capturing the most accurate and valuable feedback possible.
<Image
src={Targeting}
alt="Targeting & Triggers with Formbricks"
quality="100"
className="rounded-lg w-full sm:max-w-3xl"
/>
<Image
src={Trigger}
alt="Targeting & Triggers with Formbricks"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
## Integration
Integrating Formbricks into your web or mobile application is a breeze. With SDKs for popular web frameworks like React, and an HTML snippet for non-framework based websites, you can quickly add Formbricks to your project. The provided code snippets make it easy to initialize the Formbricks widget and configure it to communicate with your backend.
<Image
src={integrations}
alt="Integrations with Formbricks"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>
## Analytics & Insights
Formbricks provides powerful analytics and insights to help you understand user responses and make data-driven decisions. The platform aggregates survey results and presents them in an easy-to-understand format, enabling you to identify trends, spot issues, and uncover opportunities for improvement. With Formbricks, you're always one step ahead in understanding your users and optimizing your product experience.
<Image
src={Analytics}
alt="Analytics & Insights with Formbricks"
quality="100"
className="rounded-lg max-w-full sm:max-w-3xl"
/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

View File

@@ -73,7 +73,7 @@ const bestPractices: Array<BestPractice> = [
function BestPracticeIcon({ icon: Icon }: { icon: BestPractice["icon"] }) {
return (
<div className="dark:bg-white/7.5 flex h-7 w-7 items-center justify-center rounded-full bg-slate-900/5 ring-1 ring-slate-900/25 backdrop-blur-[2px] transition duration-300 group-hover:bg-white/50 group-hover:ring-slate-900/25 dark:ring-white/15 dark:group-hover:bg-emerald-300/10 dark:group-hover:ring-emerald-400">
<div className="dark:bg-white/7.5 dark:ring-white/15 flex h-7 w-7 items-center justify-center rounded-full bg-slate-900/5 ring-1 ring-slate-900/25 backdrop-blur-[2px] transition duration-300 group-hover:bg-white/50 group-hover:ring-slate-900/25 dark:group-hover:bg-emerald-300/10 dark:group-hover:ring-emerald-400">
<Icon className="h-5 w-5 fill-slate-700/10 stroke-slate-700 transition-colors duration-300 group-hover:stroke-slate-900 dark:fill-white/10 dark:stroke-slate-400 dark:group-hover:fill-emerald-300/10 dark:group-hover:stroke-emerald-400" />
</div>
);
@@ -157,7 +157,7 @@ export default function BestPractices() {
<Heading level={2} id="resources">
Best Practices
</Heading>
<div className="not-prose mt-4 grid grid-cols-1 gap-8 border-t border-slate-900/5 pt-10 sm:grid-cols-2 xl:grid-cols-4 dark:border-white/5">
<div className="not-prose mt-4 grid grid-cols-1 gap-8 border-t border-slate-900/5 pt-10 dark:border-white/5 sm:grid-cols-2 xl:grid-cols-4">
{bestPractices.map((resource) => (
<BestPractice key={resource.href} resource={resource} />
))}

View File

@@ -89,7 +89,7 @@ function SmallPrint() {
const currentYear = new Date().getFullYear();
return (
<div className="flex flex-col items-center justify-between gap-5 border-t border-slate-900/5 pt-8 sm:flex-row dark:border-white/5">
<div className="flex flex-col items-center justify-between gap-5 border-t border-slate-900/5 pt-8 dark:border-white/5 sm:flex-row">
<p className="text-xs text-slate-600 dark:text-slate-400">
Formbricks GmbH &copy; {currentYear}. All rights reserved.
</p>

View File

@@ -31,7 +31,7 @@ export function GettingStarted() {
<Heading level={2} id="getting-started">
Quick Resources
</Heading>
<div className="not-prose mt-4 grid grid-cols-1 gap-8 border-t border-slate-900/5 pt-10 sm:grid-cols-2 xl:grid-cols-4 dark:border-white/5">
<div className="not-prose mt-4 grid grid-cols-1 gap-8 border-t border-slate-900/5 pt-10 dark:border-white/5 sm:grid-cols-2 xl:grid-cols-4">
{gettingStarted.map((guide) => (
<div key={guide.href}>
<h3 className="text-sm font-semibold text-slate-900 dark:text-white">{guide.name}</h3>

View File

@@ -40,7 +40,7 @@ export const Header = forwardRef<React.ElementRef<"div">, { className?: string }
className={clsx(
className,
"fixed inset-x-0 top-0 z-50 flex h-20 items-center justify-between gap-12 px-4 transition sm:px-6 lg:left-72 lg:z-30 lg:px-8 xl:left-80",
!isInsideMobileNavigation && "backdrop-blur-sm lg:left-72 xl:left-80 dark:backdrop-blur",
!isInsideMobileNavigation && "backdrop-blur-sm dark:backdrop-blur lg:left-72 xl:left-80",
isInsideMobileNavigation
? "bg-white dark:bg-slate-900"
: "bg-white/[var(--bg-opacity-light)] dark:bg-slate-900/[var(--bg-opacity-dark)]"
@@ -73,7 +73,7 @@ export const Header = forwardRef<React.ElementRef<"div">, { className?: string }
<TopLevelNavItem href="https://formbricks.com/discord">Join our Discord</TopLevelNavItem>
</ul>
</nav>
<div className="hidden md:block md:h-5 md:w-px md:bg-slate-900/10 md:dark:bg-white/15" />
<div className="md:dark:bg-white/15 hidden md:block md:h-5 md:w-px md:bg-slate-900/10" />
<div className="flex gap-4">
<MobileSearch />
<ThemeToggle />

View File

@@ -25,7 +25,7 @@ export function Layout({
<motion.header
layoutScroll
className="contents lg:pointer-events-none lg:fixed lg:inset-0 lg:z-40 lg:flex">
<div className="contents lg:pointer-events-auto lg:block lg:w-72 lg:overflow-y-auto lg:border-r lg:border-slate-900/10 lg:px-6 lg:pb-8 lg:pt-4 xl:w-80 lg:dark:border-white/10">
<div className="contents lg:pointer-events-auto lg:block lg:w-72 lg:overflow-y-auto lg:border-r lg:border-slate-900/10 lg:px-6 lg:pb-8 lg:pt-4 lg:dark:border-white/10 xl:w-80">
<div className="hidden lg:flex">
<Link href="/" aria-label="Home">
<FooterLogo className="h-8" />

View File

@@ -37,7 +37,7 @@ const libraries = [
export function Libraries() {
return (
<div className="my-16 xl:max-w-none">
<div className="not-prose mt-4 grid grid-cols-1 gap-x-6 gap-y-10 border-slate-900/5 sm:grid-cols-2 xl:max-w-none xl:grid-cols-3 dark:border-white/5">
<div className="not-prose mt-4 grid grid-cols-1 gap-x-6 gap-y-10 border-slate-900/5 dark:border-white/5 sm:grid-cols-2 xl:max-w-none xl:grid-cols-3">
{libraries.map((library) => (
<a
key={library.name}

View File

@@ -90,7 +90,7 @@ function MobileNavigationDialog({ isOpen, close }: { isOpen: boolean; close: ()
leaveTo="-translate-x-full">
<motion.div
layoutScroll
className="ring-slate-900/7.5 fixed bottom-0 left-0 top-14 w-full overflow-y-auto bg-white px-4 pb-4 pt-6 shadow-lg shadow-slate-900/10 ring-1 min-[416px]:max-w-sm sm:px-6 sm:pb-10 dark:bg-slate-900 dark:ring-slate-800">
className="ring-slate-900/7.5 fixed bottom-0 left-0 top-14 w-full overflow-y-auto bg-white px-4 pb-4 pt-6 shadow-lg shadow-slate-900/10 ring-1 dark:bg-slate-900 dark:ring-slate-800 min-[416px]:max-w-sm sm:px-6 sm:pb-10">
<Navigation />
</motion.div>
</Transition.Child>

View File

@@ -237,7 +237,6 @@ export const navigation: Array<NavGroup> = [
links: [
{ title: "Airtable", href: "/docs/integrations/airtable" },
{ title: "Google Sheets", href: "/docs/integrations/google-sheets" },
{ title: "Notion", href: "/docs/integrations/notion" },
{ title: "Make.com", href: "/docs/integrations/make" },
{ title: "n8n", href: "/docs/integrations/n8n" },
{ title: "Zapier", href: "/docs/integrations/zapier" },

View File

@@ -243,7 +243,7 @@ const SearchInput = forwardRef<
<input
ref={inputRef}
className={clsx(
"flex-auto appearance-none bg-transparent pl-10 text-slate-900 outline-none placeholder:text-slate-500 focus:w-full focus:flex-none sm:text-sm dark:text-white [&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden [&::-webkit-search-results-button]:hidden [&::-webkit-search-results-decoration]:hidden",
"flex-auto appearance-none bg-transparent pl-10 text-slate-900 outline-none placeholder:text-slate-500 focus:w-full focus:flex-none dark:text-white sm:text-sm [&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden [&::-webkit-search-results-button]:hidden [&::-webkit-search-results-decoration]:hidden",
autocompleteState.status === "stalled" ? "pr-11" : "pr-4"
)}
{...inputProps}
@@ -336,7 +336,7 @@ function SearchDialog({
leave="ease-in duration-200"
leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95">
<Dialog.Panel className="ring-slate-900/7.5 mx-auto transform-gpu overflow-hidden rounded-lg bg-slate-50 shadow-xl ring-1 sm:max-w-xl dark:bg-slate-900 dark:ring-slate-800">
<Dialog.Panel className="ring-slate-900/7.5 mx-auto transform-gpu overflow-hidden rounded-lg bg-slate-50 shadow-xl ring-1 dark:bg-slate-900 dark:ring-slate-800 sm:max-w-xl">
<div {...autocomplete.getRootProps({})}>
<form
ref={formRef}
@@ -409,7 +409,7 @@ export function Search() {
<div className="hidden lg:block lg:max-w-md lg:flex-auto">
<button
type="button"
className="ui-not-focus-visible:outline-none hidden h-8 w-full items-center gap-2 rounded-full bg-white pl-2 pr-3 text-sm text-slate-500 ring-1 ring-slate-900/10 transition hover:ring-slate-900/20 lg:flex dark:bg-white/5 dark:text-slate-400 dark:ring-inset dark:ring-white/10 dark:hover:ring-white/20"
className="ui-not-focus-visible:outline-none hidden h-8 w-full items-center gap-2 rounded-full bg-white pl-2 pr-3 text-sm text-slate-500 ring-1 ring-slate-900/10 transition hover:ring-slate-900/20 dark:bg-white/5 dark:text-slate-400 dark:ring-inset dark:ring-white/10 dark:hover:ring-white/20 lg:flex"
{...buttonProps}>
<SearchIcon className="h-5 w-5 stroke-current" />
Find something...
@@ -432,7 +432,7 @@ export function MobileSearch() {
<div className="contents lg:hidden">
<button
type="button"
className="ui-not-focus-visible:outline-none flex h-6 w-6 items-center justify-center rounded-md transition hover:bg-slate-900/5 lg:hidden dark:hover:bg-white/5"
className="ui-not-focus-visible:outline-none flex h-6 w-6 items-center justify-center rounded-md transition hover:bg-slate-900/5 dark:hover:bg-white/5 lg:hidden"
aria-label="Find something..."
{...buttonProps}>
<SearchIcon className="h-5 w-5 stroke-slate-900 dark:stroke-white" />

View File

@@ -55,7 +55,7 @@ export const AddNoCodeEventModalDummy: React.FC<EventDetailModalProps> = ({ open
Inner Text
</Label>
</div>
<div className="hidden items-center space-x-2 rounded-lg bg-slate-50 p-3 md:flex dark:bg-slate-600">
<div className="hidden items-center space-x-2 rounded-lg bg-slate-50 p-3 dark:bg-slate-600 md:flex">
<RadioGroupItem disabled value="cssSelector" id="cssSelector" className="bg-slate-50" />
<Label
htmlFor="cssSelector"
@@ -80,7 +80,7 @@ export const AddNoCodeEventModalDummy: React.FC<EventDetailModalProps> = ({ open
<Label>URL</Label>
<Select defaultValue="endsWith">
<SelectTrigger
className="w-[110px] md:w-[180px] dark:text-slate-200"
className="w-[110px] dark:text-slate-200 md:w-[180px]"
onClick={(e) => e.preventDefault()}
disabled>
<SelectValue placeholder="Select match type" />

View File

@@ -27,7 +27,7 @@ export default function SurveyTemplatesPage({}) {
setActiveTemplate(template);
}}
/>
<aside className="group relative h-full flex-1 flex-shrink-0 overflow-hidden rounded-r-lg bg-slate-200 shadow-inner md:flex md:flex-col dark:bg-slate-700">
<aside className="group relative h-full flex-1 flex-shrink-0 overflow-hidden rounded-r-lg bg-slate-200 shadow-inner dark:bg-slate-700 md:flex md:flex-col">
{activeTemplate && (
<PreviewSurvey
activeQuestionId={activeQuestionId}

View File

@@ -22,7 +22,7 @@ export default function Modal({
<div
className={cn(
show ? "translate-x-0 opacity-100" : "translate-x-28 opacity-0",
"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg bg-white px-4 py-6 shadow-lg ring-1 ring-black ring-opacity-5 transition-all duration-500 ease-in-out sm:p-6 dark:bg-slate-900"
"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg bg-white px-4 py-6 shadow-lg ring-1 ring-black ring-opacity-5 transition-all duration-500 ease-in-out dark:bg-slate-900 sm:p-6"
)}>
{children}
</div>

View File

@@ -42,7 +42,7 @@ export default function OpenTextQuestion({
onChange={(e) => setValue(e.target.value)}
placeholder={question.placeholder}
required={question.required}
className="block w-full rounded-md border border-slate-100 bg-slate-50 p-2 shadow-sm focus:border-slate-500 focus:ring-0 sm:text-sm dark:border-slate-500 dark:bg-slate-700 dark:text-white"></textarea>
className="block w-full rounded-md border border-slate-100 bg-slate-50 p-2 shadow-sm focus:border-slate-500 focus:ring-0 dark:border-slate-500 dark:bg-slate-700 dark:text-white sm:text-sm"></textarea>
</div>
<div className="mt-4 flex w-full justify-between">
<div></div>

View File

@@ -20,7 +20,7 @@ export const GitHubSponsorship: React.FC = () => {
/> */}
<div className="col-span-2">
<h2 className="text-2xl font-bold tracking-tight text-slate-800 lg:text-2xl dark:text-slate-200">
<h2 className="text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-200 lg:text-2xl">
We are live on ProductHunt today 🚀
</h2>
<p className="lg:text-md mt-2 max-w-3xl text-slate-500 dark:text-slate-400">

View File

@@ -6,7 +6,7 @@ import FlixbusLogo from "@/images/clients/flixbus-white.svg";
import NILogoDark from "@/images/clients/niLogoDark.svg";
import NILogoLight from "@/images/clients/niLogoWhite.svg";
import AnimationFallback from "@/public/animations/opensource-xm-platform-formbricks-fallback.png";
import { ShieldCheckIcon, StarIcon } from "@heroicons/react/24/outline";
import { ChevronRightIcon } from "@heroicons/react/24/outline";
import { usePlausible } from "next-plausible";
import Image from "next/image";
import { useRouter } from "next/router";
@@ -21,31 +21,26 @@ export const Hero: React.FC = ({}) => {
return (
<div className="relative">
<div className="px-4 pb-20 pt-16 text-center sm:px-6 lg:px-8 lg:pb-32 lg:pt-20">
<div className="xs:text-sm flex items-center justify-center space-x-4 divide-x-2 text-xs text-slate-600">
<p>
<ShieldCheckIcon className="mb-1 inline h-4 w-4" /> Privacy-first
</p>
<a href="https://formbricks.com/github" target="_blank" className="hover:text-slate-800">
<StarIcon className="mb-1 ml-3 mr-1 inline h-4 w-4" />
Star us on GitHub
</a>
</div>
<h1 className="mt-10 text-3xl font-bold tracking-tight text-slate-800 sm:text-4xl md:text-5xl dark:text-slate-200">
<span className="xl:inline">
Turn customer insights
<br />
into irresistible experiences
</span>
<a
href="https://formbricks.com/github"
target="_blank"
className="border-brand-dark xs:text-sm animate-bounce rounded-full border px-4 py-1.5 text-xs text-slate-500 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800">
We&apos;re Open Source - Star us on GitHub
<ChevronRightIcon className="mb-1 ml-1 inline h-4 w-4 text-slate-300" />
</a>
<h1 className="mt-10 text-3xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-4xl md:text-5xl">
<span className="xl:inline">Privacy-first Experience Management</span>
</h1>
<p className="xs:max-w-none mx-auto mt-3 max-w-xs text-balance text-base text-slate-500 sm:text-lg md:mt-5 md:text-xl dark:text-slate-400">
Formbricks is an Experience Management Suite built on the largest open source survey stack
worldwide. Gracefully gather feedback at every step of the customer journey to{" "}
<span className="decoration-brand-dark underline underline-offset-4">
know what your customers need.
</span>
<p className="xs:max-w-none mx-auto mt-3 max-w-xs text-base text-slate-500 dark:text-slate-400 sm:text-lg md:mt-5 md:text-xl">
Turn customer insights into irresistible experiences {" "}
<span className="decoration-brand-dark underline underline-offset-4">all privacy-first.</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">
<p className="hidden whitespace-nowrap pt-3 text-xs text-slate-400 dark:text-slate-500 md:block">
Trusted by
</p>
<div className="grid grid-cols-4 items-center gap-6 pt-2 md:gap-8">
<Image
src={FlixbusLogo}
@@ -56,57 +51,57 @@ export const Hero: React.FC = ({}) => {
<Image
src={CalLogoLight}
alt="Cal Logo"
className="block rounded-lg hover:opacity-100 md:opacity-50 dark:hidden"
className="block rounded-lg hover:opacity-100 dark:hidden md:opacity-50"
width={170}
/>
<Image
src={CalLogoDark}
alt="Cal Logo"
className="hidden rounded-lg hover:opacity-100 md:opacity-50 dark:block"
className="hidden rounded-lg hover:opacity-100 dark:block md:opacity-50"
width={170}
/>
<Image
src={CrowdLogoLight}
alt="Crowd.dev Logo"
className="block rounded-lg pb-1 hover:opacity-100 md:opacity-50 dark:hidden"
className="block rounded-lg pb-1 hover:opacity-100 dark:hidden md:opacity-50"
width={200}
/>
<Image
src={CrowdLogoDark}
alt="Crowd.dev Logo"
className="hidden rounded-lg pb-1 hover:opacity-100 md:opacity-50 dark:block"
className="hidden rounded-lg pb-1 hover:opacity-100 dark:block md:opacity-50"
width={200}
/>
<Image
src={NILogoDark}
alt="Neverinstall Logo"
className="block pb-1 hover:opacity-100 md:opacity-50 dark:hidden"
className="block pb-1 hover:opacity-100 dark:hidden md:opacity-50"
width={200}
/>
<Image
src={NILogoLight}
alt="Neverinstall Logo"
className="hidden pb-1 hover:opacity-100 md:opacity-50 dark:block"
className="hidden pb-1 hover:opacity-100 dark:block md:opacity-50"
width={200}
/>
</div>
</div>
<div className="hidden pt-14 md:block">
<div className="hidden pt-10 md:block">
<Button
variant="highlight"
className="mr-3 px-6"
onClick={() => {
router.push("https://app.formbricks.com/auth/signup");
plausible("Hero_CTA_GetStartedItsFree");
plausible("Hero_CTA_CreateSurvey");
}}>
Get Started, it&apos;s Free
Get started
</Button>
<Button
variant="secondary"
className="px-6"
onClick={() => {
router.push("https://formbricks.com/github");
plausible("Hero_CTA_ViewGitHub");
/* plausible("Hero_CTA_LaunchDemo"); */
}}>
View Code on GitHub
</Button>

View File

@@ -21,7 +21,7 @@ export const Highlights: React.FC = ({}) => {
significantly higher conversion rate.
</p>
</div>
<div className="rounded-lg bg-slate-100 py-6 pr-4 sm:py-16 sm:pr-8 dark:bg-slate-800">
<div className="rounded-lg bg-slate-100 py-6 pr-4 dark:bg-slate-800 sm:py-16 sm:pr-8">
<Image
src={ImageEventTriggerLight}
alt="react library"
@@ -39,7 +39,7 @@ export const Highlights: React.FC = ({}) => {
<div className="mx-auto mb-12 mt-8 max-w-lg md:mb-0 md:mt-32 md:max-w-none">
<div className="px-4 sm:max-w-4xl sm:px-6 lg:max-w-7xl lg:px-8">
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
<div className="order-last rounded-lg bg-slate-100 p-4 sm:p-8 md:order-first dark:bg-slate-800">
<div className="order-last rounded-lg bg-slate-100 p-4 dark:bg-slate-800 sm:p-8 md:order-first">
<Image
src={ImageAttributesLight}
alt="react library"
@@ -48,7 +48,7 @@ export const Highlights: React.FC = ({}) => {
<Image src={ImageAttributesDark} alt="react library" className="hidden rounded-lg dark:block" />
</div>
<div className="pb-8 md:pb-0">
<h2 className="xs:text-3xl text-2xl font-bold leading-7 tracking-tight text-slate-800 sm:text-3xl dark:text-slate-100">
<h2 className="xs:text-3xl text-2xl font-bold leading-7 tracking-tight text-slate-800 dark:text-slate-100 sm:text-3xl">
Don&apos;t Spray and pray.
<br />
<span className="font-light">Pre-segment granularly.</span>

View File

@@ -61,7 +61,7 @@ if (typeof window !== "undefined") {
</>
) : activeTab === "html" ? (
<CodeBlock>{`<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("claDadXk29dak92dK9","https://app.formbricks.com")},500)}();
!function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://unpkg.com/@formbricks/js@^1.2.0/dist/index.umd.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e),setTimeout(function(){window.formbricks.init("claDadXk29dak92dK9","https://app.formbricks.com")},500)}();
</script>`}</CodeBlock>
) : null}
</div>

View File

@@ -45,7 +45,7 @@ export const Steps: React.FC = () => {
<div className="mx-auto mb-12 mt-8 max-w-lg md:mb-0 md:mt-32 md:max-w-none">
<div className="px-4 sm:max-w-4xl sm:px-6 lg:max-w-7xl lg:px-8">
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
<div className="order-last w-full rounded-lg bg-slate-100 p-4 sm:py-8 md:order-first dark:bg-slate-800">
<div className="order-last w-full rounded-lg bg-slate-100 p-4 dark:bg-slate-800 sm:py-8 md:order-first">
<div className="flex h-40 items-center justify-center">
<Button
variant="primary"
@@ -60,7 +60,7 @@ export const Steps: React.FC = () => {
</div>
<div className="pb-8 md:pb-0">
<h4 className="text-brand-dark font-bold">Step 2</h4>
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 sm:text-3xl dark:text-slate-100">
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-100 sm:text-3xl">
No-Code: Track User Actions
</h2>
<p className="text-md mt-6 max-w-lg leading-7 text-slate-500 dark:text-slate-400">
@@ -76,7 +76,7 @@ export const Steps: React.FC = () => {
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
<div className="pb-8 sm:pl-10 md:pb-0">
<h4 className="text-brand-dark font-bold">Step 3</h4>
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 sm:text-3xl dark:text-slate-200">
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-3xl">
Create your survey
</h2>
<p className="text-md mt-6 max-w-lg leading-7 text-slate-500 dark:text-slate-400">
@@ -84,7 +84,7 @@ export const Steps: React.FC = () => {
adjust the look and feel of your survey.
</p>
</div>
<div className="relative w-full rounded-lg p-1 sm:p-8 dark:bg-slate-800">
<div className="relative w-full rounded-lg p-1 dark:bg-slate-800 sm:p-8">
<DemoPreview template="Product Market Fit Survey (short)" />
</div>
</div>
@@ -93,14 +93,14 @@ export const Steps: React.FC = () => {
<div className="mx-auto mb-12 mt-8 max-w-lg md:mb-0 md:mt-32 md:max-w-none">
<div className="px-4 sm:max-w-4xl sm:px-6 lg:max-w-7xl lg:px-8">
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
<div className="order-last w-full rounded-lg bg-slate-100 p-4 sm:py-8 md:order-first dark:bg-slate-800">
<div className="order-last w-full rounded-lg bg-slate-100 p-4 dark:bg-slate-800 sm:py-8 md:order-first">
<div className="mx-auto flex flex-col items-center justify-center md:w-3/4">
<AddEventDummy />
</div>
</div>
<div className="pb-8 md:pb-0">
<h4 className="text-brand-dark font-bold">Step 4</h4>
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 sm:text-3xl dark:text-slate-100">
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-100 sm:text-3xl">
Set segment and trigger
</h2>
<p className="text-md mt-6 max-w-lg leading-7 text-slate-500 dark:text-slate-400">
@@ -116,7 +116,7 @@ export const Steps: React.FC = () => {
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
<div className="pb-8 sm:pl-10 md:pb-0">
<h4 className="text-brand-dark font-bold">Step 5</h4>
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 sm:text-3xl dark:text-slate-200">
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-3xl">
Make better decisions
</h2>
<p className="text-md mt-6 max-w-lg leading-7 text-slate-500 dark:text-slate-400">

View File

@@ -1,5 +1,4 @@
import AuthorJohannes from "@/images/blog/johannes-co-founder-formbricks-small.jpg";
import AuthorOla from "@/images/blog/ola-content-writer.png";
import Image from "next/image";
interface AuthorBoxProps {
@@ -7,15 +6,14 @@ interface AuthorBoxProps {
title: string;
date: string;
duration: string;
author: string;
}
export default function AuthorBox({ name, title, date, duration, author }: AuthorBoxProps) {
export default function AuthorBox({ name, title, date, duration }: AuthorBoxProps) {
return (
<div className="mb-8 flex items-center space-x-4 rounded-lg border border-slate-200 bg-slate-100 px-6 py-3 dark:border-slate-700 dark:bg-slate-800">
<Image
className="m-0 rounded-full"
src={author === "Johannes" ? AuthorJohannes : AuthorOla}
src={AuthorJohannes}
alt={name}
width={45}
height={45}

View File

@@ -4,13 +4,13 @@ export default function InsightOppos() {
return (
<div className="pb-10 pt-12 md:pt-20">
<div className="px-4 py-20 text-center sm:px-6 lg:px-8" id="best-practices">
<h1 className="text-3xl font-bold tracking-tight text-slate-800 sm:text-4xl md:text-5xl dark:text-slate-200">
<h1 className="text-3xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-4xl md:text-5xl">
Get started with{" "}
<span className="from-brand-light to-brand-dark bg-gradient-to-b bg-clip-text text-transparent xl:inline">
Best Practices
</span>
</h1>
<p className="mx-auto mt-3 max-w-md text-base text-slate-500 sm:text-lg md:mt-5 md:max-w-3xl md:text-xl dark:text-slate-300">
<p className="mx-auto mt-3 max-w-md text-base text-slate-500 dark:text-slate-300 sm:text-lg md:mt-5 md:max-w-3xl md:text-xl">
Run battle-tested approaches for qualitative user research in minutes.
</p>
</div>

View File

@@ -12,7 +12,7 @@ export default function CTA() {
<HeadingCentered closer teaser="Get started" heading="Ready for the last form tool you need?" />
<div className="mt-12 grid grid-cols-1 content-center md:grid-cols-2">
<div className="-mb-4 rounded-t-xl bg-gradient-to-br from-slate-300 to-slate-200 px-8 py-24 text-center text-slate-900 md:-mr-5 md:mb-0 md:ml-2.5 md:rounded-l-xl lg:p-24 dark:from-slate-800 dark:to-slate-900 dark:text-slate-100">
<div className="-mb-4 rounded-t-xl bg-gradient-to-br from-slate-300 to-slate-200 px-8 py-24 text-center text-slate-900 dark:from-slate-800 dark:to-slate-900 dark:text-slate-100 md:-mr-5 md:mb-0 md:ml-2.5 md:rounded-l-xl lg:p-24">
<h3 className="text-3xl font-bold">Self-hosted</h3>
<p className="mb-4 mt-2">Run locally e.g. with docker-compose.</p>
<Button variant="secondary" onClick={() => router.push("/docs")} className="mt-3">

View File

@@ -29,7 +29,7 @@ export default function FeatureHighlights({
<div className="mx-auto max-w-md px-4 sm:max-w-3xl sm:px-6 lg:max-w-7xl lg:px-8">
<div className="md:grid-cols-2 lg:grid lg:items-center lg:gap-24">
<div className={clsx(isImgLeft ? "order-last" : "")}>
<h2 className="text-2xl font-bold tracking-tight text-slate-800 sm:text-3xl dark:text-slate-200">
<h2 className="text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-3xl">
{featureTitle}
</h2>
<div className="text-md mt-6 whitespace-pre-line leading-7 text-slate-500 dark:text-slate-400">

View File

@@ -170,7 +170,7 @@ export default function Header() {
leaveTo="opacity-0 translate-y-1">
<Popover.Panel className="absolute z-10 -ml-4 mt-3 w-screen max-w-lg transform lg:left-1/2 lg:ml-0 lg:max-w-4xl lg:-translate-x-1/2">
<div className="overflow-hidden rounded-lg shadow-lg ring-1 ring-black ring-opacity-5">
<div className="relative grid gap-6 bg-white px-5 py-6 sm:gap-6 sm:p-8 lg:grid-cols-3 dark:bg-slate-700">
<div className="relative grid gap-6 bg-white px-5 py-6 dark:bg-slate-700 sm:gap-6 sm:p-8 lg:grid-cols-3">
<div>
<h4 className="mb-6 ml-16 text-sm text-slate-400 dark:text-slate-300">
Understand Users
@@ -276,22 +276,22 @@ export default function Header() {
*/}
<Link
href="/pricing"
className="text-sm font-medium text-slate-400 hover:text-slate-700 lg:text-base dark:hover:text-slate-300">
className="text-sm font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300 lg:text-base">
Pricing
</Link>
<Link
href="/community"
className="text-sm font-medium text-slate-400 hover:text-slate-700 lg:text-base dark:hover:text-slate-300">
Community
href="/concierge"
className="text-sm font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300 lg:text-base">
Concierge
</Link>
<Link
href="/docs"
className="text-sm font-medium text-slate-400 hover:text-slate-700 lg:text-base dark:hover:text-slate-300">
className="text-sm font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300 lg:text-base">
Docs
</Link>
<Link
href="/blog"
className="text-sm font-medium text-slate-400 hover:text-slate-700 lg:text-base dark:hover:text-slate-300">
className="text-sm font-medium text-slate-400 hover:text-slate-700 dark:hover:text-slate-300 lg:text-base">
Blog {/* <p className="bg-brand inline rounded-full px-2 text-xs text-white">1</p> */}
</Link>
{/* <Link
@@ -331,7 +331,7 @@ export default function Header() {
router.push("https://app.formbricks.com");
plausible("NavBar_CTA_Login");
}}>
Get started
Go to app
</Button>
</div>
</div>
@@ -391,7 +391,7 @@ export default function Header() {
<hr className="mx-20 my-6 opacity-25" />
</div>
)}
<Link href="/community">Community</Link>
<Link href="/concierge">Concierge</Link>
<Link href="/pricing">Pricing</Link>
<Link href="/docs">Docs</Link>
<Link href="/blog">Blog</Link>

View File

@@ -13,10 +13,10 @@ export default function HeadingCentered({ teaser, heading, subheading, closer }:
<p className="text-md text-brand-dark dark:text-brand-light mx-auto mb-3 max-w-2xl font-semibold uppercase sm:mt-4">
{teaser}
</p>
<h2 className="text-3xl font-bold tracking-tight text-slate-800 sm:text-4xl dark:text-slate-100">
<h2 className="text-3xl font-bold tracking-tight text-slate-800 dark:text-slate-100 sm:text-4xl">
{heading}
</h2>
<p className="mx-auto mt-3 max-w-3xl text-xl text-slate-500 sm:mt-4 dark:text-slate-300">
<p className="mx-auto mt-3 max-w-3xl text-xl text-slate-500 dark:text-slate-300 sm:mt-4">
{subheading}
</p>
</div>

View File

@@ -9,14 +9,14 @@ interface Props {
export default function HeroTitle({ headingPt1, headingTeal, headingPt2, subheading, children }: Props) {
return (
<div className="px-4 py-20 text-center sm:px-6 lg:px-8 lg:py-28">
<h1 className="text-3xl font-bold tracking-tight text-slate-800 sm:text-4xl md:text-5xl dark:text-slate-200">
<h1 className="text-3xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-4xl md:text-5xl">
<span className="xl:inline">{headingPt1}</span>{" "}
<span className="from-brand-light to-brand-dark bg-gradient-to-b bg-clip-text text-transparent xl:inline">
{headingTeal}
</span>{" "}
<span className="inline ">{headingPt2}</span>
</h1>
<p className="mx-auto mt-3 max-w-md text-base text-slate-500 sm:text-lg md:mt-5 md:max-w-2xl md:text-xl dark:text-slate-300">
<p className="mx-auto mt-3 max-w-md text-base text-slate-500 dark:text-slate-300 sm:text-lg md:mt-5 md:max-w-2xl md:text-xl">
{subheading}
</p>
<div className="mx-auto mt-5 max-w-md sm:flex sm:justify-center md:mt-8">{children}</div>

View File

@@ -60,7 +60,7 @@ export default function LayoutMdx({ meta, children }: Props) {
)}
</header>
)}
<Prose className="prose-h2:text-2xl prose-li:text-base prose-h2:mt-4 prose-p:text-base prose-p:mb-4 prose-h3:text-xl prose-a:text-slate-900 prose-a:hover:text-slate-900 prose-a:text-decoration-brand prose-a:not-italic ">
<Prose className="prose-h2:text-2xl prose-h2:mt-4 prose-p:text-base prose-p:mb-4 prose-h3:text-xl prose-a:text-slate-900 prose-a:hover:text-slate-900 prose-a:text-decoration-brand prose-a:not-italic ">
{children}
</Prose>
</article>

View File

@@ -14,7 +14,7 @@ export default function CTA() {
Try Formbricks right now!
</p>
<div className="mt-12 grid grid-cols-1 content-center md:grid-cols-2">
<div className="-mb-2 rounded-t-xl bg-gradient-to-br from-slate-300 to-slate-200 text-center text-slate-900 md:-mr-5 md:mb-0 md:ml-2.5 md:rounded-l-xl dark:from-slate-800 dark:to-slate-900 dark:text-slate-200">
<div className="-mb-2 rounded-t-xl bg-gradient-to-br from-slate-300 to-slate-200 text-center text-slate-900 dark:from-slate-800 dark:to-slate-900 dark:text-slate-200 md:-mr-5 md:mb-0 md:ml-2.5 md:rounded-l-xl">
<h3 className="text-3xl font-bold">Self-hosted</h3>
<p className="mb-4 mt-2 dark:text-slate-400">Run locally with docker-compose.</p>
<Button variant="secondary" onClick={() => router.push("/docs")} className="mb-8 mt-3 md:mb-0">

View File

@@ -26,7 +26,7 @@ export function Navigation({ navigation, className, preserveScroll, linkRef }: N
<h2 className="font-display font-medium text-slate-800 dark:text-slate-100">{section.title}</h2>
<ul
role="list"
className="mt-2 space-y-2 border-l-2 border-slate-100 lg:mt-4 lg:space-y-4 lg:border-slate-200 dark:border-slate-800">
className="mt-2 space-y-2 border-l-2 border-slate-100 dark:border-slate-800 lg:mt-4 lg:space-y-4 lg:border-slate-200">
{section.links.map((link) => (
<li key={link.href} className="relative" ref={linkRef}>
<Link

View File

@@ -4,8 +4,8 @@ export const OpenSourceInfo = () => {
return (
<div className="my-8 md:my-20">
<div className="px-8 md:px-16">
<div className=" rounded-xl bg-slate-100 px-4 py-8 md:px-12 dark:bg-slate-800">
<h2 className="text-lg font-semibold leading-7 tracking-tight text-slate-800 md:text-2xl dark:text-slate-200">
<div className=" rounded-xl bg-slate-100 px-4 py-8 dark:bg-slate-800 md:px-12">
<h2 className="text-lg font-semibold leading-7 tracking-tight text-slate-800 dark:text-slate-200 md:text-2xl">
Open Source
</h2>

View File

@@ -10,7 +10,7 @@ const LinkSurveySlider = ({ label, usersCount, price, onSliderChange }) => (
<div className="md:text-md w-2/6 text-center text-sm font-medium text-slate-700 dark:text-slate-200">
{Math.round(usersCount).toLocaleString()} Submissions
</div>
<div className="md:text-md flex w-1/6 items-center justify-end text-center text-sm font-medium text-slate-700 md:justify-center dark:text-slate-200">
<div className="md:text-md flex w-1/6 items-center justify-end text-center text-sm font-medium text-slate-700 dark:text-slate-200 md:justify-center">
<span>${price.toFixed(2)}</span>
</div>
</div>
@@ -43,7 +43,7 @@ const InAppSlider = ({ label, usersCount, price, onSliderChange }) => (
<div className="md:text-md w-2/6 text-center text-sm font-medium text-slate-700 dark:text-slate-200">
{Math.round(usersCount).toLocaleString()} Submissions
</div>
<div className="md:text-md flex w-1/6 items-center justify-end text-center text-sm font-medium text-slate-700 md:justify-center dark:text-slate-200">
<div className="md:text-md flex w-1/6 items-center justify-end text-center text-sm font-medium text-slate-700 dark:text-slate-200 md:justify-center">
<span>${price.toFixed(2)}</span>
</div>
</div>
@@ -76,7 +76,7 @@ const UserSegmentationSlider = ({ label, usersCount, price, onSliderChange }) =>
<div className="md:text-md w-2/6 text-center text-sm font-medium text-slate-700 dark:text-slate-200">
{Math.round(usersCount).toLocaleString()} Submissions
</div>
<div className="md:text-md flex w-1/6 items-center justify-end text-center text-sm font-medium text-slate-700 md:justify-center dark:text-slate-200">
<div className="md:text-md flex w-1/6 items-center justify-end text-center text-sm font-medium text-slate-700 dark:text-slate-200 md:justify-center">
<span>${price.toFixed(2)}</span>
</div>
</div>
@@ -102,8 +102,8 @@ const UserSegmentationSlider = ({ label, usersCount, price, onSliderChange }) =>
const Headers = () => (
<div className="mb-4 flex justify-between">
<h3 className="text-base font-semibold text-slate-700 md:text-lg dark:text-slate-200">Product</h3>
<h3 className="w-1/6 text-center text-base font-semibold text-slate-700 md:text-lg dark:text-slate-200">
<h3 className="text-base font-semibold text-slate-700 dark:text-slate-200 md:text-lg">Product</h3>
<h3 className="w-1/6 text-center text-base font-semibold text-slate-700 dark:text-slate-200 md:text-lg">
Subtotal
</h3>
</div>
@@ -111,14 +111,14 @@ const Headers = () => (
const MonthlyEstimate = ({ price }) => (
<div className="mt-2 flex justify-between">
<span className="text-base font-semibold text-slate-700 md:text-lg dark:text-slate-200">
<span className="text-base font-semibold text-slate-700 dark:text-slate-200 md:text-lg">
Monthly estimate:
</span>
<div className="w-1/6 text-center">
<span className="w-1/6 text-base text-slate-700 md:text-lg md:font-semibold dark:text-slate-200">
<span className="w-1/6 text-base text-slate-700 dark:text-slate-200 md:text-lg md:font-semibold">
${price.toFixed(2)}
</span>
<span className="hidden text-sm text-slate-400 md:block md:text-base dark:text-slate-500">
<span className="hidden text-sm text-slate-400 dark:text-slate-500 md:block md:text-base">
{" "}
/ month
</span>
@@ -145,11 +145,11 @@ export const PricingCalculator = () => {
return (
<div className="px-4 md:px-16">
<h2 className="px-4 py-4 text-lg font-semibold leading-7 tracking-tight text-slate-800 md:px-12 md:text-2xl dark:text-slate-200">
<h2 className="px-4 py-4 text-lg font-semibold leading-7 tracking-tight text-slate-800 dark:text-slate-200 md:px-12 md:text-2xl">
Pricing Calculator
</h2>
<div className="rounded-xl bg-slate-100 px-4 py-4 md:px-12 dark:bg-slate-800">
<div className="rounded-xl bg-slate-100 px-4 py-4 dark:bg-slate-800 md:px-12">
<div className="rounded-xl px-4">
<Headers />

View File

@@ -9,7 +9,7 @@ export const GetStartedWithPricing = ({ showDetailed }: { showDetailed: boolean
<p className="text-base font-semibold">Free</p>
{showDetailed && (
<p className="leading text-xs text-slate-500 md:text-base dark:text-slate-400">
<p className="leading text-xs text-slate-500 dark:text-slate-400 md:text-base">
General free usage on every product. Best for early stage startups and hobbyists
</p>
)}
@@ -26,7 +26,7 @@ export const GetStartedWithPricing = ({ showDetailed }: { showDetailed: boolean
<div className="w-1/3 text-left text-sm text-slate-800 dark:text-slate-100">
<p className="text-base font-semibold"> Paid</p>
{showDetailed && (
<p className="leading text-xs text-slate-500 md:text-base dark:text-slate-400">
<p className="leading text-xs text-slate-500 dark:text-slate-400 md:text-base">
Formbricks with the next-generation features, Pay only for the tracked users.
</p>
)}

View File

@@ -7,26 +7,26 @@ export const PricingTable = ({ leadRow, pricing, endRow }) => {
<div className="grid grid-cols-1 px-4 md:gap-4 md:px-16 ">
<div className="rounded-xl px-4 md:px-12">
<div className="flex items-center gap-x-4">
<div className="w-1/3 text-left font-semibold text-slate-700 md:text-xl dark:text-slate-200">
<div className="w-1/3 text-left font-semibold text-slate-700 dark:text-slate-200 md:text-xl">
{leadRow.title}
<span className="pl-2 text-sm font-normal text-slate-600">{leadRow.comparison}</span>
</div>
<div
className="flex w-1/3 items-center justify-center text-center text-sm font-semibold
text-slate-500 md:text-lg dark:text-slate-200">
text-slate-500 dark:text-slate-200 md:text-lg">
{leadRow.free}
</div>
<div className="w-1/3 text-center font-semibold text-slate-700 md:text-lg dark:text-slate-200">
<div className="w-1/3 text-center font-semibold text-slate-700 dark:text-slate-200 md:text-lg">
{leadRow.paid}
</div>
</div>
</div>
<div className="rounded-xl bg-slate-100 px-4 py-4 md:px-12 dark:bg-slate-800 ">
<div className="rounded-xl bg-slate-100 px-4 py-4 dark:bg-slate-800 md:px-12 ">
{pricing.map((feature) => (
<div key={feature.name} className="mb-8 flex items-center gap-x-4">
<div className="w-1/3 text-left text-sm text-slate-700 md:text-base dark:text-slate-200">
<div className="w-1/3 text-left text-sm text-slate-700 dark:text-slate-200 md:text-base">
{feature.name}
{feature.addOnText && (
<span className=" mx-3 rounded-full bg-emerald-200 px-2 text-xs text-slate-800 dark:bg-slate-700 dark:text-teal-500">
@@ -93,14 +93,14 @@ export const PricingTable = ({ leadRow, pricing, endRow }) => {
<div className="rounded-xl px-4 md:px-12">
<div className="flex items-center gap-x-4">
<div className="w-1/3 text-left text-sm font-semibold text-slate-700 md:text-base dark:text-slate-200">
<div className="w-1/3 text-left text-sm font-semibold text-slate-700 dark:text-slate-200 md:text-base">
{endRow.title}
</div>
<div className="flex w-1/3 items-center justify-center text-center text-sm font-semibold text-slate-700 md:text-base dark:text-slate-200">
<div className="flex w-1/3 items-center justify-center text-center text-sm font-semibold text-slate-700 dark:text-slate-200 md:text-base">
<span>{endRow.free}</span>
</div>
<div className="w-1/3 text-center text-sm font-semibold text-slate-700 md:text-base dark:text-slate-200">
<div className="w-1/3 text-center text-sm font-semibold text-slate-700 dark:text-slate-200 md:text-base">
{endRow.paid}
</div>
</div>

View File

@@ -49,14 +49,14 @@ export function Search() {
<>
<button
type="button"
className="group flex h-6 w-6 items-center justify-center sm:justify-start md:h-auto md:w-60 md:flex-none md:rounded-lg md:py-2.5 md:pl-4 md:pr-3.5 md:text-sm md:ring-1 md:ring-slate-200 md:hover:ring-slate-300 xl:w-80 dark:md:bg-slate-800/75 dark:md:ring-inset dark:md:ring-white/5 dark:md:hover:bg-slate-700/40 dark:md:hover:ring-slate-500"
className="group flex h-6 w-6 items-center justify-center sm:justify-start md:h-auto md:w-60 md:flex-none md:rounded-lg md:py-2.5 md:pl-4 md:pr-3.5 md:text-sm md:ring-1 md:ring-slate-200 md:hover:ring-slate-300 dark:md:bg-slate-800/75 dark:md:ring-inset dark:md:ring-white/5 dark:md:hover:bg-slate-700/40 dark:md:hover:ring-slate-500 xl:w-80"
onClick={onOpen}>
<SearchIcon className="h-5 w-5 flex-none fill-slate-400 group-hover:fill-slate-500 md:group-hover:fill-slate-400 dark:fill-slate-500" />
<SearchIcon className="h-5 w-5 flex-none fill-slate-400 group-hover:fill-slate-500 dark:fill-slate-500 md:group-hover:fill-slate-400" />
<span className="sr-only md:not-sr-only md:pl-2 md:text-slate-500 md:dark:text-slate-400">
Search docs
</span>
{modifierKey && (
<kbd className="ml-auto hidden font-medium text-slate-400 md:block dark:text-slate-500">
<kbd className="ml-auto hidden font-medium text-slate-400 dark:text-slate-500 md:block">
<kbd className="font-sans">{modifierKey}</kbd>
<kbd className="font-sans">K</kbd>
</kbd>

View File

@@ -11,10 +11,10 @@ export default function HeadingCentered() {
<p className="text-md text-brand-dark dark:text-brand-light mb-3 font-semibold uppercase">
What are you waiting for?
</p>
<h2 className="text-3xl font-bold tracking-tight text-slate-800 sm:text-4xl dark:text-slate-100">
<h2 className="text-3xl font-bold tracking-tight text-slate-800 dark:text-slate-100 sm:text-4xl">
Try it right now!
</h2>
<p className="my-3 text-slate-500 sm:mb-6 sm:mt-4 md:text-lg dark:text-slate-300">
<p className="my-3 text-slate-500 dark:text-slate-300 sm:mb-6 sm:mt-4 md:text-lg">
Dive right in or browse docs for examples.
<br />
Questions? Join our Discord, were happy to help!

View File

@@ -42,7 +42,7 @@ const features = [
export default function FeatureTable({}) {
return (
<div className="mt-32 rounded-xl bg-gradient-to-br from-slate-900 via-slate-900 to-slate-800 lg:mt-56 dark:from-slate-200 dark:to-slate-300">
<div className="mt-32 rounded-xl bg-gradient-to-br from-slate-900 via-slate-900 to-slate-800 dark:from-slate-200 dark:to-slate-300 lg:mt-56">
<div className="mx-auto max-w-4xl px-4 py-8 sm:px-6 sm:pb-12 sm:pt-8 lg:max-w-7xl lg:px-8 lg:pt-12">
<p className="text-md dark:text-brand-dark text-brand-light mb-3 max-w-2xl font-semibold uppercase sm:mt-4">
Why Formbricks?

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

View File

@@ -38,8 +38,8 @@ export function cleanHtml(str: string): string {
function isPossiblyDangerous(name: string, value: string): boolean {
let val = value.replace(/\s+/g, "").toLowerCase();
if (
["src", "href", "xlink:href", "srcdoc"].includes(name) &&
(val.includes("javascript:") || val.includes("data:") || val.includes("<script>"))
["src", "href", "xlink:href"].includes(name) &&
(val.includes("javascript:") || val.includes("data:"))
) {
return true;
}
@@ -57,14 +57,10 @@ export function cleanHtml(str: string): string {
// Loop through each attribute
// If it's dangerous, remove it
let atts = elem.attributes;
for (let i = atts.length - 1; i >= 0; i--) {
for (let i = 0; i < atts.length; i++) {
let { name, value } = atts[i];
if (isPossiblyDangerous(name, value)) {
elem.removeAttribute(name);
} else if (name === "srcdoc") {
// Recursively sanitize srcdoc content
elem.setAttribute(name, cleanHtml(value));
}
if (!isPossiblyDangerous(name, value)) continue;
elem.removeAttribute(name);
}
}

View File

@@ -92,12 +92,6 @@ export default async function handle(req: NextApiRequest, res: NextApiResponse)
"HTMX is a dependency-free JavaScript library that allows you to access AJAX, CSS Transitions, WebSockets, and Server Sent Events directly in HTML.",
href: "https://htmx.org",
},
{
name: "Inbox Zero",
description:
"Inbox Zero makes it easy to clean up your inbox and reach inbox zero fast. It provides bulk newsletter unsubscribe, cold email blocking, email analytics, and AI automations.",
href: "https://getinboxzero.com",
},
{
name: "Infisical",
description:

View File

@@ -1,254 +0,0 @@
import AuthorBox from "@/components/shared/AuthorBox";
import LayoutMdx from "@/components/shared/LayoutMdx";
import AuthorOla from "@/images/blog/ola-content-writer.png";
import Image from "next/image";
import Appcues from "./best-feedback-app-2024-appcues-feedback-app.png";
import Header from "./best-feedback-app-2024-free-in-app-header-image.webp";
import Formbricks from "./formbricks-best-open-source-feedback-app.png";
import InAppFeedback from "./in-app-feedback-tool-editor-open-source.webp";
import Pendo from "./pendo-best-digital-experience-feedback-app.png";
import Qualaroo from "./qualaroo-best-user-feedback-software.png";
import Survicate from "./survicate-best-survey-feedback-app.png";
import Userpilot from "./userpilot-best-feedback-in-app-tool.png";
export const meta = {
title: "Feedback App Contest: 6 Candidates, 1 Winner (and how to use it)",
description:
"We looked at the best in app feedback tools 2024 and found a clear winner. Gather feedback in your app for free with Formbricks.",
date: "2023-12-21",
publishedTime: "2023-12-21T12:00:00",
authors: ["Olasunkanmi Balogun"],
section: "Feedback Apps",
tags: ["Feedback Apps", "Formbricks", "Userpilot", "Pendo", "Appcues", "Survicate", "Qualaroo"],
};
<Image src={Header} alt="Gather in app feedback for free with these 6 tools." className="w-full rounded-lg" />
<AuthorBox
name="Olasunkanmi Balogun"
title="Content Writer"
date="December 21st, 2023"
duration="15"
author={"Ola"}
/>
_Only when you understand your users and customers will they come back and tell others about your service. AI makes it easier and easier to crank out code, but are you building the right thing?_
Only your users and customers can tell you.
## Whats in-app feedback, and why is it 6x better?
In-app feedback is a method of collecting feedback from users while they are using the app. Instead of redirecting users to external platforms or surveys, in-app feedback methods enable users to share their thoughts seamlessly.
“Why is it better?” you ask. Well, first of all, in-app surveys have a 6x higher response rate than emailed-out surveys. So to get the same amount of insight, you have to bother a lot fewer people. Orrr from the same number of people, you can harvest a LOT more insights.
Additionally, you get feedback directly when a user experiences your app, instead of pinging them hours later when they are in a completely different context. So in-app feedback gives you **more insights of higher quality while having to ask less often**.
<Image
src={InAppFeedback}
alt="Open Source and free: Formbricks is the new kid on the block."
className="w-full rounded-lg"
/>
### How to gather in-app feedback
Depending on the tools you use, you can collect in-app feedback through the following methods:
- **Chatbots**: Chatbots can be used to collect feedback conversationally and provide real-time support to users.
- **Embedded forms**: Embedded forms can be used to collect feedback on specific pages or workflows within the app. The huge advantage is that they seamlessly integrate into the existing UI, avoiding survey fatigue completely.
- **Feedback widget**: Feedback widgets are a valuable tool for app developers and website owners who want to gather user insights and improve their products or services. They are small snippets of code installed on the entire website.
### Picking the right in-app feedback tool
Here are some of the things to look for in an in-app feedback tool. According to these 7 criteria, we will rate the 6 tools we found most useful:
1. **Pre-segmentation & Targeting 🎯**
You want to avoid asking everyone the same questions. The ability to target specific segments differs widely.
2. **Native Look & Feel 😍**
Youve spent a lot of time crafting that UX and you likely dont wanna ruin it with a popup survey. Am I right?
3. **Insights Assistance** 🧠
Here we look at to what extent the tool helps you get the insights you need and how to share them with the right people in your team.
4. **Integrations with third-party tools 🧩**
How well can you implement the tool in your existing product stack?
5. **Extensibility 🛠️**
Wanna do more? We look at how much you can customize and extend each of the tools.
6. **Pricing 💸**
How expensive is it and is it worth it?
7. **Privacy and Compliance 🔒**
Can you use it with full GDPR, CCPA, or even HIPAA compliance?
The next section will explore 6 of the best tools to gather user feedback and rate them on the criteria listed above
## Meet the contenders: The best tools to gather user feedback
Among the plethora of tools available in todays market, this section will guide you through a curated selection of top contenders in the world of user feedback collection tools. Each is designed to empower you with the knowledge to refine your products and elevate user satisfaction.
### 1. Formbricks
<Image
src={Formbricks}
alt="Formbricks is a free and open source survey software for in app micro surveys. Ask any user segment at any point in the user journey."
className="w-full rounded-lg"
/>
[Formbricks](http://formbricks.com/) is an open-source micro-survey solution designed to gather specific user feedback at the perfect moment in their journey. It allows you to create and deploy targeted surveys within your app without disrupting the user experience.
Formbricks boasts a user-friendly interface, making it easy for both technical and non-technical users to create and deploy micro-surveys. The no-code editor removes the need for coding knowledge, while the intuitive design guides you through the process. Being the only open-source feedback app out there, privacy-focused users will love this!
| Score | Details |
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 🎯🎯🎯🎯 | **Pre-segmentation & Targeting:** Pre-segmentation and targeting of user segments with Formbricks is almost complete. You can send user attributes and user events to Formbricks and build segments based on that. In the next few weeks, the Formbricks team will ship [Advanced Targeting](https://github.com/formbricks/formbricks/pull/758). It gives you granular control to target any group of users even down to individual users. |
| 😍😍😍😍 | **Native Look & Feel:** Formbricks supports several means of styling the survey to match the existing UI. You can change the main color of the survey and in which corner it appears. As an engineer, you can add a stylesheet to change every element in the survey. The team is currently working on a UI to make this possible with no code as well. In the medium term, Formbricks will provide an open-source SDK to embed surveys inline, instead of having them pop over. This depth of embedding is only possible due to Formbricks open-source approach. |
| 🧠🧠🧠 | **Insights Assistance:** Formbricks provides base analytics with a few insightful add-ons like the Drop Off Analyzer and measuring time to completion for each question. The Formbricks team is scoping out AI-supported insight generation as well as custom dashboards for Q1 2024. |
| 🧩🧩🧩🧩 | **Integrations with third-party tools:** Formbricks packs direct integrations into Google Sheets, Airtable, Zapier, and Make.com. Currently in progress are a Notion and a Slack integration. With webhooks or platforms like Zapier, you can send your data exactly where you need it! |
| 🛠️🛠️🛠️🛠️🛠️ | **Extensibility:** Formbricks is the only open source solution out there. Their open approach allows you to build anything on top, below, or around it that you need - your imagination is the limit. |
| <p className="whitespace-nowrap"> 💸💸💸💸💸 </p> | **Pricing:** Formbricks is completely free to get started with, you dont even need a credit card. If you want to unlock advanced user targeting, multi-language forms, and role management, you can add your credit card and still have a free contingent of 250 responses per month. After that, you are charged $0.15 per submission - super fair! |
| 🔒🔒🔒🔒🔒 | **Privacy and Compliance:** Formbricks Cloud is hosted in Germany with full GDPR as well as CCPA compliance. Since Formbricks is easily self-hostable, keeping full control over your data is smooth. At this point, Formbricks does not yet provide HIPAA or SOC-2 compliance, but it is on the roadmap for 2024. |
**Overall**, Formbricks is a very promising solution that packs a lot of useful features and gets better by the day. The open-source approach guarantees maximum data ownership and control. Worth checking out!
Lets have a look at Userpilot!
### 2. Userpilot
<Image
src={Userpilot}
alt="Userpilot helps product teams deliver personalized in-app experiences to increase growth metrics at every stage of the user journey."
className="w-full rounded-lg"
/>
Userpilot empowers you to engage and understand your users like never before. Through its comprehensive suite of features, Userpilot helps you gather valuable feedback, personalize the user experience, and ultimately increase growth metrics.
With Userpilot, you can get started quickly with ready-made templates for common use cases.
| Score | Details |
| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p className="whitespace-nowrap">🎯🎯🎯🎯🎯</p> | **Pre-segmentation & Targeting:** Userpilot's pre-segmentation and targeting capabilities empower you to create personalized user experiences based on shared characteristics that resonate with your audience. You can segment your users based on user attributes, customer behaviors, customer preferences, and lead scoring. |
| 😍😍😍 | **Native Look & Feel:** When you create a flow with Userpilot, you also have full control over the theme of the flow. The theme controls different general appearance aspects such as fonts, background colors, and buttons. However, it always feels “added” instead of being a native part of the experience. |
| 🧠🧠🧠🧠 | **Insights Assistance:** Userpilot offers quite a range of insights on its own. You can get insights into product usage data, user engagement data, and user sentiment data. You can also analyze your product data with third-party integrations. |
| 🧩🧩🧩🧩🧩 | **Integrations with third-party tools:** You can use Userpilot with other apps in your stack. You can integrate with tools like Segment, Amplitude, Google Analytics, Google Tag Manager, Heap, Intercom, Kissmetrics, and Mixpanel. |
| 🛠️🛠️🛠️ | **Extensibility:** The extensibility is fairly limited. Userpilot does not support custom integrations or other more advanced forms of customizability. |
| 💸💸💸 | **Pricing:** Userpilot comes at a starting price of $249 / month going up to $499 if you want advanced targeting or GDPR-compliant hosting in the EU. Even though it packs a lot of great features, it seems somewhat pricey over the long run. |
| 🔒🔒 | **Privacy and Compliance:** Userpilot cannot be self-hosted. The GDPR-compliant EU cloud is only available in the $500/month plan. If you need SOC-2, you have to go with the Enterprise plan. |
**Overall**, Userpilot empowers data-driven decisions and continuous improvement, helping you to increase user engagement and reduce churn. Userpilot offers a free plan to determine if the high price point is justified.
Next up: Pendo 👇
### 3. Pendo
<Image
src={Pendo}
alt="Pendo improves the apps you build, buy, and sell so you can deliver better customer and employee experiences."
className="w-full rounded-lg"
/>
Pendo does a lot more than gathering feedback (product analytics, in-app guides, roadmaps). Once you have implemented it, you can run NPS surveys to measure your users' satisfaction with your application and gather actionable insights for driving app success. Its comprehensive suite of tools helps you understand user behavior, collect valuable feedback, and optimize your app for maximum impact.
| Score | Details |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p className="whitespace-nowrap">🎯🎯🎯🎯🎯</p> | **Pre-segmentation & Targeting:** Since Pendo packs analytics, you get to leverage the same events and segments youre using to analyze your cohorts. With Pendo, you can also divide your user base by behavioral, demographic, or customer attributes. The granular segmentation lets you run the NPS survey with users who experienced the true value of your product. |
| 😍😍😍 | **Native Look & Feel:** Pendo enables you to style your user-facing UI by setting the formatting and layouts your team can use to communicate with the user base. This helps you keep in line with your brand identity. While the styling capabilities are comprehensive, you won't be able to get a 100% native look & feel of your user-facing components. |
| 🧠🧠🧠 | **Insights Assistance:** Pendo provides analytics tools that enable you to evaluate product usage and visualize users paths. The analytics are informative and easily accessible. If needed, you can also combine Pendo with other third-party tools for a deeper analysis. |
| 🧩🧩🧩🧩🧩 | **Integrations with third-party tools:** You can connect Pendo to other apps in your stack for data integration and data syncing. You can also integrate with CRMs like Salesforce. Given all these integrations you should be able to embed Pendo nicely in your current product stack. |
| 🛠️🛠️🛠️ | **Extensibility:** Pendo does not support customization or custom integration well. There is a Developer Center where you can get the most information you need to build your own integration. |
| 💸💸💸 | **Pricing:** Pendo only provides pricing information on request. Different sources shared different estimations but it seems to start somewhere around $6000 / year. |
| 🔒🔒🔒🔒🔒 | **Privacy and Compliance:** Pendo cannot be used on-premise, so the data resides within the Pendo Cloud. It comes with GDPR, CCPA, SOC-2, and HIPAA compliance if required - thats great! |
**Overall**, Pendo stands out as a powerful and customizable platform, empowering you to create exceptional user experiences, gather valuable insights, and optimize your app for success.
Lets have a look at Appcues now ⬇️
### 4. Appcues
<Image
src={Appcues}
alt="Appcues helps you personalize in-app experiences that meet your customers where and when they need it most."
className="w-full rounded-lg"
/>
Appcues is a versatile user onboarding and engagement platform that offers a seamless experience for both users and developers. It provides a comprehensive toolkit that offers a way to streamline the journey from onboarding to feedback collection, providing valuable insights to refine your app. While it lets you run NPS surveys.
| Score | Details |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 🎯🎯🎯🎯 | **Pre-segmentation & Targeting:** Appcues enables you to target specific segments with the experiences with the flows or NPS surveys you have created. You can segment your experiences based on new users, including or excluding a subset of users. |
| 😍😍😍 | **Native Look & Feel:** Appcues is somewhat versatile in customizations. However, even after adding your brand color, the user-facing components will always look like Appcues. It feels bolted on top of your app instead of being a native part of it. |
| <p className="whitespace-nowrap">🧠🧠🧠🧠</p> | **Insights Assistance:** Appcues lets you track key product events to better understand user behavior, all with data visualizations—no coding needed. The insights dashboard is fairly comprehensive giving you a good insight into what's happening. |
| 🧩🧩🧩🧩 | **Integrations with third-party tools:** You can send data exactly where you need it with third-party integrations which include Fullstory, Google Analytics, Logrocket, and Mixpanel among others. |
| 🛠️🛠️🛠️ | **Extensibility:** Appcues offers some APIs for basic integrations, but they might not provide the level of control and flexibility required for more complex integrations or custom workflows. This can be frustrating for developers who need to work around API limitations to achieve desired functionality. |
| 💸💸 | **Pricing:** Appcues pricing starts at $249/month for smaller apps (2.500 users) jumping to $10.500/year for the Growth plan (only yearly plan available). In the Growth plan, you get access to the majority of the really cool features. Surveying in mobile apps (iOS and Android) always costs an additional premium. |
| 🔒🔒🔒 | **Privacy and Compliance:** Appcues cannot be used on-premise, so the data resides within the Appcues Cloud. It comes with GDPR and CCPA compliance and requires additional work on the customer side for HIPAA compliance. |
**Overall**, Appcues empowers you to design personalized tooltips, tours, and modals to guide users, highlight key features, and enhance their initial journey. It can be used to gather feedback in-app but it isnt built for that.
The next one has a great value for money: Survicate 💰
### 5. Survicate
<Image
src={Survicate}
alt="Survicate lets you create engaging surveys with ease."
className="w-full rounded-lg"
/>
Survicate is a powerful feedback and survey tool designed for simplicity. Users can effortlessly create and deploy surveys through an intuitive interface, with features like drag-and-drop survey builders and customizable templates. Survicate powers email, link, website, and mobile app survey.
| Score | Details |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 🎯🎯🎯 | **Pre-segmentation & Targeting:** Survicate tracks behavior in a very useful and product-agnostic way. This means that you can perform quite granular segmentation without having to set up tracking for custom events or actions. While this significantly shortens the setup time, you might not reach the exact segment you want with Survicate's built-in targeting. |
| 😍😍😍😍 | **Native Look & Feel:** Survicate enables you to design your surveys quite flexibly. You can change colors, fonts and even add custom CSS to get exactly the look and feel you are looking for. |
| 🧠🧠🧠🧠🧠 | **Insights Assistance:** Survicate has a powerful analytics dashboard. They offer custom visualizations like Word Cloud for question types where it makes sense to display one. Overall, the insights section offers a lot of depth - our favorite in this comparison 👑 |
| 🧩🧩🧩🧩🧩 | **Integrations with third-party tools:** Survicate supports a significant amount of integrations. They offer two-way sync with all relevant customer data platforms as well as one-click integrations with most other common productivity and marketing tools. |
| 🛠️🛠️ | **Extensibility:** Like most proprietary software, Survicate is not really extensible nor customizable. They offer data export via API but that's about it. |
| <p className="whitespace-nowrap">💸💸💸💸💸</p> | **Pricing:** Survicate has great value for money. You get most of the standalone survey products for $50/month. However, this does not include website or mobile app surveys, which start at $112/month for 1000 responses. Anything above is on request. |
| 🔒🔒 | **Privacy and Compliance:** As a European company, Survicate is fully GDPR compliant. There is no information about CCPA and it is not HIPAA compliant, as per their support page. Since self-hosting is not an option, Survicate cannot be used by a relevant segment of users. |
**Overall**, Survicate offers a lot of feature depth. Having been around for over 10 years, the team keeps shipping! It comes at a fair price and is versatile enough to cover most surveying use cases. The only downside is a lack of compliance support so big companies won't be able to use it.
### 6. Qualaroo
<Image
src={Qualaroo}
alt="Qualaroo simplifies the process of collecting user feedback with surveys"
className="w-full rounded-lg"
/>
Qualaroo empowers you to gather valuable user feedback through targeted "Nudges" that appear at key moments on your website. This unobtrusive approach minimizes user disruption while effectively capturing feedback that drives user experience improvements and product success.
| Score | Details |
| --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 🎯🎯🎯🎯 | **Pre-segmentation & Targeting:** Qualaroo offers various pre-segmentation methods to help you target your surveys and gather the most relevant feedback from specific user segments. These methods include user attributes and website activity like click and scroll depth, page targeting, and exit intent among others. |
| 😍😍 | **Native Look & Feel:** Qualaroo provides you with an option to style your nudges - whether light or dark palettes. While they offer a range of options, the surveys tend to look added to the UI. |
| 🧠🧠🧠🧠 | **Insights Assistance:** Qualaroo analytics and insights help you view detailed reports on survey responses, including answer choices, open-ended feedback, and sentiment analysis. You can also segment responses by user demographics, website activity, and other criteria to gain deeper insights into specific user groups. They also incorporate some AI to shorten the time to insight. |
| 🧩🧩🧩🧩 | **Integrations with third-party tools:** Qualaroo integrates with various third-party tools including Slack and Zapier. |
| 🛠️ | **Extensibility:** Since its internal workings are not readily accessible (as its not open-sourced), developers are limited in their ability to augment the platform's core functionality and tailor it to specific needs. Qualaroo does not provide APIs for developers to build on top of it. |
| 💸💸💸 | **Pricing:** Qualaroo is pretty cheap for small amounts of responses. You can access the complete product for $19.99 with 100 responses/month. If you need more, you need to reach out to their sales team. |
| <p className="whitespace-nowrap">🔒🔒🔒🔒</p> | **Privacy and Compliance:** Qualaroo cannot be self-hosted, so the data resides within the US-based cloud. The privacy compliance information is not super comprehensive, but it seems that Qualaroo supports GDPR, CCPA, and even HIPAA compliance. |
**Overall**, Qualaroo is a somewhat dated but solid solution to run surveys on public websites.
<div className="hidden sm:block">
Now that we've explored the key features and functionalities of each app, let's take a step back and see how they compare in a side-by-side format:
| Features | Formbricks | Userpilot | Pendo | Appcues | Survicate | Qualaroo |
| --------------------------------- | ---------- | --------- | ----- | ------- | --------- | -------- |
| Pre-segmentation and targeting 🎯 | 🟡🟢 | 🟢 | 🟢 | 🟢 | 🟢 | 🟡 |
| Native look and feel 😍 | 🟢 | 🟡 | 🟡 | 🟡 | 🟢 | 🔴 |
| Insights 🧠 | 🟡🟢 | 🟢 | 🟢 | 🟡 | 🟢 | 🟢 |
| Integrations 🧩 | 🟡 | 🟢 | 🟢 | 🟢 | 🟢 | 🟡 |
| Extensibility 🛠️ | 🟢 | 🟡 | 🟡 | 🔴 | 🔴 | 🔴 |
| Pricing 💸 | 🟢 | 🟡 | 🟡 | 🔴 | 🟢 | 🟡 |
| Privacy 🔒 | 🟢 | 🟡 | 🟢 | 🟡 | 🔴 | 🟡 |
</div>
# Whos the winner here? 🤓
Its a tough race and it depends on what youre looking for. If youre all about gathering feedback from many different sources and channels, **Survicate is your best shot.** Its a complete survey tool allowing pretty much any survey use case and it comes at a very fair price. The only downside is privacy compliance.
If **extensibility, data privacy,** and pricing are high on your list, **give Formbricks a squeeze**. The team built out an impressive amount of surveying functionality for apps, websites, emails, and link surveys in less than a year. Being the only open source solution available, its definitely worth considering.
[Try Formbricks](https://app.formbricks.com/auth/signup) today - it's free! Measure your user or customer experience without limits.
export default ({ children }) => <LayoutMdx meta={meta}>{children}</LayoutMdx>;

View File

@@ -1,7 +1,6 @@
import Image from "next/image";
import LayoutMdx from "@/components/shared/LayoutMdx";
import AuthorBox from "@/components/shared/AuthorBox";
import AuthorJohannes from "@/images/blog/johannes-co-founder-formbricks-small.jpg";
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";
@@ -20,7 +19,7 @@ export const meta = {
tags: ["Open Source Surveys", "Formbricks", "Typeform", "SurveyJS", "Typebot", "OpnForm", "LimeSurvey"],
};
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" author={"Johannes"} />
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" />
_Most open source projects get abandoned after a while. But these 5 open source survey tools are still alive and kicking in 2023._

View File

@@ -2,7 +2,7 @@ import Image from "next/image";
import LayoutMdx from "@/components/shared/LayoutMdx";
import { Callout } from "@/components/shared/Callout";
import AuthorBox from "@/components/shared/AuthorBox";
import AuthorJohannes from "@/images/blog/johannes-co-founder-formbricks-small.jpg";
import TweetPeer from "./peer-tweet-typeform-open-source.png";
import SnoopForms from "./snoopforms-open-source-typeform-alternative.png";
import TwitterResult from "./twitter-results-PMF-cal.png";
@@ -22,7 +22,7 @@ export const meta = {
tags: ["Open Source", "Experience Management", "Formbricks"],
};
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" author={"Johannes"}/>
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" />
_A lot has happened since Matti and I had a chat about open-source surveys in May last year. The release of Formbricks v1.0 is a perfect opportunity to look back on how it all started._

View File

@@ -1,7 +1,7 @@
import Image from "next/image";
import LayoutMdx from "@/components/shared/LayoutMdx";
import AuthorBox from "@/components/shared/AuthorBox";
import AuthorJohannes from "@/images/blog/johannes-co-founder-formbricks-small.jpg";
import EmailGIF from "./email-embed.gif";
import FigmaMock from "./figma-mock.webp";
import PiyushPR from "./pr-merged.webp";
@@ -17,7 +17,7 @@ export const meta = {
tags: ["Open Source Surveys", "Open Source Design", "Design", "Community Design"],
};
<AuthorBox name="Johannes" title="Co-Founder" date="October 11th, 2023" duration="4" author={"Johannes"} />
<AuthorBox name="Johannes" title="Co-Founder" date="October 11th, 2023" duration="4" />
<p className="text-lg font-semibold">We are super excited to share the first end-to-end feature built by the community: From request, over design to code implementation ✅</p>

View File

@@ -6,7 +6,6 @@ import Mail from "./github-accelerator-selection-mail.png";
import Teams from "./github-accelerator-2022-teams.png";
import NewsletterSignup from "@/components/shared/NewsletterSignup";
import AuthorBox from "@/components/shared/AuthorBox";
import AuthorJohannes from "@/images/blog/johannes-co-founder-formbricks-small.jpg";
export const meta = {
title: "Our GitHub Accelerator Experience 👀",
@@ -19,7 +18,7 @@ export const meta = {
tags: ["GitHub Accelerator", "Open-Source", "Startup"],
};
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" author={"Johannes"} />
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" />
_We were among the first 20 teams ever to run through the Open-Source Accelerator by Github. Read about our experience and if we would do it again:_

View File

@@ -3,7 +3,7 @@ import LayoutMdx from "@/components/shared/LayoutMdx";
import TitleImage from "./formbricks-sponsored-by-github-accelerator-2023.webp";
import NewsletterSignup from "@/components/shared/NewsletterSignup";
import AuthorBox from "@/components/shared/AuthorBox";
import AuthorJohannes from "@/images/blog/johannes-co-founder-formbricks-small.jpg";
export const meta = {
title: "Formbricks Joins GitHub Accelerator's Inaugural Cohort 💃",
description:
@@ -15,7 +15,7 @@ export const meta = {
tags: ["GitHub Accelerator", "Open-Source"],
};
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" author={"Johannes"}/>
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" />
_We're getting ready to take our open-source experience management platform to new heights, thanks to being part of the first-ever GitHub Accelerator program!_

View File

@@ -5,7 +5,7 @@ import HeaderImage from "./create-a-new-survey-with-formbricks.png";
import GitpodImage from "./setup-formbricks-via-gitpod.png";
import PackagesFolderImage from "./formbricks-packages-folder.png";
import AuthorBox from "@/components/shared/AuthorBox";
import AuthorJohannes from "@/images/blog/johannes-co-founder-formbricks-small.jpg";
export const meta = {
title: "Join the FormTribe 🔥",
description: "Here is everything you need to know about joining the Formbricks community",
@@ -16,7 +16,7 @@ export const meta = {
tags: ["Open-Source", "No-Code", "Formbricks", "Geting started", "Welcome guide"],
};
<AuthorBox name="Johannes" title="Co-Founder" date="October 1st, 2023" duration="4" author={"Johannes"}/>
<AuthorBox name="Johannes" title="Co-Founder" date="October 1st, 2023" duration="4" />
<Image src={HeaderImage} alt="Title Image" className="w-full rounded-lg" />

View File

@@ -5,7 +5,6 @@ import WhyWeDoIt from "./why-we-do-it.png";
import EverythinEverywhereAllAtOnce from "./everything_everywhere_all_at_once.png";
import ResponsiveEmbed from "react-responsive-embed";
import AuthorBox from "@/components/shared/AuthorBox";
import AuthorJohannes from "@/images/blog/johannes-co-founder-formbricks-small.jpg";
export const meta = {
title: "Open source forms will save the world.",
@@ -17,7 +16,7 @@ export const meta = {
tags: ["Open Source", "Survey Tool", "Forms"],
};
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" author={"Johannes"} />
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" />
<Image src={RobinHoodMeme} alt="Robin Hood Meme" className="rounded-lg w-full" />

View File

@@ -10,7 +10,6 @@ import TypeformValue from "./typeform-value-prop.png";
import ResponsiveEmbed from "react-responsive-embed";
import { Callout } from "@/components/shared/Callout";
import AuthorBox from "@/components/shared/AuthorBox";
import AuthorJohannes from "@/images/blog/johannes-co-founder-formbricks-small.jpg";
export const meta = {
title: "Why Qualtrics beats Typeform, especially Open-Source",
@@ -23,7 +22,7 @@ export const meta = {
tags: ["Open Source", "Experience Management", "Typeform", "Qualtrics"],
};
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" author={"Johannes"} />
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" />
<Image src={Wrestling} alt="Why we do it" className="rounded-lg w-full" />

View File

@@ -2,7 +2,6 @@ import Image from "next/image";
import LayoutMdx from "@/components/shared/LayoutMdx";
import AuthorBox from "@/components/shared/AuthorBox";
import Preseed from "./preseed-header.webp";
import AuthorJohannes from "@/images/blog/johannes-co-founder-formbricks-small.jpg";
export const meta = {
title: "We raised Pre-Seed Funding 💸",
@@ -23,7 +22,7 @@ export const meta = {
_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"}/>
<AuthorBox name="Johannes" title="Co-Founder" date="November 1st, 2023" duration="2" />
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.

View File

@@ -3,7 +3,6 @@ import LayoutMdx from "@/components/shared/LayoutMdx";
import HeaderImage from "./formbricks-logo-header-open-source-form-infrastructure.svg";
import HeroAnimation from "../../../components/shared/HeroAnimation.tsx";
import AuthorBox from "@/components/shared/AuthorBox";
import AuthorJohannes from "@/images/blog/johannes-co-founder-formbricks-small.jpg";
export const meta = {
title: "snoopForms → Formbricks 🎉",
@@ -15,7 +14,7 @@ export const meta = {
tags: ["Formbricks", "snoopForms", "Open Source"],
};
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" author={"Johannes"} />
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" />
<Image src={HeaderImage} alt="Formbricks - Open Source Forms and Surveys" className="rounded-lg w-full" />

View File

@@ -7,7 +7,6 @@ import HeaderImage from "./formbricks-logo.svg";
import ProprietaryDependence from "./propietary-dependence.jpeg";
import ResponsiveEmbed from "react-responsive-embed";
import AuthorBox from "@/components/shared/AuthorBox";
import AuthorJohannes from "@/images/blog/johannes-co-founder-formbricks-small.jpg";
export const meta = {
title: "Why Open-Source + No-Code is the Future of Enterprise & Goverment Software",
@@ -20,7 +19,7 @@ export const meta = {
tags: ["Open-Source", "No-Code", "Enterprise", "Government"],
};
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" author={"Johannes"}/>
<AuthorBox name="Johannes" title="Co-Founder" date="April 7th, 2023" duration="4" />
<Image src={TitleImage} alt="Title Image" className="rounded-lg w-full" />

View File

@@ -30,12 +30,12 @@ export default function DocsFeedbackPage() {
</p>
<UseCaseCTA href="/docs/best-practices/docs-feedback" />
</div>
<div className="mx-6 my-6 flex flex-col items-center justify-center rounded-xl border-2 border-slate-300 bg-slate-200 p-4 pb-36 transition-transform duration-150 md:mx-0 dark:border-slate-500 dark:bg-slate-700">
<div className="mx-6 my-6 flex flex-col items-center justify-center rounded-xl border-2 border-slate-300 bg-slate-200 p-4 pb-36 transition-transform duration-150 dark:border-slate-500 dark:bg-slate-700 md:mx-0">
<p className="my-3 text-sm text-slate-500">Preview</p>
<DocsFeedback />
</div>
</div>
<h2 className="mb-6 ml-4 mt-12 text-2xl font-semibold text-slate-700 md:mt-0 dark:text-slate-400">
<h2 className="mb-6 ml-4 mt-12 text-2xl font-semibold text-slate-700 dark:text-slate-400 md:mt-0">
Other Best Practices
</h2>
<BestPracticeNavigation />

View File

@@ -34,7 +34,7 @@ export default function FeatureChaserPage() {
<DemoPreview template="Feature Chaser" />
</div>
<h2 className="mb-6 ml-4 mt-12 text-2xl font-semibold text-slate-700 md:mt-0 dark:text-slate-400">
<h2 className="mb-6 ml-4 mt-12 text-2xl font-semibold text-slate-700 dark:text-slate-400 md:mt-0">
Other Best Practices
</h2>
<BestPracticeNavigation />

View File

@@ -33,7 +33,7 @@ export default function FeedbackBoxPage() {
<DemoPreview template="Feedback Box" />
</div>
<h2 className="mb-6 ml-4 mt-12 text-2xl font-semibold text-slate-700 md:mt-0 dark:text-slate-400">
<h2 className="mb-6 ml-4 mt-12 text-2xl font-semibold text-slate-700 dark:text-slate-400 md:mt-0">
Other Best Practices
</h2>
<BestPracticeNavigation />

View File

@@ -32,7 +32,7 @@ export default function MissedTrialPagePage() {
</div>
<DemoPreview template="Improve Trial Conversion" />
</div>
<h2 className="mb-6 ml-4 mt-12 text-2xl font-semibold text-slate-700 md:mt-0 dark:text-slate-400">
<h2 className="mb-6 ml-4 mt-12 text-2xl font-semibold text-slate-700 dark:text-slate-400 md:mt-0">
Other Best Practices
</h2>
<BestPracticeNavigation />

View File

@@ -32,7 +32,7 @@ export default function InterviewPromptPage() {
</div>
<DemoPreview template="Interview Prompt" />
</div>
<h2 className="mb-6 ml-4 mt-12 text-2xl font-semibold text-slate-700 md:mt-0 dark:text-slate-400">
<h2 className="mb-6 ml-4 mt-12 text-2xl font-semibold text-slate-700 dark:text-slate-400 md:mt-0">
Other Best Practices
</h2>
<BestPracticeNavigation />

View File

@@ -32,7 +32,7 @@ export default function LearnFromChurnPage() {
</div>
<DemoPreview template="Churn Survey" />
</div>
<h2 className="mb-6 ml-4 mt-12 text-2xl font-semibold text-slate-700 md:mt-0 dark:text-slate-400">
<h2 className="mb-6 ml-4 mt-12 text-2xl font-semibold text-slate-700 dark:text-slate-400 md:mt-0">
Other Best Practices
</h2>
<BestPracticeNavigation />

View File

@@ -55,7 +55,7 @@ export default function MeasurePMFPage() {
<strong>only survey the right subset</strong> of your user base.
</p>
</div>
<div className="rounded-lg bg-slate-100 p-4 sm:p-8 dark:bg-slate-800">
<div className="rounded-lg bg-slate-100 p-4 dark:bg-slate-800 sm:p-8">
<Image
src={PreSegmentation}
quality="100"
@@ -81,7 +81,7 @@ export default function MeasurePMFPage() {
</div>
<div className="pb-8 md:pb-0">
<h4 className="text-brand-dark font-bold">Step 2</h4>
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 sm:text-3xl dark:text-slate-100">
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-100 sm:text-3xl">
Survey users in-app
</h2>
<p className="text-md mt-6 max-w-lg leading-7 text-slate-500 dark:text-slate-400">
@@ -97,7 +97,7 @@ export default function MeasurePMFPage() {
<div className="grid md:grid-cols-2 md:items-center md:gap-16">
<div className="pb-8 sm:pl-10 md:pb-0">
<h4 className="text-brand-dark font-bold">Step 3</h4>
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 sm:text-3xl dark:text-slate-200">
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-200 sm:text-3xl">
Loop in your team
</h2>
<p className="text-md mt-6 max-w-lg leading-7 text-slate-500 dark:text-slate-400">
@@ -136,7 +136,7 @@ export default function MeasurePMFPage() {
</div>
<div className="pb-8 pl-4 md:pb-0">
<h4 className="text-brand-dark font-bold">Step 4</h4>
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 sm:text-3xl dark:text-slate-100">
<h2 className="xs:text-3xl text-2xl font-bold tracking-tight text-slate-800 dark:text-slate-100 sm:text-3xl">
Make better decisions
</h2>
<p className="text-md mt-6 max-w-lg leading-7 text-slate-500 dark:text-slate-400">

View File

@@ -32,7 +32,7 @@ export default function OnboardingSegmentationPage() {
<DemoPreview template="Onboarding Segmentation" />
</div>
<h2 className="mb-6 ml-4 mt-12 text-2xl font-semibold text-slate-700 md:mt-0 dark:text-slate-400">
<h2 className="mb-6 ml-4 mt-12 text-2xl font-semibold text-slate-700 dark:text-slate-400 md:mt-0">
Other Best Practices
</h2>
<BestPracticeNavigation />

View File

@@ -4,6 +4,7 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "storybook dev -p 6006",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
@@ -17,19 +18,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-essentials": "^7.6.4",
"@storybook/addon-interactions": "^7.6.4",
"@storybook/addon-links": "^7.6.4",
"@storybook/addon-onboarding": "^1.0.10",
"@storybook/blocks": "^7.6.7",
"@storybook/react": "^7.6.7",
"@storybook/react-vite": "^7.6.7",
"@storybook/blocks": "^7.6.4",
"@storybook/react": "^7.6.4",
"@storybook/react-vite": "^7.6.4",
"@storybook/testing-library": "^0.2.2",
"@typescript-eslint/eslint-plugin": "^6.17.0",
"@typescript-eslint/parser": "^6.17.0",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@vitejs/plugin-react": "^4.2.1",
"esbuild": "^0.19.11",
"esbuild": "^0.19.9",
"tsup": "^8.0.1",
"vite": "^5.0.10"
"vite": "^5.0.8"
}
}

View File

@@ -13,7 +13,7 @@ export default function PosthogIdentify({ session }: { session: Session }) {
useEffect(() => {
if (posthogEnabled && session.user && posthog) {
posthog.identify(session.user.id, { name: session.user.name, email: session.user.email });
posthog.identify(session.user.id);
}
}, [session, posthog]);

View File

@@ -10,7 +10,6 @@ import {
CodeBracketIcon,
CreditCardIcon,
DocumentCheckIcon,
EnvelopeIcon,
HeartIcon,
LinkIcon,
PaintBrushIcon,
@@ -480,27 +479,17 @@ export default function Navigation({
<DropdownMenuSeparator />
<DropdownMenuGroup>
{isFormbricksCloud && (
<>
<DropdownMenuItem>
<a href="mailto:johannes@formbricks.com">
<div className="flex items-center">
<EnvelopeIcon className="mr-2 h-4 w-4" />
<span>Email us!</span>
</div>
</a>
</DropdownMenuItem>
<DropdownMenuItem>
<button
onClick={() => {
formbricks.track("Top Menu: Product Feedback");
}}>
<div className="flex items-center">
<ChatBubbleBottomCenterTextIcon className="mr-2 h-4 w-4" />
<span>Product Feedback</span>
</div>
</button>
</DropdownMenuItem>
</>
<DropdownMenuItem>
<button
onClick={() => {
formbricks.track("Top Menu: Product Feedback");
}}>
<div className="flex items-center">
<ChatBubbleBottomCenterTextIcon className="mr-2 h-4 w-4" />
<span>Product Feedback</span>
</div>
</button>
</DropdownMenuItem>
)}
<DropdownMenuItem
onClick={async () => {

View File

@@ -1,18 +0,0 @@
"use server";
import { getServerSession } from "next-auth";
import { authOptions } from "@formbricks/lib/authOptions";
import { hasUserEnvironmentAccess } from "@formbricks/lib/environment/auth";
import { getNotionDatabases } from "@formbricks/lib/notion/service";
import { AuthorizationError } from "@formbricks/types/errors";
export async function refreshDatabasesAction(environmentId: string) {
const session = await getServerSession(authOptions);
if (!session) throw new AuthorizationError("Not authorized");
const isAuthorized = await hasUserEnvironmentAccess(session.user.id, environmentId);
if (!isAuthorized) throw new AuthorizationError("Not authorized");
return await getNotionDatabases(environmentId);
}

View File

@@ -1,589 +0,0 @@
import { createOrUpdateIntegrationAction } from "@/app/(app)/environments/[environmentId]/integrations/actions";
import {
ERRORS,
TYPE_MAPPING,
UNSUPPORTED_TYPES_BY_NOTION,
} from "@/app/(app)/environments/[environmentId]/integrations/notion/constants";
import { questionTypes } from "@/app/lib/questions";
import NotionLogo from "@/images/notion.png";
import { ArrowPathIcon, ChevronDownIcon, PlusIcon, XMarkIcon } from "@heroicons/react/24/solid";
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
import Image from "next/image";
import React, { useEffect, useMemo, useState } from "react";
import { useForm } from "react-hook-form";
import toast from "react-hot-toast";
import { TIntegrationInput } from "@formbricks/types/integration";
import {
TIntegrationNotion,
TIntegrationNotionConfigData,
TIntegrationNotionDatabase,
} from "@formbricks/types/integration/notion";
import { TSurvey, TSurveyQuestionType } from "@formbricks/types/surveys";
import { Button } from "@formbricks/ui/Button";
import { Label } from "@formbricks/ui/Label";
import { Modal } from "@formbricks/ui/Modal";
interface AddIntegrationModalProps {
environmentId: string;
surveys: TSurvey[];
open: boolean;
setOpen: React.Dispatch<React.SetStateAction<boolean>>;
notionIntegration: TIntegrationNotion;
databases: TIntegrationNotionDatabase[];
selectedIntegration: (TIntegrationNotionConfigData & { index: number }) | null;
}
export default function AddIntegrationModal({
environmentId,
surveys,
open,
setOpen,
notionIntegration,
databases,
selectedIntegration,
}: AddIntegrationModalProps) {
const { handleSubmit } = useForm();
const [selectedDatabase, setSelectedDatabase] = useState<TIntegrationNotionDatabase | null>();
const [selectedSurvey, setSelectedSurvey] = useState<TSurvey | null>(null);
const [mapping, setMapping] = useState<
{
column: { id: string; name: string; type: string };
question: { id: string; name: string; type: string };
error?: {
type: string;
msg: React.ReactNode | string;
} | null;
}[]
>([
{
column: { id: "", name: "", type: "" },
question: { id: "", name: "", type: "" },
},
]);
const [isDeleting, setIsDeleting] = useState<any>(null);
const [isLinkingDatabase, setIsLinkingDatabase] = useState(false);
const integrationData = {
databaseId: "",
databaseName: "",
surveyId: "",
surveyName: "",
mapping: [
{
column: { id: "", name: "", type: "" },
question: { id: "", name: "", type: "" },
},
],
createdAt: new Date(),
};
const notionIntegrationData: TIntegrationInput = {
type: "notion",
config: {
key: notionIntegration?.config?.key,
data: notionIntegration.config?.data || [],
},
};
const hasMatchingId = notionIntegration.config.data.some((configData) => {
if (!selectedDatabase) {
return false;
}
return configData.databaseId === selectedDatabase.id;
});
const dbItems = useMemo(() => {
const dbProperties = (selectedDatabase as any)?.properties;
return (
Object.keys(dbProperties || {}).map((fieldKey: string) => ({
id: dbProperties[fieldKey].id,
name: dbProperties[fieldKey].name,
type: dbProperties[fieldKey].type,
})) || []
);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedDatabase?.id]);
const questionItems = useMemo(() => {
const questions =
selectedSurvey?.questions.map((q) => ({
id: q.id,
name: q.headline,
type: q.type,
})) || [];
const hiddenFields = selectedSurvey?.hiddenFields.enabled
? selectedSurvey?.hiddenFields.fieldIds?.map((fId) => ({
id: fId,
name: fId,
type: TSurveyQuestionType.OpenText,
})) || []
: [];
return [...questions, ...hiddenFields];
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedSurvey?.id]);
useEffect(() => {
if (selectedIntegration) {
const selectedDB = databases.find((db) => db.id === selectedIntegration.databaseId)!;
if (selectedDB) {
setSelectedDatabase({
id: selectedDB.id,
name: (selectedDB as any).title?.[0]?.plain_text,
properties: selectedDB.properties,
});
}
setSelectedSurvey(
surveys.find((survey) => {
return survey.id === selectedIntegration.surveyId;
})!
);
setMapping(selectedIntegration.mapping);
return;
}
resetForm();
}, [selectedIntegration, surveys, databases]);
const linkDatabase = async () => {
try {
if (!selectedDatabase) {
throw new Error("Please select a database");
}
if (!selectedSurvey) {
throw new Error("Please select a survey");
}
if (mapping.length === 1 && (!mapping[0].question.id || !mapping[0].column.id)) {
throw new Error("Please select at least one mapping");
}
if (mapping.filter((m) => m.error).length > 0) {
throw new Error("Please resolve the mapping errors");
}
if (
mapping.filter((m) => m.column.id && !m.question.id).length >= 1 ||
mapping.filter((m) => m.question.id && !m.column.id).length >= 1
) {
throw new Error("Please complete mapping fields with notion property");
}
setIsLinkingDatabase(true);
integrationData.databaseId = selectedDatabase.id;
integrationData.databaseName = selectedDatabase.name;
integrationData.surveyId = selectedSurvey.id;
integrationData.surveyName = selectedSurvey.name;
integrationData.mapping = mapping.map((m) => {
delete m.error;
return m;
});
integrationData.createdAt = new Date();
if (selectedIntegration) {
// update action
notionIntegrationData.config!.data[selectedIntegration.index] = integrationData;
} else {
// create action
notionIntegrationData.config!.data.push(integrationData);
}
await createOrUpdateIntegrationAction(environmentId, notionIntegrationData);
toast.success(`Integration ${selectedIntegration ? "updated" : "added"} successfully`);
resetForm();
setOpen(false);
} catch (e) {
toast.error(e.message);
} finally {
setIsLinkingDatabase(false);
}
};
const deleteLink = async () => {
notionIntegrationData.config!.data.splice(selectedIntegration!.index, 1);
try {
setIsDeleting(true);
await createOrUpdateIntegrationAction(environmentId, notionIntegrationData);
toast.success("Integration removed successfully");
setOpen(false);
} catch (error) {
toast.error(error.message);
} finally {
setIsDeleting(false);
}
};
const resetForm = () => {
setIsLinkingDatabase(false);
setSelectedDatabase(null);
setSelectedSurvey(null);
};
const getFilteredQuestionItems = (selectedIdx) => {
const selectedQuestionIds = mapping.filter((_, idx) => idx !== selectedIdx).map((m) => m.question.id);
return questionItems.filter((q) => !selectedQuestionIds.includes(q.id));
};
const createCopy = (item) => JSON.parse(JSON.stringify(item));
const MappingRow = ({ idx }: { idx: number }) => {
const filteredQuestionItems = getFilteredQuestionItems(idx);
const addRow = () => {
setMapping((prev) => [
...prev,
{
column: { id: "", name: "", type: "" },
question: { id: "", name: "", type: "" },
},
]);
};
const deleteRow = () => {
setMapping((prev) => {
return prev.filter((_, i) => i !== idx);
});
};
const ErrorMsg = ({ error, col, ques }) => {
const showErrorMsg = useMemo(() => {
switch (error?.type) {
case ERRORS.UNSUPPORTED_TYPE:
return (
<>
- <i>{col.name}</i> of type <b>{col.type}</b> is not supported by notion API. The data
won&apos;t be reflected in your notion database.
</>
);
case ERRORS.MAPPING:
return (
<>
- <i>&quot;{ques.name}&quot;</i> of type{" "}
<b>{questionTypes.find((qt) => qt.id === ques.type)?.label}</b> can&apos;t be mapped to the
column <i>&quot;{col.name}&quot;</i> of type <b>{col.type}</b>
</>
);
default:
return null;
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [error]);
if (!error) return null;
return (
<div className="my-4 w-full rounded-lg bg-red-100 p-4 text-sm text-red-800">
<span className="mb-2 block">{error.type}</span>
{showErrorMsg}
</div>
);
};
const getFilteredDbItems = () => {
const colMapping = mapping.map((m) => m.column.id);
return dbItems.filter((item) => !colMapping.includes(item.id));
};
return (
<div className="w-full">
<ErrorMsg
key={idx}
error={mapping[idx]?.error}
col={mapping[idx].column}
ques={mapping[idx].question}
/>
<div className="flex w-full items-center gap-3">
<div className="flex w-full items-center">
<div className="w-[340px] max-w-full">
<DropdownSelector
placeholder="Select a survey question"
items={filteredQuestionItems}
selectedItem={mapping?.[idx]?.question}
setSelectedItem={(item) => {
setMapping((prev) => {
const copy = createCopy(prev);
const col = copy[idx].column;
if (col.id) {
if (UNSUPPORTED_TYPES_BY_NOTION.includes(col.type)) {
copy[idx] = {
...copy[idx],
error: {
type: ERRORS.UNSUPPORTED_TYPE,
},
question: item,
};
return copy;
}
const isValidColType = TYPE_MAPPING[item.type].includes(col.type);
if (!isValidColType) {
copy[idx] = {
...copy[idx],
error: {
type: ERRORS.MAPPING,
},
question: item,
};
return copy;
}
}
copy[idx] = {
...copy[idx],
question: item,
error: null,
};
return copy;
});
}}
disabled={questionItems.length === 0}
/>
</div>
<div className="h-px w-4 border-t border-t-slate-300" />
<div className="w-[340px] max-w-full">
<DropdownSelector
placeholder="Select a field to map"
items={getFilteredDbItems()}
selectedItem={mapping?.[idx]?.column}
setSelectedItem={(item) => {
setMapping((prev) => {
const copy = createCopy(prev);
const ques = copy[idx].question;
if (ques.id) {
const isValidQuesType = TYPE_MAPPING[ques.type].includes(item.type);
if (UNSUPPORTED_TYPES_BY_NOTION.includes(item.type)) {
copy[idx] = {
...copy[idx],
error: {
type: ERRORS.UNSUPPORTED_TYPE,
},
column: item,
};
return copy;
}
if (!isValidQuesType) {
copy[idx] = {
...copy[idx],
error: {
type: ERRORS.MAPPING,
},
column: item,
};
return copy;
}
}
copy[idx] = {
...copy[idx],
column: item,
error: null,
};
return copy;
});
}}
disabled={dbItems.length === 0}
/>
</div>
</div>
<button
type="button"
className={`rounded-md p-1 hover:bg-slate-300 ${
idx === mapping.length - 1 ? "visible" : "invisible"
}`}
onClick={addRow}>
<PlusIcon className="h-5 w-5 font-bold text-gray-500" />
</button>
<button
type="button"
className={`flex-1 rounded-md p-1 hover:bg-red-100 ${
mapping.length > 1 ? "visible" : "invisible"
}`}
onClick={deleteRow}>
<XMarkIcon className="h-5 w-5 text-red-500" />
</button>
</div>
</div>
);
};
return (
<Modal open={open} setOpen={setOpen} noPadding closeOnOutsideClick={false} size="lg">
<div className="flex h-full flex-col rounded-lg">
<div className="rounded-t-lg bg-slate-100">
<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">
<Image className="w-12" src={NotionLogo} alt="Google Sheet logo" />
</div>
<div>
<div className="text-xl font-medium text-slate-700">Link Notion Database</div>
<div className="text-sm text-slate-500">Sync responses with a Notion Database</div>
</div>
</div>
</div>
</div>
<form onSubmit={handleSubmit(linkDatabase)} className="w-full">
<div className="flex justify-between rounded-lg p-6">
<div className="w-full space-y-4">
<div>
<div className="mb-4">
<DropdownSelector
label="Select Database"
items={databases.map((d) => ({
id: d.id,
name: (d as any).title?.[0]?.plain_text,
properties: d.properties,
}))}
selectedItem={selectedDatabase}
setSelectedItem={setSelectedDatabase}
disabled={databases.length === 0}
/>
{selectedDatabase && hasMatchingId && (
<p className="text-xs text-amber-700">
<strong>Warning:</strong> A connection with this database is live. Please make changes
with caution.
</p>
)}
<p className="m-1 text-xs text-slate-500">
{databases.length === 0 &&
"You have to create at least one database to be able to setup this integration"}
</p>
</div>
<div className="mb-4">
<DropdownSelector
label="Select Survey"
items={surveys}
selectedItem={selectedSurvey}
setSelectedItem={setSelectedSurvey}
disabled={surveys.length === 0}
/>
<p className="m-1 text-xs text-slate-500">
{surveys.length === 0 &&
"You have to create a survey to be able to setup this integration"}
</p>
</div>
{selectedDatabase && selectedSurvey && (
<div>
<Label>Map Formbricks fields to Notion property</Label>
<div className="mt-4">
{mapping.map((_, idx) => (
<MappingRow idx={idx} key={idx} />
))}
</div>
</div>
)}
</div>
</div>
</div>
<div className="flex justify-end border-t border-slate-200 p-6">
<div className="flex space-x-2">
{selectedIntegration ? (
<Button
type="button"
variant="warn"
loading={isDeleting}
onClick={() => {
deleteLink();
}}>
Delete
</Button>
) : (
<Button
type="button"
variant="minimal"
onClick={() => {
setOpen(false);
resetForm();
setMapping([]);
}}>
Cancel
</Button>
)}
<Button
variant="darkCTA"
type="submit"
loading={isLinkingDatabase}
disabled={mapping.filter((m) => m.error).length > 0}>
{selectedIntegration ? "Update" : "Link Database"}
</Button>
</div>
</div>
</form>
</div>
</Modal>
);
}
interface DropdownSelectorProps {
label?: string;
items: Array<any>;
selectedItem: any;
setSelectedItem: React.Dispatch<React.SetStateAction<any>>;
disabled: boolean;
placeholder?: string;
refetch?: () => void;
}
const DropdownSelector = ({
label,
items,
selectedItem,
setSelectedItem,
disabled,
placeholder,
refetch,
}: DropdownSelectorProps) => {
return (
<div className="col-span-1">
{label && <Label htmlFor={label}>{label}</Label>}
<div className="mt-1 flex items-center gap-3">
<DropdownMenu.Root>
<DropdownMenu.Trigger asChild>
<button
disabled={disabled ? disabled : false}
type="button"
className="flex h-10 w-full rounded-md border border-slate-300 bg-transparent px-3 py-2 text-sm text-slate-800 placeholder:text-slate-400 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-500 dark:text-slate-300">
<span className="flex w-4/5 flex-1">
<span className="w-full truncate text-left">
{selectedItem ? selectedItem.name || placeholder || label : `${placeholder || label}`}
</span>
</span>
<span className="flex h-full items-center border-l pl-3">
<ChevronDownIcon className="h-4 w-4 text-gray-500" />
</span>
</button>
</DropdownMenu.Trigger>
{!disabled && (
<DropdownMenu.Portal>
<DropdownMenu.Content
className="z-50 max-h-64 min-w-[220px] overflow-auto rounded-md bg-white text-sm text-slate-800 shadow-md"
align="start">
{items &&
items.map((item) => (
<DropdownMenu.Item
key={item.id}
className="flex cursor-pointer items-center p-3 hover:bg-gray-100 hover:outline-none data-[disabled]:cursor-default data-[disabled]:opacity-50"
onSelect={() => setSelectedItem(item)}>
{item.name}
</DropdownMenu.Item>
))}
</DropdownMenu.Content>
</DropdownMenu.Portal>
)}
</DropdownMenu.Root>
{refetch && (
<button
type="button"
className="rounded-md p-1 hover:bg-slate-300"
onClick={() => {
refetch();
}}>
<ArrowPathIcon className="h-5 w-5 font-bold text-gray-500" />
</button>
)}
</div>
</div>
);
};

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