# benefits: Benefits URL: /docs/benefits Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/(common)/benefits.mdx Why does this kit exist ? And why should I use it ? *** title: Benefits description: Why does this kit exist ? And why should I use it ? ---------------------------------------------------------------- ## What is the interest ? Do not waste your time to reinvent the wheel. In 2025, it has never been easier to build software. Many libraries became standard and known by the community (react, tailwind, expo, shadcn/radix, Next.js, etc...). The creatorem saas kit provides you with a coding interface that aims to be as clean as possible to easily understand and customize what you need, to build powerful applications that are easy to maintain and scale. **Important:** If the modern tools like Next.js, shadcn/ui, expo, etc... are the bricks to create your applications, creatorem is the cement to glue them together. ## For which environments ? Monorepo tools, featured with the react native ecosystem, allows to build web and native applications with the same codebase. (At least to be as close as never before) For that reason the creatorem saas kit aims to build tools and applications for : * **Web applications** : Powered using [**Next.js**](https://nextjs.org/) and [**React**](https://react.dev/). * **Native applications** : Powered using [**Expo**](https://expo.dev/) and [**React Native**](https://reactnative.dev/). **Note:** Native applications implies to develop **IOS** and **Android** mobile apps. Cross environment development ## Why should I use a toolkit if AI can code for me ? AI is a powerful tool and we are using it to improve our productivity. But we have to keep in mind that it useful only if a few use cases. ### Long answer An AI coding agent is trained on large datasets of code. During the training, the model will learn to generate code which will be the average of the code that have been used to train the model. So you won't get something perfect, but something close to the average. **Important:** Artificial intelligence is a statistical tool. Which means that when you enter a prompt, you will have a certain probability to get the right answer. But the 100% doesn't exist in the statistical world. **Make sure to check its work to make sure it is correct.** *It is a tool to help you, not to replace you.* With that in mind, it is easy to understand that AI should be used for simple and repetitive tasks only. If you need to build complex logic or design system, human is still the best. ### Short answer AI is nice to build simple MVPs, but it is impossible to build such easy to maintain, powerful and scalable applications with AI. People who say the opposite are **fools**. Even if a such AI exists, it would either take a lot of time to build or to be very expensive. # database: Database URL: /docs/database Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/(common)/database.mdx Database management for the creatorem saas kit. *** title: Database description: Database management for the creatorem saas kit. links: 'Supabase': "[https://supabase.com/](https://supabase.com/)" ------------------------------------------------------------ We are using [Supabase](https://supabase.com/) to host our database. ## Why Supabase ? [Supabase](https://supabase.com/) is a modern PostgreSQL database platform that provides a lot of features out of the box. It is a great choice for a saas application. Here are our favorite features : | Feature | Description | | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | ✨ Row Level Security | RLS allows you to control access to your database based on the user's role. | | Api REST | Supabase provides a REST API to access and edit your database. | | Hosting | Supabase Cloud provides affordable pricing and a free tier, perfect when you are just starting. | | Open Source | If you want to host your own database, you can host it yourself as [Supabase is open source](https://github.com/supabase/supabase). | | Web client | You can view and edit your database in a Supabase Studio, a web interface to manage your database. | | Authentication | Supabase provides a built-in authentication system with many oAuth providers. | | Much more... | Version management, test, realtime database, bucket storage, etc... | Most of all, **Supabase**, is built on top of PostgreSQL, giving you a huge flexibility and efficiency to manage your data. `sql` is a language built to **efficiently** handle a **huge amount of data**. `sql` allows you to set more than *tables* and *constraints*. You can define *functions*, *triggers*, *views*, *enums*, etc... Defining as much logic as possible using `sql`, you highly simplify your application logic. As all the data checking, control access, coercing, etc... are done by the database. ## Project structure By default, we have single database by monorepo. As the core of an appplication is its data, and the web/mobile/etc applications are closer to entry points to access and edit your data. | File/Folder | Description | | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | `migrations` | All migrations files. **Do not touch**, they are automatically generated using *creatorem* or *supabase* tools. | | `schemas` | **The most important files**. Contains all the data logic declaration, tables, relations, etc... | | `env-schemas` | That files contains examples of tables definition that you might use in your products. Can be used in `dev` environment to generate migrations. | | `tests` | Supabase test files. | | `.env` | The environment variables for the database. | | `config.toml` | The config file for the database. Allow you to configure the supabase database on environment variables. For example, you can set oAuth providers here. | | `seed.sql` | To seed the database with some data. | ## Migration generation To assemble the migration file, you can use the following command : ```bash npm run db:generate-migration ``` If you start with an empty project, you may want example tables to see all the kit power in action. You can also create your migration with the example `booking.sql` file in the `supabase/env-schemas` folder using the following command : ```bash npm run db:generate-migration --env-schemas booking ``` ## Commands ### Start First, make sure that **docker** is running. ```bash npm run supabase:start ``` ### Stop ```bash npm run supabase:stop ``` ### Test ```bash npm run supabase:test ``` ### Reset The reset command will rebuild the migration file and recreate a new empty database instance. ```bash npm run db:reset ``` If you want to reset with the example `booking.sql` schema, you can use the following command : ```bash npm run db:reset:booking ``` ### Types generation The previous `supabase` commands where close to a ordinary `supabase` cli usage. But this command also generate the drizzle declaration files and extra types. *For that reason, we do not advise to use the `supabase gen types typescript`, from the `supabase` cli command.* ```bash npm run db:types ``` That command will : * generate the `supabase` types in the `kit/db/core/src/database.types.ts` file. * generate the `drizzle` declaration files in the `@kit/drizzle/src/drizzle/` package. * create extra types in the `@kit/drizzle/src/tables.ts` file to improve a cleaner development experience. We are using the `drizzle` client in web applications because it offers better type checking and better autocompletion than the `supabase` client. We are working to use it also on native applications. But `supabase` ecosystem is not fully compatible with mobile app and PostgresQL database yet. ### Dump ```bash npm run supabase:db:dump:local ``` ### Deploy ```bash npm run supabase:deploy ``` # scripts: Scripts URL: /docs/scripts Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/(common)/scripts.mdx All the scripts commands from the the root `package.json` file. *** title: Scripts description: All the scripts commands from the the root `package.json` file. ---------------------------------------------------------------------------- In this page, you will learn the role of each script command from the root `package.json` file. ```json title="package.json" { "name": "your-project-name", "version": "1.0.0", "scripts": { "build": "...", // build all apps and packages for production "clean": "...", // rm node_modules, dist, .next, etc... "dev": "..", // trigger dev cmd for all apps in parallel "format": "...", // format the code with `prettier` "format:fix": "...", // format the code and fix issues "lint": "...", // lint the code with `eslint` "lint:fix": "...", // lint the code and fix issues "typecheck": "...", // ts type checking using `tsc` // other scripts... } // dependencies, etc... } ``` We are using the `turbo` tool to run the scripts, one by one for each application/packages. ## Development Scripts ### Dev The `dev` script starts the development servers for all applications in parallel. ```bash npm run dev ``` This command uses `turbo dev --parallel` to run development servers concurrently for all apps (marketing, dashboard, creatorem, mobile) and packages. ### Build The `build` script builds all applications and packages for production. ```bash npm run build ``` This uses `turbo build` with caching to compile all projects efficiently. ### Clean The `clean` script removes all generated files and dependencies. ```bash npm run clean ``` This command cleans `node_modules`, `dist`, `.next` directories and other build artifacts. ## Code Quality Scripts ### Lint The `lint` script runs ESLint on all affected packages and checks for package mismatches. ```bash npm run lint ``` This uses `turbo lint --affected` to only lint files that have changed, improving performance. ### Lint:fix The `lint:fix` script automatically fixes ESLint issues and package mismatches. ```bash npm run lint:fix ``` This command fixes linting errors and corrects package dependency inconsistencies. ### Format The `format` script checks code formatting using Prettier. ```bash npm run format ``` This command verifies that all code follows the project's formatting standards. ### Format:fix The `format:fix` script automatically formats all code files. ```bash npm run format:fix ``` This command applies Prettier formatting to fix any formatting issues. ### Typecheck The `typecheck` script runs TypeScript type checking across all packages. ```bash npm run typecheck ``` This uses `turbo typecheck --affected` to only check types for changed files. ## Testing Scripts ### Test The `test` script runs all test suites across the monorepo. ```bash npm run test ``` This command executes unit tests, integration tests, and other test types defined in each package. ### Analyze The `analyze` script runs bundle analysis tools to optimize build sizes. ```bash npm run analyze ``` This helps identify large dependencies and optimization opportunities. ## Package Management Scripts ### Syncpack:list The `syncpack:list` script lists mismatched package versions across the monorepo. ```bash npm run syncpack:list ``` This helps identify packages that have different versions in different workspaces. ### Syncpack:fix The `syncpack:fix` script automatically fixes package version mismatches. ```bash npm run syncpack:fix ``` This ensures all packages use consistent versions across the monorepo. ## Database Scripts Check the [database commands](./docs/database#commands) for more information. ## Payment Scripts ### Stripe:listen The `stripe:listen` script starts the Stripe webhook listener for local development. ```bash npm run stripe:listen ``` This enables local testing of Stripe webhooks and payment flows. # Fumadocs Framework: Introduction URL: /docs/ui Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/index.mdx A bunch of react components built using the radix design system. *** title: Introduction description: A bunch of react components built using the radix design system. ----------------------------------------------------------------------------- ## Philosophy We enjoy using the [shadcn/ui](https://ui.shadcn.com) components library, built on top of the [radix primitive](https://www.radix-ui.com/primitives) components. This project must be seen as a complement to the *shadcn/ui* library. You will find in here : * [components](/docs/ui/components) : missing components from the *shadcn/ui* library. * [motion](/docs/ui/motion) : custom animated components implemented with the [motion](https://motion.dev/) library. **Important:** Some of this components are only available with the [creatorem saas kit](/pricing). # mobile: Not implemented yet URL: /docs/mobile Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/mobile/(root)/index.mdx Mobile environment tools *** title: Not implemented yet description: Mobile environment tools ------------------------------------- The mobile environment tools are not implemented yet. The mobile app will be launched **the 30th of November 2025**. # Fumadocs Framework: Confirm Button URL: /docs/ui/components/confirm-button Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/components/confirm-button.mdx A high level component to handle the AlertDialog component when you need to confirm an action. *** title: Confirm Button description: A high level component to handle the AlertDialog component when you need to confirm an action. component: true links: 'Alert Dialog API': [https://www.radix-ui.com/docs/primitives/components/alert-dialog](https://www.radix-ui.com/docs/primitives/components/alert-dialog) -------------------------------------------------------------------------------------------------------------------------------------------------------- ## Benefits This component is a high level component. Which means that it is designed to simplify the usage of the AlertDialog component for a specific confirmation use case. This component is just a shortcut to a `AlertDialog` implementation. For that reason, we are not trying to replicate the **radix** design system here. If you need more heavy customization, you should use the `AlertDialog` component directly. ## Installation Make sure that the following shadcn/ui components are present in your project: * [AlertDialog](https://ui.shadcn.com/docs/components/alert-dialog) * [Button](https://ui.shadcn.com/docs/components/button) * [Form](https://ui.shadcn.com/docs/components/form) * [Input](https://ui.shadcn.com/docs/components/input) * [Label](https://ui.shadcn.com/docs/components/label) Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx showLineNumbers import { ConfirmButton } from '@kit/ui/confirm-button'; ``` ```tsx showLineNumbers { console.log('Confirmation triggered!'); }} > Delete ``` ## Features * Built to avoid duplicated code. * Quickly add templates to fit your needs. * Support for write confirmation. ## API Reference # Fumadocs Framework: File Upload URL: /docs/ui/components/file-upload Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/components/file-upload.mdx A simple file input with validation for formats and size. *** title: File Upload description: A simple file input with validation for formats and size. component: true --------------- ## Installation Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx showLineNumbers import { FileInput } from '@kit/ui/file-upload'; ``` ```tsx showLineNumbers { console.log('Selected file:', file); }} /> ``` ## Features * Validates file type and size * Configurable accepted formats by category * Simple API for handling selected file ## API Reference # Fumadocs Framework: Image Dropzone URL: /docs/ui/components/image-dropzone Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/components/image-dropzone.mdx Drag & drop or click to select an image, with preview support. *** title: Image Dropzone description: Drag & drop or click to select an image, with preview support. component: true --------------- ## Installation Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx showLineNumbers import { ImageDropzone } from '@kit/ui/image-dropzone'; ``` ```tsx showLineNumbers { const first = accepted[0]; if (first) { const url = URL.createObjectURL(first); console.log('Dropped file URL:', url); } }} /> ``` ## Features * Drag & drop integration * Optional preview via `src` prop * Border radius presets and easy styling ## API Reference # Fumadocs Framework: Media Manager URL: /docs/ui/components/media-manager Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/components/media-manager.mdx A full-featured media picker and manager with selection, edit, and upload. *** title: Media Manager description: A full-featured media picker and manager with selection, edit, and upload. component: true --------------- ## Installation Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx showLineNumbers import { MediaManager, MediaManagerTrigger, MediaManagerContent } from '@kit/ui/media-manager'; ``` ```tsx showLineNumbers {}} getUrl={(media, path) => `https://example.com/${[...path, media.name].join('/')}`} value={null} onValueChange={(val) => console.log('Selected:', val)} > ``` ## Features * Dialog-based manager with list, selection, and details pane * Works with URLs or object values; single or multiple selection * Upload flow integration and metadata editing ## API Reference # Fumadocs Framework: Number Input URL: /docs/ui/components/number-input Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/components/number-input.mdx An enhanced number input with keyboard, mouse wheel, and drag controls. *** title: Number Input description: An enhanced number input with keyboard, mouse wheel, and drag controls. component: true --------------- ## Installation Make sure that the following shadcn/ui components are present in your project: * [Input](https://ui.shadcn.com/docs/components/input) Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx showLineNumbers import { DragWheelControls, NumberInputBase, NumberInputRoot, NumberInputUnit } from '@kit/ui/number-input'; ``` ```tsx showLineNumbers ``` Or you can use the `NumberInput` if you don't need that much customization. ```tsx showLineNumbers import { NumberInput } from '@kit/ui/number-input'; ``` ```tsx showLineNumbers ``` ## Features * Keyboard arrow key controls (↑↓) * Mouse wheel scrolling support * Click and drag vertical adjustment * Unit display support * Min/max value constraints * Decimal step increments * Accessible ARIA attributes ### Control step factor with the keyboard You can control the step factor with the keyboard by holding the `ALT`, `SHIFT`, or `CTRL` key. Number Input component anatomy ## Examples ### Horizontal Drag Switch the drag direction to horizontal. ### Custom Scale Control the sensitivity of the drag and wheel controls. ### Min/Max ### Base The `NumberInputBase` component is a simpler version of the `NumberInput` component without drag and wheel controls. ## API Reference We are exposing 2 components ### Root `NumberInputRootProps` ### Drag & Wheel Controls `DragWheelControlsProps` ### Base The input `type="number"` element. ### Unit `NumberInputUnitProps` ### All in one This component is a shortcut if you don't need heavy customization. `NumberInputProps` # Fumadocs Framework: Phone Input URL: /docs/ui/components/phone-input Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/components/phone-input.mdx A phone input component that simplifies the phone input. *** title: Phone Input description: A phone input component that simplifies the phone input. component: true kitRequired: true ----------------- ## Installation Install the following dependencies: We use the light-weight (145kB) [libphonenumber-js](https://www.npmjs.com/package/libphonenumber-js) library for the phone number validation. ```bash npm install libphonenumber-js ``` Copy and paste the following code into your project. Update the import paths to match your project setup. ## Anatomy Phone Input component anatomy ## Usage ```tsx showLineNumbers import { PhoneInputRoot, PhoneInputBase, PhoneInputFlagMenu } from '@kit/ui/phone-input'; ``` ```tsx showLineNumbers ``` ## Features * International zip code suggestions * Flag menu * Phone number formatting ## API Reference ### Root `PhoneInputRootProps` ### Flag Menu Props: `Omit, 'children' | 'type' | 'role'>` ### Base The input component. Props: `React.InputHTMLAttributes` # Fumadocs Framework: Progression URL: /docs/ui/components/progression Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/components/progression.mdx A progression component to display scroll progress through content. *** title: Progression description: A progression component to display scroll progress through content. component: true --------------- ## Features * Scroll-based progress tracking * Circular and bar progress indicators * Smooth animations and transitions * Automatic content measurement * Programmatic scroll control * Responsive design ## Installation Install the following dependencies: We use `@radix-ui/react-slot` for component composition. ```bash npm install @radix-ui/react-slot ``` Make sure that the following shadcn/ui components are present in your project: * [Slot](https://www.radix-ui.com/primitives/docs/utilities/slot) Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx showLineNumbers import { Progression, ProgressionBar, ProgressionCircle, ProgressionContent } from '@kit/ui/progression'; ``` ### Basic Example ```tsx showLineNumbers {/* Long content */} ``` ## API Reference ### Root The root component that provides the progression context. *No props* ### Circle Displays progress as a circular indicator with percentage text. ```tsx showLineNumbers ``` `ProgressionCircleProps` ### Bar Displays progress as a horizontal or vertical bar. ```tsx showLineNumbers ``` `ProgressionBarProps` ### Content Wraps the content you want to track scroll progress for. ```tsx showLineNumbers {/* Your content */} ``` `ProgressionContentProps` # Fumadocs Framework: QR Code URL: /docs/ui/components/qr-code Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/components/qr-code.mdx A compound component for generating QR codes with download functionality. *** title: QR Code description: A compound component for generating QR codes with download functionality. component: true --------------- ## Installation Install the following dependencies: We use `qrcode` for the QR code generation. ```bash npm install qrcode ``` Make sure that the following shadcn/ui components are present in your project: * [Button](https://ui.shadcn.com/docs/components/button) Copy and paste the following code into your project. Update the import paths to match your project setup. ## Anatomy QR Code component anatomy ## Usage ```tsx showLineNumbers import { QRCodeRoot, QRCodeFrame, QRCodePattern, QRCodeDownloadTrigger } from '@kit/ui/qr-code'; ``` ```tsx showLineNumbers ``` ## Features * Radix component architecture * Controlled and uncontrolled value support * Error correction level configuration (L, M, Q, H) * Download functionality with multiple image formats (PNG, JPEG, WebP) * TypeScript support with proper prop types ## Examples ### With an overlay ```tsx showLineNumbers Your Logo ``` ## Troubleshooting It may be possible that your url is too long, or the overlay is too big. In that case try to increase the error correction level. As mentioned in the [QR Code library documentation](https://github.com/soldair/node-qrcode?tab=readme-ov-file#error-correction-level), a higher levels offer a better error resistance but reduce the symbol's capacity. | Level | Error resistance | | ----- | ---------------- | | L | \~7% | | M | \~15% | | Q | \~25% | | H | \~30% | ## API Reference ### Root Contains the context provider and a div element. We advise you to set the width of the QR code in this component using the `className` prop. ### Frame Contains the QR code frame. ### Pattern Contains the QR code SVG element. Props: `Omit, 'children'>` ### Overlay Add an overlay to make your QR code more attractive. ### Download Trigger # Fumadocs Framework: Quick Form URL: /docs/ui/components/quick-form Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/components/quick-form.mdx Avoid form redundancy by using a quick form component. *** title: Quick Form description: Avoid form redundancy by using a quick form component. component: true --------------- 80% of the time, when you dress a form using `react-hook-form` and `zod` : * We have to dress a zod schema * Set the `react-hook-form` hooks * Calling the same shadcn/ui [Form](https://ui.shadcn.com/docs/components/form) components : * FormField * FormItem * FormLabel * FormControl * FormMessage * ... * And we have to do it for each input we create, generating a lot of duplicated code The `QuickForm` component is a solution to this redundancy. Set your zod schema and your object config. Then let the component handle the rest. ## Installation Make sure that the following shadcn/ui components are present in your project: * [Button](https://ui.shadcn.com/docs/components/button) * [Form](https://ui.shadcn.com/docs/components/form) * [Input](https://ui.shadcn.com/docs/components/input) * [Label](https://ui.shadcn.com/docs/components/label) Copy and paste the following code into your project. Update the import paths to match your project setup. ## Features * Avoid form redundancy * Typescript auto-completion * Zod validation * Clean MVC architecture * Equivalent component for server side rendering in the kit. ## Usage
Quick Form workflow
```tsx showLineNumbers import { QuickForm, type QuickFormConfig } from '@kit/ui/quick-form'; import { z } from 'zod'; ``` ```tsx showLineNumbers

Profile

Basic information

), settings: [ { type: 'text', slug: 'name', label: 'Name' }, { type: 'text', slug: 'email', label: 'Email' }, { type: 'phone', slug: 'phone', label: 'Phone' }, { type: 'textarea', slug: 'bio', label: 'Bio', description: 'Short bio (max 200 chars)', }, ], }, ], }} defaultValues={{ name: 'John Doe', email: 'john@example.com', phone: '', bio: '', }} onSubmit={(values) => { console.log('QuickForm submitted:', values); }} /> ``` ## API Reference ### Props `QuickFormComponentProps` ### Config `QuickFormConfig` ### Inputs You can find all the inputs available by default here : # Fumadocs Framework: Speech Input URL: /docs/ui/components/speech-input Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/components/speech-input.mdx A compound component for capturing and transcribing audio input using the Web Speech API with real-time visualization. *** title: Speech Input description: A compound component for capturing and transcribing audio input using the Web Speech API with real-time visualization. component: true links: 'Web Speech API': [https://developer.mozilla.org/en-US/docs/Web/API/Web\_Speech\_API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API) ------------------------------------------------------------------------------------------------------------------------------------------------------ Speech Input is a compound component for capturing voice input with real-time transcription and animated audio visualization. Built on the Web Speech API with Radix design system principles. ## Features * **Real-time transcription** with interim and final results * **Animated equalizer** showing audio activity * **Flexible composition** using Radix compound components * **Browser support detection** with graceful fallbacks * **Language support** with customizable locales * **Callback hooks** for lifecycle events * **Keyboard editable** input field * **Cancellation support** to discard transcriptions ## Installation Install the following dependencies: ```bash npm install motion ``` Make sure that the following packages are present in your project: * [Radix UI Slot](https://www.radix-ui.com/primitives/docs/utilities/slot) Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ### Basic Setup ```tsx showLineNumbers import { SpeechInput, SpeechInputTrigger, SpeechInputBase, SpeechInputCancel } from '@kit/ui/speech-input'; console.log('Started listening')} onSpeechChange={(text) => console.log('Final:', text)} > ``` ### With Custom Components The `asChild` prop lets you compose with your own components: ```tsx showLineNumbers ``` ### Cancelling Input The `SpeechInputCancel` button discards the transcription and prevents the `onSpeechChange` callback: ```tsx showLineNumbers {/* Only enabled while listening */} ``` ## API Reference ### SpeechInput Root provider managing speech recognition state. ### SpeechInputTrigger Button to start/stop speech recognition. Supports `asChild` for composition. ### SpeechInputCancel Button to cancel recording and discard transcription. Disabled when not listening. ### SpeechInputEqualizer Animated equalizer showing real-time audio activity. ### SpeechInputBase Input field displaying transcribed text. Fully editable by keyboard. ## Troubleshooting | Issue | Solution | | ----------------------- | ------------------------------------------------------------------- | | Microphone blocked | Check browser permissions and grant microphone access | | No text appearing | Verify microphone works and Web Speech API is supported | | Language not recognized | Use valid language codes like `en-US`, `fr-FR`, `de-DE` | | Input not editable | Use `asChild` prop or ensure `SpeechInputBase` is properly composed | # Fumadocs Framework: Stepper URL: /docs/ui/components/stepper Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/components/stepper.mdx A stepper component to display step by step content. *** title: Stepper description: A stepper component to display step by step content. component: true --------------- ## Features * `react-hook-form` integration, validation and submit handling * Customizable style * Navigation controls ## Installation Install the following dependencies: For typing purposes, make sure that `react-hook-form` is installed. If you want to use an animated stepper, you need to install `motion`. Otherwise delete the `StepperMotionContent` component.
```bash npm install react-hook-form motion ```
Make sure that the following shadcn/ui components are present in your project: * [Form](https://ui.shadcn.com/docs/components/form) * [Button](https://ui.shadcn.com/docs/components/button) * [Slot](https://www.radix-ui.com/primitives/docs/utilities/slot) Copy and paste the following code into your project. Update the import paths to match your project setup.
## Usage ```tsx showLineNumbers import { Stepper, StepperContent, StepperNext, StepperPrevious, StepperStep, StepperTrigger } from '@kit/ui/stepper'; ``` ```tsx showLineNumbers <>{/* Step content 1 */} <>{/* Step content 2 */} <>{/* Step content 3 */}
``` ### Anatomy Stepper anatomy diagram ## Examples ### Motion You can easily animate step transitions using `motion` and its `AnimatePresence` component. To do that you need to use the `StepperMotionContent` component instead of the `StepperContent` component. ```tsx showLineNumbers {2-6} {/* Your steps come here ... */}
``` ### Form implementation The example at the top shows a simple stepper component with form validation and submit handling. Follow these instructions to properly implement the stepper component with form validation and submit handling. Declare the form methods and schema Optional: set `disableForwardNav` to `true` to disable the forward navigation, prevent your users to skip a step without validating the previous steps. We are using the `name` props of the `` children to detect which fields are present in the current step. For that reason, you have to use shadcn/ui's `` component to properly integrate your form. ```tsx showLineNumbers {1-5,8,13,15,32,34,50,63} const methods = useForm({ mode: 'onChange', resolver: zodResolver(yourSchema), defaultValues: {/* ... */} }); return (
( First Name )} /> ( Last Name )} /> {/* other steps come here ... */} {/* flex row reverse for focus control */}
); ``` ## Progress Bar variant Here are some premade progress bar that you can use or adapt to your needs. ### Simple ### Bullets ### Panels Borders ### Circles ### Connecting Lines ### Dots ### Panels Progress ## API Reference ### Root ### Content Props: `React.ComponentPropsWithoutRef<'div'>` ### MotionContent Motion version of the `StepperContent` component. Props: `{ children: React.ReactNode } & HTMLMotionProps<'div'>` ### Step Allow to define the content of a single step. Must be the direct child of StepperContent. `StepperStepProps` ### Previous Previous step button. `StepperPreviousProps` ### Next Next step button. `StepperNextProps` ### Trigger `StepperTriggerProps` ### ActiveStep A React Fragment that contains the active step number. ### StepLength A React Fragment that contains the number of steps. # Fumadocs Framework: Tour URL: /docs/ui/components/tour Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/components/tour.mdx A guided tour that helps users understand the interface. *** title: Tour description: A guided tour that helps users understand the interface. component: true links: 'Popover API': [https://www.radix-ui.com/docs/primitives/components/popover](https://www.radix-ui.com/docs/primitives/components/popover) ----------------------------------------------------------------------------------------------------------------------------------------- ## Installation Install the following dependencies: We use `motion/react` for the animations and `react-remove-scroll` is used by radix and shadcn/ui to prevent the scroll when the tour is open.
```bash npm install motion/react react-remove-scroll ```
Make sure that the following shadcn/ui components are present in your project: * [Popover](https://ui.shadcn.com/docs/components/popover) * [Button](https://ui.shadcn.com/docs/components/button) Copy and paste the following code into your project. Update the import paths to match your project setup.
## Usage ```tsx showLineNumbers import { Tour, TourArrow, TourClose, TourContent, TourDescription, TourFrame, TourNext, TourOverlay, TourPortal, TourPrevious, TourProgress, TourTitle, TourTrigger, type TourStep } from '@kit/ui/tour'; ```
```tsx showLineNumbers
```
## Features * Built on top of the shadcn/ui components, using the radix design system * Support for different step types such as "dialog" and "floating" * Support for customizable content per step * Flexible positioning of the tour dialog per step * Progress tracking shows users their progress through the tour ### Keyboard controls Tour component keyboard controls | Key | Action | | -------------------- | ------------- | | `ArrowRight` `Space` | Next step | | `ArrowLeft` | Previous step | | `Escape` | Close tour | ## API Reference ### Root Contains all the parts of the tour. ### Trigger An extended version of the [PopoverTrigger](https://www.radix-ui.com/primitives/docs/components/popover#trigger) component. ### Portal An extended version of the [PopoverPortal](https://www.radix-ui.com/primitives/docs/components/popover#portal) component. ### Frame The frame that wrap the highlighted element. Optional according your styling preferences. Takes `React.ComponentProps<'div'>` or `React.ComponentProps` props. ### Overlay The overlay that cover the entire screen except the highlighted element. ### Content Takes the same props as the [PopoverContent](https://www.radix-ui.com/primitives/docs/components/popover#content) component. Calls the `RemoveScroll` component to prevent the scroll when the tour is open. When the `dialogDisplay` is true, it display another `div` different than the `PopoverContent` component to display the dialog. *We are calling the preventDefault method on the `onInteractOutside` prop to prevent the tour from being closed when the user clicks on the dialog.* ### Title To display the title of the active step. Props : `React.HTMLAttributes`. ### Description To display the description of the active step. Props : `React.HTMLAttributes`. ### Progress A progress component to show which step the user is on. ### Arrow An extended version of the [PopoverArrow](https://www.radix-ui.com/primitives/docs/components/popover#arrow) component. ### Close A button to close/skip the tour. `TourCloseProps` ### Previous `TourPreviousProps` ### Next `TourNextProps` # Fumadocs Framework: Use Copy To Clipboard URL: /docs/ui/hooks/use-copy-to-clipboard Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/hooks/use-copy-to-clipboard.mdx A simple hook to copy to clipboard. *** title: Use Copy To Clipboard description: A simple hook to copy to clipboard. component: false ---------------- ## Installation Copy and paste the following code into your project. ## Usage ```tsx showLineNumbers import { useCopyToClipboard } from '@kit/ui/hooks/use-copy-to-clipboard'; ``` ```tsx showLineNumbers const { copyToClipboard, isCopied } = useCopyToClipboard(); return ( ) ``` ## API Reference Nothing special here. # Fumadocs Framework: Delay URL: /docs/ui/hooks/use-delay Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/hooks/use-delay.mdx Delay your react states. *** title: Delay description: Delay your react states. component: false ---------------- Delay a state update. Very handy for animations and other UI effects. ## Installation Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx showLineNumbers import { useDelay, useFnDelay } from '@kit/ui/hooks/use-delay'; ``` ```tsx showLineNumbers const [count, setCount] = useState(0); const delayedCount = useDelay(count, 1000); // function approach const conditionalDelayResult = useFnDelay( async (delay) => { if (count < 5) return count; await delay(2000); return count; }, [count] ); ``` ## API Reference ### useDelay Takes : `(value: T, delayMs: number) => T` ### useFnDelay Takes : ```ts ( asyncFactory: (delay: (timeMs: number) => Promise) => Promise, deps: React.DependencyList ) => T ``` # Fumadocs Framework: Input Drag Control URL: /docs/ui/hooks/use-input-drag-control Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/hooks/use-input-drag-control.mdx Update a number using drag controls *** title: Input Drag Control description: Update a number using drag controls component: false ---------------- This component is used in the [Number Input](/docs/ui/components/number-input) component to implement the drag behavior. ## Installation Copy and paste the following code into your project. Nothing else, no dependencies. ## Usage ```tsx showLineNumbers import { useInputDragControl } from '@kit/ui/hooks/use-input-drag-control'; ``` ```tsx showLineNumbers const { handleMouseDown, isDragging } = useInputDragControl({ containerRef: localRef, value: currentValue, step, min, max, onDrag: onValueChange, dragScale, lockToStep, dragDirection, }); ``` Look at the [API Reference](#api-reference) for more details on the parameters. ## Features * Drag controls * Inifnite drag * Keyboard support * Scale, direction, step customization ### Control step factor with the keyboard You can control the step factor with the keyboard by holding the `ALT`, `SHIFT`, or `CTRL` key. Number Input component anatomy ## API Reference `UseInputDragControlParams` # Fumadocs Framework: Dialog URL: /docs/ui/motion/dialog Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/motion/dialog.mdx An animated dialog component powered by motion. *** title: Dialog description: An animated dialog component powered by motion. component: true links: 'Motion Layout': [https://motion.dev/docs/react-layout-animations](https://motion.dev/docs/react-layout-animations) ------------------------------------------------------------------------------------------------------------------- ## Features * Seamless transition between trigger and content * Radix component architecture * Handle open state logic internally * Remove scrollbar when the dialog is open A dialog component providing a user experience close to a native app animation. It gives the illusion that the element is always present in the viewport during the transition to a `fixed` position. We are using the [motion layout](https://motion.dev/docs/react-layout-animations) layoutId props to create seamless "magic motion" effects between two separate elements ## Installation Install the following dependencies: We use `motion/react` and `framer-motion` for animations, as well as `react-remove-scroll` to prevent the scroll when the dialog is open. ```bash npm install motion/react framer-motion react-remove-scroll ``` Make sure that the following radix [portal](https://www.radix-ui.com/primitives/docs/utilities/portal) is present in your project Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ### Anatomy ```tsx showLineNumbers import { Dialog, DialogAnimatePresenceDiv, DialogContent, DialogMotionImage, DialogMotionImageWrapper, DialogOverlay, DialogPortal, DialogTrigger } from '@kit/ui/motion/dialog'; ``` ```tsx showLineNumbers ``` Creatorem Dialog component anatomy ### How it works **Here is a short explanation of how layout animations are handled in `motion`.** Let's call : * *origin* : the original element * *target* : the target element having the style that we would like to transition to. To give the illusion that the element is always present in the viewport, `motion` looks at the future and present (position, size) of the *origin* and *target* before the animation is applied. Knowing that, `motion` will do several operations at the same time: * on the *origin* : * apply animated `translate` and `scale` transformations to fit the future (position, size) * use a fade-out to smoothly make it disappear * on the *target* : * apply animated `translate` and `scale` transformations to fit the *origin* (position, size) * use a fade-in to smoothly make it appear As the fade-out of the *origin* and the fade-in of the *target* are place on top of each other (by making sure that they share the same (position, size)), it gives the illusion that the element is always present in the viewport. Finally, `motion` use the `layoutId` to know which *origin* and *target* are related to each other. A *target* is a `motion` component wrapped in an `` component. Better you will understand how [motion layout](https://motion.dev/docs/react-layout-animations) works, the better you will be able to use this component. Here is a schema that tries to illustrate what we said above: Dialog motion layout schema ### Layout vs non-layout components In this page, what we call a *layout* component is a component that will be present in the *origin* and the *target* and that will be animated during the transitions to the new position. Non-layout components are : * components that will be present in the *target* only * non-motion components * motion components without a `layoutId` prop The dialog component is based on the layoutId props. For that reason, a layout component is not just a motion component with the `layout` attribute, the `layoutId` is required. | Layout component | Non-layout component | | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | | `DialogTrigger`, `DialogContent`, `MotionImageWrapper`, `MotionImage`,`DialogMotionDiv` (with a `layoutId` prop) | `DialogAnimatePresenceDiv`, `DialogOverlay`, `DialogPortal`, `DialogClose`, `DialogMotionDiv` (without `layoutId`) | ## Examples ### Variant 1 ### Variant 2 ### Netflix card ## Tailwind animation The components are built to animate components with css and tailwindcss. Each one of our components has a `data-open` attribute that you can use to animate your content with tailwind. To have a better understanding of how it works, here is a timeline of the animation: Dialog timeline **When opening** We change the `data-open` to `true` after adding the *DialogContent* to the react tree to be able to trigger transitions with the `data-open` attribute. **When closing** For the same reason, we change the `data-open` to `false` before removing the *DialogContent* from the react tree to be able to trigger transitions with the `data-open` attribute before the content is removed. ### CSS variables We are exposing css variables to access the animation duration that you passed to the component. | Variable | Value | | ---------------------- | ----------------------------- | | `--dialog-duration` | The duration of the animation | | `--dialog-duration-95` | 95% of the animation duration | | `--dialog-duration-90` | 90% | | `--dialog-duration-80` | 80% | | `--dialog-duration-70` | 70% | | `--dialog-duration-60` | 60% | | `--dialog-duration-50` | 50% | | `--dialog-duration-40` | 40% | | `--dialog-duration-30` | 30% | | `--dialog-duration-20` | 20% | | `--dialog-duration-10` | 10% | ### Classname usage You can use the `data-open` attribute to animate your content with tailwind. The following examples are equivalent: ```tsx showLineNumbers {children} ``` ```tsx showLineNumbers {children} ``` If you want to animate other component, use the parent group. * the `dialog-trigger` group for trigger children * the `dialog` group for content children ```tsx showLineNumbers
{children}
``` ## Troubleshooting ### Why do we use an ImageWrapper ? `motion` uses the scaleX and scaleY transform properties to change the size of the element. This may lead to deformation of the element, making it hard to properly render images. Wrapping the image with position `absolute` in a `relative` container avoid this issue. This requires several things: * the image must be bigger than the wrapper * set yourself the x and y position of the image to make it covers the entire `relative` wrapper ## API Reference ### Root `DialogProps` ### Trigger The *Trigger* has the same `layoutId` than the *Content* component. Props: `Omit, 'layoutId' | 'transition'> & React.PropsWithChildren` ### Content The *Content* has the same `layoutId` than the *Trigger* component. ### MotionImageWrapper ### MotionImage ### MotionDiv Wrapping a text with this component avoid deformation. Props: `HTMLMotionProps<'div'>` ### AnimatePresenceDiv Used to animate new content (not present in the *origin*) in the dialog content. We are using a local `` and open state effect to trigger `motion` *initial*, *animate* and *exit* animation states. `DialogAnimatePresenceDivProps` ### Overlay Props: `Omit, 'layoutId'>` ### Portal The radix [portal](https://www.radix-ui.com/primitives/docs/utilities/portal) component. ### Close Props: `HTMLMotionProps<'button'>` # Fumadocs Framework: Glow URL: /docs/ui/motion/glow Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/motion/glow.mdx Add a glowing effect to your components. *** title: Glow description: Add a glowing effect to your components. component: true --------------- ## Installation Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx showLineNumbers import { Glow, GlowingDiv } from '@kit/ui/motion/glow'; ``` ```tsx showLineNumbers
``` ## Features * Efficient and performant animations * Powered by motion library * Use SVG mask feature for efficient rendering ## API Reference ### Props ### Root ### Div # Fumadocs Framework: Device Mockup URL: /docs/ui/motion/mutable-device-mockup Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/ui/motion/mutable-device-mockup.mdx An animated mockup to switch and render macOS, iPhone and Android devices. *** title: Device Mockup description: An animated mockup to switch and render macOS, iPhone and Android devices. component: true --------------- ## Installation Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx showLineNumbers import { Camera, DeviceContent, DeviceSelector, Keyboard, MobileButtons, MutableDeviceMockupRoot, Screen, TopBar, Viewport, } from '@kit/ui/motion/mutable-device-mockup'; ``` ```tsx showLineNumbers {/* Desktop content */} {/* Android and iOS content */} ``` ## Features * MacOS, iPhone and Android mockups. * Animated transitions. * Powered by motion library * Radix components architecture. ## API Reference ### Root `MutableDeviceMockupRootProps` ### Selector `DeviceSelectorProps` ### Viewport ### Screen The screen of all the devices. `React.PropsWithChildren` ### Keyboard The macOS keyboard. ### MacOSTopBar `MacOSTopBarProps` ### IOSTopBar The top bar on iOS devices. ### AndroidTopBar The top bar on Android devices. ### AppleTopCamera The top camera on macOS and iOS devices. ### AndroidFloatingCamera The floating camera on Android devices. ### PowerButton The power button on mobile devices. ### IOSButtons Add mobile buttons according an iOS layout. ### AndroidButtons Add mobile buttons according an Android layout. ### DeviceContent `DeviceContentProps` ### Shortcut components Use this components to avoid the pain of handling all the previous components. #### MobileButtons Add mobile buttons according an iOS or Android layout. #### TopBar Add the top bar according an macOS, iOS or Android layout. #### Camera Add the camera according an macOS, iOS or Android layout. ### MutableDeviceMockup The main component to render the device mockup. Takes the same props as `Root` : `MutableDeviceMockupRootProps`. # web: Configuration URL: /docs/web/configuration Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/web/(root)/configuration.mdx All the steps to install and keep up to date the creatorem saas kit. *** title: Configuration description: All the steps to install and keep up to date the creatorem saas kit. --------------------------------------------------------------------------------- ## App config The `app.config.ts` file is used to get the application name, description, ... If also implements [email templates](/docs/web/features/emails/templates) data in the `email` attribute. ```ts import { parseAppConfig } from '@kit/shared/config'; export const appConfig = parseAppConfig({ name: 'acme', title: 'Acme | Your company goals.', description: 'Acme is a company that helps you achieve your goals.', theme: 'light', email: { template: { logo: { url: routes.url + '/images/logo-name.png', width: 176, height: 32, }, }, contactEmail: 'hello@acme.com', supportEmail: 'hello@acme.com', }, }); ``` `AppConfig` ## Routes constants It is very handy to have a constants routes object to easliy the different routes of your applications. All the routes are stored in `kit/shared/config/routes.ts` file. ### Routes usage ```tsx import { dashboardRoutes, marketingRoutes } from '@kit/shared/config'; export default function Home() { return (
Login Marketing
); } ``` # web: Deployment URL: /docs/web/deployment Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/web/(root)/deployment.mdx Implement your own documentation website with Fumadocs. *** title: Deployment description: Implement your own documentation website with Fumadocs. -------------------------------------------------------------------- In this guide, we gonna show you how to deploy the **dashboard** and **marketing** applications with *supabase* and *vercel* ## Supabase First deploy a [supabase instance here](https://supabase.com/dashboard/project/). Once your supabase database created push migration files from your local project using the following commands : ```bash npx supabase link --project-ref your-project-ref npx supabase db push ``` You can find your project ref in your Supabase dashboard URL: `https://supabase.com/dashboard/project/your-project-ref` ### Authentication provider Go to Authentication > Sign In / Providers and fill the required field to set you oAuth providers. For instance with google: * click on "Enable Sign in with Google" * enter your "Client IDs" and you "Client Secret (for OAuth)" * click "Skip nonce checks" * click "Save" By default the `Email` provider will be enabled. ### Authentication Emails The creatorem saas kit provide premade templates to personalize the UI of your [authentication email templates](docs/web/features/email/templates) : * Confirm signup * Invite user * Magic Link * Change Email Address * Reset Password Here is the required setup. Go to Authentication > Auth Hooks. Click on "Add a new hook" and select "Send Email hook". Hook type select "HTTPS" In the URL field use : [https://your-domain-name.com/api/auth-hook](https://your-domain-name.com/api/auth-hook) Require that the [auth-hook api endpoint](docs/web/features/authentication) is set in your application. Then generate a "Secret" token and keep it. You gonna need to to set the `AUTH_WEBHOOK_SECRET` environment variable in the vercel dashboard. ### Authentication Redirect URI You have to specify [your application url and the allowed redirect URLs](https://supabase.com/dashboard/project) once user logged in with oAuth provider. Go to "Authentication" > "URL Configuration" and add your application url and the allowed redirect URLs. In "Site URL" field, enter the application url where the auth feature is deployed. In "Redirect URLs" field, enter something like this: `http://localhost:3000/auth/callback` ### Expose the `kit` and `storage` database schema Go to "Project Settings" > "Data API". In the "Exposed schemas" field, add the `kit` and `storage` schema. In the "Extra search path" field, add the `kit` table. Click on "Save". You can safely expose the `kit` and `storage` schema because their are protected by RLS policies. ## Vercel Create a project in the [vercel dashboard](https://vercel.com) Once you repository selected, chose the `apps/dashboard` or `apps/marketing` path as root of the project. ### Set you environment variables Copy paste your environment variables from the .env.local file to the vercel dashboard. You will have to set the following supabase environment variables according your previous setup : | Environment Variable | Description | | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | | NEXT\_PUBLIC\_SUPABASE\_URL | Go to "Project Settings" > "Data API" | | NEXT\_PUBLIC\_SUPABASE\_ANON\_KEY | Go to "Project Settings" > "API Keys" | | SUPABASE\_SERVICE\_ROLE\_KEY | Go to "Project Settings" > "API Keys" | | SUPABASE\_DATABASE\_URL | To access the supabase connection instruction, go to your dashboard project and add `?showConnect=true` at the end of the url. | Use the "Transaction Pooler" method for the `SUPABASE_DATABASE_URL` variable. Your `SUPABASE_DATABASE_URL` must look like this : ```bash postgresql://postgres.[YOUR-PROJECT-REF]:[YOUR-PASSWORD]@[YOUR-REGION].pooler.supabase.com:6543/postgres ``` # web: Environment Variables URL: /docs/web/environment-variables Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/web/(root)/environment-variables.mdx All the environment variables you need to configure the creatorem saas kit. *** title: Environment Variables description: All the environment variables you need to configure the creatorem saas kit. ---------------------------------------------------------------------------------------- To implement # web: Introduction URL: /docs/web Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/web/(root)/index.mdx Provides all the tools you need to build scalable saas applications. *** title: Introduction description: Provides all the tools you need to build scalable saas applications. --------------------------------------------------------------------------------- ## Our mission The goal is to deploy applications as fast as possible. This includes : * you new projects * existing applications To improve readability, some packages use a [config file](/docs/web/configuration) to configure the behavior of the package features. ## Our stack * [turborepo](https://turborepo.org/) : Turborepo is a build system for monorepos, built by vercel. * [turbopack](https://turbo.build/pack) : Turbopack is a fast, disk space efficient package manager for JavaScript, built by vercel. * [next.js](https://nextjs.org/) : Next.js is a framework for building server-side rendered and static websites using React, built by vercel. * [pnpm](https://pnpm.io/) : pnpm is a fast, disk space efficient package manager for JavaScript. * [supabase](https://supabase.com/) : Supabase is a open source firebase alternative, built by supabase. * [tailwindcss](https://tailwindcss.com/) : Tailwind CSS is a utility-first CSS framework for rapidly building custom user interfaces. * [shadcn/ui](https://ui.shadcn.com/) : Shadcn/UI is a library of reusable UI components for React, built by shadcn. * [react](https://react.dev/) : React is a library for building user interfaces, built by facebook. ## Monorepo structure * `apps` : The applications of your saas. * `kit` : All packages of your saas. * `supabase` : The supabase configuration. * `tooling` : Contains dev tools configurations like eslint, prettier, tailwind, tsconfig, etc. # web: Documentation URL: /docs/web/features/documentation Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/web/features/documentation.mdx Implement your own documentation website with Fumadocs. *** title: Documentation description: Implement your own documentation website with Fumadocs. links: 'Fumadocs': "[https://fumadocs.dev](https://fumadocs.dev)" 'Marketing App': "/marketing/docs" ---------------------------------- Check the [Fumadocs page](/docs/web/features/cms/fumadocs) to learn more about Fumadocs in the kit. ## Overview We use [Fumadocs](https://fumadocs.dev) to implement comprehensive documentation websites across our applications. The marketing application includes a fully functional Fumadocs implementation that serves as a reference for building your own documentation sites. ## Fumadocs Implementation ### In the Marketing Application The marketing app demonstrates a complete Fumadocs setup with the following structure: **Configuration** * `source.config.ts` - Defines the documentation source with MDX options using `@kit/fumadocs/mdx-options` * Content stored in `content/docs/` directory with structured folders and MDX files * Metadata configuration through `meta.json` files for navigation structure **Layout & Navigation** * `app/docs/layout.tsx` - Main layout with `DocsProvider` and `DocsSidebar` components * `app/docs/[[...slug]]/page.tsx` - Dynamic page rendering with breadcrumbs, navigation, and table of contents * Responsive sidebar navigation with collapsible tree structure **Features** * Static generation for optimal performance (`generateStaticParams`) * SEO-friendly metadata generation (`generateMetadata`) * Table of contents with scroll-to-top functionality * Previous/next page navigation * Copy page content and AI-powered search features ### Key Components Used The implementation leverages the `@kit/fumadocs` package which provides: * Pre-configured MDX options with syntax highlighting * Custom MDX components for rich documentation content * UI components like `DocsSidebar`, `DocsBottomNavigation`, and `DocsBreadcrumb` * LLM processing utilities for AI-powered features ## Getting Started To implement Fumadocs in your own application: 1. **Install Dependencies**: Follow the [Fumadocs quick start guide](https://fumadocs.dev/docs/getting-started/quick-start) 2. **Configure Source**: Set up your `source.config.ts` similar to the marketing app 3. **Create Layout**: Implement the docs layout with sidebar and navigation 4. **Add Content**: Structure your documentation in MDX files 5. **Customize Styling**: Apply your theme and branding ## Learn More For detailed information about the Fumadocs API, components, and advanced features, see the [Fumadocs documentation](/docs/web/features/cms/fumadocs). # web: Monitoring URL: /docs/web/features/monitoring Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/web/features/monitoring.mdx Tools to monitor your application, to track errors and events. *** title: Monitoring description: Tools to monitor your application, to track errors and events. links: 'Sentry': "[https://sentry.io/](https://sentry.io/)" ---------------------------------------------------- In this page, we will see how to setup monitoring in your application. This feature is implemented in the `@kit/monitoring` package. We are using [Sentry](https://sentry.io/) as monitoring provider. **Note:** No need to use this package if you want to use the vercel monitoring provider, just follow the instructions in the [Vercel docs](https://vercel.com/docs/query/monitoring/quickstart). ## Installation ### Project Setup Make sure that the `@kit/monitoring` package is installed. ```bash npm install '@kit/monitoring@workspace:*' ``` Paste the following code in your `instrumentation.ts` file of your application. ```ts title="instrumentation.ts" showLineNumbers {1} import { MonitoringProvider } from '@kit/monitoring'; export const register = MonitoringProvider.register; export const onRequestError = MonitoringProvider.captureRequestError; ``` The next step is to set the **sentry** environment variables. ### Sentry Setup Here is where you will find the **sentry** environment variables. | Environment Variable | Description | | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `SENTRY_ORG` | The organization slug.
Go to Sentry > Settings > [Organization](https://sentry.io/settings/organization/).
You can also find it in the url subdomain. | | `SENTRY_PROJECT` | The project name.
Present in the url after `/projects/` | | `NEXT_PUBLIC_SENTRY_DSN` | The Sentry DSN.
Go to the [project settings](https://sentry.io/settings/projects/) page. Then click on `Client Keys (DSN)`. | | `SENTRY_AUTH_TOKEN` | The Sentry auth token.
Go to Sentry > Sentry > [Organization Tokens](https://sentry.io/settings/auth-tokens/)
Then create and copy a token for your project. | ## Environment variables ```dotenv showLineNumbers noCollapse # ============================================ # 📈 MONITORING & ERROR TRACKING # ============================================ SENTRY_ORG="your-sentry-org" SENTRY_PROJECT="your-sentry-project" NEXT_PUBLIC_SENTRY_DSN='https://xxxxxxxxxxx@xxxxx.ingest.de.sentry.io/xxxxxxxx' SENTRY_AUTH_TOKEN="your-sentry-auth-token" ``` # web: Roadmap URL: /docs/web/features/roadmap Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/web/features/roadmap.mdx Keep your users aware of your progress with a smooth roadmap process. *** title: Roadmap description: Keep your users aware of your progress with a smooth roadmap process. links: 'Notion': "[https://www.notion.com](https://www.notion.com)" ------------------------------------------------------------