--- title: "Introduction" description: "Learn what Beignet provides, how it fits with Next.js, and where to start with a new app, an existing app, a tutorial, or a specific task." url: "https://www.beignetjs.com/docs" markdown_url: "https://www.beignetjs.com/markdown/docs.md" framework_version: "0.0.65" documentation_scope: "current-checkout" source_revision: "468e8570b12fe2af9e77d1a32502f728b098107c" source_modified: true --- # Introduction Beignet is an opinionated TypeScript application framework. It gives APIs, business rules, and infrastructure defined places in your app, with shared conventions and tools to check them as the application grows. ## Choose your starting point - **[Create an app](https://www.beignetjs.com/markdown/getting-started.md)** — run the Next.js starter with sign-in and persistent Todos, then change a validation rule across the form and API. - **[Add to an existing app](https://www.beignetjs.com/markdown/guides/existing-nextjs-app.md)** — add one typed endpoint alongside your existing Next.js routes and adopt more structure as the feature needs it. - **[Learn by building](https://www.beignetjs.com/markdown/learn.md)** — build a Projects feature through its API, ownership rules, and React UI, with a checkpoint after each chapter. - **[Complete a task](https://www.beignetjs.com/markdown/guides.md)** — find a guide for background work, email, uploads, webhooks, testing, or deployment. You can follow any of these paths with a coding agent. [Build with an agent](https://www.beignetjs.com/markdown/getting-started/agents.md) explains how to start a session, inspect the app, and verify the changes together. ## What Beignet owns A feature has three main responsibilities: | Responsibility | Beignet's approach | | ----------------------------- | ----------------------------------------------------------------------------------------------------------------- | | Describe how callers use it | Contracts define HTTP inputs and responses. Shared schemas connect validation, typed clients, forms, and OpenAPI. | | Apply the business rules | Use cases own application workflows and authorization, so routes, jobs, and scripts can call the same operation. | | Connect the services it needs | Ports define dependency interfaces. Adapters and providers connect the database and external services. | The CLI generates these pieces, maps their relationships, and checks dependency boundaries and wiring. Your tests verify the behavior the application needs. Read the [mental model](https://www.beignetjs.com/markdown/concepts.md) to follow a request through these responsibilities, or use [App architecture](https://www.beignetjs.com/markdown/app-architecture.md) to locate a change in an existing codebase. ## How it fits with Next.js Next.js owns pages, layouts, rendering, and the application host. Beignet organizes the API contracts, business workflows, and infrastructure behind those pages. Thin Next.js route handlers expose Beignet's HTTP API; React components can call it through typed clients and form adapters. Use Beignet when you want consistent boundaries for features that grow beyond an endpoint. You can start with a contract and handler, then introduce use cases and dependency ports when you have business rules or infrastructure to separate. See [Comparisons](https://www.beignetjs.com/markdown/comparisons.md) for tradeoffs and alternatives. Other hosts can use the [Web Fetch adapter](https://www.beignetjs.com/markdown/server.md#web-fetch-runtimes). The introductory walkthroughs use Next.js and SQLite so you can follow one tested setup from installation to a working feature. ## What comes with the starter The full-stack Next.js starter includes Better Auth sign-in and sign-up, a database-backed Todos feature with ownership checks, a shadcn/Tailwind UI shell, typed client integration, and feature tests. SQLite is the default database; Drizzle manages its schema and checked-in migrations. Add jobs, uploads, notifications, schedules, and other capabilities when a feature needs them. Generators create the relevant files and wiring; configure providers and runtime entrypoints for the services you choose. These optional capabilities are not all installed by the starter. ## Find the right level of detail - **Start** gets a new or existing application running. - **Learn** follows the Projects tutorial in order. - **Guides** complete specific tasks and explain how to verify the result. - **Architecture and capability pages** explain the application model, production concerns, and available choices. - **Reference** covers [CLI commands](https://www.beignetjs.com/markdown/cli.md), [package imports](https://www.beignetjs.com/markdown/package-reference.md), [agent tools](https://www.beignetjs.com/markdown/agents.md), and [API signatures](https://www.beignetjs.com/markdown/api-reference.md). Search for a task or an exact API name. Use **Copy page** or **Open Markdown** to share a page with your agent, and use the [agent instructions](https://www.beignetjs.com/markdown/agent-instructions.md) to select guidance for the installed packages. Beignet is alpha software and APIs can change between releases. Read [Stability and releases](https://www.beignetjs.com/markdown/stability.md) before adopting it in a production app. Start with the [quickstart](https://www.beignetjs.com/markdown/getting-started.md), or [add Beignet to your existing Next.js app](https://www.beignetjs.com/markdown/guides/existing-nextjs-app.md).