diff --git a/.env.docker b/.env.docker
index d0c378e4d3..ba19223174 100644
--- a/.env.docker
+++ b/.env.docker
@@ -7,7 +7,7 @@
# BASICS #
############
-NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
+WEBAPP_URL=http://localhost:3000
##############
# DATABASE #
@@ -63,25 +63,25 @@ NEXTAUTH_URL=http://localhost:3000
#####################
# Email Verification. If you enable Email Verification you have to setup SMTP-Settings, too.
-NEXT_PUBLIC_EMAIL_VERIFICATION_DISABLED=1
+EMAIL_VERIFICATION_DISABLED=1
# Password Reset. If you enable Password Reset functionality you have to setup SMTP-Settings, too.
-NEXT_PUBLIC_PASSWORD_RESET_DISABLED=1
+PASSWORD_RESET_DISABLED=1
# Signup. Disable the ability for new users to create an account.
-# NEXT_PUBLIC_SIGNUP_DISABLED=1
+# SIGNUP_DISABLED=1
# Team Invite. Disable the ability for invited users to create an account.
-# NEXT_PUBLIC_INVITE_DISABLED=1
+# INVITE_DISABLED=1
##########
# Other #
##########
# Display privacy policy, imprint and terms of service links in the footer of signup & public pages.
-NEXT_PUBLIC_PRIVACY_URL=
-NEXT_PUBLIC_TERMS_URL=
-NEXT_PUBLIC_IMPRINT_URL=
+PRIVACY_URL=
+TERMS_URL=
+IMPRINT_URL=
# Disable Sentry warning
SENTRY_IGNORE_API_RESOLUTION_ERROR=1
@@ -90,14 +90,18 @@ SENTRY_IGNORE_API_RESOLUTION_ERROR=1
NEXT_PUBLIC_SENTRY_DSN=
# Configure Github Login
-NEXT_PUBLIC_GITHUB_AUTH_ENABLED=0
+GITHUB_AUTH_ENABLED=0
GITHUB_ID=
GITHUB_SECRET=
# Configure Google Login
-NEXT_PUBLIC_GOOGLE_AUTH_ENABLED=0
+GOOGLE_AUTH_ENABLED=0
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# Cron Secret
CRON_SECRET=
+
+# Encryption key
+# You can use: `openssl rand -base64 16` to generate one
+FORMBRICKS_ENCRYPTION_KEY=
\ No newline at end of file
diff --git a/.env.example b/.env.example
index 7b3c52feec..1a4c51ccf9 100644
--- a/.env.example
+++ b/.env.example
@@ -8,7 +8,7 @@
# BASICS #
############
-NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
+WEBAPP_URL=http://localhost:3000
##############
# DATABASE #
@@ -20,6 +20,7 @@ DATABASE_URL='postgresql://postgres:postgres@localhost:5432/formbricks?schema=pu
# Cold boots will be faster and you'll be able to scale your DB independently of your app.
# @see https://www.prisma.io/docs/data-platform/data-proxy/use-data-proxy
# PRISMA_GENERATE_DATAPROXY=true
+# i dont think we use it so ask Matti and remove it
PRISMA_GENERATE_DATAPROXY=
###############
@@ -34,9 +35,6 @@ NEXTAUTH_SECRET=RANDOM_STRING
# You do not need the NEXTAUTH_URL environment variable in Vercel.
NEXTAUTH_URL=http://localhost:3000
-# If you encounter NEXT_AUTH URL problems this should always be localhost:3000 (or whatever port your app is running on)
-# NEXTAUTH_URL_INTERNAL=http://localhost:3000
-
################
# MAIL SETUP #
################
@@ -64,33 +62,33 @@ SMTP_PASSWORD=smtpPassword
#####################
# Email Verification. If you enable Email Verification you have to setup SMTP-Settings, too.
-# NEXT_PUBLIC_EMAIL_VERIFICATION_DISABLED=1
+# EMAIL_VERIFICATION_DISABLED=1
# Password Reset. If you enable Password Reset functionality you have to setup SMTP-Settings, too.
-# NEXT_PUBLIC_PASSWORD_RESET_DISABLED=1
+# PASSWORD_RESET_DISABLED=1
# Signup. Disable the ability for new users to create an account.
-# NEXT_PUBLIC_SIGNUP_DISABLED=1
+# SIGNUP_DISABLED=1
# Team Invite. Disable the ability for invited users to create an account.
-# NEXT_PUBLIC_INVITE_DISABLED=1
+# INVITE_DISABLED=1
##########
# Other #
##########
# Display privacy policy, imprint and terms of service links in the footer of signup & public pages.
-NEXT_PUBLIC_PRIVACY_URL=
-NEXT_PUBLIC_TERMS_URL=
-NEXT_PUBLIC_IMPRINT_URL=
+PRIVACY_URL=
+TERMS_URL=
+IMPRINT_URL=
# Configure Github Login
-NEXT_PUBLIC_GITHUB_AUTH_ENABLED=0
+GITHUB_AUTH_ENABLED=0
GITHUB_ID=
GITHUB_SECRET=
# Configure Google Login
-NEXT_PUBLIC_GOOGLE_AUTH_ENABLED=0
+GOOGLE_AUTH_ENABLED=0
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
@@ -106,4 +104,8 @@ NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID=
# Cron Secret
CRON_SECRET=
-*/
\ No newline at end of file
+*/
+
+# Encryption key
+# You can use: `openssl rand -base64 16` to generate one
+FORMBRICKS_ENCRYPTION_KEY=
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
index 338cbcbe7a..c5b00f7561 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.yml
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -4,42 +4,45 @@ title: "[FEATURE]"
labels: enhancement
assignees: []
body:
-- type: textarea
- id: problem-description
- attributes:
- label: Is your feature request related to a problem? Please describe.
- description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
- validations:
- required: true
-- type: textarea
- id: solution-description
- attributes:
- label: Describe the solution you'd like
- description: A clear and concise description of what you want to happen.
- validations:
- required: true
-- type: textarea
- id: alternate-solution-description
- attributes:
- label: Describe alternatives you've considered
- description: A clear and concise description of any alternative solutions or features you've considered.
- validations:
- required: false
-- type: textarea
- id: additional-context
- attributes:
- label: Additional context
- description: Add any other context or screenshots about the feature request here.
- validations:
- required: false
-- type: markdown
- id: formbricks-info
- attributes:
- value: |
- ### How we code at Formbricks 🤓
+ - type: textarea
+ id: problem-description
+ attributes:
+ label: Is your feature request related to a problem? Please describe.
+ description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+ validations:
+ required: true
+ - type: textarea
+ id: solution-description
+ attributes:
+ label: Describe the solution you'd like
+ description: A clear and concise description of what you want to happen.
+ validations:
+ required: true
+ - type: textarea
+ id: alternate-solution-description
+ attributes:
+ label: Describe alternatives you've considered
+ description: A clear and concise description of any alternative solutions or features you've considered.
+ validations:
+ required: false
+ - type: textarea
+ id: additional-context
+ attributes:
+ label: Additional context
+ description: Add any other context or screenshots about the feature request here.
+ validations:
+ required: false
+ - type: markdown
+ id: formbricks-info
+ attributes:
+ value: |
+ ### How we code at Formbricks 🤓
- - Everything is type-safe
- - All UI components are in the package `formbricks/ui`
- - Run `pnpm dev` to find a demo app to test in-app surveys at `localhost:3002`
- - We use **chatGPT** to help refactor code. Use our [Formbricks ✨ megaprompt ✨](https://github.com/formbricks/formbricks/blob/main/megaprompt.md) to create the right
- context before you write your prompt.
+ - Follow Best Practices lined out in our [Contributor Docs](https://formbricks.com/docs/contributing/how-we-code)
+ - First time: Please read our [introductory blog post](https://formbricks.com/blog/join-the-formtribe)
+ - All UI components are in the package `formbricks/ui`
+ - Run `pnpm go` to find a demo app to test in-app surveys at `localhost:3002`
+ - Everything is type-safe
+ - We use **chatGPT** to help refactor code. Use our [Formbricks ✨ megaprompt ✨](https://github.com/formbricks/formbricks/blob/main/megaprompt.md) to create the right
+ context before you write your prompt.
+ - Anything unclear? [Ask in Discord](https://formbricks.com/discord)
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index bcc25bd390..fa0d33dbca 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -31,9 +31,10 @@ Fixes # (issue)
-- [ ] Added a screen recording or screenshots to this PR
+### Required
+
- [ ] Filled out the "How to test" section in this PR
-- [ ] Read the [contributing guide](https://github.com/formbricks/formbricks/blob/main/CONTRIBUTING.md)
+- [ ] Read [How we Code at Formbricks](<[https://github.com/formbricks/formbricks/blob/main/CONTRIBUTING.md](https://formbricks.com/docs/contributing/how-we-code)>)
- [ ] Self-reviewed my own code
- [ ] Commented on my code in hard-to-understand bits
- [ ] Ran `pnpm build`
@@ -41,4 +42,8 @@ Fixes # (issue)
- [ ] Removed all `console.logs`
- [ ] Merged the latest changes from main onto my branch with `git pull origin main`
- [ ] My changes don't cause any responsiveness issues
+
+### Appreciated
+
+- [ ] If a UI change was made: Added a screen recording or screenshots to this PR
- [ ] Updated the Formbricks Docs if changes were necessary
diff --git a/.gitpod.yml b/.gitpod.yml
index 54f05d33a1..3c5941863b 100644
--- a/.gitpod.yml
+++ b/.gitpod.yml
@@ -32,7 +32,7 @@ tasks:
command: |
gp sync-await init &&
cp .env.example .env &&
- sed -i -r "s#^(NEXT_PUBLIC_WEBAPP_URL=).*#\1 $(gp url 3000)#" .env &&
+ sed -i -r "s#^(WEBAPP_URL=).*#\1 $(gp url 3000)#" .env &&
sed -i -r "s#^(NEXTAUTH_URL=).*#\1 $(gp url 3000)#" .env &&
turbo --filter "@formbricks/web" go
diff --git a/apps/formbricks-com/app/docs/contributing/gitpod/page.mdx b/apps/formbricks-com/app/docs/contributing/gitpod/page.mdx
new file mode 100644
index 0000000000..1128322297
--- /dev/null
+++ b/apps/formbricks-com/app/docs/contributing/gitpod/page.mdx
@@ -0,0 +1,15 @@
+import Image from "next/image";
+
+export const meta = {
+ title: "Gitpod Setup",
+ description:
+ "With one click, you can setup the Formbricks developer environment in your browser using Gitpod",
+};
+
+### One Click Setup
+
+1. Click the button below to open this project in Gitpod.
+
+2. This will open a fully configured workspace in your browser with all the necessary dependencies already installed.
+
+[](https://gitpod.io/#https://github.com/formbricks/formbricks)
diff --git a/apps/formbricks-com/app/docs/contributing/how-we-code/cors-handling-in-api.webp b/apps/formbricks-com/app/docs/contributing/how-we-code/cors-handling-in-api.webp
new file mode 100644
index 0000000000..10ced089d6
Binary files /dev/null and b/apps/formbricks-com/app/docs/contributing/how-we-code/cors-handling-in-api.webp differ
diff --git a/apps/formbricks-com/app/docs/contributing/how-we-code/page.mdx b/apps/formbricks-com/app/docs/contributing/how-we-code/page.mdx
new file mode 100644
index 0000000000..4ea09e78c6
--- /dev/null
+++ b/apps/formbricks-com/app/docs/contributing/how-we-code/page.mdx
@@ -0,0 +1,128 @@
+import Image from "next/image";
+import CorsHandling from "./cors-handling-in-api.webp";
+
+export const meta = {
+ title: "Formbricks Code Contribution Guide: Best Practices and Standards",
+ description:
+ "Effortlessly Navigate Your Contribution Journey with Formbricks' Coding Guidelines and PR Review Process",
+};
+
+#### Contributing
+
+# How we Code at Formbricks
+
+Thank you for choosing to contribute to Formbricks. Before you start, please familiarize yourself with our coding standards and best practices, as these are key criteria for pull request reviews. Your contributions are greatly valued, and if you have any questions about these guidelines, please don't hesitate to ask.
+
+**Table of content**
+
+- Use Typescript types throughout the application
+- Always prioritise Server components
+- Fetch data only in server components
+- Use Server-Action for mutations
+- Use service abstraction instead of direct database calls
+- Handle authentication and CORS in management APIs
+- Always Document API changes
+- Constants should be in the packages folder
+- Types should be in the packages folder
+- How we handle Pull Requests
+- Read environment variables from `.env.mjs`
+
+---
+
+## Use Typescript types throughout the application
+
+The entire codebase is written in TypeScript, and it is crucial that every new piece of code is thoroughly and accurately typed. Instead of resorting to using the `any` type for variables, please ensure that you explicitly specify the appropriate type.
+
+## Always prioritise Server components
+
+When it comes to prioritizing the development of our components, our main focus is on building them as server components. This ensures that they are optimized for server-side rendering and can handle any necessary interactivity seamlessly. However, in cases where a component requires client-side interactivity, we are able to adapt it into a client component. If you would like to learn more about the advantages and benefits of server components, we highly recommend reading the comprehensive documentation provided by Next.js, which can be accessed [here](https://nextjs.org/docs/app/building-your-application/rendering/server-components).
+
+## Fetch data only in server components
+
+In order to ensure that both data fetching and rendering take place on the server, it is expected that actions to fetch data from the server will be performed within server components. This approach is prioritized as discussed in the previous point, which provides further details on the benefits and importance of server components.
+
+**Note**: Data fetching is done in the `page.tsx` of the route or the corresponding server component that needs this data.
+
+## Use Server-Action for mutations
+
+Server actions are used to perform server actions in client components. For example, a button click (client-side) that should change something in the database. Server actions should be placed in an `actions.ts` file within the specific route to maintain code organization and facilitate efficient development.
+
+## Use service abstraction instead of direct database calls
+
+We utilize [prisma](https://www.prisma.io/) as our Object-Relational Mapping (ORM) tool to interact with the database. This implies that when you need to fetch or modify data in the database, you will be utilizing prisma. All prisma calls should be written in the services folder `packages/lib/services`, and before creating a new service, please ensure that one does not already exist.
+
+## Handle authentication and CORS in management APIs
+
+We have two APIs: Management API and Client API.
+
+The public endpoints of the Client API are used by the link survey and `formbricks-js` to send responses and displays to formbricks. Client APIs can be found in `apps/web/app/api/v1/client`
+
+The Management API offers the same functionality as the management frontend and can be used to create surveys, view responses or change account settings. The endpoints require an api key that the user can obtain in the management frontend. Management APIs can be found in `apps/web/app/api/v1/management`.
+
+Please keep the following in mind:
+
+- When dealing with Management APIs always make sure to require authentication via API keys and a sufficient authorization check.
+- Make sure to handle CORS requests in any new Client API endpoint you create as these are called from the browser in link surveys or `formbricks-js`. Example below:
+
+
+
+## Always Document API changes
+
+It is imperative that any and all modifications or updates made to the client API are thoroughly and comprehensively documented. This documentation should provide clear and detailed information about the nature of the changes, their impact on existing functionality, and any new features or improvements introduced. This practice not only ensures transparency and accountability but also aids developers, both internal and external, in understanding and effectively utilizing the API, ultimately fostering a more robust and user-friendly development ecosystem.
+
+## Constants should be in the packages folder
+
+You should store constants in `packages/lib/constants`
+
+## Types should be in the packages folder
+
+You should store type in `packages/types/v1`
+
+## Read environment variables from `.env.mjs`
+
+Environment variables (`process.env`) shouldn’t be accessed directly but be added in the `.env.mjs` and should be accessed from here. This practice helps us ensure that the variables are typesafe.
+
+## How we handle Pull Requests
+
+We have a number of requirements for PRs to ensure they are as easy to review as possible and to ensure that they are up to standard with the code.
+
+### Code change
+
+When submitting a pull request, it is important to avoid combining multiple changes or issues into a single PR. By keeping each PR focused on a specific change or issue, it becomes easier and faster to review. Additionally, separating changes into individual PRs makes it easier to test each change independently. This allows for more efficient and thorough testing, ensuring that each change is properly validated before merging.
+
+### Title & Content
+
+We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). You should provide a short and concise title. Don’t put something generic (e.g. bug fixes), and instead mention more specifically what your PR achieves, for instance “fix: dropdown not expanding on survey page”.
+
+For the PR description, you should go into much greater detail about what your PR adds or fixes. Firstly, the description should include a link to any relevant issues or discussions surrounding the feature or bug that your PR addresses.
+
+### Feature PRs
+
+Give a functional overview of how your feature works, including how the user can use the feature. Then, share any technical details in an overview of how the PR works (e.g. “Once the user enters their password, the password is hashed using BCrypt and stored in the Users database field”).
+
+### Bug Fix PRs
+
+Give an overview of how your PR fixes the bug both as a high-level overview and a technical explanation of what caused the issue and how your PR resolves this.
+
+Add a short video or screenshots of what your PR achieves. Loom is a great way of sharing short videos however you can upload your videos directly to the PR description.
+
+### Code Quality & Styling
+
+All submitted code must match our **[code styling](https://www.notion.so/Code-Styling-65ddc5dd2deb4b28a9876f1f7cc89ca9?pvs=21)** standards. We will reject pull requests that differ significantly from our standardised code styles.
+
+All code is automatically checked by Github actions, and will notify you if there are any issues with the code that you submit. We require that code passes these quality checks before merging.
+
+### PR review process
+
+At the moment Matti is responsible for approving and merging pull requests, so please make sure to request his review when opening the PR and make the changes he requests in order to merge the PR.
+
+### Making a Pull Request
+
+- Be sure to **[check the "Allow edits from maintainers" option](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork)** while creating your PR.
+- If your PR refers to or fixes an issue, be sure to add **`refs #XXX`** or **`fixes #XXX`** to the PR description. Replacing **`XXX`** with the respective issue number. See more about **[Linking a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)** .
+- Be sure to fill the PR Template accordingly.
diff --git a/apps/formbricks-com/app/docs/contributing/introduction/page.mdx b/apps/formbricks-com/app/docs/contributing/introduction/page.mdx
index 28ce951945..e852110835 100644
--- a/apps/formbricks-com/app/docs/contributing/introduction/page.mdx
+++ b/apps/formbricks-com/app/docs/contributing/introduction/page.mdx
@@ -1,6 +1,7 @@
export const meta = {
title: "Formbricks Open Source Contribution Guide: How to Enhance yourself and Contribute to Formbricks",
- description: "Join the Formbricks community and learn how to effectively contribute. From raising issues and feature requests to creating PRs, discover the best practices and communicate with our responsive team on Discord",
+ description:
+ "Join the Formbricks community and learn how to effectively contribute. From raising issues and feature requests to creating PRs, discover the best practices and communicate with our responsive team on Discord",
};
#### Contributing
@@ -36,3 +37,11 @@ We are currently working on having a clear [Roadmap](https://github.com/formbric
But you can also pick a feature that is not already on the roadmap if you think it creates a positive impact for Formbricks.
If you are at all unsure, just raise it as an enhancement issue first and tell us that you like to work on it, and we'll very quickly respond.
+
+## Contributor License Agreement (CLA)
+
+To be able to keep working on Formbricks over the coming years, we need to collect a CLA from all relevant contributors.
+
+Please note that we can only get your contribution merged when we have a CLA signed by you.
+
+To access the CLA form, please click [here](https://formbricks.com/clmyhzfrymr4ko00hycsg1tvx)
diff --git a/apps/formbricks-com/app/docs/introduction/what-is-formbricks/page.mdx b/apps/formbricks-com/app/docs/introduction/what-is-formbricks/page.mdx
index 4c41036d58..ea333e00fd 100644
--- a/apps/formbricks-com/app/docs/introduction/what-is-formbricks/page.mdx
+++ b/apps/formbricks-com/app/docs/introduction/what-is-formbricks/page.mdx
@@ -1,4 +1,5 @@
import { GettingStarted } from "@/components/docs/GettingStarted";
+import BestPractices from "@/components/docs/BestPractices";
import { HeroPattern } from "@/components/docs/HeroPattern";
import { Button } from "@/components/docs/Button";
diff --git a/apps/formbricks-com/app/docs/self-hosting/from-source/page.mdx b/apps/formbricks-com/app/docs/self-hosting/from-source/page.mdx
index 89e3cbe2f0..f6209619e7 100644
--- a/apps/formbricks-com/app/docs/self-hosting/from-source/page.mdx
+++ b/apps/formbricks-com/app/docs/self-hosting/from-source/page.mdx
@@ -29,7 +29,7 @@ Ensure `docker` & `docker compose` are installed on your server/system. Both are
-2. **Modify the `.env.docker` file as required by your setup.** This file comes with a basic setup and Formbricks works without making any changes to the file. To enable email sending functionality you need to configure the SMTP settings. If you configured your email credentials, you can also comment the following lines to enable email verification (`# NEXT_PUBLIC_EMAIL_VERIFICATION_DISABLED=1`) and password reset (`# NEXT_PUBLIC_PASSWORD_RESET_DISABLED=1`)
+2. **Modify the `.env.docker` file as required by your setup.** This file comes with a basic setup and Formbricks works without making any changes to the file. To enable email sending functionality you need to configure the SMTP settings. If you configured your email credentials, you can also comment the following lines to enable email verification (`# EMAIL_VERIFICATION_DISABLED=1`) and password reset (`# PASSWORD_RESET_DISABLED=1`)
## Editing a NEXT_PUBLIC_* variable?
@@ -50,67 +50,64 @@ Ensure `docker` & `docker compose` are installed on your server/system. Both are
You can now access the 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.
-### Important Run-time Variables
+## Important Run-time Variables
These variables must also be provided at runtime.
-| Variable | Description | Required | Default |
-| ------------------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------- | --- |
-| WEBAPP_URL | Base URL of the site. | required | `http://localhost:3000` |
-| DATABASE_URL | Database URL with credentials. | required | `postgresql://postgres:postgres@postgres:5432/formbricks?schema=public` |
-| PRISMA_GENERATE_DATAPROXY | Enables a dedicated connection pool for Prisma using Prisma Data Proxy. Uncomment to enable. | optional | |
-| NEXTAUTH_SECRET | Secret for NextAuth, used for session signing and encryption. | required | (Generated by the user) |
-| NEXTAUTH_URL | Location of the auth server. By default, this is the Formbricks docker instance itself. | required | `http://localhost:3000` |
-| MAIL_FROM | Email address to send emails from. | optional (required if email services are to be enabled) | |
-| SMTP_HOST | Host URL of your SMTP server. | optional (required if email services are to be enabled) | |
-| SMTP_PORT | Host Port of your SMTP server. | optional (required if email services are to be enabled) | |
-| SMTP_USER | Username for your SMTP Server. | optional (required if email services are to be enabled) | |
-| SMTP_PASSWORD | Password for your SMTP Server. | optional (required if email services are to be enabled) | |
-| SMTP_SECURE_ENABLED | SMTP secure connection. For using TLS, set to `1` else to `0`. | optional (required if email services are to be enabled) | |
-| GITHUB_ID | Client ID for GitHub. | optional (required if GitHub auth is enabled) | |
-| GITHUB_SECRET | Secret for GitHub. | optional (required if GitHub auth is enabled) | |
-| GOOGLE_CLIENT_ID | Client ID for Google. | optional (required if Google auth is enabled) | |
-| GOOGLE_CLIENT_SECRET | Secret for Google. | optional (required if Google auth is enabled) | |
-| CRON_SECRET | API Secret for running cron jobs. | optional | |
-| STRIPE_SECRET_KEY | Secret key for Stripe integration. | optional | |
-| STRIPE_WEBHOOK_SECRET | Webhook secret for Stripe integration. | optional | |
-| TELEMETRY_DISABLED | Disables telemetry if set to `1`. | optional | |
-| INSTANCE_ID | Instance ID for Formbricks Cloud to be sent to Telemetry. | optional | |
-| INTERNAL_SECRET | Internal Secret (Currently we do not use this anywhere). | optional | |
-| RENDER_EXTERNAL_URL | External URL for rendering (used instead of WEBAPP_URL). | optional | |
-| HEROKU_APP_NAME | Heroku app name (used instead of WEBAPP_URL). | optional | |
-| RAILWAY_STATIC_URL | Railway static URL (used instead of WEBAPP_URL). | optional | | |
+| Variable | Description | Required | Default |
+| --------------------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------- |
+| WEBAPP_URL | Base URL of the site. | required | `http://localhost:3000` |
+| SURVEY_BASE_URL | Base URL of the link surveys. | required | `http://localhost:3000/s/` |
+| DATABASE_URL | Database URL with credentials. | required | `postgresql://postgres:postgres@postgres:5432/formbricks?schema=public` |
+| PRISMA_GENERATE_DATAPROXY | Enables a dedicated connection pool for Prisma using Prisma Data Proxy. Uncomment to enable. | optional | |
+| NEXTAUTH_SECRET | Secret for NextAuth, used for session signing and encryption. | required | (Generated by the user) |
+| NEXTAUTH_URL | Location of the auth server. By default, this is the Formbricks docker instance itself. | required | `http://localhost:3000` |
+| PRIVACY_URL | URL for privacy policy. | optional | |
+| TERMS_URL | URL for terms of service. | optional | |
+| IMPRINT_URL | URL for imprint. | optional | |
+| SIGNUP_DISABLED | Disables the ability for new users to create an account if set to `1`. | optional | |
+| PASSWORD_RESET_DISABLED | Disables password reset functionality if set to `1`. | optional | |
+| EMAIL_VERIFICATION_DISABLED | Disables email verification if set to `1`. | optional | |
+| INVITE_DISABLED | Disables the ability for invited users to create an account if set to `1`. | optional | |
+| MAIL_FROM | Email address to send emails from. | optional (required if email services are to be enabled) | |
+| SMTP_HOST | Host URL of your SMTP server. | optional (required if email services are to be enabled) | |
+| SMTP_PORT | Host Port of your SMTP server. | optional (required if email services are to be enabled) | |
+| SMTP_USER | Username for your SMTP Server. | optional (required if email services are to be enabled) | |
+| SMTP_PASSWORD | Password for your SMTP Server. | optional (required if email services are to be enabled) | |
+| SMTP_SECURE_ENABLED | SMTP secure connection. For using TLS, set to `1` else to `0`. | optional (required if email services are to be enabled) | |
+| GITHUB_AUTH_ENABLED | Enables GitHub login if set to `1`. | optional | |
+| GOOGLE_AUTH_ENABLED | Enables Google login if set to `1`. | optional | |
+| GITHUB_ID | Client ID for GitHub. | optional (required if GitHub auth is enabled) | |
+| GITHUB_SECRET | Secret for GitHub. | optional (required if GitHub auth is enabled) | |
+| GOOGLE_CLIENT_ID | Client ID for Google. | optional (required if Google auth is enabled) | |
+| GOOGLE_CLIENT_SECRET | Secret for Google. | optional (required if Google auth is enabled) | |
+| CRON_SECRET | API Secret for running cron jobs. | optional | |
+| STRIPE_SECRET_KEY | Secret key for Stripe integration. | optional | |
+| STRIPE_WEBHOOK_SECRET | Webhook secret for Stripe integration. | optional | |
+| TELEMETRY_DISABLED | Disables telemetry if set to `1`. | optional | |
+| INSTANCE_ID | Instance ID for Formbricks Cloud to be sent to Telemetry. | optional | |
+| INTERNAL_SECRET | Internal Secret (Currently we overwrite the value with a random value). | optional | |
+| IS_FORMBRICKS_CLOUD | Uses Formbricks Cloud if set to `1` | optional | |
+| DEFAULT_BRAND_COLOR | Default brand color for your app (Can be overwritten from the UI as well). | optional | `#64748b` |
-### Build-time Variables
+## Build-time Variables
These variables must be provided at the time of the docker build and can be provided by updating the `.env` file.
-| Variable | Description | Required | Default |
-| -------------------------------------------------- | -------------------------------------------------------------------------- | -------- | ----------------------- |
-| NEXT_PUBLIC_WEBAPP_URL | Base URL injected into static files. | required | `http://localhost:3000` |
-| NEXT_PUBLIC_EMAIL_VERIFICATION_DISABLED | Disables email verification if set to `1`. | optional | |
-| NEXT_PUBLIC_PASSWORD_RESET_DISABLED | Disables password reset functionality if set to `1`. | optional | |
-| NEXT_PUBLIC_SIGNUP_DISABLED | Disables the ability for new users to create an account if set to `1`. | optional | |
-| NEXT_PUBLIC_INVITE_DISABLED | Disables the ability for invited users to create an account if set to `1`. | optional | |
-| NEXT_PUBLIC_PRIVACY_URL | URL for privacy policy. | optional | |
-| NEXT_PUBLIC_TERMS_URL | URL for terms of service. | optional | |
-| NEXT_PUBLIC_IMPRINT_URL | URL for imprint. | optional | |
-| NEXT_PUBLIC_GITHUB_AUTH_ENABLED | Enables GitHub login if set to `1`. | optional | |
-| NEXT_PUBLIC_GOOGLE_AUTH_ENABLED | Enables Google login if set to `1`. | optional | |
-| NEXT_PUBLIC_FORMBRICKS_API_HOST | Host for the Formbricks API. | optional | |
-| NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID | If you already have a preset environment ID of the environment. | optional | |
-| NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID | If you already have an onboarding survey ID to show new users. | optional | |
-| NEXT_PUBLIC_IS_FORMBRICKS_CLOUD | Uses Formbricks Cloud if set to `1` | optional | |
-| NEXT_PUBLIC_POSTHOG_API_KEY | API key for PostHog analytics. | optional | |
-| NEXT_PUBLIC_POSTHOG_API_HOST | Host for PostHog analytics. | optional | |
-| NEXT_PUBLIC_SENTRY_DSN | DSN for Sentry error tracking. | optional | |
-| NEXT_PUBLIC_DOCSEARCH_APP_ID | ID of the DocSearch application. | optional | |
-| NEXT_PUBLIC_DOCSEARCH_API_KEY | API key of the DocSearch application. | optional | |
-| NEXT_PUBLIC_DOCSEARCH_INDEX_NAME | Name of the DocSearch index. | optional | |
-| NEXT_PUBLIC_FORMBRICKS_COM_ENVIRONMENT_ID | Environment ID for Formbricks (if you already have one) | optional | |
-| NEXT_PUBLIC_FORMBRICKS_COM_DOCS_FEEDBACK_SURVEY_ID | Survey ID for the feedback survey on the docs site. | optional | |
-| NEXT_PUBLIC_FORMBRICKS_COM_API_HOST | Host for the Formbricks API. | optional | |
-| NEXT_PUBLIC_VERCEL_URL | Vercel URL (used instead of WEBAPP_URL). | optional |
+| Variable | Description | Required | Default |
+| -------------------------------------------------- | --------------------------------------------------------------- | -------- | ------- |
+| NEXT_PUBLIC_FORMBRICKS_API_HOST | Host for the Formbricks API. | optional | |
+| NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID | If you already have a preset environment ID of the environment. | optional | |
+| NEXT_PUBLIC_FORMBRICKS_ONBOARDING_SURVEY_ID | If you already have an onboarding survey ID to show new users. | optional | |
+| NEXT_PUBLIC_POSTHOG_API_KEY | API key for PostHog analytics. | optional | |
+| NEXT_PUBLIC_POSTHOG_API_HOST | Host for PostHog analytics. | optional | |
+| NEXT_PUBLIC_SENTRY_DSN | DSN for Sentry error tracking. | optional | |
+| NEXT_PUBLIC_DOCSEARCH_APP_ID | ID of the DocSearch application. | optional | |
+| NEXT_PUBLIC_DOCSEARCH_API_KEY | API key of the DocSearch application. | optional | |
+| NEXT_PUBLIC_DOCSEARCH_INDEX_NAME | Name of the DocSearch index. | optional | |
+| NEXT_PUBLIC_FORMBRICKS_COM_ENVIRONMENT_ID | Environment ID for Formbricks (if you already have one) | optional | |
+| NEXT_PUBLIC_FORMBRICKS_COM_DOCS_FEEDBACK_SURVEY_ID | Survey ID for the feedback survey on the docs site. | optional | |
+| NEXT_PUBLIC_FORMBRICKS_COM_API_HOST | Host for the Formbricks API. | optional | |
## Debugging
diff --git a/apps/formbricks-com/app/docs/self-hosting/migrating-to-1.1/page.mdx b/apps/formbricks-com/app/docs/self-hosting/migrating-to-1.1/page.mdx
new file mode 100644
index 0000000000..7d3ab4f1b2
--- /dev/null
+++ b/apps/formbricks-com/app/docs/self-hosting/migrating-to-1.1/page.mdx
@@ -0,0 +1,138 @@
+export const meta = {
+ title: "Migrating Formbricks to v1.1",
+ description:
+ "Formbricks v1.1 comes with an amazing set of features including the ability to define most environment variables at runtime itself! No need to build the image again! This guide will help you migrate your existing Formbricks instance to v1.1",
+};
+
+#### Self-Hosting
+
+# Migrating to v1.1
+
+Formbricks v1.1 includes a lot of new features and improvements. However, it also comes with a few breaking changes specifically with the environment variables. This guide will help you migrate your existing Formbricks instance to v1.1 without losing any data.
+
+## Changes in .env
+
+### Renamed Environment Variables
+This was introduced because we got a lot of requests from our users for the ability to define some common environment variables at runtime itself i.e. without having to rebuild the image for the changes to take effect.
+This is now possible with v1.1. However, due to Next.JS best practices, we had to deprecate the prefix **NEXT_PUBLIC_** in the following environment variables:
+
+| till v1.0 | v1.1 |
+| ------------------------------------------- | --------------------------- |
+| **NEXT_PUBLIC_**EMAIL_VERIFICATION_DISABLED | EMAIL_VERIFICATION_DISABLED |
+| **NEXT_PUBLIC_**PASSWORD_RESET_DISABLED | PASSWORD_RESET_DISABLED |
+| **NEXT_PUBLIC_**SIGNUP_DISABLED | SIGNUP_DISABLED |
+| **NEXT_PUBLIC_**INVITE_DISABLED | INVITE_DISABLED |
+| **NEXT_PUBLIC_**PRIVACY_URL | PRIVACY_URL |
+| **NEXT_PUBLIC_**TERMS_URL | TERMS_URL |
+| **NEXT_PUBLIC_**IMPRINT_URL | IMPRINT_URL |
+| **NEXT_PUBLIC_**GITHUB_AUTH_ENABLED | GITHUB_AUTH_ENABLED |
+| **NEXT_PUBLIC_**GOOGLE_AUTH_ENABLED | GOOGLE_AUTH_ENABLED |
+| **NEXT_PUBLIC_**WEBAPP_URL | WEBAPP_URL |
+| **NEXT_PUBLIC_**IS_FORMBRICKS_CLOUD | IS_FORMBRICKS_CLOUD |
+| **NEXT_PUBLIC_**SURVEY_BASE_URL | SURVEY_BASE_URL |
+
+
+Please note that their values and the logic remains exactly the same. Only the prefix has been deprecated. The other environment variables remain the same as well.
+
+
+### Deprecated Environment Variables
+
+- **NEXT_PUBLIC_VERCEL_URL**: Was used as Vercel URL (used instead of WEBAPP_URL), but from v1.1, you can just set the WEBAPP_URL environment variable to your Vercel URL.
+- **RAILWAY_STATIC_URL**: Was used as Railway Static URL (used instead of WEBAPP_URL), but from v1.1, you can just set the WEBAPP_URL environment variable.
+- **RENDER_EXTERNAL_URL**: Was used as an external URL to Render (used instead of WEBAPP_URL), but from v1.1, you can just set the WEBAPP_URL environment variable.
+- **HEROKU_APP_NAME**: Was used to build the App name on a Heroku hosted webapp, but from v1.1, you can just set the WEBAPP_URL environment variable.
+- **NEXT_PUBLIC_WEBAPP_URL**: Was used for the same purpose as WEBAPP_URL, but from v1.1, you can just set the WEBAPP_URL environment variable.
+- **PRISMA_GENERATE_DATAPROXY**: Was used to tell Prisma that it should generate the runtime for Dataproxy usage. But its officially deprecated now.
+
+## Helper Shell Script
+For a seamless migration, below is a shell script for your self-hosted instance that will automatically update your environment variables to be compliant with the new naming conventions.
+
+### Building From Source
+The below script will:
+1. Create a backup of your existing .env file as `.env.old`
+2. Update the .env file to be compliant with the new naming conventions
+
+
+```shell {{ title: '.env file' }}
+for var in NEXT_PUBLIC_EMAIL_VERIFICATION_DISABLED NEXT_PUBLIC_PASSWORD_RESET_DISABLED NEXT_PUBLIC_SIGNUP_DISABLED NEXT_PUBLIC_INVITE_DISABLED NEXT_PUBLIC_PRIVACY_URL NEXT_PUBLIC_TERMS_URL NEXT_PUBLIC_IMPRINT_URL NEXT_PUBLIC_GITHUB_AUTH_ENABLED NEXT_PUBLIC_GOOGLE_AUTH_ENABLED NEXT_PUBLIC_WEBAPP_URL NEXT_PUBLIC_IS_FORMBRICKS_CLOUD NEXT_PUBLIC_SURVEY_BASE_URL; do sed -i.old "s/^$var=/$(echo $var | sed 's/NEXT_PUBLIC_//')=/" .env; done; echo "Formbricks environment variables have been migrated as per v1.1! You are good to go."
+```
+
+
+
+### Docker & Single Script Setup
+
+Now that these variables can be defined at runtime, you can append them inside your `x-environment` in the `docker-compose.yml` itself.
+For a more detailed guide on these environment variables, please refer to the [Important Runtime Variables](/docs/self-hosting/from-source#important-run-time-variables) section.
+
+
+```yaml {{ title: 'docker-compose.yml' }}
+version: "3.3"
+x-environment: &environment
+ environment:
+ # The url of your Formbricks instance used in the admin panel
+ WEBAPP_URL:
+
+ # PostgreSQL DB for Formbricks to connect to
+ DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/formbricks?schema=public"
+
+ # Uncomment to enable a dedicated connection pool for Prisma using Prisma Data Proxy
+ # Cold boots will be faster and you'll be able to scale your DB independently of your app.
+ # @see https://www.prisma.io/docs/data-platform/data-proxy/use-data-proxy
+ # PRISMA_GENERATE_DATAPROXY=true
+ PRISMA_GENERATE_DATAPROXY:
+
+ # NextJS Auth
+ # @see: https://next-auth.js.org/configuration/options#nextauth_secret
+ # You can use: `openssl rand -base64 32` to generate one
+ NEXTAUTH_SECRET:
+
+ # Set this to your public-facing URL, e.g., https://example.com
+ # You do not need the NEXTAUTH_URL environment variable in Vercel.
+ NEXTAUTH_URL: http://localhost:3000
+
+ # PostgreSQL password
+ POSTGRES_PASSWORD: postgres
+
+ # Email Configuration
+ MAIL_FROM:
+ SMTP_HOST:
+ SMTP_PORT:
+ SMTP_SECURE_ENABLED:
+ SMTP_USER:
+ SMTP_PASSWORD:
+
+ # Uncomment the below and set it to 1 to disable Email Verification for new signups
+ # EMAIL_VERIFICATION_DISABLED:
+
+ # Uncomment the below and set it to 1 to disable Password Reset
+ # PASSWORD_RESET_DISABLED:
+
+ # Uncomment the below and set it to 1 to disable Signups
+ # SIGNUP_DISABLED:
+
+ # Uncomment the below and set it to 1 to disable Invites
+ # INVITE_DISABLED:
+
+ # Uncomment the below and set a value to have your own Privacy Page URL on the signup & login page
+ # PRIVACY_URL:
+
+ # Uncomment the below and set a value to have your own Terms Page URL on the auth and the surveys page
+ # TERMS_URL:
+
+ # Uncomment the below and set a value to have your own Imprint Page URL on the auth and the surveys page
+ # IMPRINT_URL:
+
+ # Uncomment the below and set to 1 if you want to enable GitHub OAuth
+ # GITHUB_AUTH_ENABLED:
+ # GITHUB_ID:
+ # GITHUB_SECRET:
+
+ # Uncomment the below and set to 1 if you want to enable Google OAuth
+ # GOOGLE_AUTH_ENABLED:
+ # GOOGLE_CLIENT_ID:
+ # GOOGLE_CLIENT_SECRET:
+
+```
+
+
+Did we miss something? Are you still facing issues migrating your app? [Join our Discord!](https://formbricks.com/discord) We'd be happy to help!
\ No newline at end of file
diff --git a/apps/formbricks-com/components/docs/BestPractices.tsx b/apps/formbricks-com/components/docs/BestPractices.tsx
index c01a2a24ab..b48d3036e1 100644
--- a/apps/formbricks-com/components/docs/BestPractices.tsx
+++ b/apps/formbricks-com/components/docs/BestPractices.tsx
@@ -151,7 +151,7 @@ function BestPractice({ resource }: { resource: BestPractice }) {
);
}
-export function BestPractices() {
+export default function BestPractices() {
return (
diff --git a/apps/formbricks-com/components/docs/Navigation.tsx b/apps/formbricks-com/components/docs/Navigation.tsx
index 7d8c2b28f4..28ffa757ca 100644
--- a/apps/formbricks-com/components/docs/Navigation.tsx
+++ b/apps/formbricks-com/components/docs/Navigation.tsx
@@ -1,16 +1,16 @@
"use client";
-import { useRef } from "react";
-import Link from "next/link";
-import { usePathname } from "next/navigation";
import clsx from "clsx";
import { AnimatePresence, motion, useIsPresent } from "framer-motion";
+import Link from "next/link";
+import { usePathname } from "next/navigation";
+import { useRef } from "react";
+import { remToPx } from "@/lib/remToPx";
import { Button } from "./Button";
import { useIsInsideMobileNavigation } from "./MobileNavigation";
import { useSectionStore } from "./SectionProvider";
import { Tag } from "./Tag";
-import { remToPx } from "@/lib/remToPx";
interface NavGroup {
title: string;
@@ -246,13 +246,16 @@ export const navigation: Array = [
{ title: "Production", href: "/docs/self-hosting/production" },
{ title: "Docker", href: "/docs/self-hosting/docker" },
{ title: "From Source", href: "/docs/self-hosting/from-source" },
+ { title: "Migration to v1.1", href: "/docs/self-hosting/migrating-to-1.1" },
],
},
{
title: "Contributing",
links: [
{ title: "Introduction", href: "/docs/contributing/introduction" },
+ { title: "How we code at Formbricks", href: "/docs/contributing/how-we-code" },
{ title: "Setup Dev Environment", href: "/docs/contributing/setup" },
+ { title: "Gitpod", href: "/docs/contributing/gitpod" },
{ title: "Demo App", href: "/docs/contributing/demo" },
{ title: "Troubleshooting", href: "/docs/contributing/troubleshooting" },
{ title: "FaQ", href: "/docs/faq" },
diff --git a/apps/formbricks-com/components/home/GitHubSponsorship.tsx b/apps/formbricks-com/components/home/GitHubSponsorship.tsx
index a089c5b7dd..4e331ec086 100644
--- a/apps/formbricks-com/components/home/GitHubSponsorship.tsx
+++ b/apps/formbricks-com/components/home/GitHubSponsorship.tsx
@@ -1,5 +1,4 @@
-import GitHubMarkWhite from "@/images/github-mark-white.svg";
-import GitHubMarkDark from "@/images/github-mark.svg";
+import HackIconGold from "@/images/formtribe/hack-icon-gold.svg";
import Image from "next/image";
import Link from "next/link";
@@ -10,7 +9,7 @@ export const GitHubSponsorship: React.FC = () => {
@media (min-width: 426px);
`}
- Proudly Open-Source 🤍
+ The FormTribe goes Hacktoberfest 🥨
- We're proud to to be supported by GitHubs Open-Source Program!{" "}
+ Write code, win a Mac! We're running a Hacktoberfest community Hackathon:
-
- Read more.
+
+ Find out more.
+ Formbricks is an open source project. You can self-host it for free. We provide multiple easy
+ deployment options as per your customisation needs. We have documented the process of self-hosting
+ Formbricks on your own server using Docker, Bash Scripting, and Building from Source.
+
+ );
+};
diff --git a/apps/formbricks-com/components/shared/Slider.tsx b/apps/formbricks-com/components/shared/Slider.tsx
new file mode 100644
index 0000000000..07bce61744
--- /dev/null
+++ b/apps/formbricks-com/components/shared/Slider.tsx
@@ -0,0 +1,24 @@
+"use client";
+
+import * as React from "react";
+import * as SliderPrimitive from "@radix-ui/react-slider";
+
+import { cn } from "@formbricks/lib/cn";
+
+const Slider = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+
+
+
+
+
+));
+Slider.displayName = SliderPrimitive.Root.displayName;
+
+export { Slider };
diff --git a/apps/formbricks-com/components/shared/icons/XCircleIcon.jsx b/apps/formbricks-com/components/shared/icons/XCircleIcon.jsx
new file mode 100644
index 0000000000..d1573c7733
--- /dev/null
+++ b/apps/formbricks-com/components/shared/icons/XCircleIcon.jsx
@@ -0,0 +1,13 @@
+;
diff --git a/apps/formbricks-com/images/formtribe/hack-icon-gold.svg b/apps/formbricks-com/images/formtribe/hack-icon-gold.svg
new file mode 100644
index 0000000000..0286b6b8a0
--- /dev/null
+++ b/apps/formbricks-com/images/formtribe/hack-icon-gold.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/apps/formbricks-com/package.json b/apps/formbricks-com/package.json
index 1101313dfd..338b344d89 100644
--- a/apps/formbricks-com/package.json
+++ b/apps/formbricks-com/package.json
@@ -24,14 +24,14 @@
"@mapbox/rehype-prism": "^0.8.0",
"@mdx-js/loader": "^2.3.0",
"@mdx-js/react": "^2.3.0",
- "@next/mdx": "13.5.3",
+ "@next/mdx": "13.4.19",
"@paralleldrive/cuid2": "^2.2.2",
"@sindresorhus/slugify": "^2.2.1",
"@tailwindcss/typography": "^0.5.10",
- "@types/node": "20.7.0",
- "@types/react-highlight-words": "^0.16.5",
+ "@types/node": "20.6.0",
+ "@types/react-highlight-words": "^0.16.4",
"acorn": "^8.10.0",
- "autoprefixer": "^10.4.16",
+ "autoprefixer": "^10.4.15",
"clsx": "^2.0.0",
"fast-glob": "^3.3.1",
"flexsearch": "^0.7.31",
@@ -39,14 +39,16 @@
"lottie-web": "^5.12.2",
"mdast-util-to-string": "^4.0.0",
"mdx-annotations": "^0.1.3",
- "next": "13.5.3",
+ "next": "13.4.19",
"next-plausible": "^3.11.1",
"next-seo": "^6.1.0",
"next-sitemap": "^4.2.3",
"next-themes": "^0.2.1",
"node-fetch": "^3.3.2",
- "prism-react-renderer": "^2.1.0",
+ "prism-react-renderer": "^2.0.6",
"prismjs": "^1.29.0",
+ "@radix-ui/react-slider": "^1.1.2",
+ "@radix-ui/react-tooltip": "^1.0.6",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-highlight-words": "^0.20.0",
@@ -56,7 +58,7 @@
"remark": "^14.0.3",
"remark-gfm": "^3.0.1",
"remark-mdx": "^2.3.0",
- "sharp": "^0.32.6",
+ "sharp": "^0.32.5",
"shiki": "^0.14.4",
"simple-functional-loader": "^1.2.1",
"tailwindcss": "^3.3.3",
diff --git a/apps/formbricks-com/pages/blog/join-the-formtribe/create-a-new-survey-with-formbricks.png b/apps/formbricks-com/pages/blog/join-the-formtribe/create-a-new-survey-with-formbricks.png
new file mode 100644
index 0000000000..6803f12105
Binary files /dev/null and b/apps/formbricks-com/pages/blog/join-the-formtribe/create-a-new-survey-with-formbricks.png differ
diff --git a/apps/formbricks-com/pages/blog/join-the-formtribe/formbricks-monorepo-folder-structure.png b/apps/formbricks-com/pages/blog/join-the-formtribe/formbricks-monorepo-folder-structure.png
new file mode 100644
index 0000000000..5ac0e6b4c5
Binary files /dev/null and b/apps/formbricks-com/pages/blog/join-the-formtribe/formbricks-monorepo-folder-structure.png differ
diff --git a/apps/formbricks-com/pages/blog/join-the-formtribe/formbricks-packages-folder.png b/apps/formbricks-com/pages/blog/join-the-formtribe/formbricks-packages-folder.png
new file mode 100644
index 0000000000..29e9f5f233
Binary files /dev/null and b/apps/formbricks-com/pages/blog/join-the-formtribe/formbricks-packages-folder.png differ
diff --git a/apps/formbricks-com/pages/blog/join-the-formtribe/index.mdx b/apps/formbricks-com/pages/blog/join-the-formtribe/index.mdx
new file mode 100644
index 0000000000..8264126c90
--- /dev/null
+++ b/apps/formbricks-com/pages/blog/join-the-formtribe/index.mdx
@@ -0,0 +1,107 @@
+import Image from "next/image";
+import LayoutMdx from "@/components/shared/LayoutMdx";
+import MonorepoImage from "./formbricks-monorepo-folder-structure.png";
+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";
+
+export const meta = {
+ title: "Join the FormTribe 🔥",
+ description: "Here is everything you need to know about joining the Formbricks community",
+ date: "2023-10-01",
+ publishedTime: "2023-10-01T00:00:00",
+ authors: ["Johannes"],
+ section: "Open-Source",
+ tags: ["Open-Source", "No-Code", "Formbricks", "Geting started", "Welcome guide"],
+};
+
+
+
+
+
+_Get a quick intro to the Formbricks community, also known as FormTribe, and learn all the deets about making awesome contributions to the project._
+
+## Welcome to the Formbricks community!
+
+We are so excited to have you with us 😊
+
+In this post we will be helping you get familiar with the Formbricks codebase and get you up to speed contributing in no time. If you want to learn about Formbricks check out our [docs intro](https://formbricks.com/docs/introduction/what-is-formbricks), for more info about our founding story and why we're building open source checkout out our [blog](https://formbricks.com/blog).
+
+### Prerequisites
+
+Our codebase is written fully in Typescript and we love it 😍. To power our the experience management solution, here is the stack behind it all:
+
+[Next.js](https://nextjs.org/) - React Framework
+
+[Prisma](https://www.prisma.io/) - ORM
+
+[Typescript](https://www.typescriptlang.org/) - Language
+
+[Lucide React](https://lucide.dev/guide/packages/lucide-react) - Icons
+
+[TalwindCSS](https://tailwindcss.com/) - Styling
+
+[Zod](https://zod.dev/) - Validation
+
+[Auth.js](https://authjs.dev/) - Authentication
+
+### 😎 Installation and Setup
+
+To get up and running we have 2 options: Gitpod and local.
+
+#### Get started with Gitpod
+
+With Gitpod you can run all of Formbricks in the cloud. With one click you can start coding right away in your browser:
+
+[](https://gitpod.io/#https://github.com/formbricks/formbricks)
+
+
+
+#### Run on a local machine
+
+If you choose to get setup locally, we also have a well documented guide to hold you through the process, you can find it [here](https://formbricks.com/docs/contributing/setup)
+
+### 👩🏽💻 Codebase Overview
+
+Our codebase is a [monorepo](https://en.wikipedia.org/wiki/Monorepo) which means we have different projects in one repository. At moment we have 3 different projects:
+
+1. **demo** `apps/demo` - It's a simple React app that you can run locally and use to trigger actions and set **[Attributes](https://formbricks.com/docs/attributes/why)**. It allows you to test your setup easily.
+2. **formbricks-com** `apps/formbricks-com` - The landing page of [Formbricks](https://formbricks.com)
+3. **web** `apps/web` - Our [cloud offering](https://app.formbricks.com/) for Formbricks.
+
+
+
+#### TurboRepo and our own packages
+
+To manage all of these projects in one repository we use [turborepo](https://turbo.build/repo/docs/core-concepts/monorepos). Depending on what part of the codebase you need to contribute in, now you know where to begin 😃
+
+We also have a set of packages which we manage: They are located in the `packages` folder. There we keep our styling library, components, database migrations and connection, a couple of configurations and much more. We do this to use any of these packages seamlessly between our mono repos.
+
+
+
+### ⚖️ Contribution Guidelines
+
+You want to get started contributing? Amazing! Checkout our must-read post on [How we Code at Formbricks](https://formbricks.com/docs/contributing/how-we-code). This will give you everything you need to know about successfully contributing to our codebase in no time.
+
+### 🤗 Our Community
+
+We really value our community. It might be small but it is close to our hearts. Join our [Discord](https://formbricks.com/discord) to learn from other contributors and meet the Formbricks community.
+
+### Conclusion
+
+Contributing to open source projects like Formbricks can be a rewarding experience. By contributing, you have the opportunity to make a meaningful impact on a project used by many and gain valuable experience in the process.
+
+Whether you are a seasoned developer or just starting out, your contributions are appreciated. We might not always have to onboard everyone but try our best. You can help improve the codebase, fix bugs, add new features, or even contribute to the documentation. Every contribution, no matter how small, can make a difference.
+
+Not only will you be able to showcase your skills and build your portfolio, but you will also have the chance to collaborate with other talented designers and developers in the Formbricks community. You can learn from their expertise and share your own knowledge.
+
+### So, why wait?
+
+Join the Formbricks community today and start contributing to an up and coming open source project. Your contributions can help shape the future of Formbricks and make a positive impact on the lives of tens of thousands of users worldwide.
+
+We look forward to seeing your contributions and welcoming you to the Formbricks community!
+
+### [Say Hi 👋](https://formbricks.com/discord)
+
+export default ({ children }) => {children};
diff --git a/apps/formbricks-com/pages/blog/join-the-formtribe/setup-formbricks-via-gitpod.png b/apps/formbricks-com/pages/blog/join-the-formtribe/setup-formbricks-via-gitpod.png
new file mode 100644
index 0000000000..4756254185
Binary files /dev/null and b/apps/formbricks-com/pages/blog/join-the-formtribe/setup-formbricks-via-gitpod.png differ
diff --git a/apps/formbricks-com/pages/formtribe/index.tsx b/apps/formbricks-com/pages/formtribe/index.tsx
index e6997206e3..9a993efd3f 100644
--- a/apps/formbricks-com/pages/formtribe/index.tsx
+++ b/apps/formbricks-com/pages/formtribe/index.tsx
@@ -16,65 +16,117 @@ import { useEffect } from "react";
const HowTo = [
{
step: "1",
- header: "Pick an issue from the list below (or start with a side quest)",
+ header: "Pick a 'FormTribe 🔥' issue in our repository and comment.",
+ link: "https://formbricks.com/github",
},
{
step: "2",
- header: "Comment on the issue to signal that you started working on it.",
+ header: "Be the first to comment and get the issue assigned.",
},
{
step: "3",
- header: "Join our Discord to ask questions and submit side quests.",
- link: "https://formbricks.com/discord",
+ header: "You now have 24h to open a draft PR ⏲️",
},
{
step: "4",
- header: "Code and open a PR with your contribution. ",
+ header: "If your PR looks promising, we'll work with you to get it merged.",
},
{
step: "5",
- header: "Get your PR merged and collect points.",
+ header: "For every merged PR you collect points ✨",
},
{
step: "6",
- header: "Tweet about your contribution and tag @formbricks",
+ header: "Solve side quests to increase your chances on the MacBook 👀",
+ link: "#prizes",
},
{
step: "7",
- header: "Solve side quests to increase your chances on the MacBook 👀",
- link: "#prizes",
+ header: "Join our Discord to ask questions (and submit side quests).",
+ link: "https://formbricks.com/discord",
},
];
const SideQuests = [
{
- points: "100 Points:",
- quest: "You think you're smart removing the blur to see the side quests first?",
+ points: "Join the Tribe Tweet (100 Points)",
+ quest: "Tweet a single “🧱” emoji before the 7th of October EOD to join the #FormTribe.",
+ proof: "Share the link to the tweet in the “side-quest” channel.",
},
{
- points: "150 Points:",
+ points: "Spread the Word Tweet (100 Points)",
+ quest: "Tweet “🧱🚀” on the day of the ProductHunt launch to spread the word.",
+ proof: "Share the link to the tweet in the “side-quest” channel.",
+ },
+ {
+ points: "Setup Insights (200 Points)",
+ quest: "Screen record yourself setting up the Formbricks dev environment.",
+ proof: "Upload to WeTransfer and send to johannes@formbricks.com",
+ },
+ {
+ points: "Meme Magic (50 Points + up to 100 Points)",
quest:
- "You are! Take a screenshot of this and share it in the 'side-quest' channel on Discord to get 100 points.",
+ "Craft a meme where a brick plays a role. For extra points, tweet it, tag us and score +5 for each like.",
+ proof: "Share meme or link to the tweet in the “side-quest” channel.",
},
{
- points: "200 Points:",
- quest: "The rest of the side quests will be released on the 1st of October.",
+ points: "GIF Magic (100 Points)",
+ quest:
+ "Create a branded gif related to Formbricks. Upload it to Giphy. For extra points, tweet it, tag us and score +5 for each like.",
+ proof: "Share link to Giphy in the “side-quest” channel.",
},
{
- points: "250 Points:",
- quest: "Follow us on Twitter and join us on Discord to be the first to know!",
+ points: "Design a background (250 Points)",
+ quest: "Illustrate a captivating background for survey enthusiasts (more infos on Notion).",
+ proof: "Share the design in the “side-quest” channel.",
},
{
- points: "Pushmaster Prime | +500 Points + Hoodie:",
- quest: "Merge the highest amount of Formbricks PRs in October.",
+ points: "Transform Animation to CSS (350 Points per background)",
+ quest: "Animate an existing background to CSS versions (more infos on Notion).",
+ proof: "Share the animated background.",
},
{
- points: "Guidance Guru | +500 Points + Hoodie:",
- quest: "Most active and helpful in the community helping other contributors.",
+ points: "Enhance Docs (50-250 Points)",
+ quest:
+ "Add a new section to our docs where you see gaps. Follow the current style of documentation incl. code snippets and screenshots. Pls no spam.",
+ proof: "Open a PR with “docs” in the title",
},
{
- points: "Buzz Builder Guru | +500 Points + Hoodie:",
- quest: "Marketing Genie with great and effective ideas to spread the word about FormTribe",
+ points: "Starry-eyed Supporter (250 Points)",
+ quest: "Get five friends to star our repository.",
+ proof: "Share 5 screenshots of the chats where you asked them and they confirmed + their GitHub names",
+ },
+ {
+ points: "Bug Hunter (50-250 Points)",
+ quest: "Find and report any functionality bugs.",
+ proof: "Open a bug issue in our repository.",
+ },
+ {
+ points: "Brickify someone famous with AI (200 Points + up to 100 Points)",
+ quest:
+ "Find someone whose name would be funny as a play on words with “brick”. Then, with the help of AI, create a brick version of this person like Brick Astley, Brickj Minaj, etc. For extra points, tweet it, tag us and score +5 for each like.",
+ proof: "Share your art or link to the tweet in the “side-quest” channel.",
+ },
+ {
+ points: "SEO Sage (50-250 Points)",
+ quest: "Provide detailed SEO recommendations or improvements for our main website.",
+ proof: "Share your insights.",
+ },
+ {
+ points: "Community Connector (50 points each, up to 250 points)",
+ quest:
+ "Introduce and onboard new members to the community. Have them join Discord and reply to their automated welcome message with your discord handle (in “say-hi” channel).",
+ proof: "New member joined and commented with your Discord handle",
+ },
+ {
+ points: "Feedback Fanatic (50 Points)",
+ quest: "Fill out our feedback survey after the hackathon with suggestions for improvement.",
+ proof: "Submit the survey.",
+ },
+ {
+ points: "Side Quest Babo (500 Points)",
+ quest: "Complete all side quests.",
+ proof: "All quests marked as completed.",
},
];
@@ -212,6 +264,155 @@ const FAQ = [
},
];
+const Leaderboard = [
+ {
+ name: "Piyush",
+ points: "550",
+ link: "https://github.com/gupta-piyush19",
+ },
+ {
+ name: "Suman",
+ points: "200",
+ },
+ {
+ name: "Subhdeep",
+ points: "100",
+ },
+ {
+ name: "Pratik",
+ points: "250",
+ },
+ {
+ name: "Karuppiah",
+ points: "100",
+ },
+ {
+ name: "Arth",
+ points: "100",
+ },
+ {
+ name: "Neztep",
+ points: "100",
+ },
+ {
+ name: "Kelvin Parmar",
+ points: "200",
+ },
+ {
+ name: "Naitik Kapadia (Arjun)",
+ points: "200",
+ },
+ {
+ name: "Yashhhh",
+ points: "200",
+ },
+ {
+ name: "vishleshak",
+ points: "100",
+ },
+ {
+ name: "Ashu999",
+ points: "100",
+ },
+ {
+ name: "Sachin H",
+ points: "100",
+ },
+ {
+ name: "Suraj Jadhav",
+ points: "100",
+ },
+ {
+ name: "Vishrut",
+ points: "250",
+ },
+ {
+ name: "cataxcab",
+ points: "100",
+ },
+ {
+ name: "Eldemarkki",
+ points: "500",
+ },
+ {
+ name: "Suyash",
+ points: "100",
+ },
+ {
+ name: "Rohan Gupta",
+ points: "100",
+ },
+ {
+ name: "Nafees Nazik",
+ points: "100",
+ },
+ {
+ name: "monk",
+ points: "100",
+ },
+ {
+ name: "Pratik Tiwari (Pratik)",
+ points: "100",
+ },
+ {
+ name: "Ardash Malviya",
+ points: "100",
+ },
+ {
+ name: "Aditya Deshlahre",
+ points: "550",
+ link: "https://github.com/adityadeshlahre",
+ },
+ {
+ name: "Rutam",
+ points: "350",
+ },
+ {
+ name: "Sagnik Sahoo",
+ points: "100",
+ },
+ {
+ name: "Prasoon Mahawar",
+ points: "100",
+ },
+ {
+ name: "Dushmanta",
+ points: "100",
+ },
+ {
+ name: "Arjavv",
+ points: "100",
+ },
+ {
+ name: "Ashish Khare",
+ points: "100",
+ },
+ {
+ name: "Rohit Mondal",
+ points: "100",
+ },
+ {
+ name: "noobcoder",
+ points: "100",
+ },
+ {
+ name: "Rayyan Alam (Rayy)",
+ points: "100",
+ },
+ {
+ name: "Ayush",
+ points: "100",
+ },
+ {
+ name: "Zechariah",
+ points: "100",
+ },
+ {
+ name: "Rajarshi Misra",
+ points: "100",
+ },
+];
+
export default function FormTribeHackathon() {
// dark mode fix
useEffect(() => {
@@ -234,7 +435,7 @@ export default function FormTribeHackathon() {
Write code, win a Macbook 🔥
- Let's ship Open Source Typeform in Hacktoberfest
+ Let's ship Open Source Typeform during Hacktoberfest
@@ -400,6 +601,7 @@ export default function FormTribeHackathon() {
🎉 1 x MacBook Air M2
🎉 3 x Limited FormTribe Premium Hoodie
🎉 10 x Limited FormTribe Premium Shirt
+
🎉 10 x 250h for Gitpod
🎉 50 x Sets of Formbricks Stickers
@@ -462,40 +664,57 @@ export default function FormTribeHackathon() {
While code contributions are what gives the most points, everyone gets to bump up their chance of
- winning. Here is a list of side quests you can complete:{" "}
+ winning. Here is a list of side quests you can complete: