Quick Start

This guide will get you up and running with FLXBL in under 5 minutes. You'll set up the MCP integration, define a schema, and make your first API calls.

Prerequisites

  • A FLXBL account (sign up at flxbl.dev)
  • An API key from your FLXBL dashboard
  • Node.js 18+ (for MCP integration)
  • An MCP-compatible IDE (Cursor, Windsurf, or VS Code with Continue)

Step 1: Set Up MCP Integration

The FLXBL MCP server allows AI assistants in your IDE to design schemas, generate code, and manage your backend through conversation.

Add this to your IDE's MCP configuration:

// ~/.cursor/mcp.json
{
  "mcpServers": {
    "flxbl": {
      "command": "npx",
      "args": ["@flxbl-dev/mcp"],
      "env": {
        "FLXBL_INSTANCE_URL": "https://api.flxbl.dev",
        "FLXBL_API_KEY": "flxbl_your_api_key_here"
      }
    }
  }
}

Replace flxbl_your_api_key_here with your actual API key from the FLXBL dashboard.

Tip: In Cursor, you can also run npx @flxbl-dev/mcp directly and the MCP server will guide you through setup.

Step 2: Define Your Schema

You have two options for creating your schema:

Use the drag-and-drop Schema Editor in your FLXBL dashboard. Create entities, add fields with type dropdowns, and connect relationships visually.

FLXBL Visual Schema Editor showing entities and relationships
Visual Schema Editor with graph-based entity and relationship editing

You can also ask your AI assistant to help design a schema using the MCP tool. Try prompts like "Help me design a schema for an e-commerce platform".

Once published, FLXBL automatically generates:

  • REST endpoints: /api/v1/dynamic/Product, /api/v1/dynamic/Category
  • GraphQL schema at /api/v1/dynamic-gql/:tenantId
  • Relationship endpoints for managing BELONGS_TO connections

Step 3: Create Data

Use the REST API to create your first product:

// Create a product via REST API
curl -X POST https://api.flxbl.dev/api/v1/dynamic/Product \
  -H "Authorization: Bearer flxbl_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Wireless Headphones",
    "description": "Premium noise-canceling headphones",
    "price": 299.99,
    "inStock": true
  }'

Step 4: Query Your Data

Use the Query DSL to find products:

// Query products with filters
curl -X POST https://api.flxbl.dev/api/v1/dynamic/Product/query \
  -H "Authorization: Bearer flxbl_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "where": {
      "price": { "$lte": 500 },
      "inStock": { "$eq": true }
    },
    "orderBy": "price",
    "orderDirection": "ASC",
    "limit": 10
  }'

Or use GraphQL:

# GraphQL query
query {
  products(where: { inStock: true }, limit: 10) {
    id
    name
    price
    belongsTo {
      name
      slug
    }
  }
}

Next Steps

Need Help?

If you get stuck, try asking your AI assistant: "Help me create a FLXBL schema for [your use case]"