Lovable Clone

A Bolt.ai-like clone: an AI-powered backend for chat, automation, and integrations.

Features

  • Chat with AI models (OpenAI, etc.)
  • User authentication and management
  • API endpoints for chat, history, and user data
  • Modular backend for easy extension
  • Secure and scalable architecture

Getting Started

Prerequisites

  • Node.js (v16+)
  • npm or yarn
  • MongoDB (or your preferred database)

Installation

git clone https://github.com/kishansinghifs1/lovable-clone.git
cd lovable-clone
npm install

Configuration

  1. Copy .env.example to .env and fill in your API keys and database URIs.
  2. Example:
    Anthropoic=your-anthropic-key
    MONGODB_URI=your-mongodb-uri
    JWT_SECRET=your-secret
    

Running the Server

npm run dev

Server runs at http://localhost:3000.

API Endpoints

Method Endpoint Description
POST /api/chat Send a message to the AI
GET /api/history Get user chat history
POST /api/auth/login User login
POST /api/auth/signup User registration

Project Structure

/src
  /defaults
  constants.ts
  index.ts
  prompt.ts
  stripindents.ts