🗄️ SmartLists API

List-based key-value store with binary optimization

🟢 Status: Running at smartlists.smartbrandcompany.com
📋 Storage: BadgerDB with binary optimization
💾 Location: /home/ubuntu/smartlists/data_storage
⚡ Features: Multiple chambers, dynamic schemas, tunneled operations

📝 Chambers

Organize data into named chambers with custom schemas. Each chamber can have different column types and structures.

🔧 Dynamic Schemas

Define custom columns with types: email, string, uint64, bool, date, timestamp. Required field validation.

💾 Binary Storage

50-60% storage reduction with position-based binary encoding. JSON API with binary internal storage.

🔄 Merge Operations

Smart merge operations - automatically update existing records while preserving creation timestamps.

📝 Chamber Management API

GET/api/lists - Get all available chambers
POST/api/lists/{name}/schema - Create chamber with schema
GET/api/lists/{name}/schema - Get chamber schema
DELETE/api/lists/{name} - Delete entire chamber

📊 Record Operations

POST/api/lists/{name}/records - Store record with JSON data
GET/api/lists/{name}/records/{md5_or_email} - Get record
GET/api/lists/{name}/records/{md5}/exists - Check if record exists
DELETE/api/lists/{name}/records/{md5} - Delete record
GET/api/lists/{name}/export - Export all records as JSON

⚡ Async Operations

POST/api/lists/ops/diff - Start chamber difference operation (A - B = C)
GET/api/jobs/{job_id} - Monitor job progress
GET/api/lists/{name}/status - Chamber job status

🛠️ Usage Examples

# Create a customer chamber
curl -X POST https://smartlists.smartbrandcompany.com/api/lists/customers/schema \
  -H "Content-Type: application/json" \
  -d '{
    "columns": {
      "email": {"type": "email", "required": true},
      "signup_date": {"type": "date"},
      "total_orders": {"type": "uint64"},
      "is_premium": {"type": "bool"}
    }
  }'

# Add a customer record
curl -X POST https://smartlists.smartbrandcompany.com/api/lists/customers/records \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "signup_date": "2024-01-15",
    "total_orders": 5,
    "is_premium": true
  }'

# Start chamber difference operation
curl -X POST https://smartlists.smartbrandcompany.com/api/lists/ops/diff \
  -H "Content-Type: application/json" \
  -d '{
    "source_list_a": "all_customers",
    "source_list_b": "unsubscribed",
    "operation": "difference",
    "new_list_name": "active_customers"
  }'

🔗 Resources

Dashboard Lists Browser

Publicly accessible through Cloudflare's tunnel network with CORS support.