auto-component
v1.0.4
Published
A tool to streamline UI element creation in React projects by utilizing AI prompted generation
Downloads
21
Readme
auto-component
A tool to streamline UI element creation in React projects through AI prompted generation
Technologies Used
| Category | Technologies | |---------------------|----------------------------------------------------------------------------------------| | Frontend | React - JavaScript | | Backend | Mongoose - Express - Node.js | | Dependencies | Babel - JSXParser - js-beautify |
Dependency Uses
Babel - Transpile JSX to JS for publishing JSXParser - Dynamically render generated code js-beautify - Format JSX/HTML for UI display
Installation
Install auto-component
as a development dependency within your project:
npm install -D auto-component
Usage
- Import
AutoComponent
in the file where you're building the new component:
import AutoComponent from 'auto-component';
- Add the component to your code where you want it to be rendered:
<AutoComponent />
Getting Started
- View your page to see the auto-component tool at the bottom, indicating where it will render your code:
- Start building by telling
auto-component
what you want and clicking "Generate." The result will be rendered on the page. You can view the "Request" or "Response" tabs to inspect what is being sent to the AI and what was returned:
Making Changes
- Ask
auto-component
to make changes to the code it provided, and see the changes rendered on the page:
Copying Your Code
- When satisfied with the response, click on the "Response" tab underneath the input. Copy the code from the AI to use it in your codebase:
Start a New Session
- Click the red X button to start a new session.
Planned Features
User Features
Personal Page:
- Allow users to create a personal page to store and manage their created components.
- Efficiently reuse and keep track of components.
Save and Manage Code:
- Provide a "Save" button to store the returned code from the AI.
- Users can easily manage their components within their user page.
Position Customization:
- Allow users to shift the position of the request/code box around the screen.
- Ensure it doesn't obscure anything in their project.
Developer Features
Code Integration Walkthrough:
- Include an optional walkthrough of code integration.
- Help developers understand how to implement generated components into their projects.
Code Editing in the Browser:
- Enable developers to edit displayed code directly in the browser.
- Allow quick adjustments without leaving the platform.
Access Saved Components:
- Provide developers with the ability to access their saved components directly from the AutoComponent component.
Multiple AutoComponent Instances:
- Notify developers if there is more than one
<AutoComponent />
creation component added to the project. - Prevent potential functionality issues that may arise from multiple instances.
- Notify developers if there is more than one
Multiple Components with Single Request Box:
- Allow developers to add multiple components to the page.
- Provide an easy way to switch between them using a single request box.
License
This project is licensed under the AGPL 3.0 License - see the LICENSE file for details. View license at GNU.org