{
  "schema_version": "2026-07-09",
  "example": true,
  "live_api": false,
  "name": "Property Listings Backend Example",
  "slug": "property-listings",
  "description": "A public example of the backend contract Spala can help create for real estate listings: properties, agents, saved listings, inquiries, auth, search filters, and API docs.",
  "audience": "real estate teams, marketplace builders, agencies",
  "boundary": "Illustrative backend contract only. This is not a live customer API, not Spala source code, and not private platform architecture.",
  "suggested_tables": [
    {
      "name": "users",
      "purpose": "Example users resource for the property-listings backend contract.",
      "fields": [
        "id",
        "created_at",
        "updated_at"
      ],
      "note": "Exact fields should be generated, reviewed, and validated in the Spala project."
    },
    {
      "name": "agents",
      "purpose": "Example agents resource for the property-listings backend contract.",
      "fields": [
        "id",
        "created_at",
        "updated_at"
      ],
      "note": "Exact fields should be generated, reviewed, and validated in the Spala project."
    },
    {
      "name": "properties",
      "purpose": "Example properties resource for the property-listings backend contract.",
      "fields": [
        "id",
        "created_at",
        "updated_at"
      ],
      "note": "Exact fields should be generated, reviewed, and validated in the Spala project."
    },
    {
      "name": "property_images",
      "purpose": "Example property_images resource for the property-listings backend contract.",
      "fields": [
        "id",
        "created_at",
        "updated_at"
      ],
      "note": "Exact fields should be generated, reviewed, and validated in the Spala project."
    },
    {
      "name": "saved_listings",
      "purpose": "Example saved_listings resource for the property-listings backend contract.",
      "fields": [
        "id",
        "created_at",
        "updated_at"
      ],
      "note": "Exact fields should be generated, reviewed, and validated in the Spala project."
    },
    {
      "name": "inquiries",
      "purpose": "Example inquiries resource for the property-listings backend contract.",
      "fields": [
        "id",
        "created_at",
        "updated_at"
      ],
      "note": "Exact fields should be generated, reviewed, and validated in the Spala project."
    },
    {
      "name": "appointments",
      "purpose": "Example appointments resource for the property-listings backend contract.",
      "fields": [
        "id",
        "created_at",
        "updated_at"
      ],
      "note": "Exact fields should be generated, reviewed, and validated in the Spala project."
    }
  ],
  "suggested_endpoints": [
    {
      "method": "GET",
      "path": "/api/properties",
      "operationId": "get_properties",
      "auth": "depends_on_route",
      "note": "Example route shape only. Validate request, response, ownership, and error behavior in the generated Spala project."
    },
    {
      "method": "GET",
      "path": "/api/properties/{id}",
      "operationId": "get_properties_id",
      "auth": "depends_on_route",
      "note": "Example route shape only. Validate request, response, ownership, and error behavior in the generated Spala project."
    },
    {
      "method": "POST",
      "path": "/api/properties",
      "operationId": "post_properties",
      "auth": "bearer_user_or_project_token",
      "note": "Example route shape only. Validate request, response, ownership, and error behavior in the generated Spala project."
    },
    {
      "method": "PUT",
      "path": "/api/properties/{id}",
      "operationId": "put_properties_id",
      "auth": "bearer_user_or_project_token",
      "note": "Example route shape only. Validate request, response, ownership, and error behavior in the generated Spala project."
    },
    {
      "method": "POST",
      "path": "/api/inquiries",
      "operationId": "post_inquiries",
      "auth": "bearer_user_or_project_token",
      "note": "Example route shape only. Validate request, response, ownership, and error behavior in the generated Spala project."
    },
    {
      "method": "POST",
      "path": "/api/saved-listings",
      "operationId": "post_saved_listings",
      "auth": "bearer_user_or_project_token",
      "note": "Example route shape only. Validate request, response, ownership, and error behavior in the generated Spala project."
    },
    {
      "method": "GET",
      "path": "/api/me/saved-listings",
      "operationId": "get_me_saved_listings",
      "auth": "bearer_user_or_project_token",
      "note": "Example route shape only. Validate request, response, ownership, and error behavior in the generated Spala project."
    }
  ],
  "auth_boundary": "Public listing read endpoints plus authenticated saved listing, inquiry, and agent/admin write routes.",
  "frontend_handoff": {
    "summary": "Frontend receives filter fields, pagination shape, image metadata rules, auth routes, CORS origin, and generated docs.",
    "include": [
      "published API base URL",
      "OpenAPI or generated Markdown API docs",
      "auth routes and token behavior",
      "protected route rules",
      "CORS origin",
      "upload/realtime rules when relevant",
      "error format",
      "publish state",
      "exact project MCP URL after auth and project selection"
    ]
  },
  "proof_of_concept_steps": [
    "Create a low-risk Spala project.",
    "Ask AI Copilot to generate this backend contract.",
    "Review tables, endpoints, auth rules, backend logic, and generated docs.",
    "Test public, protected, success, failure, validation, and ownership paths.",
    "Publish only after validation and review."
  ]
}