How ink-db/ink works
Ink is an append-only, tamper-evident database with a native browser and a TCP client/server interface. The main workflow is to submit IQL or append requests through a client or the browser, process them through the server/query and storage layers, and return records or integrity results. Storage, indexing, signatures, access control, and Merkle proofs are distinct domain capabilities. The browser also supports local browsing, query execution, verification, and proofs. Some server and UI implementations were not sampled, so uncertain internal links are omitted.
Main entry points: app.rs Desktop App · store.rs Database Store · connection.rs Client Connection · evaluator.rs IQL Evaluator
Components 31
Ink Browser
- Desktop App
ink-browser/src/ui/app.rs - Browser Backend
ink-browser/src/backend/local.rs - Browser Settings
ink-browser/src/settings.rs - Record Browser
ink-browser/src/ui/browse.rs - Connection View
ink-browser/src/ui/connection.rs - Query View
ink-browser/src/ui/execute_iql.rs - Filter Builder
ink-browser/src/ui/filter_builder.rs - Integrity View
ink-browser/src/ui/verify.rs - Proofs View
ink-browser/src/ui/proofs.rs - Merkle View
ink-browser/src/ui/merkle.rs
Query And Access
- IQL Lexer
ink-query/src/lexer.rs - IQL Parser
ink-query/src/parser.rs - IQL AST
ink-query/src/ast.rs - IQL Evaluator
ink-query/src/evaluator.rs - Access Registry
ink-core/src/auth.rs
Storage And Integrity
- Database Store
ink-core/src/store.rs - Append Segments
ink-core/src/segment.rs - Rebuildable Index
ink-core/src/index.rs - Signed Records
ink-core/src/record.rs - Ed25519 Crypto
ink-core/src/crypto.rs - Merkle Tree
ink-core/src/merkle.rs
Client And Protocol
- Client Shell
ink-client/src/shell.rs - Client Connection
ink-client/src/connection.rs - Client Keys
ink-client/src/key.rs - Wire Frames
ink-proto/src/frame.rs - Wire Messages
ink-proto/src/messages.rs - Frame Codec
ink-proto/src/codec.rs
Server
- Server CLI
ink-server/src/cli.rs - TCP Daemon
ink-server/src/server.rs
Other components
- User
- Database Files
Connections 37
- User → Desktop App: uses
- Desktop App → Browser Settings: loads settings
ink-browser/src/ui/app.rs - Desktop App → Record Browser: shows
ink-browser/src/ui/app.rs - Desktop App → Connection View: shows
ink-browser/src/ui/app.rs - Desktop App → Query View: shows
ink-browser/src/ui/app.rs - Desktop App → Integrity View: shows
ink-browser/src/ui/app.rs - Desktop App → Proofs View: shows
ink-browser/src/ui/app.rs - Desktop App → Merkle View: shows
ink-browser/src/ui/app.rs - Record Browser → Browser Backend: loads pages
ink-browser/src/ui/browse.rs - Record Browser → Filter Builder: uses filters
ink-browser/src/ui/browse.rs - Query View → Browser Backend: executes through
ink-browser/src/ui/execute_iql.rs - Browser Backend → Database Files: opens local data
- User → Client Shell: runs commands
- Client Shell → Client Connection: uses
ink-client/src/shell.rs - Client Connection → Client Keys: signs requests
ink-client/src/connection.rs - Client Connection → Wire Messages: exchanges messages
ink-client/src/connection.rs - Client Connection → Wire Frames: frames traffic
ink-client/src/connection.rs - Wire Messages → Wire Frames: serializes as
ink-proto/src/messages.rs - Frame Codec → Wire Frames: encodes frames
ink-proto/src/codec.rs - User → Server CLI: administers
- Server CLI → TCP Daemon: configures daemon
- Client Connection → TCP Daemon: connects over TCP
- TCP Daemon → Wire Messages: handles protocol
- TCP Daemon → IQL Evaluator: dispatches queries
- IQL Lexer → IQL Parser: tokenizes input
ink-query/src/parser.rs - IQL Parser → IQL AST: builds statements
ink-query/src/parser.rs - IQL Evaluator → IQL Parser: parses input
ink-query/src/evaluator.rs - IQL Evaluator → IQL AST: evaluates statements
ink-query/src/evaluator.rs - IQL Evaluator → Database Store: executes against
- Database Store → Append Segments: reads and appends
ink-core/src/store.rs - Database Store → Rebuildable Index: updates and queries
ink-core/src/store.rs - Database Store → Signed Records: validates records
ink-core/src/store.rs - Database Store → Ed25519 Crypto: checks signatures
ink-core/src/store.rs - Database Store → Merkle Tree: builds proofs
ink-core/src/store.rs - Database Store → Access Registry: checks access
ink-core/src/store.rs - Append Segments → Database Files: persists log
ink-core/src/segment.rs - Database Store → Database Files: opens database