AI prompts
base on Open Source Lovable <p align="center">
<img src="icon.png" alt="description" width="75">
</p>
# Adorable
Open-source version of **Lovable** - an AI agent that can make websites and apps through a chat interface.
For guidance on building app builders with AI, see the [Freestyle guide on Building an App Builder](https://docs.freestyle.sh/guides/app-builder).
## Features
- 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
## Setup Instructions
### Dependencies
- Node.js
- PostgreSQL database ([Neon](https://neon.tech) is easy and has a good free tier)
- Redis (for caching and session management)
- Anthropic API key
- Freestyle API key
- Morph API key (optional)
### Installation
1. Clone the repository:
```bash
git clone https://github.com/freestyle-sh/adorable
cd adorable
```
2. Install dependencies:
```bash
npm install
```
3. Get a Freestyle API key
Head to [our API keys page](https://admin.freestyle.sh/dashboard/api-tokens) to get yours. We're totally free to use right now!
4. 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
```
5. Initialize the database:
```bash
npx drizzle-kit push
```
6. Set up Redis
The easiest way to run Redis locally is with Docker:
```bash
docker run --name adorable-redis -p 6379:6379 -d redis
```
This will start a Redis server on port 6379. If you already have Redis running, you can skip this step.
Add the following to your `.env` file (if not already present):
```env
REDIS_URL=redis://localhost:6379
```
6. Set up [Stack Auth](https://stack-auth.com)
Go to the [Stack Auth dashboard](https://app.stack-auth.com) 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:
```env
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>
```
7. Add a Preview Domain (optional)
Go to the [Freestyle dashboard](https://admin.freestyle.sh/dashboard/domains) and verify a new domain. Then follow the [DNS Instructions](https://docs.freestyle.sh/web/deploy-to-custom-domain) to point your domain to Freestyle.
Finally, add the following environment variable to your `.env` file:
```env
PREVIEW_DOMAIN=<your-domain> # formatted like adorable.app
```
8. Add Morph for Fast Apply (optional)
Get a Morph API key from [morphllm.com](https://morphllm.com) and add it to your `.env` file to enable the fast edit tool:
```env
MORPH_API_KEY=<your-morph-api-key>
```
This automatically enables the Morph fast edit tool which provides faster code modifications.
9. Run the development server:
```bash
npm run dev
```
10. Open [http://localhost:3000](http://localhost:3000) in your browser.
## Developer Documentation
- [Forking Guide](./docs/forking.md) - Comprehensive guide for developers working with this codebase
## Deployment
For production deployment:
```bash
npm run build
npm run start
```
Or use the included deployment script:
```bash
./deploy.sh
```
", Assign "at most 3 tags" to the expected json: {"id":"14547","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"