Thanks to visit codestin.com
Credit goes to github.com

Skip to content

andrelandgraf/aileen

Repository files navigation

Aileen - AI Code Generation Platform

Full stack application codegen platform.

About

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.

Key Features

  • 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

Platform Setup

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)

Per-Project Setup

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

Getting Started

Follow these steps to run Aileen locally:

Prerequisites

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)

Environment Variables

Copy the example environment file and fill in your API keys from the services above:

cp example.env .env

All required environment variables are documented in example.env.

Installation

bun install

Initialize Database

Use Drizzle ORM to initialize the platform database:

bun run db:migrate

Development

Aileen runs on two separate servers in development. The Mastra server must be running concurrently for code-generation capabilities.

Run the web server:

bun run dev

Run the Mastra agent server:

bun run mastra:dev

Your application will be available at http://localhost:3000.

Deployment

Aileen requires deployment to two separate cloud platforms:

Mastra Cloud (Agent Deployment)

Deploy the Mastra agent to Mastra Cloud for production agent execution. Add all required environment variables to your Mastra Cloud project configuration.

Vercel (Next.js Deployment)

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.

Aileen in Production

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.

About

Open source codegen platform provisioning apps with Neon databases

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published