Skip to content

Code generation working. Need to figure out e2b #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

juancastano
Copy link
Contributor

@juancastano juancastano commented May 16, 2025

TL;DR

Implement AI-powered UI component generation with OpenAI, Benchify code repair, and E2B preview functionality.

What changed?

  • Added environment configuration with .env.example and updated .gitignore
  • Created API endpoint for component generation at /api/generate/route.ts
  • Implemented core libraries for AI integration:
    • openai.ts for generating Vue components using OpenAI
    • benchify.ts for repairing generated code
    • e2b.ts for creating live component previews
  • Added UI components using shadcn/ui including forms, buttons, cards, etc.
  • Created a prompt form component for user input
  • Updated the homepage with a clean UI for the component generator
  • Added necessary dependencies in package.json
  • Enhanced styling with Tailwind CSS configuration

How to test?

  1. Copy .env.example to .env and add your API keys
  2. Run npm install to install dependencies
  3. Start the development server with npm run dev
  4. Navigate to the homepage and enter a component description
  5. Submit the form to generate a Vue component
  6. View the generated code and preview (if available)

Why make this change?

This implementation creates a complete UI component generation system that leverages AI to:

  1. Generate Vue components based on natural language descriptions
  2. Automatically repair code issues using Benchify
  3. Provide instant previews of generated components using E2B sandboxes

This streamlines the component creation workflow, allowing developers to quickly prototype UI components without writing code from scratch.

Copy link
Contributor Author

juancastano commented May 19, 2025

Merge activity

  • May 19, 6:16 AM EDT: A user started a stack merge that includes this pull request via Graphite.
  • May 19, 6:16 AM EDT: @juancastano merged this pull request with Graphite.

@juancastano juancastano merged commit ee53480 into main May 19, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant