Open-source version of Lovable - an AI agent that can make websites and apps through a chat interface.
- Chat interface for interacting with AI code assistants
- Patch-based code editing with user approval
- Git integration for version control
- Preview capabilities for code changes
- Node.js
- PostgreSQL database (Neon is easy and has a good free tier)
- Anthropic API key
- Freestyle API key
-
Clone the repository:
git clone https://github.com/freestyle-sh/adorable cd adorable
-
Install dependencies:
npm install
-
Get a Freestyle API key
Head to our API keys page to get yours. We're totally free to use right now!
-
Set up environment variables: Create a
.env
file in the root directory with the following variables:# Database DATABASE_URL=postgresql://username:password@localhost:5432/adorable # Anthropic API ANTHROPIC_API_KEY=your_anthropic_api_key # Freestyle API FREESTYLE_API_KEY=your_freestyle_api_key
-
Initialize the database:
npx drizzle-kit push
-
Set up Stack Auth
Go to the Stack Auth dashboard and create a new application. In Configuration > Domains, enable Allow all localhost callbacks for development
to be able to sign in locally.
You'll need to add the following environment variables to your .env
file:
NEXT_PUBLIC_STACK_PROJECT_ID=<your-project-id>
NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY=<your-publishable-client-key>
STACK_SECRET_SERVER_KEY=<your-secret-server-key>
- Add a Preview Domain (optional)
Go to the Freestyle dashboard and verify a new domain. Then follow the DNS Instructions to point your domain to Freestyle.
Finally, add the following environment variable to your .env
file:
PREVIEW_DOMAIN=<your-domain> # formatted like adorable.app
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
For production deployment:
npm run build
npm run start
Or use the included deployment script:
./deploy.sh