Skip to main content
The Base44 CLI’s create command creates new projects with all necessary files and configuration. This article describes the Base44 backend project structure and explains what each file and directory does.

Backend project structure

When you create a backend-only Base44 project, the CLI generates this minimal structure:
<your-project-name>
base44
.app.jsonc
config.jsonc
.gitignore
As you develop your project, you’ll add entities, functions, and other files:
<your-project-name>
base44
.app.jsonc
config.jsonc
entities
<entity-name>.jsonc
functions
<function-name>
function.jsonc
index.ts
.gitignore

base44/

Contains all Base44 backend configuration and resource definitions.

config.jsonc

Defines your project configuration, including paths to entities, functions, and site hosting settings for full-stack projects. The CLI creates this with just your project name, and you can add more configuration as needed. Your project requires a config.jsonc (or config.json) file in the base44/ directory:
// Base44 Project Configuration
{
  "name": "my-project",
  "description": "My Base44 application",

  // Directory paths (relative to config file)
  "entitiesDir": "./entities",
  "functionsDir": "./functions",

  // Site/hosting configuration (for full-stack projects)
  "site": {
    "outputDirectory": "./dist"  // Required - where your built files are located
  }
}
PropertyDescriptionDefault
nameProject name (required)
descriptionProject description
entitiesDirPath to entities directory./entities
functionsDirPath to functions directory./functions
site.outputDirectoryWhere your built site files are located (required for site deployment)
site.buildCommandUsed only during base44 create for automated deployment
site.installCommandUsed only during base44 create for automated deployment
site.serveCommandReference only. Not currently used by the CLI
The buildCommand, installCommand, and serveCommand properties are included automatically when you create a project from the full-stack template. They’re used only during the initial base44 create flow for automated deployment. You don’t need to specify or modify these properties after project creation. When deploying your site later with site deploy, only outputDirectory is used.

.app.jsonc

Links your local project to your Base44 app. This file is automatically created by the CLI when you create or link a project.
// Base44 App Configuration
// This file links your local project to your Base44 app.
// Do not commit this file to version control.
{
  "id": "your-app-id"
}
The .app.jsonc file should not be committed to version control. The CLI automatically creates a .gitignore file that excludes this file.

entities/

Directory containing entity schema definitions. Each entity is defined in a separate .json or .jsonc file. Create this directory when you’re ready to define your first entity.

functions/

Directory containing serverless backend functions. Each function requires its own subdirectory with a function.jsonc configuration file and an index.ts code file. Function structure: Each function is organized in its own directory:
functions
<function-name>
function.jsonc
index.ts
function.jsonc A configuration file defining a function’s name and entry point. It has the following format:
{
  "name": "<function-name>",
  "entry": "index.ts"
}
This name is used to invoke the function via the SDK or HTTP endpoint. For example, a function named sendWelcomeEmail would be called with base44.functions.invoke('sendWelcomeEmail', {...}). index.ts The function code using Deno runtime. For example:
import { createClientFromRequest } from 'npm:@base44/[email protected]';

Deno.serve(async (req) => {
  try {
    const base44 = createClientFromRequest(req);
    const user = await base44.auth.me();
    
    if (!user) {
      return Response.json({ error: 'Unauthorized' }, { status: 401 });
    }

    const { name } = await req.json();
    
    return Response.json({ 
      message: `Hello, ${name || user.full_name}!` 
    });
  } catch (error) {
    return Response.json({ error: error.message }, { status: 500 });
  }
});
Requirements:
  • Your function must use the Deno.serve() wrapper.
  • Import the Base44 SDK (npm:@base44/[email protected]) to access your app’s data, authentication, and integrations.
  • Use createClientFromRequest(req) to identify the current user and access Base44 services.
  • Your function must return Response objects, not plain strings or objects.
Each deployed function gets an HTTP endpoint at <your-app-domain>/functions/<function-name>. Deploy with base44 functions deploy.

.gitignore

Prevents files from being committed to version control. Your project starts with this file to prevent .app.jsonc from being committed.

See also