First Application
On this page
Build a simple healthcare compliance application using the Kimberlite Rust SDK.
What You’ll Build
A patient record system that:
- Stores patient records with HIPAA data classification
- Creates an immutable audit trail for every access
- Queries historical records via time travel
Prerequisites
kimberliteinstalled — see Start- Rust 1.88+ installed
Step 1: Start the Database
# Tip: run `kimberlite init` for an interactive wizard with template selection
Step 2: Create Your Project
Add Kimberlite to Cargo.toml:
[dependencies]
kimberlite-client = "0.4"
anyhow = "1"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
Step 3: Write the Application
Replace src/main.rs:
use Result;
use ;
use TenantId;
Step 4: Run the Application
Expected output:
✓ Table created
✓ Patient records inserted
Patient Records:
----------------------------------------
1 Jane Doe 1980-01-15
2 John Smith 1992-07-22
2 patients found
Record for patient 1:
id: 1
name: Jane Doe
...
✓ Application complete
Step 5: View the Audit Trail in Studio
Open http://localhost:5555 and click the Studio tab.
Every insert and query is recorded in the immutable log. You can:
- Browse all data in the schema explorer
- Execute SQL queries interactively
- Use the time-travel slider to see the database at any past state
Next Steps
- Compliance — HIPAA, GDPR, and 21 more frameworks
- RBAC — Role-based access control
- Field Masking — Mask PHI fields automatically
- Python SDK — Use Kimberlite from Python