# Building Your Application

> Build a feature in the Cloudflare kit: create a page, load data, submit a form, authenticate the user, and test the result.

*Canonical: https://makerkit.dev/docs/void-cloudflare/development-guide/overview*

---

Start here after [Installation](../installation/overview). This guide explains how to build application features with the conventions this kit actually uses: Void Pages, React, self-managed Better Auth, and Drizzle on Postgres.

## What Do You Want to Build?

| I want to… | Start with |
| --- | --- |
| Add a page and put it in the sidebar | [Pages, Routes and Layouts](./pages-and-routing) |
| Fetch data for a page | [Fetching Data](./data-fetching) |
| Save a form or run a mutation | [Mutations and Forms](./mutations-and-forms) |
| Get the signed-in user or check permissions | [Users, Sessions and Permissions](./users-and-permissions) |
| Add a JSON endpoint or call it from React | [API Routes](./api-routes) |
| Add a table, write a query, or apply migrations | [Database and Services](./database-and-services) |
| Add an application email | [Custom Emails](./emails) |
| Test a feature and debug failures | [Testing and Debugging](./testing-and-debugging) |

For daily commands, see [Command Reference](./commands). For ongoing work, see [Kit Updates](./updating) and [Building with Coding Agents](./working-with-agents).

## How a Feature Fits Together

A page normally needs two files: its React component and a companion `.server.ts` file. The server file loads data and accepts mutations. Put database operations and business rules in named service functions, then call them from those handlers.

{% img src="/assets/images/docs/void-cloudflare/request-lifecycle.svg" width="600" height="1285" alt="Page reads pass through middleware, an authorized loader and a service. Form writes validate and authorize before mutation, then reload or redirect." /%}

Loaders and actions run on the server. React page components render on the server initially and hydrate in the browser. A component's `import type` of its loader props is erased from the browser bundle; importing a server function into a component is a different operation and must be avoided.

## Follow One Small Feature

The first three guides build an **account summary** at `/account-summary`:

1. Generate the page and add its labels and navigation entry.
2. Read the current user's profile with a scoped database query.
3. Add a validated display-name form using the kit's existing account service.

The page and query are new examples you add to your app. The mutation reuses the real `updateOwnName` function, so the kit's name validation, hooks, and rate limits continue to apply. You do not need to invent a `projects` table to follow these examples.

## Where to Put Things

| Code | Location |
| --- | --- |
| Signed-in pages | `apps/web/pages/(app)/` |
| Public pages | `apps/web/pages/`, outside `(app)/` and `auth/` |
| Page loaders and actions | Beside the page, with the same name and `.server.ts` |
| API endpoints | `apps/web/routes/api/` |
| App services and validators | `apps/web/lib/*.service.ts` and `*.schema.ts` |
| Your database tables | `apps/web/db/schema.ts` |
| App labels | `apps/web/messages/en/app.json`, or your own namespace |
| Sidebar items | `apps/web/config/navigation.config.tsx` |
| Reusable packages | `packages/<name>/src/`, with separate client and server entries |

For specialized work, continue to [background jobs](../outbox/overview), [file storage](../storage/overview), [billing](../billing/overview), [translations](../internationalization/overview), and [configuration](../configuration/overview).

---

**Next:** [Create a Page →](./pages-and-routing)
