Skip to content

Developer Guides

Developer Guides

In-depth tutorials for HeliosDB Nano features


Getting Started

GuideDescriptionTime
Quick StartBasic setup and first queries5 min
AuthenticationBearer tokens and API keys10 min

Core Features

Build semantic search, RAG backends, and AI-native applications.

Topics covered:

  • HNSW index configuration
  • Product Quantization for compression
  • Cosine, Euclidean, and IP distance metrics
  • Hybrid queries (filters + similarity)
-- Create vector-enabled table
CREATE TABLE documents (
id UUID PRIMARY KEY,
content TEXT,
embedding VECTOR(1536)
);
-- Create HNSW index
CREATE INDEX ON documents
USING hnsw (embedding vector_cosine_ops)
WITH (m = 16, ef_construction = 200);
-- Similarity search
SELECT content, embedding <-> $query AS distance
FROM documents
ORDER BY embedding <-> $query
LIMIT 10;

Full Vector Search Guide →


Multi-Tenancy

Build SaaS platforms with automatic tenant isolation.

Topics covered:

  • Row-Level Security (RLS) policies
  • Tenant plans and quotas
  • Isolation modes (Shared, Schema, Database)
  • Per-tenant tokens
-- Enable RLS
CREATE POLICY tenant_isolation ON orders
USING (tenant_id = current_setting('app.tenant_id')::uuid);
ALTER TABLE orders ENABLE ROW LEVEL SECURITY;

Full Multi-Tenancy Guide →


Database Branching

Git-like workflows for your database.

Topics covered:

  • Creating and switching branches
  • Feature branch workflows
  • Preview environments
  • Branch merging strategies
-- Create feature branch
CREATE BRANCH feature_new_pricing FROM main;
-- Work in isolation
USE BRANCH feature_new_pricing;
ALTER TABLE products ADD COLUMN discount_tier INT;
-- Merge when ready
MERGE BRANCH feature_new_pricing INTO main;

Full Branching Guide →


Time Travel

Query historical data without audit tables.

Topics covered:

  • Point-in-time queries
  • Retention configuration
  • Compliance and auditing
  • Change tracking
-- Query past data
SELECT * FROM orders
AS OF TIMESTAMP '2024-01-01 00:00:00';
-- Compare changes
SELECT
current.price AS now,
past.price AS then
FROM products current
JOIN products AS OF TIMESTAMP '2024-01-01' past
ON current.id = past.id
WHERE current.price != past.price;

Full Time Travel Guide →


Materialized Views

Automatic query caching with smart refresh.

Topics covered:

  • Creating materialized views
  • Refresh strategies (manual, scheduled, incremental)
  • CPU-aware scheduling
  • Dependency tracking
-- Create materialized view
CREATE MATERIALIZED VIEW monthly_revenue AS
SELECT
date_trunc('month', created_at) AS month,
SUM(amount) AS revenue,
COUNT(*) AS order_count
FROM orders
GROUP BY 1;
-- Refresh
REFRESH MATERIALIZED VIEW monthly_revenue;

Full Materialized Views Guide →


Encryption

Transparent data encryption with minimal overhead.

Topics covered:

  • AES-256-GCM configuration
  • Key management
  • Performance impact (<3%)
  • Compliance requirements
Terminal window
# Start with encryption
./heliosdb-nano --mode server --encryption-key $KEY

Full Encryption Guide →


Integration Guides

Language SDKs

LanguageStatusLink
PythonRecommendedPython SDK
JavaScript/TypeScriptRecommendedJS/TS SDK
GoCommunityGo SDK
RustNativeRust Crate

Framework Integration

FrameworkGuide
Next.jsNext.js Integration
FastAPIFastAPI Integration
ExpressExpress Integration
ActixActix Integration

AI/ML Platforms

PlatformGuide
LangChainLangChain Vector Store
LlamaIndexLlamaIndex Integration
OpenAIOpenAI Embeddings

Operations

Deployment

EnvironmentGuide
DockerDocker Deployment
KubernetesK8s Deployment
AWSAWS Deployment
Fly.ioFly.io Deployment

Monitoring

Backup & Recovery


Best Practices

Performance

  1. Use appropriate indexes

    -- For vector search
    CREATE INDEX USING hnsw (embedding vector_cosine_ops);
    -- For filtered queries
    CREATE INDEX ON products (category, price);
  2. Optimize vector dimensions

    • Use Product Quantization for large embeddings
    • Consider smaller models (384-dim vs 1536-dim)
  3. Connection pooling

    • Use connection pools in your application
    • Configure max_connections appropriately

Security

  1. Always use HTTPS in production
  2. Rotate tokens regularly
  3. Use RLS for tenant isolation
  4. Enable audit logging

Schema Design

  1. Include tenant_id in multi-tenant tables
  2. Use UUIDs for distributed systems
  3. Add created_at/updated_at timestamps
  4. Use JSONB for flexible metadata

Troubleshooting

Common Issues

IssueSolution
Connection refusedCheck server is running, port is correct
Token expiredRefresh token before expiry
Slow queriesCheck EXPLAIN output, add indexes
Out of memoryIncrease limits, optimize queries

Getting Help


Need a guide that’s not listed? Request a guide