Skip to content

AI-powered application builder built with Next.js 16 that lets you create apps and websites by chatting with AI.

License

Notifications You must be signed in to change notification settings

sanidhyy/lovable-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

125 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

AI-powered application builder built with Next.js 16

AI-powered application builder built with Next.js 16

Ask Me Anything! GitHub license Maintenance GitHub branches Github commits GitHub issues GitHub pull requests Vercel status

πŸ“” Table of Contents

‼️ Folder Structure

Here is the folder structure of this app.

lovable-clone/
  |- prisma/
    |-- migrations/
    |-- schema.prisma
  |- public/
    |-- github.svg
    |-- logo.svg
    |-- web-app-manifest-192x192.png
    |-- web-app-manifest-512x512.png
  |- sandbox-templates/
  |- src/
    |-- app/
        |--- (home)/
          |---- pricing/
          |---- sign-in/
          |---- sign-up/
          |---- layout.tsx
          |---- page.tsx
        |--- api/
          |---- cron/
          |---- inngest/
          |---- trpc/
        |--- projects/
          |---- [projectId]/
        |--- apple-icon.png
        |--- favicon.ico
        |--- global-error.tsx
        |--- globals.css
        |--- icon0.svg
        |--- icon1.png
        |--- layout.tsx
        |--- manifest.json
        |--- not-found.tsx
    |-- components/
        |--- code-view/
        |--- providers/
        |--- ui/
        |--- error-state.tsx
        |--- file-explorer.tsx
        |--- hint.tsx
        |--- loading-state.tsx
        |--- responsive-dialog.tsx
        |--- theme-toggle.tsx
        |--- tree-view.tsx
        |--- user-control.tsx
    |-- config/
        |--- http-status-codes.ts
        |--- index.ts
    |-- constants/
        |--- index.ts
    |-- db/
        |--- index.ts
        |--- schema.ts
    |-- env/
        |--- client.ts
        |--- server.ts
    |-- generated/
    |-- hooks/
        |--- use-confirm.tsx
        |--- use-mobile.ts
        |--- use-scroll.ts
    |-- inngest/
        |--- client.ts
        |--- functions.ts
        |--- utils.ts
    |-- lib/
        |--- db.ts
        |--- encryption.ts
        |--- utils.ts
    |-- modules
        |--- auth/
        |--- home/
        |--- messages/
        |--- pricing/
        |--- settings/
        |--- usage/
    |-- trpc/
        |--- routers/
        |--- client.tsx
        |--- init.ts
        |--- query-client.ts
        |--- server.tsx
    |-- types/
        |--- index.ts
    |-- proxy.ts
  |- .env.example
  |- .env.local
  |- .gitignore
  |- .prettierignore
  |- .prettierrc.mjs
  |- components.json
  |- environment.d.ts
  |- eslint.config.mjs
  |- next.config.ts
  |- package.json
  |- pnpm-lock.yaml
  |- pnpm-workspace.yaml
  |- postcss.config.mjs
  |- prisma.config.ts
  |- README.md
  |- tsconfig.json
  |- vercel.json

🧰 Getting Started

  1. Make sure Git and NodeJS is installed.
  2. Clone this repository to your local computer.
  3. Create .env.local file in root directory.
  4. Contents of .env.local:
# disable telemetry
DO_NOT_TRACK="1"
NEXT_TELEMETRY_DISABLED="1"

# app base url
NEXT_PUBLIC_APP_BASE_URL="http://localhost:3000"

# neon db uri
DATABASE_URL="postgresql://<username>:<password>@<hostname>/Vibe?sslmode=require&channel_binding=require"

# e2b api key
E2B_API_KEY="e2b_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# clerk api keys
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
CLERK_SECRET_KEY="sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

# clerk redirect urls
NEXT_PUBLIC_CLERK_SIGN_IN_URL="/sign-in"
NEXT_PUBLIC_CLERK_SIGN_UP_URL="/sign-up"
NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL="/"
NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL="/"

# verification secret and cron secret (generated by `openssl rand -hex 32`)
VERIFICATION_SECRET="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
CRON_SECRET="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

5. Disable Telemetry (Optional)

DO_NOT_TRACK=1
NEXT_TELEMETRY_DISABLED=1
  • These disable analytics/telemetry from Next.js and other packages. Keep them as provided.

6. App Base URL

NEXT_PUBLIC_APP_BASE_URL="http://localhost:3000"
  • Keep as http://localhost:3000 during development.
  • Change to your deployed URL (e.g., https://clone-vibe.vercel.app) in production.

7. Neon (PostgreSQL Database)

  • Sign up at Neon.
  • Create a new PostgreSQL project.
  • Go to Connection Details and copy the Connection String.
  • Replace <username>, <password>, and <hostname> with your Neon credentials.
  • Append ?sslmode=require at the end (needed for secure connections).

8. Clerk (Authentication)

  • Go to Clerk Dashboard.
  • Create a new application.
  • Navigate to API Keys:
    • Copy Publishable Key β†’ NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
    • Copy Secret Key β†’ CLERK_SECRET_KEY
  • Redirect URLs: Keep as provided unless you modify authentication routes.

9. E2B (Sandbox)

  • Install Docker Desktop.
  • Go to E2B Dashboard.
  • Sign up for a new account and go to API Keys page.
  • Create a new key and copy the API key β†’ E2B_API_KEY.
  • Open terminal and run npm i -g @e2b/cli to install the E2B CLI.
  • Login to E2B CLI using e2b auth login.
  • Change the working directory using cd ./sandbox-templates/nextjs
  • Run e2b template build --name <template-name> --cmd "./compile_page.sh" to create a new sandbox. Make sure the template name is unique and not already taken.
  • Also pass the template name to the SANDBOX_TEMPLATE_NAME constant in the /src/constants/index.ts file.

10. Generate Secrets

  • Generate verification secret and cron secret (for cryptographic signing):

    openssl rand -hex 32

    Copy the output β†’ VERIFICATION_SECRET and CRON_SECRET separately


  1. Install Project Dependencies using pnpm install --legacy-peer-deps or npm install --legacy-peer-deps.

  2. Now app is fully configured πŸ‘ and you can start using this app using either one of pnpm run dev or npm run dev.

NOTE: Please make sure to keep your API keys and configuration values secure and do not expose them publicly.

πŸ“· Screenshots

Modern UI/UX

Demo and Code view

Subscriptions powered by Clerk

βš™οΈ Tech Stack

React JS Next JS Typescript PostgreSQL Prisma Tailwind CSS Vercel

πŸ”§ Stats

Stats for Vibe

πŸ™Œ Contribute

You might encounter some bugs while using this app. You are more than welcome to contribute. Just submit changes via pull request and I will review them before merging. Make sure you follow community guidelines.

πŸ’Ž Acknowledgements

Useful resources and dependencies that are used in Vibe.

β˜• Buy Me a Coffee

πŸš€ Follow Me

Follow Me Tweet about this project Subscribe to my YouTube Channel

πŸ“š Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

πŸ“ƒ Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out Next.js deployment documentation for more details.

⭐ Give A Star

You can also give this repository a star to show more people and they can use this repository.

🌟 Star History

Star History Chart

(back to top)

About

AI-powered application builder built with Next.js 16 that lets you create apps and websites by chatting with AI.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks