Start here

Getting Started with NoCodeBackend

A zero-to-one guide on provisioning your first database and understanding the dashboard.

New users5 min read

Getting Started with NoCodeBackend: A Complete Guide

NoCodeBackend is an enterprise-grade backend-as-a-service (BaaS) that instantly generates a fully documented, production-ready REST API and relational database without writing any backend code.

Whether you are building a SaaS, an internal tool, or a mobile app, NoCodeBackend handles the infrastructure, database hosting, API generation, and security, allowing you to focus entirely on your frontend logic and user experience.

This comprehensive guide will walk you through the core concepts, setup process, configuration options, best practices, and troubleshooting steps to get you from zero to a fully deployed API in minutes.


1. Detailed Overview

Traditional backend development requires setting up a server, writing routing logic, installing database drivers, configuring ORMs, designing the schema, managing migrations, writing authentication middleware, generating Swagger documentation, and finally deploying it to a cloud provider.

NoCodeBackend condenses this entire process into a single step.

Core Concepts

  • Dedicated Relational Schema: NoCodeBackend provisions a dedicated, isolated MySQL schema specifically for your workspace. You get the full power of enterprise relational databases with zero setup.
  • Instant REST API: Every table you create instantly generates standard REST endpoints (GET, POST, PUT, DELETE, PATCH). There is no "build" or "deploy" step. The moment you save a table, your API is live and ready to accept requests. (See Using the REST API for more details).
  • Automated Swagger Documentation: As your schema evolves, NoCodeBackend automatically updates a live Swagger/OpenAPI documentation page, allowing you to test endpoints directly from the browser.
  • Security by Default: All APIs are secured via API Keys or JSON Web Tokens (JWT) out of the box, with built-in database authentication available for granular access control.

2. Step-by-Step Guide: Your First Database

Let's build a fully functioning backend for a "Task Management" application.

Step 2.1: Provisioning the Database

  1. Log in to your NoCodeBackend dashboard.
  2. Navigate to the Workspaces tab and click Create Database.
  3. You will be presented with two options:
    • Manual Setup (Quick Create): You define the tables and columns yourself via the Schema Builder. (See Manual Database Setup).
    • AI Database Setup: You write a prompt, and our AI builds the schema for you. (See AI Database Setup).
  4. For this tutorial, select Manual Setup. Name your database "TaskApp DB".
  5. Wait a few seconds while NoCodeBackend provisions your isolated database schema.

Step 2.2: Creating Tables

We need two tables: users and tasks.

  1. Click on Manage Tables in your new database dashboard.
  2. Click Add Table.
  3. Name the table users. You do not need to create an id or created_at column; NoCodeBackend manages standard tracking columns automatically.
  4. Click Add Column to add fields to the users table:
    • Name: email, Type: VARCHAR, Length: 255, Required (Not Null): true
    • Name: full_name, Type: VARCHAR, Length: 100, Required (Not Null): true
  5. Save the users table.
  6. Click Add Table again and name it tasks.
  7. Add the following columns:
    • Name: title, Type: VARCHAR, Required: true
    • Name: description, Type: TEXT, Required: false
    • Name: is_completed, Type: BOOLEAN, Default Value: 0
    • Name: user_id, Type: INT, Required: true
  8. Save the tasks table. (Note: If you use AI Setup, it will automatically configure the foreign key constraints linking tasks.user_id to users.id).

Step 2.3: Testing the Live API

Your backend is now fully built and deployed.

  1. Navigate to API Docs (Swagger) in the sidebar.
  2. Expand the POST /users endpoint.
  3. Click Try it out and enter the following JSON:
    {
      "email": "test@example.com",
      "full_name": "Test User"
    }
    
  4. Click Execute. You will receive a 201 Created response with the newly generated record.
  5. Now expand the GET /users endpoint, execute it, and you will see your newly created user in the database.

3. Configuration & Parameters

To integrate this API into your frontend code (React, Vue, Swift, etc.), you must configure your authentication parameters.

API Keys (Server-to-Server)

If you are calling NoCodeBackend from a secure environment (like a Next.js API route, a Node.js server, or a Python script), you should use a Secret Key.

  • Location: Go to Developer Settings > API Keys.
  • Usage: Pass the key in the headers of your HTTP request.
    • Header Key: x-api-key
    • Header Value: your_secret_key_here
// Example Server-Side Fetch
const response = await fetch('https://api.nocodebackend.com/v1/your_db_id/tasks', {
  headers: {
    'x-api-key': 'sk_live_123456789'
  }
});

Public API Settings (Client-Side)

💡

Never expose your Secret Key in client-side code like React, Vue, or Swift. If you need to call the API directly from a public application, you must rely on Database Auth (JWT).

NoCodeBackend provides managed authentication endpoints (/auth/login, /auth/register) that issue secure tokens for your frontend users.

Environment Variables

When deploying your frontend, store your NoCodeBackend URL and API Keys securely:

NEXT_PUBLIC_NCB_API_URL=https://api.nocodebackend.com/v1/your_db_id
NCB_SECRET_KEY=sk_live_123456789

4. Best Practices & Edge Cases

  • Schema Design: Always name your tables in plural, lowercase snake_case (e.g., user_profiles, not UserProfile or userProfile). This ensures standard RESTful URL generation (/user_profiles).
  • Pagination: Never query data endpoints without pagination if you expect thousands of records. Always use the _limit and _offset parameters to protect your application's memory and reduce latency. (e.g., GET /tasks?_limit=50&_offset=0).

5. Troubleshooting

Common Errors

Error: 401 Unauthorized

  • Cause: You are missing the x-api-key header, or the key is invalid.
  • Resolution: Verify your API key in Developer Settings. Ensure it is not being stripped by an intermediate proxy or CORS policy in your browser.

Error: 400 Bad Request: Duplicate entry

  • Cause: You attempted to insert a record with a value that already exists in a column marked as Unique.
  • Resolution: Catch this 400 error in your frontend and display a user-friendly message.

Error: 400 Bad Request: a foreign key constraint fails

  • Cause: You tried to insert a child record (like a task) with a user_id that does not exist in the parent users table.
  • Resolution: Ensure the parent record exists before creating the child record, or check your frontend state to ensure you are passing the correct ID.
Getting Started with NoCodeBackend | Help Center