Formbricks Project Structure

The open-source experience management platform. Formbricks uses a modern Next.js monorepo architecture designed for modularity, allowing for easy integration of survey tools directly into products.

Updated 2025-12-30

#formbricks #nextjs #prisma #monorepo #turborepo #surveys #open-source
PNGPDF

Project Directory

formbricks/
apps/
Core applications
web/
Main Next.js application
app/
Next.js App Router source
components/
lib/
storybook/
Component documentation
packages/
Shared internal packages
database/
Prisma schema and client
ui/
Shared UI component library
lib/
Shared business logic and types
api/
Shared API client logic
js/
Client-side JS SDK
docker/
Docker deployment files
turbo.json
Turborepo orchestration
package.json
Root workspace

Repository Info

Tech Stack

  • Framework-Next.js
  • Language-TypeScript
  • Database-PostgreSQL with Prisma
  • Auth-NextAuth.js
  • Styling-Tailwind CSS
  • Monorepo-Turborepo + pnpm

Architecture Notes

Formbricks follows a standard and clean Next.js monorepo pattern using Turborepo. The apps/web directory contains the main dashboard and survey runner, while all critical business logic, database interactions, and UI components are extracted into the packages/ directory. This modular approach is essential for Formbricks as it provides multiple ways to consume its functionality, including a specialized js package for its client-side SDK.

Key Directories

  • apps/web/-The primary dashboard for creating and managing surveys
  • packages/database/-Centrally manages the data model and all database interactions
  • packages/ui/-A beautifully crafted and consistent UI library used across the app
  • packages/js/-The core SDK that developers embed in their apps to trigger surveys

Why This Structure?

Formbricks is a great example of a modern, well-structured T3-style monorepo. It shows how to build a complex, user-facing SaaS while maintaining a highly modular and developer-friendly codebase. Highly recommended for anyone interested in building embeddable tools or complex survey platforms.

Share this template

Related Templates

© 2025 FolderStructure.dev