Full stack application codegen platform.
Aileen is a vibe-coding/code-generation platform that builds Next.js applications with Neon databases based on natural language prompts.
Each Aileen project is a standalone, version-controlled Next.js application with its own Neon database that is fully developed and managed by the Aileen agent.
You can find a detailed blog post about Aileen here.
- Creates projects with automated database, authentication, and development server setup
- Manages project versions with database snapshots and version control
- Provides an AI chat interface for collaborative development
- Orchestrates complex initialization workflows using Vercel Workflows
- Tracks and manages environment secrets per project version
The platform is a Next.js app hosted on Vercel. The Workflow Development Kit is used for background tasks. Bun is used as the TypeScript runtime and package manager.
The following services and infra providers are used to build the platform:
- Neon - Serverless Postgres database for storing users, projects, project versions, and project secrets
- Neon Auth - Platform user authentication powered by Stack Auth
- Assistant UI - AI chat interface with conversation persistence
- Mastra - AI agents framework & hosting
- Vercel - Platform hosting provider (Next.js hosting & background tasks)
Each codegen project is initialized using an opinionated starter template w/ Next.js, Drizzle ORM, Neon Postgres, Neon Auth, and Shadcn/ui pre-configured. This helps the agent focus on feature development rather than infrastructure setup. You can find the starter template here: github.com/andrelandgraf/neon-freestyle-template.
Each created project includes the following provisioned resources/services:
- Neon Database - Dedicated Postgres instance
- Neon Auth - Authentication configured by default, dev server domain allowlisted through Neon Auth API
- Freestyle - Development server (sandbox) and git repository
Follow these steps to run Aileen locally:
Before starting, you must create accounts with the following services and obtain the required API credentials. Refer to .env.example for the required environment variables.
Services:
- Assistant UI
- Create an Assistant UI account and project
- Freestyle
- Create a Freestyle account and project
- Neon
- Create a Neon account and project
- Initialize Neon Auth and obtain the Neon Auth credentials
- Create an organization API key to manage codegen project databases
- Anthropic
- Obtain a Claude API key (Haiku 4.5 is used by default)
Copy the example environment file and fill in your API keys from the services above:
cp example.env .envAll required environment variables are documented in example.env.
bun installUse Drizzle ORM to initialize the platform database:
bun run db:migrateAileen runs on two separate servers in development. The Mastra server must be running concurrently for code-generation capabilities.
Run the web server:
bun run devRun the Mastra agent server:
bun run mastra:devYour application will be available at http://localhost:3000.
Aileen requires deployment to two separate cloud platforms:
Deploy the Mastra agent to Mastra Cloud for production agent execution. Add all required environment variables to your Mastra Cloud project configuration.
Deploy the Next.js application to Vercel. Ensure all environment variables from your .env file are added to the Vercel project environment settings.
For complete deployment instructions, refer to the official documentation for Mastra Cloud and Vercel.
In production, you likely want to have two separate Neon organizations:
- Company Organization - Hosts the Aileen platform database (users, projects, versions, secrets)
- Multi-Tenant Agent Organization - Hosts all agent-managed codegen application databases
This separation provides better resource isolation, cost tracking, and management of the agent-created databases. For detailed information about scaling agent platforms on Neon, see Neon for AI Agent Platforms.