Coder Social home page Coder Social logo

cameronking4 / nextjs-ai-page-generator Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 4.0 12.96 MB

⚡️Design, generate, iterate and live preview Nextjs pages with 🤖 GPT! Watch AI code right in front of you and bring UI to life using chat as if you're making these updates yourself. Copy and paste Next pages into your main repo or extend AI generated pages into codesandboxes.

Home Page: https://nextjs-page-generator.vercel.app/

License: Apache License 2.0

JavaScript 0.79% Shell 0.58% TypeScript 97.07% CSS 1.56%
ai app-builder chatgpt code-generation gpt-4 nextjs sandpack gpt-react-designer

nextjs-ai-page-generator's Introduction

Nextjs Page Generator

Inspired by project ChatGPT powered React Code Generator which already allows you to specify what kind of React component you want to build and directly get the code and a live preview. With Nextjs Page Generator you can easily craft UI for pages in your Nextjs project. Use chat to continue your UI as if you're coding it. Engineers can use it to draft up several pages to copy as pages into your main code base. If starting from scratch, you can export the preview to CodeSandbox, where you can develop within a devbox or initiate a Github Repo. The code generated by Nextjs Page Generator is styled with TailwindCSS or plain inline CSS.

Screenshot 2024-03-02 165534

Goals

The goal of this project is to have a playground for frontend developers to quickly generate and tweak and export AI generated UI. In the current state it supports TailwindCSS and plain inline CSS but this could easily be extended with prompting.

Future investments includes:

  • Support for other styling frameworks (Shadcn imports TSX & Stackblitz)
  • Auto-save and deploy projects to Vercel or Netlify
  • Provide context to an existing project that needs to be extended

Getting Started

Install dependencies with yarn, npm or pnpm.

Set your OpenAI key by running the setup script ./setup.sh. Or by editing .env.local if you're running this code locally.

Then run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev

Open http://localhost:3000 with your browser to see the result.

Demos

For example, this page was generated with a single a prompt and included the axios request setup: Screenshot 2024-03-02 004705

screenrun-02-27-2024-16-20-25.mp4
screenrun-03-02-2024-18-22-16.mp4
screenrun-02-27-2024-16-44-02.mp4

nextjs-ai-page-generator's People

Contributors

cameronking4 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

osmanity

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.