ContentGen is a React application built using Next.js that uses PromptChainer's API to generate an article and more content based on user input. This powerful tool is perfect for generating articles using AI and you can create it in a matter of minutes!
Read more in our Blog Post.
- React.js & Next.js application.
- Integration with the PromptChain API.
- Dynamic rendering of the generated output.
- Adaptive textarea input for keywords.
- Loading state with randomized sentences.
To get a local copy up and running follow these simple steps.
- Node.js installed (>= 14.x)
- NPM or Yarn as package manager
- An API key from PromptChain - in this Beta version it's on us :) Don't worry about it
- Clone the repository:
git clone https://github.com/PromptChainer/showcase-article-gen
Install NPM packages:
npm install
Or if you are using Yarn:
yarn
Copy the .env.example file and create a .env file in the root of the project. Add your PromptChain API key to the .env file:
NEXT_PUBLIC_API_KEY=your_api_key_here
If you want to add Google Analytics, add your measurment ID to the .env file:
NEXT_PUBLIC_GA_TRACKING_ID=your_google_analytics_measurment_id_here
Start the development server:
npm run dev
Or if you are using Yarn:
yarn dev
Open http://localhost:3000 with your browser to see the result.
After you've started the application, you will find four text inputs:
- Subject: The main topic of the article.
- Keywords: Important words that should be included in the article.
- Target Audience: The primary readers or viewers that the article will be targeting.
- Personal Notes: Any additional instructions or guidelines for the content.
After filling in the desired fields, click on the 'Generate' button and the marvelous content will be created and displayed on the right side of the application.
The React components written:
- Textarea: This is a dynamic textarea component. It resizes based on input, handles placeholder, value, onChange events, and provides optional rows and columns properties.
Pull requests, suggestions and improvemnts are welcome!
Distributed under the MIT License. See LICENSE for more information.
Email: [email protected]