PHP · embedded · document database

A database that
is a folder.

AxiDB is an embedded, file-based document database for PHP. Copy it into your project and start storing documents. No server. No Composer. No third-party dependencies. Just a database you can understand.

PHP 8.1+Built for modern PHP.
0 dependenciesNo vendor directory required.
Apache 2.0Open source license.
v0.8.0API still evolving.
01 / Start

One folder.
One require.

AxiDB is designed for projects where installing and maintaining a database server feels heavier than the problem itself. Put the folder in your project, point it at a data directory and use the API.

// copy axidb/ into your project
require 'axidb/core/axidb.php';

$db = axidb(__DIR__ . '/datos');

$db->insert('clientes', ['nombre' => 'Ana Ruiz', 'ciudad' => 'Murcia']);

foreach ($db->find('clientes')->where('ciudad', '=', 'Murcia')->get() as $cliente) {
  echo $cliente['nombre'];
}
02 / What it does

Small enough
to understand.

CRUD, queries, indexes, transactions, backups and more — while keeping storage close to the application.

01

Document first

Schema-free documents stored as readable files, with indexes and a packed format when collections grow.

02

Queries

where, orderBy, limit, offset, select and joins, plus AxiSQL for richer queries.

03

Transactions

Atomic updates with recovery after interruption and process locking.

04

Backups

Full and incremental backups, restoration, JSON and CSV.

05

Semantic search

Vector search for meaning-based retrieval, with a measured 45 ms result on 10,000 documents in the project benchmark.

06

AI-ready

Agents get a controlled database view with permissions, traceability and a stop control.

PHYSICAL DATA

Your data remains visible.

A collection can be a directory of JSON documents you can open, inspect and repair manually. Larger collections can use packed storage.

NO INFRASTRUCTURE TAX

Database without the server.

There is no separate service to install or keep alive. Authentication, roles, network access and TLS remain the responsibility of the host application.

03 / Security

Security is part
of the engine.

The repository includes security testing and documents the boundaries of the embedded model.

01

AES-256-GCM

Collections can be encrypted at rest, with HMAC protection for index bucket names.

02

Atomic writes

Writes are designed to survive interruptions, with recovery and process locking.

03

Injection & traversal controls

AxiSQL keeps literals separate from syntax and data paths are constrained.

04

Known boundaries

AxiDB is embedded, not a server. Authentication, roles, network controls and TLS belong to the host application.

// project status
version     0.8.0
php         8.1 · 8.2 · 8.3 · 8.4
platforms   Linux · Windows
tests       > 3,000 checks
security    560+ attacks rejected
license     Apache 2.0
04 / Benchmarks

Performance,
without makeup.

The repository compares AxiDB with SQLite on 10,000 documents. AxiDB does not try to beat SQLite at raw write speed; its trade is simplicity and zero installation.

1,000 READS

44 ms · AxiDB fs

21 ms packed · 3 ms SQLite
MASS INSERT

375 ms · AxiDB packed

14,938 ms fs · 22 ms SQLite

Measured on a Windows laptop with SSD. Reproduce with php bench/comparativa.php.

05 / Quick start

From empty folder
to working CRUD.

PHP 8.1+ with the built-in JSON extension. No third-party dependencies are required.

INSTALLATION

Copy. Require. Use.

Designed to work even on shared hosting where there may be no command line or database server.

Read the 5-minute guide ↗
01Copy axidb/ into your project
02require 'axidb/core/axidb.php';
03$db = axidb(__DIR__ . '/datos');
04$db->insert('clientes', [...]);
06 / Fit

Know when
to use it.

AxiDB is deliberately clear about where it fits — and where another engine is the better choice.

GOOD FIT

Websites · small stores · internal panels · blogs · AI agent state

Useful when you want document storage, simple deployment and a small operational footprint.

NOT THE FIT

Very large datasets · maximum raw throughput · server-grade concurrency

AxiDB is embedded, does not provide MVCC isolation, is not designed for tens of millions of documents, and does not claim to outperform SQLite.

07 / Beyond CRUD

One engine.
More than storage.

When a project needs more, AxiDB adds capabilities without becoming a separate platform.

AxiSQL

SQL when you need it.

JOINs, aggregates, GROUP BY, date and text functions, subqueries, views and EXPLAIN.

HTTP

Use it from the browser.

An HTTP bridge with tokens and CORS exposes the database to web clients.

JS

axi.js

An ES module client without dependencies or a bundler.

VECTORS

Search by meaning.

Vector search for applications that need semantic retrieval.

PROFILES

Declare the role.

Profiles such as core, docs and ai let the engine enforce the intended database mode.

OPERATIONS

See what is happening.

Describe, inspect statistics and run health checks with actionable warnings.

08 / Questions

Before you
install it.

The short answers to the questions developers usually ask first.

What is AxiDB?

AxiDB is an embedded, file-based document database for PHP. It keeps storage close to the application without requiring a separate database server.

Does AxiDB require MySQL or PostgreSQL?

No. AxiDB is designed to run inside the PHP application, so a separate database server is not required.

Does AxiDB require Composer?

No. AxiDB is designed to work without Composer and without third-party dependencies.

Can AxiDB perform vector search?

Yes. AxiDB includes vector search capabilities for applications that need semantic retrieval.

Is AxiDB open source?

Yes. The source is available on GitHub and the project is released under the Apache 2.0 license.

When should I use AxiDB?

Use it when an embedded document database, simple deployment and a small operational footprint matter more than maximum database-server throughput or very large-scale storage.

OPEN SOURCE · PHP · APACHE 2.0

A database you can copy, inspect and own.

AxiDB is built by GestasAI for developers who want the database close to their application — without unnecessary infrastructure.