# Architecture Overview

Curio is a Deno-native backend toolkit organized as a monorepo.

The repository currently contains two publishable packages:

* `@curio/core` in `packages/core`
* `@curio/init` in `packages/init`

## Product Split

Curio contains two separate products that should not be conflated.

### Core

`@curio/core` is the reusable framework package.

It owns:

* API authoring
* API build artifacts for advanced tooling
* middleware
* schema integration
* DB abstractions
* testing utilities
* value-object primitives
* admin runtime
* focused admin modules
* auth helpers
* Drizzle integration
* advanced OpenAPI generation

### Init

`@curio/init` is the project bootstrap package.

It owns:

* project scaffolding
* template copying
* placeholder replacement
* CLI ergonomics

It should not drive the core package into a shape optimized for scaffolding internals.

## Guiding Principles

### Strong Happy Path

Curio should make the common backend flow easy:

* define models
* define APIs
* mount an admin
* adopt auth, roles, sessions, and audit quickly

### Clear Boundaries

The public surface should stay smaller than the internal implementation.

Curio should hide complexity behind:

* focused entrypoints
* narrow modules
* stable abstractions

### Domain-Oriented Organization

The repository and the core package should be organized by responsibility, not by implementation accident.

### Opinionated Defaults Without Lock-In

Curio is intentionally opinionated around Oak, Valibot, and the generated project template. At the same time, advanced consumers should still have credible extension points where that matters.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fifo-docs.gitbook.io/curio/architecture/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
