Headless · Momen BaaS
Momen gives you an integrated no-code experience covering UI, data modeling, business logic and deployment. If you would rather build the frontend in your own stack, you can use a Momen project as a backend service: database, Actionflows, AI Agents, user permissions and media are all exposed through the Runtime API.
This page is about the backend itself — what it provides, how it is exposed, and how to connect your frontend to it. To let your own AI coding tool read and write Momen backend configuration directly, see Bring your own AI coding tool.
Understand the headless architecture
In a headless architecture, the external frontend and Momen backend are developed and deployed separately, then connected through the Runtime API:
- External frontend: Runs in your codebase and deployment environment and handles the interface, interactions, and client state.
- Momen backend: Provides managed database, Actionflow, AI Agent, user and permission management, and file and media services.
- Runtime API: Provides HTTP and WebSocket interfaces for the external frontend to call deployed backend services.
What services the Momen backend provides
Core services
Momen provides the following services through one managed backend:
| Service | What it provides |
|---|---|
| Database | PostgreSQL tables with relations, constraints, indexes, aggregations, and computed fields |
| Actionflows | Synchronous or asynchronous server-side business logic composed from nodes |
| AI Agents | One-off tasks and multi-turn conversations using knowledge bases, tools, and context |
| Third-party APIs | External APIs imported and called through the Momen backend |
| Payments | Stripe and Airwallex payment capabilities |
| Users and authentication | User accounts, sign-in, and sessions |
| Permissions | Role, data, and action permissions that control access to services and data |
| Files and media | Image, video, and file upload and management |
| Real-time data | Updates pushed to clients when data changes |
How services are exposed
Momen generates a Runtime GraphQL API from the project configuration. The GraphQL schema describes the fields, arguments, and return types available in the current project.
HTTP endpoint for queries and mutations:
https://villa.momen.app/zero/{projectExId}/api/graphql-v2WebSocket endpoint for subscriptions:
wss://villa.momen.app/zero/{projectExId}/api/graphql-subscriptionprojectExId is the unique identifier of the project. Copy the URLs from Developer access instead of constructing them manually.
The Runtime API applies project permissions according to the request identity:
- A request without an
Authorizationheader runs as a guest. - A request with
Authorization: Bearer <jwt>runs with that user’s roles and permissions. - A request with
Authorization: Bearer <admin_token>runs as a project administrator and is intended only for local development, scripts, or trusted servers.
Never include an Admin Bearer Token in a website, mobile app, public repository, or any other code delivered to end users.
See the Runtime API Reference for complete request formats and API details.
Build the backend in the Momen editor
You can also configure data models, permissions, Actionflows, AI Agents, and third-party APIs manually in the Momen editor or with its built-in AI assistant. When the backend is ready, run Sync changes and inspect the current Runtime Schema in Developer access.
Then choose one of the following ways to connect an external frontend.
Connect the frontend with the Skill
The Skill gives an AI the integration conventions for a Momen project’s backend Runtime API. It can guide the AI in connecting the current codebase to a deployed Momen backend, but it cannot create, modify, or sync the backend configuration.
Send the following instruction to your AI coding tool:
Carefully read and install the development skill from this repository:
https://github.com/momen-tech-org/momen-baas-skillOr install it from a terminal:
npx skills add https://github.com/momen-tech-org/momen-baas-skill -gAfter installation, tell the AI which Momen project to connect and what frontend feature to implement. For example:
Connect the current frontend to the Momen project "Project name or project ID."
Use the deployed Momen backend to implement the product list and product details.Use the Runtime API manually
Open Developer access from the Momen top navigation to copy the project endpoints and Admin Bearer Token, then use the built-in GraphiQL panel to write and test requests against the current schema.
The following example reads records from a post table. Replace the table and field names with those in the current project schema.
query ListPosts {
post(limit: 10, order_by: { created_at: desc }) {
id
title
}
}Base subsequent queries and calls on the current GraphQL schema shown in Developer access. For per-endpoint request formats, authentication, error codes and transaction semantics, see the Runtime API Reference.
Continue development
After the first connection, the frontend and Momen backend can evolve independently. With the Plugin, continue describing business requirements in natural language so the AI can update both the backend configuration and frontend code. When using the Momen editor, sync backend changes first, then update frontend calls against the latest GraphQL schema.
Momen also provides complete visual frontend development, preview, and publishing capabilities. You can design pages, bind data, and configure actions in the same project. To build both the frontend and backend in Momen, see the Editor Overview and Build Your First Page.