mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-29 10:46:12 -06:00
* created new create-display and updated display endpoints with zod, db service-layer, and next.js route handlers * changed the api URL and changed few type definations * new getTeamDetails service is created which will be further used by display and response endpoints * changed the prisma call with getTeamDetails service * created display services and zod validation schema * removed envId from func parameter * fix build error by adding a type annotation * Moved the return inside try block * Removed comments * changed the update display service name to markDisplayResponded * Update route.ts * reference person type in display, check response code first then transform to json * add createdAt & updatedAt to person when query display * pnpm format * small optimizations --------- Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
Formbricks Browser JS Library
Please see Formbricks Docs. Specifically, Quickstart/Implementation details.
What is Formbricks
Formbricks is your go-to solution for in-product micro-surveys that will supercharge your product experience! 🚀 For more information please check out formbricks.com.
How to use this library
- Install the Formbricks package inside your project using npm:
npm install -s @formbricks/js
- Import Formbricks and initialize the widget in your main component (e.g., App.tsx or App.js):
import formbricks from "@formbricks/js";
if (typeof window !== "undefined") {
formbricks.init({
environmentId: "your-environment-id",
apiHost: "https://app.formbricks.com",
});
}
Replace your-environment-id with your actual environment ID. You can find your environment ID in the Setup Checklist in the Formbricks settings.
For more detailed guides for different frameworks, check out our Next.js and Vue.js guides.