Skip to content

0xmetaschool/css-generator-gpt

Repository files navigation

CSSGeneratorGPT

CSSGeneratorGPT is the perfect tool for developers and designers who want to bring their raw HTML to life. With just a few clicks, this AI-powered template takes your plain HTML and styles it beautifully, so you don’t have to spend hours coding CSS from scratch or hunting for design ideas.

It is built with Next.js and OpenAI API. Whether you're building something new or want to make your website prettier, this template turns your basic website into something that looks amazing.

Live Demo

https://css-generator-gpt.vercel.app/

Features

  • Provide raw HTML to produce CSS
  • Add custom commands to generate CSS according to UI preference
  • Live preview to view the CSS suggestions
  • Redesign the generated CSS using prompts

Technologies Used

  • Next.js for Frontend -Tailwind CSS and Chakra UI for UI
  • OpenAI API Key for AI-Powered Features

Use Cases

  • Transform raw HTML into responsive designs with AI-generated CSS.
  • Customize styling options and receive instant visual feedback on your code.
  • Suitable for prototyping, refining applications, and exploring CSS styling techniques.

Installation Steps

  1. Clone the repository:
https://github.com/0xmetaschool/css-generator-gpt.git
  1. Navigate to the project directory:
cd css-generator-gpt
  1. Install dependencies:
npm install
  1. Set up environment variables:

Create an .env file in the root directory and add the following variables:

OPENAI_API_KEY=your_openai_api_key
  1. Run the development server:
npm run dev

Open your browser and navigate to http://localhost:3000.

Screenshots

CSSGeneratorGPT Template Add HTML screenshot

CSSGeneratorGPT Template Generated CSS screenshot

CSSGeneratorGPT Template Generated CSS Preview screenshot

Contributing

We love contributions! Here's how you can help make the CSSGeneratorGPT even better:

  1. Fork the project (gh repo fork https://github.com/0xmetaschool/code-styler)
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

Please open an issue in the GitHub repository for any queries or support.