> ## Documentation Index
> Fetch the complete documentation index at: https://docs.davia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Practical Examples

> Here are a few example prompts you can use with your AI coding agent after running `davia init` in your project.

## 1. Broad wiki for the whole project

If you initialized Davia with your coding agent (for example `davia init --agent=cursor`), the agent already knows it should use Davia to generate the wiki.\
In that case, even a very broad prompt like this will work:

```text theme={null}
Document this project.
```

Your agent will use its tooling to scan the project, generate an initial wiki, and create interactive docs and whiteboards.

<Note>
  If you did not run <code>davia init --agent=\<your-agent></code>, make
  sure your prompt explicitly mentions Davia and that you want a local wiki. For
  example: `Use Davia to generate a local wiki that documents this project.`
</Note>

<Frame caption="Ask your agent for a broad wiki over the whole project">
  <video controls className="w-full rounded-xl" src="https://storage.googleapis.com/davia-public-assets/documentation/example_prompt_1.mp4" />
</Frame>

## 2. Focused wiki for a specific part (e.g. schemas)

You can also guide your agent to document only a specific area of the codebase and structure the output in a particular way.\
For example, to document only your schemas/classes and organize them in a table:

```text theme={null}
Using Davia, generate a wiki page that documents only the schemas/classes
in this project. For each schema, include a row in a table with:
- the schema name
- a short description
- its main fields and relationships.
```

This kind of prompt narrows the scope and gives your agent a clear output structure, resulting in a more targeted, immediately useful wiki page.

<Frame caption="Ask your agent for a focused wiki on schemas, structured as a table">
  <video controls className="w-full rounded-xl" src="https://storage.googleapis.com/davia-public-assets/documentation/example_prompt_2.mp4" />
</Frame>

## 3. API spec wiki with custom components

You can also ask your agent to use **custom UI components** when generating documentation.\
For example, to turn an API spec into a browsable gallery of endpoints using your own card and modal components:

```text theme={null}
I want to create a wiki for my API spec using a custom component. 
The UI should display each API endpoint as a card, grouped by category. 
Each card should show a short title and a concise description. 
When a user clicks a card, it should open a modal or dialog that displays the endpoint’s full details. 
The design should be clean, minimal, and readable.
```

Behind the scenes, Davia’s **custom bundler** lets your agent wire these prompts into real components, so your API documentation becomes an interactive interface instead of a static list.

<Frame caption="Use custom components to render an API spec as interactive cards with details in a modal">
  <video controls className="w-full rounded-xl" src="https://storage.googleapis.com/davia-public-assets/documentation/example-claude-code-prompt-1.mp4" />
</Frame>

## 4. Authentication flow architecture diagram

You can also use Davia to generate **clean architecture diagrams** for critical flows like authentication:

```text theme={null}
I want to document this project's authentication flow and I need a clean architecture diagram that visually explains it. 
The diagram should show the interactions between: Client → API Server → Auth Service → Database, 
including steps like credential submission, verification, token creation, and token validation. 
The final output should be visually clear, standard, and easy to understand in one glance.
```

Your agent will produce a visual, end‑to‑end diagram of the auth flow (client, API server, auth service, and database), which you can refine directly in Davia’s interactive canvas.

<Frame caption="Ask your agent for a clear, end-to-end authentication flow diagram">
  <video controls className="w-full rounded-xl" src="https://storage.googleapis.com/davia-public-assets/documentation/example-claude-code-prompt-2.mp4" />
</Frame>
