A Lowdefy application starter template designed for AI-assisted development with AI Agents and the Lowdefy MCP server.
This starter template demonstrates how AI can accelerate Lowdefy application development by providing:
- Real-time schema validation through MCP server integration
- Intelligent component suggestions based on Lowdefy best practices
- Automated code generation with proper YAML structure
- Pattern-based development following established conventions
- Companies Management: CRUD operations with data tables and forms
- Contact Management: Relationship handling with company associations
- User Administration: Authentication, profiles, and role management
- AI Integration: Comprehensive MCP server integration for development assistance
This starter template showcases how AI can accelerate Lowdefy application development through:
- AI Agents Integration: Intelligent code generation and suggestions
- Lowdefy MCP Server: Real-time schema access and validation
- Smart Component Selection: AI-powered block and action recommendations
- Pattern Recognition: Automated application of best practices
Tip: Before starting an AI-assisted session, prime the LLM with
AGENTS-PROMPT.md(see the "Example Use Cases" section below for details).
-
MongoDB Setup
- Sign up for a free MongoDB Atlas cluster at https://www.mongodb.com/cloud/atlas/register
- Create a new project and build a free shared cluster
- Under "Security > Database Access", create a new database user with read/write access
- Go to "Network Access" and add your IP address (or 0.0.0.0/0 for development)
- In the "Database" section, click "Connect" and choose "Connect your application"
- Copy the connection string (it will look like
mongodb+srv://<username>:<password>@cluster0.xxxxx.mongodb.net/)
-
Email Service Setup
Choose one of the suggested options below or any of the supported providers.
Option 1: Mailgun
- Sign up for a free Mailgun account at https://signup.mailgun.com/
- Verify your domain or use the sandbox domain for testing
- Go to "Sending > Domain Settings" and find your SMTP credentials
- Copy your SMTP username and password
- Add your email as an authorized recipient
Option 2: SendGrid
- Sign up for a free SendGrid account at https://signup.sendgrid.com/
- Verify your sender identity (Single Sender Verification for testing)
- Go to "Settings > API Keys" and create a new API key with "Full Access"
- Copy the API key
-
Create Environment File
Create a
.envfile in theapp/folder with the following variables:# NextAuth NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-nextauth-secret-here # MongoDB LOWDEFY_SECRET_MONGODB_URI=mongodb+srv://<username>:<password>@cluster0.xxxxx.mongodb.net/lowdefy-vibe-code-starter?retryWrites=true&w=majority # Sender email [email protected] # Choose one email provider configuration: # For Mailgun [email protected] LOWDEFY_SECRET_MAILGUN_SMTP_PASSWORD=your-mailgun-smtp-password # OR for SendGrid LOWDEFY_SECRET_SENDGRID_API_KEY=SG.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Generate NextAuth Secret:
# Generate a secure random secret
openssl rand -base64 32Or use Node.js:
node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"# Change to the app directory
cd app
# Install dependencies
pnpm install
# Start development server
pnpm lowdefy:devThe Lowdefy MCP server enables AI-assisted development through schema access and validation.
-
Start the Lowdefy development server:
pnpm lowdefy:dev(runs on localhost:3000) -
Configure Windsurf MCP settings in your
mcp_config.json:{ "mcpServers": { "lowdefy": { "serverUrl": "http://localhost:3000/api/ai/mcp" } } } -
Restart Windsurf to load the MCP server configuration
-
The AI assistant will now have access to Lowdefy schemas and can provide:
- Real-time component validation
- Intelligent code suggestions
- Schema-based error prevention
- Context-aware development assistance
list_blocks- Get all available Lowdefy blocksget_block- Get detailed schema for specific blockslist_actions- Get all available Lowdefy actionsget_action- Get detailed schema for specific actionslist_connections- Get all available connection typesget_connection- Get detailed schema for connectionslist_operators- Get all available operatorsget_operator- Get detailed schema for operatorslist_requests- Get requests for specific connection typesget_request- Get detailed schema for specific requestsexecute_request- Execute a request with the specified parameters
lowdefy-vibe-code-starter/
βββ .windsurf/
β βββ rules/
β βββ rules.md # Windsurf AI Agent assistance rules & conventions
βββ app/
β βββ pages/ # Application pages
β βββ connections.yaml # Database connections
β βββ lowdefy.yaml # Main app configuration
β βββ menus.yaml # Navigation structure
βββ plugins/ # Custom Lowdefy plugins
βββ context/ # Context files
β βββAGENTS-CHANGELOG.md # Agents change log
β βββAGENTS-CONTEXT.md # Agents context
β βββDATA-STRUCTURES.md # Data structures
β βββLOWDEFY-CONTEXT.md # Lowdefy context
βββ AGENTS-PROMPT.md # Initialization prompt to prime AI Agent context
βββ AGENTS.md # AI Agents assistance rules & conventions
βββ README.md
Note: This project uses
_refextensively to keep files modular and maintainable.
- Context-aware code generation
- Intelligent component suggestions
- Automated YAML configuration
- Best practice enforcement
- Real-time schema access
- Component documentation
- Validation and error prevention
- Pattern-based suggestions
Before starting a new chat with the AI Agent, open and send the contents of AGENTS-PROMPT.md to the chat to provide immediate context about this repo.
- Open
AGENTS-PROMPT.mdin the root of this project. - Start a fresh chat in Windsurf.
- Paste or reference the file contents to the assistant to prime context.
- Then proceed with other actions below.
Ask AI Agent: "Create a project management page with a data table and form"
AI Agent validates configurations against Lowdefy schemas in real-time
AI Agent suggests and applies common Lowdefy patterns automatically
Generate complete page structures with minimal input
- Describe Intent: Tell the AI Agent what you want to build
- AI Generation: AI Agent generates appropriate YAML configurations
- Schema Validation: MCP server ensures valid Lowdefy syntax
- Iterative Refinement: Collaborate with AI to perfect the implementation
@lowdefy/community-plugin-mongodbfor MongoDB connections and requests@lowdefy/community-plugin-nodemailerfor email provider integration@lowdefy/plugin-lowdefy-vibe-code-starterworkspace plugin for local integrations
This project serves as a reference for AI-assisted Lowdefy development. Contributions that showcase new AI integration patterns are welcome.