FlinDB

FLIN's embedded database engine. No PostgreSQL. No Redis. No setup. Define entities and start querying instantly.

10
Field Types
49
Validators
13
Constraints
203/203
MVP Tasks

Everything Built Into the Runtime

Six core capabilities that eliminate your entire database infrastructure.

Temporal-Native

Every entity tracks its complete version history. Access any previous state with record.history — time travel is built in.

Semantic Search

Mark a field as semantic text and FlinDB indexes it with vector embeddings. Search by meaning, not just keywords.

Zero Config

No connection strings. No migrations. No schema files. Define an entity and FlinDB creates the storage automatically in .flindb/.

WAL + CRC-32

Write-Ahead Log with CRC-32 checksums on every entry. Process-level file locking prevents corruption. No data loss, even on crash.

Auto-Checkpointing

WAL entries compact into per-entity data files automatically. Configurable thresholds, automatic backups, and graceful shutdown via Drop.

CRUDD Operations

Create, Read, Update, Delete, and Destroy. Soft delete preserves data with deleted_at. Hard destroy removes permanently.

Define, Save, Query

Entity definitions are your schema. Queries are expressive method chains.

entities/product.flin
enum Category { Electronics, Books, Clothing, Home }

entity Product {
    name: text @required @minLength(2)
    description: semantic text
    category: Category = "Electronics"
    price: money @min(0)
    stock: int @min(0) = 0
    active: bool = true

    @index(category, active)
    @unique(name)
}

// Create
product = Product { name: "FLIN Handbook", category: "Books", price: 2999 }
save product

// Query
books = Product.where(category == "Books" && active == true)
cheap = Product.where(price < 5000).order_by("price")
total = Product.where(active == true).sum("price")

// Soft delete (reversible)
delete product

// Hard destroy (permanent)
destroy product

No PostgreSQL. No Redis. No Setup.

Compare what you need with a traditional stack versus FLIN.

Traditional Stack

  • Install PostgreSQL or MySQL
  • Configure connection strings and credentials
  • Write migrations for every schema change
  • Set up an ORM (Prisma, SQLAlchemy, ActiveRecord...)
  • Add Redis for caching and sessions
  • Configure backup scripts with cron jobs
  • Install a separate search engine (Elasticsearch, Meilisearch...)
  • Set up monitoring tools

FLIN

  • Define an entity. Done.
  • No connection strings, no credentials
  • Schema evolves automatically
  • Query API is built into the language
  • Sessions handled natively
  • Auto-checkpointing with WAL backups
  • Semantic search via semantic text fields
  • Admin console at /_flin, built in

What FlinDB Handles

  • Entity Storage — Per-entity data files in .flindb/data/ with automatic schema persistence
  • Write-Ahead Log — Every write appended to wal.log before reaching storage, with CRC-32 integrity checks
  • File Locking — Only one FLIN process can access the database at a time via .flindb/lock
  • Auto-Backup — Snapshot backups on every checkpoint, max 5 retained, max 1 per hour
  • Semantic Search — Vector embeddings via local models or OpenAI, with keyword fallback
  • Validation — 49 built-in decorators enforced on every save operation
  • Constraints@unique and @index at both field and entity level, including composites
  • Version History — Full temporal tracking with version counter and record.history access

Get Started in Seconds

Install FLIN, define your first entity, and FlinDB handles the rest. No database server, no setup, no configuration files.

curl -fsSL https://flin.sh/install | sh
flin new myapp
flin dev myapp
# Your database is ready at .flindb/