# Navree documentation > The complete backend framework for Rust. Modular, API-first and AI-native. Everything your backend needs, checked by the compiler. Every page of https://navree.com/docs/ in one file, in the order of the sidebar. Each page starts with its title and URL. The index of pages is https://navree.com/llms.txt. --- # Introduction URL: https://navree.com/docs/prologue/introduction/ > What Navree is, the ideas it is built on, what comes in the box, who it's for and how to read these docs. Navree is a framework for building efficient, secure and scalable server-side applications in Rust. It gives you an application architecture out of the box: features live in modules, modules declare what they import and export, and a dependency-injection container wires them together when the app boots, refusing to start if anything is missing. Around that structure sits a complete standard library for backends, from routing and validation to workspaces, queues, monitoring and AI, designed together, documented together and released together. The result is code that stays easy to test, easy to change and easy to hand to a new teammate, or to an AI agent. Navree runs on [Tokio](https://tokio.rs), [Axum](https://docs.rs/axum), Hyper and Tower, works with data through its own [ORM](https://navree.com/docs/orm/getting-started.md) on [SeaORM](https://www.sea-ql.org/SeaORM/) and sqlx connections, validates input with [garde](https://docs.rs/garde), speaks TLS through rustls and hashes passwords with Argon2id. A whole application compiles to one binary. This documentation describes Navree 0.1. The [release notes](https://navree.com/docs/prologue/release-notes.md) list what it ships, and the [roadmap](https://navree.com/docs/prologue/roadmap.md) says where it goes next. ## What Navree stands for - **Modular by design.** Every feature is a module that declares what it imports, provides and exports. Apps stay navigable at five modules or five hundred. - **Dependency injection.** A type-keyed container wires services at boot and refuses to start with a missing or private dependency, naming the module and the type. - **API-first.** Versioned routes, validated input, one JSON error shape and an OpenAPI 3.1 document generated from your code. - **Type-safe end to end.** Requests, queries, jobs, events and configuration are typed. If it compiles, it's wired. - **Secure by default.** Routes deny until you allow them. Rotating refresh tokens, two-factor, Argon2id, encrypted cookies, CSRF, rate limits, security headers, an audit log and an SSRF guard ship on. - **Workspaces built in.** Multi-tenancy at the workspace level: members, roles, invitations, and isolation by row, schema or database. - **AI-native.** Agent skills, an MCP server for your coding agent, docs written for models as well as people, and an AI SDK for the product itself. - **Observable.** Structured logs, traces, metrics, health checks and [Lighthouse](https://navree.com/docs/tools/lighthouse.md) monitoring, self-hosted and on by default. - **Scales out.** Start as one binary; split into services over NATS, Kafka, RabbitMQ, Redis Streams or gRPC without rewriting your modules. - **Fast and frugal.** One binary, under 40 MB of memory under load and ready in milliseconds. [Performance](https://navree.com/performance/) has the measurements and how to reproduce them. ## What a Navree app looks like An app is a root module that lists its modules, each configured once: ```rust title="src/app.rs" pub fn app(sources: ConfigSources) -> AppBuilder { Navree::app() .module(ConfigModule::for_root(sources)) .module(LoggerModule::from_config()) .module(CryptoModule::from_config()) .module(HttpModule::from_config()) .module(DatabaseModule::from_config()) .module(QueueModule::from_config()) .module(ValidationModule::from_config()) .module(AuthModule::from_config()) .module(AccessModule::for_root(AccessOptions { abilities: abilities::define, super_admin_role: Some("admin".to_owned()), })) // ... .module(modules::tasks::TasksModule) } ``` A feature module declares what it provides: ```rust title="src/modules/tasks/mod.rs" #[module( imports = [AccessModule::for_feature::()], providers = [TaskService], controllers = [TaskController], exports = [TaskService], register = Self::wire, )] pub struct TasksModule; ``` A controller's routes say who may call them, and the framework enforces it before the handler runs: ```rust title="src/modules/tasks/controller.rs" #[controller("/tasks", version = "1")] impl TaskController { #[patch("/{id}")] #[can(Update, Task, from = "id")] async fn update( &self, uow: Uow, task: Authorized, Valid(Json(input)): Valid>, ) -> Result> { task.check_fields(&input.changed_fields())?; let task = self.tasks.update(&uow, task.into_inner(), input).await?; Ok(Json(task)) } } ``` This route answers `PATCH /api/v1/tasks/{id}`. Before the handler runs, Navree authenticates the bearer token, loads the task, checks that the user's abilities allow updating it, and validates the body. The handler's writes run in the request's transaction, which commits when the response succeeds. [Your first app](https://navree.com/docs/getting-started/your-first-app.md) builds this module from scratch. ## What's in the box ### The framework Each module is its own crate, and the `navree` crate re-exports all of them, one Cargo feature each. The default `full` feature turns them all on. | Area | Modules | |---|---| | Foundation | The kernel (module graph, dependency injection, lifecycle hooks, commands); typed configuration from `.env`, TOML files and `APP_*` variables; structured logging with redaction | | HTTP | Controllers and route attributes on Axum, deny-by-default access declarations, one JSON error shape (`{ "statusCode", "message", "error", "code" }`) with stable, translatable error codes, rate limits, CORS and security headers, signed URLs, maintenance mode | | Validation | `Valid` extractors on garde, one readable message per broken rule, async `unique` and `exists` rules | | Database | An ORM with typed queries, relationships and eager loading, casts, events, scopes, soft deletes, factories and test helpers; a unit of work per request; per-module migrations written with a schema builder, seeders and pagination; TimescaleDB by default (PostgreSQL with hypertables), plain PostgreSQL, MySQL and MariaDB, SQLite for tests, and MongoDB through a document driver | | Security | JWT access tokens with rotating refresh tokens, pluggable authentication strategies, registration, password reset, email verification and two-factor authentication; roles, permissions and abilities with record checks and SQL list filters, shared with the front end; AES-256-GCM encryption and Argon2id hashing; an audit log | | Workspaces | Workspaces, members, roles and invitations; the current workspace from a header, a subdomain, a path or a token; isolation by row, schema or database | | Background work | Database and memory job queues with retries, backoff, unique and delayed jobs; events with synchronous and queued listeners; a scheduler on cron expressions that runs each task once across servers | | Communication | Mail from templates over SMTP; notifications over mail, the database and broadcasts; a WebSocket server that speaks the Pusher protocol, with public, private and presence channels | | Integrations | File storage on named disks with signed temporary URLs; an HTTP client with retries, timeouts, an SSRF policy and fakes; a cache with tags and locks; MiniJinja templates | | Operations | Health and readiness probes, Prometheus metrics, an OpenAPI 3.1 document with a docs UI | | Testing and tools | `TestApp` and an in-process test client with fakes; the `navree` CLI with `navree new`, code generators and a rebuilding dev server | ### The ecosystem Everything else a production backend needs is first-party too: open source under MIT or Apache-2.0, free and self-hosted, released with the framework. | Tool | What it does | |---|---| | [Lighthouse](https://navree.com/docs/tools/lighthouse.md) | Application monitoring: exceptions, slow requests and queries, failed jobs and alerts | | [Logbook](https://navree.com/docs/tools/logbook.md) | A local debugging timeline of every request, query, job, mail, event, cache call and log line | | [Fleet](https://navree.com/docs/tools/fleet.md) | A queue dashboard and worker supervisor | | [Helm](https://navree.com/docs/tools/helm.md) | An admin panel generated from your entities | | [Harbor](https://navree.com/docs/tools/harbor.md) | Server provisioning and zero-downtime deployments | | [Dock](https://navree.com/docs/tools/dock.md) | PostgreSQL, Redis, Meilisearch, Mailpit, MinIO and NATS for local development, with one command | | [Navigator](https://navree.com/docs/ai/navigator.md) | The MCP server for your coding agent | | Package | What it does | |---|---| | [Starter kits](https://navree.com/docs/getting-started/starter-kits.md) | Production-ready apps from one command: SaaS, API and microservice | | [Microservices](https://navree.com/docs/microservices/introduction.md), [gRPC](https://navree.com/docs/microservices/grpc.md) and [GraphQL](https://navree.com/docs/microservices/graphql.md) | Services over NATS, Kafka, RabbitMQ, Redis Streams, MQTT and TCP, gRPC and Connect, and GraphQL, all sharing your modules | | [AI SDK](https://navree.com/docs/ai/ai-sdk.md) and [MCP servers](https://navree.com/docs/ai/mcp-servers.md) | Text, structured output, agents with tools, embeddings and RAG; your app's tools exposed to AI clients | | [Search](https://navree.com/docs/packages/search.md) | Full-text and vector search over your entities | | [Billing](https://navree.com/docs/packages/billing.md) | Subscriptions, usage metering and invoices with Stripe or Paddle | | [Feature flags](https://navree.com/docs/packages/feature-flags.md) | Roll features out per user, workspace or percentage | | [OAuth server](https://navree.com/docs/packages/oauth-server.md) and [Social sign-in](https://navree.com/docs/packages/social-sign-in.md) | OAuth 2.1 and OpenID Connect for third parties; sign-in with Google, GitHub, Apple and Microsoft | | [Webhooks](https://navree.com/docs/packages/webhooks.md) | Signed outgoing webhooks with retries, and verified incoming ones | | [Localization](https://navree.com/docs/packages/localization.md) | Translations, plurals and locale negotiation | | [Browser testing](https://navree.com/docs/packages/browser-testing.md) | Drive a real browser from your tests | The repository also holds a reference application: a CRM with an API built on Navree and a Next.js front end. The [CRM tour](https://navree.com/docs/example-app/crm-tour.md) walks through it. ## Who Navree is for Navree is for teams that build back ends and want the structure decided before the first line of code: - **API and product teams** building JSON APIs for web and mobile front ends, with users, permissions, background jobs, mail and real time. - **SaaS builders** who need workspaces, billing, feature flags and an admin panel on day one, not in month six. - **Systems that grow.** Start as a modular monolith and split modules into services when the load or the team calls for it. The [architecture patterns](https://navree.com/docs/patterns/overview.md) show each shape. - **Rust developers** who would rather build the product than choose, wire and maintain a dozen crates for every new service. - **Teams that work with AI agents.** Every app has the same layout, every feature has an [agent skill](https://navree.com/docs/ai/agent-skills.md), and [Navigator](https://navree.com/docs/ai/navigator.md) lets the agent read your routes, modules and schema. ## How to read these docs - **Getting started** installs Navree and builds a small API with authentication, access rules and tests. Start with [Your first app](https://navree.com/docs/getting-started/your-first-app.md). - **Architecture concepts** explains how an app is put together: the [request lifecycle](https://navree.com/docs/architecture/request-lifecycle.md), [modules](https://navree.com/docs/architecture/modules.md) and [providers](https://navree.com/docs/architecture/providers.md). Read it once; everything else builds on it. - **Architecture patterns** shows the shapes of system you can build: modular monolith, microservices, multi-tenant SaaS, event-driven, API-first and backend-for-frontend. - **The basics, Security, Workspaces, Database and Digging deeper** are the reference, one page per feature. Read them when you need the feature. - **Microservices, AI, Packages and Tools** cover the ecosystem. - **Testing** and the **Example application** show how it all comes together. A (Feature: `queue`) badge at the top of a page or section names the Cargo feature of `navree` it needs. Every page is also available as Markdown for AI agents: see [Docs for agents](https://navree.com/docs/ai/docs-for-agents.md). ## Where to next - [Installation](https://navree.com/docs/getting-started/installation.md): Install the CLI and create your first app. - [Your first app](https://navree.com/docs/getting-started/your-first-app.md): A CRUD API with authentication, access rules and tests. - [Modules](https://navree.com/docs/architecture/modules.md): How an app is put together. - [Architecture patterns](https://navree.com/docs/patterns/overview.md): Monoliths, microservices, multi-tenant SaaS and more. - [Performance](https://navree.com/performance/): Navree's own measurements, the method and how to reproduce them. --- # Release notes URL: https://navree.com/docs/prologue/release-notes/ > Navree 0.1.0, the first release: the framework's modules, workspaces, the tools and packages of the first-party ecosystem, AI-native tooling, the CLI and the reference CRM. ## Navree 0.1.0 0.1.0 is Navree's first release. It ships the framework (the kernel, the shared contracts, the module crates, the `navree` facade that re-exports them, the attribute macros and the `navree` CLI) together with the first-party ecosystem: tools for monitoring, debugging, queues, administration, deployment and local services, and packages for search, AI, microservices, OAuth, billing and more. Everything shares one version number, is open source under MIT or Apache-2.0 and is free to self-host. > **Note: Installing from Git** > > Install the CLI from the Git repository, and let new apps depend on the repository or a local checkout; [Installation](https://navree.com/docs/getting-started/installation.md) shows how. ## The framework ### Foundation - **`navree-kernel`**: the module graph, a type-keyed dependency-injection container with singleton, request and transient scopes, lifecycle hooks, graceful shutdown and the command runner behind `serve`, `migrate` and every other command. The graph is validated before anything is constructed, and `check --graph` prints it. - **`navree-macros`**: `#[module]`, `#[injectable]`, `#[controller]`, the route attributes (`#[get]`, `#[post]`, `#[put]`, `#[patch]`, `#[delete]`) and the helper attributes for access, throttling, timeouts, transactions, audit actions and OpenAPI metadata. A route without an access declaration doesn't compile. - **`navree-contracts`**: the small shared traits and types that let modules cooperate without depending on each other: `Secret`, `RequestId`, `Principal`, jobs and dispatchers, sinks for audit and events, `Broadcaster` and `Clock`. - **`navree-config`**: typed configuration from `.env`, TOML files and `APP_*` environment variables, validated at boot, with secrets redacted in logs and errors. - **`navree-log`**: a tracing subscriber with pretty or JSON output, field redaction, per-target levels and rotating log files. ### HTTP - **`navree-http`**: Axum integration with a default pipeline (request ids, client IP resolution through trusted proxies, panic catching, timeouts, security headers, compression, a per-IP rate limit, body limits, maintenance mode), controllers, deny-by-default route access, per-route throttles, signed URLs, CORS and one JSON error shape for every error (`{ "statusCode", "message", "error", "code" }`, validation failures as 400 with `errors`), whose stable `code` a front end translates. - **`navree-validation`**: `Valid>`, `Valid>` and friends on garde, with one readable message per broken rule and async `unique` and `exists` rules. International input: phone numbers in E.164 with a per-request default region, rich text sanitized by a configurable policy, names and digits in any script, ISO 3166-1 countries and BCP 47 locales. - **`navree-api`**: an OpenAPI 3.1 document built from route metadata at `/api/openapi.json`, a docs UI at `/api/docs`, `openapi:export`, and API resource helpers. - **`navree-session`**: encrypted session cookies with memory and database stores, and CSRF protection for single-page apps that use cookies. ### Data - **`navree-db`**: SeaORM integration with a unit of work per request (a transaction that commits when the response succeeds), `Repo` with change events, per-module migration sets, seeders, model factories, pagination and the `migrate`, `migrate:rollback`, `migrate:fresh`, `migrate:status` and `db:seed` commands. TimescaleDB is the default database (`navree new` sets it up and Dock runs it), with hypertables for Navree's own time-series tables and chunk-dropping pruning (`prune_time_series`); plain PostgreSQL with the same `postgres` feature, MySQL and MariaDB with `mysql`, and SQLite built in. - **`navree-orm`**: the [ORM](https://navree.com/docs/orm/getting-started.md). Models are structs with `#[derive(Model)]` and typed column constants; a query builder with joins, subqueries, unions, aggregates, JSON and full-text conditions, row locks and bulk writes; records with dirty tracking; relationships of every kind with batched eager loading and lazy-loading prevention; casts, accessors and serialization; model events, observers and broadcasts; global and local scopes, soft deletes and pruning; offset and cursor pagination, chunks and streams; factories with fake data; `#[navree::test]` databases with templates and assertions; route model binding; and workspace and access-control scoping. It runs in the unit of work on PostgreSQL with TimescaleDB, MySQL and MariaDB, SQLite and, with `navree-mongo`, MongoDB. - **`navree-schema`**: the [schema builder](https://navree.com/docs/database/schema-builder.md) migrations are written with: tables, columns, indexes, foreign keys and check constraints in Rust, written as each database's SQL, SQLite table rebuilds, TimescaleDB hypertables, reading the live schema, and [schema dumps](https://navree.com/docs/database/squashing-migrations.md) that replace a long migration history. - **`navree-cache`**: a memory cache store on moka with `remember`, tags, stale-while-revalidate and atomic locks. ### Security - **`navree-auth`**: 15-minute JWT access tokens and 30-day rotating refresh tokens with reuse detection, pluggable authentication strategies, `CurrentUser`, registration, password change and reset, email verification, TOTP two-factor authentication with recovery codes and a policy that requires it per role or per workspace, and login throttling. Users list and end their sessions; `#[recent_auth]` asks for the password or a code again before sensitive actions; support staff impersonate users behind `#[not_while_impersonating]` guards, with the impersonator on every audit entry; magic links, emailed sign-in codes and passkeys (ES256 and Ed25519) sign users in without a password; platform administrators sign in apart with two-factor authentication always; and trusted sibling systems hand their users over with signed tokens. - **`navree-access`**: roles, permissions and abilities, record checks for `#[can(.., from = "id")]` routes, SQL list filters with `Accessible`, the abilities endpoint that shares the rules with front ends (in the JSON form `@casl/ability` reads), management routes and the `access:role`, `access:grant` and `access:explain` commands. - **`navree-crypto`**: AES-256-GCM encryption with key rotation, Argon2id password hashing on a bounded blocking pool, token helpers and `key:generate`. `navree_crypto::jose` signs and verifies JSON Web Signatures (HS256, EdDSA, ES256, RS256 and their siblings) on `ring`, reads and publishes JSON Web Keys and key sets, and loads PKCS#8 keys such as Apple's `.p8` files and the public keys of X.509 certificates. - **`navree-audit`**: an audit log of data changes, sign-ins, permission changes and access denials, with `audit:prune`. ### Workspaces - **`navree-workspace`**: multi-tenancy at the workspace level, on in the default features. `WorkspaceModule`, the `CurrentWorkspace` extractor, the `Workspaces`, `Members` and `Invitations` services, the `Owner`, `Admin`, `Member` and `Viewer` roles plus your own, workspace-scoped permissions for `navree-access`, resolution from a header, a subdomain, a path prefix or a token claim, a time zone and country per workspace, isolation by row, schema or database, demo workspaces seeded from fixtures, read-only or reset every night, with an `X-Navree-Demo` header for a Live/Demo switch, and shared libraries: tables of global, organization and workspace content (`m.library::()`) that each workspace reads as one list and clones to change, kept consistent by a `CHECK` constraint. See [Workspaces](https://navree.com/docs/workspaces/introduction.md), [Demo workspaces](https://navree.com/docs/workspaces/demo-workspaces.md) and [Shared libraries](https://navree.com/docs/workspaces/shared-libraries.md). ### Background work - **`navree-queue`**: database and memory job queues with workers, retries with backoff, unique and delayed jobs, failed-job storage and the `queue:work`, `queue:failed`, `queue:retry` and `queue:flush` commands. Jobs dispatched during a request are queued only if its transaction commits. [Batches](https://navree.com/docs/digging-deeper/batches-and-operations.md) run many jobs as one with `then`, `catch` and `finally` callbacks, jobs report progress with `ctx.progress`, and operations show long work to users: `GET /api/operations/{id}`, an SSE progress stream, a private channel, cooperative cancel and a watchdog that fails or restarts stalled work. - **`navree-events`**: a typed event bus with synchronous and queued listeners. - **`navree-schedule`**: schedules on cron expressions in UTC, in a time zone (`in_zone`) or once per workspace at its local time (`per_workspace_local`), overlap prevention, single-node runs across servers sharing a database, and `schedule:run`, `schedule:work` and `schedule:list`. - **`navree-time`**: time zones for users, workspaces and organizations. `CurrentZone`, local days and report windows counted in the tenant's days, send windows with weekends and public holidays, `AT TIME ZONE` with a checked zone, zone names every PostgreSQL accepts, and the public zone list at `/api/time/zones`. See [Time zones](https://navree.com/docs/digging-deeper/time-zones.md). ### Communication - **`navree-mail`**: mailables rendered from templates, with CSS inlined and a text body generated; SMTP (DKIM-signed), SES, Mailgun, Postmark, Resend, log, array and failover transports; queued sending. For products that send for their customers: transports per sending domain, workspace and organization, a delivery log fed by provider webhooks, automatic suppressions, mail held for approval, open and click tracking, and SPF, DKIM and DMARC checks. And for mail coming in: messages parsed with every header, body, attachment and forwarded message, routed to mailboxes by address, signed reply addresses, the raw `.eml` kept on a disk, sources for Amazon SES, Mailgun, Postmark and raw MIME, and a customer's own Microsoft 365 and Gmail mailboxes watched through their integration connection. See [Inbound mail](https://navree.com/docs/digging-deeper/inbound-mail.md). - **`navree-notify`**: notifications over mail, the database, broadcasts, Slack, Microsoft Teams, SMS, WhatsApp and web push, with read state. People and workspaces choose the channels of each category, mail batches into hourly, daily or weekly digests, quiet hours and send windows hold deliveries on the recipient's clock until `notify:release` sends them, and each workspace restyles its notification mail. See [Notification preferences](https://navree.com/docs/digging-deeper/notification-preferences.md). - **`navree-realtime`**: an in-process WebSocket server that speaks the Pusher protocol, so pusher-js and any Pusher client connects, with public, private and presence channels and a signed relay that lets workers broadcast through the serving process. - **`navree-view`**: MiniJinja templates for mail and other text. ### Integrations and operations - **`navree-storage`**: named disks on object_store, streaming, signed temporary URLs and upload checks. - **`navree-http-client`**: outgoing HTTP with retries, timeouts, an SSRF policy and fakes for tests. - **`navree-observe`**: `/health/live`, `/health/ready` with per-module checks, and Prometheus metrics at `/metrics`. ### Testing - **`navree-testing`**: `TestApp` to boot an app or a few modules on a temporary database, an in-process `TestClient` with cookies, `acting_as`, JSON assertions and validation-error assertions, and fakes. ## The ecosystem ### Tools - **[Lighthouse](https://navree.com/docs/tools/lighthouse.md)** (`navree-lighthouse`): application monitoring inside your app, with a dashboard at `/_lighthouse`. Exceptions grouped by fingerprint, slow requests and queries, failed jobs, sampled traces, alerts to email, Slack and signed webhooks through the queue, a JSON API so scripts can read and resolve issues, and MCP tools, an issue resource and a fix-this-issue prompt for agents (with the `mcp` feature). - **[Logbook](https://navree.com/docs/tools/logbook.md)** (`navree-logbook`): a local debugging timeline at `/_logbook` of every request, query, job, mail, event, cache call and log line, with filters and request replay. Development only. - **[Fleet](https://navree.com/docs/tools/fleet.md)** (`navree-fleet`): a queue dashboard at `/_fleet` and a worker supervisor (`navree fleet`) with auto-balanced workers per queue, throughput, wait and runtime metrics, retries for failed jobs, pause and continue, and long-wait alerts. - **[Helm](https://navree.com/docs/tools/helm.md)** (`navree-helm`): an admin panel at `/admin` generated from your entities, with fields, filters, actions and metrics per resource (`navree make:resource`). It respects your access rules. - **[Harbor](https://navree.com/docs/tools/harbor.md)**: server provisioning and zero-downtime deployments from the CLI (`navree harbor:provision`, `navree deploy`, `navree deploy:rollback`), configured in `harbor.toml`, with health-checked atomic releases, encrypted secrets, several servers and roles, container images and push-to-deploy from GitHub Actions. - **[Dock](https://navree.com/docs/tools/dock.md)**: local services for development. `navree dock up` starts TimescaleDB (or plain PostgreSQL), Redis, Meilisearch, Mailpit, MinIO and NATS in Docker or Podman, configured in `dock.toml`. - **[Navigator](https://navree.com/docs/ai/navigator.md)**: the MCP server for your coding agent (`navree mcp`). It lists routes, the module graph and providers, the database schema, recent logs and the last error, runs read-only SQL and searches the docs for your version. ### Packages - **[Search](https://navree.com/docs/packages/search.md)** (`navree-search`): full-text and vector search over your entities with `#[derive(Searchable)]`, on PostgreSQL full text, Meilisearch, Typesense or embedded Tantivy, with vectors in pgvector or Qdrant and indexes kept in sync through the queue. - **[AI SDK](https://navree.com/docs/ai/ai-sdk.md)** (`navree-ai`): text, structured output, streaming, [agents with tools](https://navree.com/docs/ai/agents-and-tools.md), [embeddings and RAG](https://navree.com/docs/ai/embeddings-and-rag.md), with provider failover across Anthropic, OpenAI, Google Gemini, Mistral, Ollama and AWS Bedrock, and `AiFake` for tests. - **[MCP servers](https://navree.com/docs/ai/mcp-servers.md)** (`navree-mcp`, feature `mcp`): expose your app's tools, resources and prompts to AI clients with `#[mcp_server]`, over streamable HTTP at `/mcp` or stdio (`mcp:serve --user`), authenticated by your app's bearer tokens or OAuth (RFC 9728 metadata), with per-tool permissions, filtered lists, `McpTestClient` and `navree make:mcp`. Built on the official Rust MCP SDK. - **[Microservices](https://navree.com/docs/microservices/introduction.md)** (`navree-micro`): request-response and events between services over TCP, NATS, Kafka, RabbitMQ, Redis Streams and MQTT, and hybrid apps that serve HTTP and messages from one binary. - **[gRPC](https://navree.com/docs/microservices/grpc.md)** (`navree-grpc`) and **[GraphQL](https://navree.com/docs/microservices/graphql.md)** (`navree-graphql`): gRPC, gRPC-Web and Connect services on tonic, and GraphQL on async-graphql with dataloaders and subscriptions, both sharing your modules, guards and access rules. - **[OAuth server](https://navree.com/docs/packages/oauth-server.md)** (`navree-oauth`): OAuth 2.1 and OpenID Connect for third-party apps, with PKCE, client credentials, device codes, scopes and consent, and personal access tokens. - **[Social sign-in](https://navree.com/docs/packages/social-sign-in.md)** (`navree-social`): sign-in with Google, GitHub, Apple, Microsoft, GitLab, Slack, LinkedIn, Discord, X and any OpenID Connect provider, linked to Navree users and ending with normal Navree tokens. - **[Single sign-on](https://navree.com/docs/security/single-sign-on.md)** (`navree-sso`): SAML 2.0 and OpenID Connect sign-in per organization or workspace, verified email domains that route sign-in and can refuse passwords, and just-in-time provisioning with group to role mapping. SAML signatures are verified in Rust (exclusive canonicalization, RSA-SHA256 and ECDSA on `ring`; SHA-1 refused), with `SsoFake` for tests. - **[Billing](https://navree.com/docs/packages/billing.md)** (`navree-billing`): subscriptions, trials, usage metering and invoices with Stripe or Paddle, for users or workspaces. - **[Redis](https://navree.com/docs/digging-deeper/redis.md)** (`navree-redis`, feature `redis`): one set of reconnecting Redis connections for the app, and Redis drivers so every process shares the cache and locks, the queue, sessions, named rate limits and WebSocket broadcasts and presence (`cache.store`, `queue.driver`, `session.store` and `realtime.backplane` set to `redis`). - **[MongoDB](https://navree.com/docs/orm/mongodb.md)** (`navree-mongo`, feature `mongo`): `MongoModule` with pooled connections and a readiness check, the ORM's document driver (models, queries, aggregation pipelines, relations, sessions and transactions), the schema builder on collections (validators, indexes, time-series collections) and migrations. - **[Feature flags](https://navree.com/docs/packages/feature-flags.md)** (`navree-flags`): roll features out per user, workspace or percentage, stored in your database. - **[Webhooks](https://navree.com/docs/packages/webhooks.md)** (`navree-webhooks`): signed outgoing webhooks with queue-backed retries and a delivery log, and verified incoming ones from Stripe, GitHub, Paddle, AWS SNS, Google Pub/Sub, Microsoft Graph, Twilio, Slack, Mailgun, Postmark and Standard Webhooks senders, with their handshakes answered. - **[Integrations](https://navree.com/docs/packages/integrations.md)** (`navree-integrations`): each workspace or organization connects its own Microsoft 365 (admin consent and app-only tokens), Google Workspace (service-account keys with domain-wide delegation), Slack, OAuth 2.0 APIs and API keys; credentials encrypted with the application key, tokens refreshed once under a lock, least-privilege scope sets per feature, scheduled health checks that emit `ConnectionUnhealthy`, and typed clients such as `Connection`. - **[Directory sync](https://navree.com/docs/packages/directory-sync.md)** (`navree-directory`): each workspace or organization keeps its people in step with its directory, pushed by Microsoft Entra ID, Okta or any identity provider over a SCIM 2.0 server (filters, PATCH as providers send it, a bearer token per connection), or pulled from Microsoft Graph with delta queries, Google Workspace, Okta, and LDAP or Active Directory over TLS; one normalized directory mapped into your model by `impl DirectorySink`, in runs that stage, diff and apply with dry runs, a deactivation limit that holds a suspicious run for approval, progress on operations and every change recorded; events for created, updated and deactivated users, and `DirectoryFake` for tests. - **[Custom domains](https://navree.com/docs/packages/custom-domains.md)** (`navree-domains`): workspaces on their own domains, with the DNS records to create, verification through TXT records and routing checks on a schedule, automatic TLS through an on-demand proxy's ask endpoint (Harbor's Caddy with `[web.custom_domains]`) or ACME certificates the app gets, renews and serves itself with rustls, the `domain` workspace resolver and `CurrentDomain` for public pages, managed Cloudflare zones, certificate expiry reports to Lighthouse, and fakes for DNS, the CA and certificate probes. - **[Documents](https://navree.com/docs/packages/documents.md)** (`navree-documents`): PDF from HTML templates or documents built in code, laid out in process by the native engine (HarfRust shaping, bidirectional text, tables whose headers repeat, page-numbered headers and footers, tagged PDF, bundled Noto fonts for Latin, Arabic, Hebrew and Devanagari) or printed by headless Chrome, DOCX, merge, stamps and overlays, and queued renders to a storage disk, behind an operation your users follow when you want one. See [Typst templates become HTML](#typst-templates-become-html). - **[Media](https://navree.com/docs/packages/media.md)** (`navree-media`, feature `media`): files attached to models in collections that check types sniffed from the content and sizes and keep one or the latest few files, rows in the `media` table and bytes on storage disks; image conversions (resize, crop, WebP, greyscale, blur, responsive variants with a `srcset`, SVG through resvg) with EXIF stripped from originals, queued and regenerated with `media:regenerate`; remote files through the SSRF guard; zip archives with zip-slip and size-bomb guards; text from PDF, DOCX and HTML; video and audio through an FFmpeg sidecar (`media-ffmpeg`); and `MediaFake` for tests. - **[Imports and exports](https://navree.com/docs/packages/imports-and-exports.md)** (`navree-sheets`): CSV with a byte-order mark and formula escaping and XLSX with typed cells from `#[derive(Exportable)]` rows, streamed or queued to a disk with a signed link; imports that detect the encoding (UTF-16, Windows-1256 and the rest), read CSV, XLSX, XLS and ODS, map headers automatically or from saved mappings, validate every row with garde, stage the rows for a preview and apply them in queue batches with duplicates skipped, updated or refused, and write an error file. - **[Workflows](https://navree.com/docs/packages/workflows.md)** (`navree-workflows`): durable workflows as `#[workflow]` async functions, whose steps are stored and replayed on resume, with retries, sleeps of minutes or months, event waits with timeouts, versions, cancellation and leases that survive crashes; and **[automations](https://navree.com/docs/packages/automations.md)** people build in your app from `#[trigger]`, `#[condition]` and `#[action]` blocks, with JSON Schemas for the editor, versioned definitions per workspace, enrollment policies, waits, simulation and templates. - **[Localization](https://navree.com/docs/packages/localization.md)** (`navree-i18n`): Fluent translations, plurals, locale negotiation and translated validation messages. - **[Browser testing](https://navree.com/docs/packages/browser-testing.md)** (`navree-browser`): drive a real browser from your tests over the Chrome DevTools Protocol. - **[Starter kits](https://navree.com/docs/getting-started/starter-kits.md)**: `navree new --kit saas`, `--kit api` or `--kit micro`. The SaaS kit has a Next.js and shadcn/ui front end with sign-in, workspaces, billing, settings and admin. ### AI-native - **[Agent skills](https://navree.com/docs/ai/agent-skills.md)** for every common task, installed into a project with `navree skills:install`. - **`AGENTS.md`**: `navree new` writes the project's conventions for coding agents, and a `CLAUDE.md` that points at it. - **[Docs for agents](https://navree.com/docs/ai/docs-for-agents.md)**: `/llms.txt`, `/llms-full.txt` and every docs page as Markdown. ## The CLI The `navree` binary (crate `navree-cli`) creates apps, generates code and runs the dev loop: - `navree new `, with `--kit` for a [starter kit](https://navree.com/docs/getting-started/starter-kits.md), `--ui next` for a Next.js front end that keeps tokens in httpOnly cookies, and `--navree-path` to choose the Navree checkout. - `navree make:module [--crud]` and `make:` generators for controllers, services, entities, migrations, jobs, events, listeners, mail, notifications, policies, commands, AI agents and tests. Generators never overwrite files; they register what they create at marker comments. - `navree dev`, which rebuilds and restarts the app when its code changes, and keeps the last good build serving when a build fails. - The ecosystem's commands: `navree dock up`, `navree deploy`, `navree fleet`, `navree mcp` and `navree skills:install`. - Every other command is forwarded to the app's binary. ## The reference CRM `apps/crm-api` is a CRM API built on Navree: companies, contacts, a deals pipeline, activities, a dashboard, users and roles, with live updates over WebSockets, queued notifications, scheduled reminders and an audit log. `apps/crm-web` is its Next.js front end, whose server holds the tokens for the browser. Unit, feature and Playwright end-to-end tests cover both. The [CRM tour](https://navree.com/docs/example-app/crm-tour.md) walks through it. ## Performance A Navree app is one binary that needs a few megabytes at idle and starts in milliseconds. [Performance](https://navree.com/performance/) has Navree's measurements, the workload behind them, the method and how to reproduce them on your own machine. ## Typst templates become HTML Before this release, `navree-documents` compiled `.typ` templates with the Typst crates. Those crates brought six dependencies that are no longer maintained (`bincode`, `paste`, `rustybuzz`, `ttf-parser`, `unsafe-libyaml` and `yaml-rust`), which the vulnerability scan reports, so the Typst engine is replaced by a native engine built on maintained crates (krilla, HarfRust, Skrifa, unicode-bidi, ICU4X). It reads the same `.html` templates as Chrome, and [Documents built in code](https://navree.com/docs/packages/documents.md#documents-built-in-code) adds `PdfDocument`. If your app used Typst templates: - **Rewrite each `.typ` template as `.html`.** The render's data are template variables (`{{ name }}`, not `json("/data.json")`), `{{ locale }}` and `{{ dir }}` replace `sys.inputs`, `@page { size; margin }` sets the page, and a `