Getting Started with NoCodeBackend
A zero-to-one guide on provisioning your first database and understanding the dashboard.
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
- Log in to your NoCodeBackend dashboard.
- Navigate to the Workspaces tab and click Create Database.
- 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).
- For this tutorial, select Manual Setup. Name your database "TaskApp DB".
- Wait a few seconds while NoCodeBackend provisions your isolated database schema.
Step 2.2: Creating Tables
We need two tables: users and tasks.
- Click on Manage Tables in your new database dashboard.
- Click Add Table.
- Name the table
users. You do not need to create anidorcreated_atcolumn; NoCodeBackend manages standard tracking columns automatically. - Click Add Column to add fields to the
userstable:- Name:
email, Type:VARCHAR, Length:255, Required (Not Null):true - Name:
full_name, Type:VARCHAR, Length:100, Required (Not Null):true
- Name:
- Save the
userstable. - Click Add Table again and name it
tasks. - 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
- Name:
- Save the
taskstable. (Note: If you use AI Setup, it will automatically configure the foreign key constraints linkingtasks.user_idtousers.id).
Step 2.3: Testing the Live API
Your backend is now fully built and deployed.
- Navigate to API Docs (Swagger) in the sidebar.
- Expand the
POST /usersendpoint. - Click Try it out and enter the following JSON:
{ "email": "test@example.com", "full_name": "Test User" } - Click Execute. You will receive a
201 Createdresponse with the newly generated record. - Now expand the
GET /usersendpoint, 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.
Secret Keys (Server-to-Server)
If you are calling NoCodeBackend from a secure environment (like a Next.js Server Action, a Node.js server, or a Python script), use a Secret Key.
- Location: Click the three dots menu (...) on your database card and select Secret keys.
- Usage: Pass the key as a Bearer token in the
Authorizationheader.
// Example Server-Side Fetch
const response = await fetch('https://api.nocodebackend.com/read/tasks?Instance=your_db_id', {
headers: {
'Authorization': 'Bearer ncb_sec_your_secret_key'
}
});
Client-Side Authentication (Web Apps & Portals)
💡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, use NoCodeBackend Built-in Authentication.
NoCodeBackend provides managed authentication endpoints that issue secure session cookies for your users and automatically apply Row-Level Security (user_id = session.userId).
Environment Variables
When deploying your backend, store your database configuration securely:
NCB_API_URL=https://api.nocodebackend.com
NCB_DATABASE=your_db_id
NCB_SECRET_KEY=ncb_sec_your_secret_key
4. Best Practices & Edge Cases
- Schema Design: Always name your tables in plural, lowercase snake_case (e.g.,
user_profiles, notUserProfileoruserProfile). This ensures standard RESTful URL generation (/read/user_profiles). - Pagination: Never query data endpoints without pagination if you expect thousands of records. Always use the
limitandpageparameters to protect your application's memory and reduce latency (e.g.,GET /read/tasks?Instance=your_db_id&limit=50).
5. Troubleshooting
Common Errors
Error: 401 Unauthorized
- Cause: You are missing the
Authorization: Bearer <secret_key>header, the key is invalid, or you are making a client request without a valid session cookie. - Resolution: Verify your Secret Key under your database card's Secret keys menu, or ensure your client application is properly passing authenticated session cookies.
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 auser_idthat does not exist in the parentuserstable. - Resolution: Ensure the parent record exists before creating the child record, or check your frontend state to ensure you are passing the correct ID.
