momen-cursor-rules
Cursor rules for using momen as backend
Install / Use
npx skills add momen-tech-org/momen-cursor-rulesInstalls into whichever agent you are using.
.cursorrules
Cursor IDE rules (legacy)
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Skill content
View source on GitHubMomen Cursor Rules - Build Custom Frontends with Momen Backend-as-a-Service
Prebuilt Cursor rules for developing custom frontend applications powered by Momen.app as a headless Backend-as-a-Service (BaaS)
This repository contains a comprehensive set of production-ready Cursor rules that enable AI assistants (Claude, ChatGPT, etc.) to seamlessly integrate with Momen's powerful backend infrastructure. Use these rules to rapidly build full-stack applications with custom frontends while leveraging Momen's enterprise-grade PostgreSQL database, GraphQL API, actionflows, AI agents, and more.
🎯 What This Repository Provides
This repository contains 8 specialized rule files in .cursor/rules/ that teach AI assistants how to:
- Understand Momen's Architecture - Backend structure, GraphQL endpoints, authentication
- Query & Mutate Database - Auto-generated GraphQL schema from your data model
- Execute Backend Logic - Actionflows for complex, multi-step operations
- Integrate Third-party APIs - Use imported API definitions as backend relays
- Leverage AI Agents - RAG, tool use, multi-modal I/O, structured JSON output
- Handle Payments - Stripe integration for one-time and subscription billing
- Manage Binary Assets - Image/file uploads and management
- Fetch Project Schema - MCP server integration for real-time schema access
📦 Included Rule Files
.cursor/rules/
├── momen-backend-architecture.mdc # Core architecture & GraphQL setup
├── momen-database-gql-api-rules.mdc # Database CRUD operations
├── momen-actionflow-gql-api-rules.mdc # Backend workflows & business logic
├── momen-tpa-gql-api-rules.mdc # Third-party API integration
├── momen-ai-agent-gql-api-rules.mdc # AI agent capabilities
├── momen-stripe-payment-rules.mdc # Payment processing
└── momen-binary-asset-upload-rules.mdc # File management
🚀 Quick Start
Prerequisites
- Cursor Editor or any AI assistant supporting Cursor rules
- A Momen.app account and project
- Basic knowledge of GraphQL and TypeScript/JavaScript
Step 1: Build Your Backend in Momen
Before using these rules, you need to create your backend infrastructure in Momen:
- Sign up at Momen.app and create a new project
- Design your database - Create tables, define relationships, and set up your data model
- Build backend logic - Create actionflows for complex business logic
- Configure integrations - Set up Stripe payments, AI agents, third-party APIs as needed
- Note your credentials:
- Your Momen username (email)
- Your Momen password
- Your project's
exId(found in project settings) or project name
Tip: Momen's visual editor makes it easy to design your entire backend without code. Once ready, use these Cursor rules to build a custom frontend that connects to your Momen backend!
Step 2: Clone This Repository
git clone https://github.com/privateJiangyaokai/momen-cursor-rules.git
cd momen-cursor-rules
Step 3: Copy Rules to Your Project
Copy the entire .cursor directory into your project root:
cp -r .cursor /path/to/your/project/
Step 4: Configure MCP Server
The MCP server allows AI to automatically fetch your project's latest schema. To configure in Cursor:
- Open Cursor Settings (⌘ + , on macOS, Ctrl + , on Windows)
- Search for "MCP" or navigate to Features → Model Context Protocol
- Click "Edit Config" or "Add MCP Server"
- Add the Momen MCP server configuration:
{
"mcpServers": {
"momen": {
"command": "npx",
"args": [
"-y",
"momen-mcp@latest"
]
}
}
}
Alternative: You can also manually edit the MCP config file:
- macOS:
~/Library/Application Support/Cursor/User/globalStorage/mcp-config.json - Windows:
%APPDATA%\Cursor\User\globalStorage\mcp-config.json
Note: The MCP server integration enhances AI's ability to understand your Momen project schema but is optional. The core Cursor rules work without it.
Step 5: Vibe the Frontend
Open your project in Cursor and provide AI with your Momen credentials to start building. Use prompts like:
Initial Setup:
My Momen project is: my-ecommerce-app (or exId: abc123xyz)
Build an ecommerce website based on the Momen project's backend structure.
Use username authentication.
+ Other misc requirements
e.g. Use Stripe publishable key: pk_test_51RQRPTCO2XREqHNZr8Vz0T1CNciMnXCM4I2qxb3ZYOi4GTHtbPnW8OJxGM9GR9L67jEngDUoBTMWOdr9W2AzMoKa00AzoEc7qr
The AI will use your credentials to authenticate, fetch your project schema, and generate production-ready code that perfectly matches your Momen backend structure!
🏗️ What is Momen?
Momen is a next-generation full-stack no-code platform with a powerful backend designed for headless use. While Momen provides a visual editor for building complete applications, its backend can be used independently as a Backend-as-a-Service (BaaS) for custom frontend development.
Why Use Momen as BaaS?
✅ Enterprise-Grade PostgreSQL - Powerful relational database with full ACID compliance
✅ Auto-Generated GraphQL API - Your data model automatically becomes a type-safe GraphQL schema
✅ Built-in Backend Logic - Actionflows for complex workflows without writing backend code
✅ Native AI Integration - Built-in AI agents with RAG, tool use, and structured output
✅ Third-party API Relay - Import OpenAPI specs, use as backend relay with authentication
✅ Stripe Integration - Native payment processing for subscriptions and one-time charges
✅ File Storage - Image and binary asset management with CDN
✅ Authentication - Built-in user management with JWT tokens
✅ Real-time Subscriptions - WebSocket support via GraphQL subscriptions
✅ Predictable Pricing - Project-based pricing, no per-request charges
🎓 What are Cursor Rules?
Cursor Rules (.cursor/rules/*.mdc files) are specialized instructions that teach AI assistants about your project's architecture, APIs, and best practices. They enable AI to:
🎓 What are Cursor Rules?
Cursor Rules (.cursor/rules/*.mdc files) are specialized instructions that teach AI assistants about your project's architecture, APIs, and best practices. They enable AI to:
- Generate accurate code without extensive prompting
- Understand complex backend architectures
- Follow best practices automatically
- Produce production-ready code on first attempt
Why MDC Format?
The .mdc (Markdown with frontmatter) format includes metadata that helps AI understand when and how to apply rules:
---
description: Brief description of the rule
alwaysApply: true # or false for contextual rules
---
# Rule content in markdown...
📚 Detailed Rule Documentation
1. momen-backend-architecture.mdc
Purpose: Core architecture understanding - always applied
Teaches AI:
- GraphQL API endpoints (HTTP & WebSocket)
- Apollo Client + subscriptions-transport-ws setup
- Authentication token handling
- Project structure and conventions
Key Concepts:
// HTTP endpoint
https://villa.momen.app/zero/{projectExId}/api/graphql-v2
// WebSocket endpoint
wss://villa.momen.app/zero/{projectExId}/api/graphql-subscription
2. momen-database-gql-api-rules.mdc
Purpose: Database operations via auto-generated GraphQL schema
Teaches AI:
- How database tables map to GraphQL types
- Query patterns for fetching data
- Mutation patterns for CRUD operations
- Relationship handling (1:1, 1:N, N:N)
- Filter, sort, and pagination syntax
Example AI can generate:
query GetPostsWithAuthors($limit: Int) {
post(limit: $limit, order_by: {created_at: desc}) {
id
title
content
author { # Relationship automatically handled
id
name
email
}
}
}
3. momen-actionflow-gql-api-rules.mdc
Purpose: Execute complex backend workflows
Teaches AI:
- Sync vs async actionflows
- Invoking actionflows via GraphQL
- Handling actionflow arguments and return values
- Polling for async actionflow completion
- Error handling and retries
Use Cases:
- Multi-step business logic
- Long-running operations (LLM API calls)
- Database transactions with rollback
- Email sending, notifications
- Complex data transformations
4. momen-tpa-gql-api-rules.mdc
Purpose: Third-party API integration
Teaches AI:
- Using imported OpenAPI definitions
- Backend acts as authenticated relay
- No CORS issues
- Secure credential management
Benefits:
- Keep API keys server-side
- Centralized error handling
- Request/response logging
- Rate limiting control
5. momen-ai-agent-gql-api-rules.mdc
Purpose: Leverage built-in AI capabilities
Teaches AI:
- Creating and managing AI agents
- RAG (Retrieval Augmented Generation)
- Tool use / function calling
- Multi-modal input (text, images, audio)
- Structured JSON output
- Streaming responses
Example AI Agent Features:
- Document Q&A with vector search
- Image analysis and generation
- Automated decision making
- Data extraction from unstructured text
6. momen-stripe-payment-rules.mdc
Purpose: Payment processing integration
Teaches AI:
- One-time payment flows
- Subscription management
- Webhook handling for payment events
- Order creation and status tracking
- Stripe checkout UI integration
Supported Operations:
- Create payment intents
- Handle 3D Secure authentication
- Manage subscriptions (create, upgrade, cancel)
- Process refunds
- Handle payment failures
7. momen-binary-asset-upload-rules.mdc
Purpose: File and image management
Teaches AI:
- Direct file uploads to Momen storage
- Image optimization and transformation
- CDN URL generation
- File metadata management
- Access control for assets
Supported File Types:
- Images (JPG, PNG, GIF, WebP)
- Documents (PDF, DOCX, XLSX)
- Videos (MP4, WebM)
- Audio files
- General binary data
Generated Files:
.momen-mcp/
├── credentials.json
└── config.json
💡 Usage Examples
Example 1: Building a Blog with AI Assistant
You: "Create a Next.js blog based on the Momen project's backend whose exId is abc91xyY"
🛠️ Advanced Workflows
Combining Multiple Rules
The rules work together intelligently. For example:
You: "Build a social media post creation flow with image upload and Stripe payment for premium features"
AI will use:
momen-backend-architecture.mdc→ Set up Apollo Clientmomen-database-gql-api-rules.mdc→ Create post mutationmomen-binary-asset-upload-rules.mdc→ Handle image uploadmomen-actionflow-gql-api-rules.mdc→ Multi-step post creation workflowmomen-stripe-payment-rules.mdc→ Premium feature paywallmomen-ai-agent-gql-api-rules.mdc→ AI-powered content moderation
🎯 Best Practices
1. Rule Selection
Rules have alwaysApply metadata:
- true: AI always considers this rule (e.g., architecture)
- false: AI applies contextually when relevant
2. Keep Schema Updated
Use MCP server to refresh schema whenever your Momen project structure changes:
You: "Refresh my Momen project's schema"
AI: Fetches project's latest schema into context
3. Leverage Actionflows for Complex Logic
Don't try to implement multi-step business logic in frontend:
❌ Don't:
// Frontend doing too much
const createOrderWithInventoryCheck = async () => {
const inventory = await checkInventory(productId);
if (inventory > 0) {
const order = await createOrder(...);
await reduceInventory(productId);
await sendEmail(...);
}
};
✅ Do:
// Let backend actionflow handle it
const createOrder = async () => {
awa
Truncated for display — read the full file on GitHub.
Related Skills
career-ops
72.3kOpen-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)
ai-job-search
43.5kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.6kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
guizang-ppt-skill
26.7kAI-agent Skill for generating polished HTML slide decks: editorial magazine and Swiss layouts, image prompts, social covers, and a WebGL/low-power presentation runtime.
Security Score
Audited on Apr 4, 2026
